diff --git a/config/routes/search.yaml b/config/routes/search.yaml index 54bebd51..b21d8562 100644 --- a/config/routes/search.yaml +++ b/config/routes/search.yaml @@ -6,3 +6,7 @@ search_history: path: /search/history controller: App\Controller\SearchController::search methods: [GET] + +search_legacyjo_details: + path: /search/legacyjo/{id}/details + controller: App\Controller\SearchController::legacyJODetails diff --git a/src/Controller/SearchController.php b/src/Controller/SearchController.php index 1e660e16..9706e914 100644 --- a/src/Controller/SearchController.php +++ b/src/Controller/SearchController.php @@ -3,8 +3,11 @@ namespace App\Controller; use App\Ramcar\BaseController; + use App\Service\GeneralSearch; +use App\Entity\LegacyJobOrder; + use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -46,4 +49,21 @@ class SearchController extends BaseController // response return $this->render('search/form.html.twig', $params); } + + public function legacyJODetails($id) + { + $this->denyAccessUnlessGranted('general.search', null, 'No access.'); + + // get legacy job order + $em = $this->getDoctrine()->getManager(); + $legacy_jo = $em->getRepository(LegacyJobOrder::class)->find($id); + + $params = $this->initParameters('general.search'); + $params['data'] = $legacy_jo; + $params['search_term'] = $search_term; + $params['mode'] = "details"; + + // response + return $this->render('search/legacyjo_details.html.twig', $params); + } } diff --git a/templates/search/form.html.twig b/templates/search/form.html.twig index 9e9d22c7..fc830136 100644 --- a/templates/search/form.html.twig +++ b/templates/search/form.html.twig @@ -86,6 +86,7 @@ Last Name First Name Plate Number + @@ -95,6 +96,7 @@ {{ result.getCustLastName|default('') }} {{ result.getCustFirstName|default('') }} {{ result.getPlateNumber|default('') }} + Details {% endfor %} diff --git a/templates/search/legacyjo_details.html.twig b/templates/search/legacyjo_details.html.twig new file mode 100644 index 00000000..9177e9c9 --- /dev/null +++ b/templates/search/legacyjo_details.html.twig @@ -0,0 +1,229 @@ +{% extends 'base.html.twig' %} + +{% block body %} + +
+
+
+

Job Order

+
+
+
+ +
+ +
+
+
+
+

+ Customer Details +

+
+
+
+ + + +
+
+ + + +
+
+
+
+ +
+ +63 + + +
+
+
+ +
+ +63 + + +
+
+
+
+
+ +
+ +63 + + +
+
+
+
+
+
+

+ Vehicle Details +

+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+ + + +
+
+ + + +
+
+
+
+
+

+ Transaction Details +

+ + + +
+
+
+ + + +
+
+ + + +
+
+
+
+ + + +
+
+ +
+ + + + +
+ +
+
+ +
+ + + + +
+ +
+
+
+
+ + + +
+
+
+
+
+ + + +
+
+
+ + +
+
+
+
+ + + +
+
+
+ + + +
+
+
+
+
+ + + +
+
+
+
+ + + +
+
+ + + +
+
+
+
+
+
+

+ Location +

+
+
+
+ + + +
+
+ + + +
+
+
+
+
+
+{% endblock %}