customer_view.php 825 B

1234567891011121314151617181920
  1. <?php
  2. $customer = Customer::get($id);
  3. if(!$customer) throw new Exception("Customer not found.");
  4. $page_title = $customer->name;
  5. Core::addBreadcrumb("/account", "Account");
  6. Core::addBreadcrumb("/account/customers", "Customers");
  7. Core::addBreadcrumb("/account/customers/$id", $page_title);
  8. $icons = [];
  9. $icons[] = new AccountIcon(__("Projects"), "/account/projects?customer_id={$id}", "list");
  10. $icons[] = new AccountIcon(__("Locations"), "/account/locations?customer_id={$id}", "map-marker");
  11. $icons[] = new AccountIcon(__("Reports"), "/account/reports?customer_id={$id}", "chart-pie");
  12. $icons[] = new AccountIcon(__("Templates"), "/account/templates?customer_id={$id}", "file-alt");
  13. View::includeOnce("header", compact("page_title"));
  14. View::include("customer", compact("customer", "icons"));
  15. View::includeOnce("footer");