1
0

map_overview.php 776 B

1234567891011121314151617181920212223242526272829
  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. "show_in_map_overview" => "1"
  9. ], ["sort" => "name"]);
  10. $customer_ids = array_column($customers, "id");
  11. Customer::load($customer_ids);
  12. $projects = Project::query([
  13. "customer_id" => $customer_ids,
  14. "dts_deadline" => (new Constraint("MORE_THAN_OR_EQUAL"))->setValues($today)
  15. ], [
  16. "sort" => "dts_deadline"
  17. ]);
  18. View::includeOnce("header", compact("page_title"));
  19. View::include("map_overview", compact("customers", "projects"));
  20. View::includeOnce("footer");