From 92054296621b48569fdf7c6074869ace953dec34 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 1 May 2019 09:34:00 +0000 Subject: [PATCH] Add the legacy job order row details to the details page. #207 --- src/Controller/SearchController.php | 1 + src/Entity/LegacyJobOrder.php | 9 + src/Entity/LegacyJobOrderRow.php | 106 +++++ templates/search/legacyjo_details.html.twig | 475 +++++++++++--------- 4 files changed, 374 insertions(+), 217 deletions(-) diff --git a/src/Controller/SearchController.php b/src/Controller/SearchController.php index 3afbe85c..9632c0fc 100644 --- a/src/Controller/SearchController.php +++ b/src/Controller/SearchController.php @@ -7,6 +7,7 @@ use App\Ramcar\BaseController; use App\Service\GeneralSearch; use App\Entity\LegacyJobOrder; +use App\Entity\LegacyJobOrderRow; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Entity/LegacyJobOrder.php b/src/Entity/LegacyJobOrder.php index 17485fc7..e9cbd660 100644 --- a/src/Entity/LegacyJobOrder.php +++ b/src/Entity/LegacyJobOrder.php @@ -343,6 +343,10 @@ class LegacyJobOrder */ protected $plate_number; + /** + * @ORM\OneToMany(targetEntity="LegacyJobOrderRow", mappedBy="job_order") + */ + protected $rows; public function setID($id) @@ -696,4 +700,9 @@ class LegacyJobOrder { return $this->plate_number; } + + public function getRows() + { + return $this->rows; + } } diff --git a/src/Entity/LegacyJobOrderRow.php b/src/Entity/LegacyJobOrderRow.php index 6927afb2..dd8ac461 100644 --- a/src/Entity/LegacyJobOrderRow.php +++ b/src/Entity/LegacyJobOrderRow.php @@ -59,6 +59,12 @@ class LegacyJobOrderRow */ protected $enrollee; + /** + * @ORM\ManyToOne(targetEntity="LegacyJobOrder", inversedBy="rows") + * @ORM\JoinColumn(name="legacy_job_order_id", referencedColumnName="id", nullable=true) + */ + protected $job_order; + public function setID($id) { $this->id = $id; @@ -69,4 +75,104 @@ class LegacyJobOrderRow { return $this->id; } + + public function setJobOrderID($job_order_id) + { + $this->job_order_id = $job_order_id; + return $this; + } + + public function getJobOrderID() + { + return $this->job_order_id; + } + + public function setItem($item) + { + $this->item = $item; + return $this; + } + + public function getItem() + { + return $this->item; + } + + public function setQty($qty) + { + $this->qty = $qty; + return $this; + } + + public function getQty() + { + return $this->qty; + } + + public function setPrice($price) + { + $this->price = $price; + return $this; + } + + public function getPrice() + { + return $this->price; + } + + public function setPriceLevel($price_level) + { + $this->price_level = $price_level; + return $this; + } + + public function getPriceLevel() + { + return $this->price_level; + } + + public function setStatus($status) + { + $this->status = $status; + return $this; + } + + public function getStatus() + { + return $this->status; + } + + public function setAccount($account) + { + $this->account = $account; + return $this; + } + + public function getAccount() + { + return $this->account; + } + + public function setEnrollee($enrollee) + { + $this->enrollee = $enrollee; + return $this; + } + + public function getEnrollee() + { + return $this->enrollee; + } + + public function setJobOrder(LegacyJobOrder $job_order) + { + $this->job_order = $job_order; + return $this; + } + + public function getJobOrder() + { + return $this->job_order; + } + } diff --git a/templates/search/legacyjo_details.html.twig b/templates/search/legacyjo_details.html.twig index f43e9e49..7b1bafd4 100644 --- a/templates/search/legacyjo_details.html.twig +++ b/templates/search/legacyjo_details.html.twig @@ -27,225 +27,266 @@ + +
+
+
+
+
+

+ Customer Details +

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

+ Vehicle Details +

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

+ Transaction Details +

+ + + +
+
+
+ + + +
+
+ + + +
+
+
+
+ + + +
+
+ +
+ + + + +
+ +
+
+ +
+ + + + +
+ +
+
+
+
+ + + +
+
+
+
+
+ + + +
+
+
+ + +
+
+
+
+ + + +
+
+
+ + + +
+
+
+
+
+ + + +
+
+
+
+ + + +
+
+ + + +
+
+
+
+ {% if data.getRows is empty %} + + {% else %} + + + + + + + + + + + + + + + {% for row in data.getRows %} + + + + + + + + + + {% endfor %} + +
IDItemQuantityPricePrice LevelStatusAccountEnrollee
{{ row.getID|default("") }}{{ row.getItem|default('') }}{{ row.getQuantity|default('') }}{{ row.getPrice|default('') }}{{ row.getStatus|default('') }}{{ row.getAccount|default('') }}{{ row.getEnrollee|default('') }}
+ {% endif %} +
+
+
+
+
+
+

+ Location +

+
+
+
+ + + +
+
+ + + +
+
+
+
+
- - -
-
-
-
-
-

- Customer Details -

-
-
-
- - - -
-
- - - -
-
-
-
- -
- +63 - - -
-
-
- -
- +63 - - -
-
-
-
-
- -
- +63 - - -
-
-
-
-
-
-

- Vehicle Details -

-
-
-
- - - -
-
- - - -
-
- - - -
-
-
-
- - - -
-
- - - -
-
-
-
-
-

- Transaction Details -

- - - -
-
-
- - - -
-
- - - -
-
-
-
- - - -
-
- -
- - - - -
- -
-
- -
- - - - -
- -
-
-
-
- - - -
-
-
-
-
- - - -
-
-
- - -
-
-
-
- - - -
-
-
- - - -
-
-
-
-
- - - -
-
-
-
- - - -
-
- - - -
-
-
-
-
-
-

- Location -

-
-
-
- - - -
-
- - - -
-
-
-
-
-
{% endblock %}