diff --git a/config/acl.yaml b/config/acl.yaml index 25e04dbc..36f0b2b3 100644 --- a/config/acl.yaml +++ b/config/acl.yaml @@ -266,6 +266,8 @@ access_keys: label: Walk-in Edit - id: jo_autoassign.test label: Autoassign Test + - id: jo_hub.view + label: Hub View - id: support label: Customer Support Access diff --git a/config/menu.yaml b/config/menu.yaml index b0096cf5..0adf524b 100644 --- a/config/menu.yaml +++ b/config/menu.yaml @@ -122,6 +122,10 @@ main_menu: acl: jo_all.list label: View All parent: joborder + - id: jo_hub_view + acl: jo_hub.view + label: Hub View + parent: joborder - id: support acl: support.menu diff --git a/config/resq.menu.yaml b/config/resq.menu.yaml index b0096cf5..69f0b806 100644 --- a/config/resq.menu.yaml +++ b/config/resq.menu.yaml @@ -122,6 +122,9 @@ main_menu: acl: jo_all.list label: View All parent: joborder + - id: jo_hub.view + label: Hub View + parent: joborder - id: support acl: support.menu diff --git a/config/routes/job_order.yaml b/config/routes/job_order.yaml index f239402d..ab505c42 100644 --- a/config/routes/job_order.yaml +++ b/config/routes/job_order.yaml @@ -235,3 +235,8 @@ jo_autoassign_test_submit: path: /job-order/autoassign controller: App\Controller\JobOrderController::autoAssignSubmit methods: [POST] + +jo_hub_view: + path: /job-order/hub-view + controller: App\Controller\JobOrderController::hubView + methods: [GET] diff --git a/src/Controller/JobOrderController.php b/src/Controller/JobOrderController.php index d8866203..bd9c67ad 100644 --- a/src/Controller/JobOrderController.php +++ b/src/Controller/JobOrderController.php @@ -1065,6 +1065,21 @@ class JobOrderController extends Controller ]); } + /** + * @Menu(selected="jo_hub_view") + */ + public function hubView(JobOrderHandlerInterface $jo_handler) + { + $this->denyAccessUnlessGranted('jo_hub.view', null, 'No access.'); + + $template = $jo_handler->getTwigTemplate('jo_hub_list'); + + $params = $jo_handler->getOtherParameters(); + $params['table_refresh_rate'] = $this->container->getParameter('job_order_refresh_interval'); + + return $this->render($template, $params); + } + /** * @Menu(selected="jo_autoassign") */ diff --git a/src/Service/JobOrderHandler/ResqJobOrderHandler.php b/src/Service/JobOrderHandler/ResqJobOrderHandler.php index 54deda2f..e8693945 100644 --- a/src/Service/JobOrderHandler/ResqJobOrderHandler.php +++ b/src/Service/JobOrderHandler/ResqJobOrderHandler.php @@ -2341,6 +2341,9 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface // get riders for dropdown $params['riders'] = $this->em->getRepository(Rider::class)->findAll(); + // get hubs for dropdown + $params['hubs'] = $this->em->getRepository(Hub::class)->findAll(); + return $params; } @@ -2509,6 +2512,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface $this->template_hash['jo_list_open'] = 'job-order/list.open.html.twig'; $this->template_hash['jo_list_all'] = 'job-order/list.all.html.twig'; $this->template_hash['jo_popup'] = 'job-order/popup.html.twig'; + $this->template_hash['jo_hub_list'] = 'job-order/list.hubview.html.twig'; } protected function checkTier($tier) diff --git a/templates/job-order/list.hubview.html.twig b/templates/job-order/list.hubview.html.twig new file mode 100644 index 00000000..c0c69003 --- /dev/null +++ b/templates/job-order/list.hubview.html.twig @@ -0,0 +1,175 @@ +{% extends 'base.html.twig' %} + +{% block body %} + +
+
+
+

+ Job Orders (Hub View) +

+
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+ + + + +
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+{% endblock %} + +{% block scripts %} + +{% endblock %}