1
0

map_overview.php 838 B

1234567891011121314151617181920212223242526272829303132
  1. <?php /** @noinspection PhpUnhandledExceptionInspection */
  2. $page_title = "Map Overview";
  3. Core::addScript("public/js/app-map-overview.js");
  4. Core::addBreadcrumb("/account", "Account");
  5. Core::addBreadcrumb("/account/map-overview", $page_title);
  6. $today = gmdate("Y-m-d") . " 00:00:00";
  7. $customers = Customer::query([
  8. "archived" => 0,
  9. "show_in_map_overview" => "1"
  10. ], ["sort" => "name"]);
  11. $customer_ids = array_column($customers, "id");
  12. Customer::load($customer_ids);
  13. $projects = Project::query([
  14. "customer_id" => $customer_ids,
  15. "dts_deadline" => (new Constraint("MORE_THAN_OR_EQUAL"))->setValues($today)
  16. ], [
  17. "sort" => "dts_deadline"
  18. ]);
  19. $filter = http::value("filter");
  20. View::includeOnce("header", compact("page_title"));
  21. View::include("map_overview", compact("customers", "projects", "filter"));
  22. View::includeOnce("footer");