Add the legacy job order row details to the details page. #207
This commit is contained in:
parent
2a31a2823d
commit
9205429662
4 changed files with 374 additions and 217 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,21 +27,17 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Begin::Section-->
|
||||
<div class="row">
|
||||
<form id="row-form" class="m-form m-form--fit m-form--label-align-right">
|
||||
<form id="row-form" class="m-form m-form--fit m-form--label-align-right m-form--group-seperator-dashed">
|
||||
<div class="m-portlet__body">
|
||||
<br>
|
||||
<div class="m-form__section{{ mode == 'details' }}">
|
||||
<div class="m-form__heading">
|
||||
<h3 class="m-form__heading-title">
|
||||
Customer Details
|
||||
</h3>
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="form-group m-form__group row" no-border>
|
||||
<div class="col-lg-6">
|
||||
<label data-field="customer_first_name">First Name</label>
|
||||
<input type="text" name="customer_first_name" id="customer-first-name" class="form-control m-input" value="{{ data.getCustFirstName|default('') }}" data-vehicle-field="1" disabled>
|
||||
|
|
@ -223,6 +219,49 @@
|
|||
<div class="form-control-feedback hide" data-field="cancel_reason_specify"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-12">
|
||||
{% if data.getRows is empty %}
|
||||
<div class="m-alert m-alert--icon m-alert--icon-solid m-alert--outline alert alert-brand" role="alert">
|
||||
<div class="m-alert__icon">
|
||||
<i class="flaticon-exclamation-2"></i>
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="m-alert__text">
|
||||
No transactions for this legacy job order.
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<table class="table table-striped m-table">
|
||||
<thead>
|
||||
<tr class="m-table__row--brand">
|
||||
<th>ID</th>
|
||||
<th>Item</th>
|
||||
<th>Quantity</th>
|
||||
<th>Price</th>
|
||||
<th>Price Level</th>
|
||||
<th>Status</th>
|
||||
<th>Account</th>
|
||||
<th>Enrollee</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in data.getRows %}
|
||||
<tr>
|
||||
<td>{{ row.getID|default("") }}</td>
|
||||
<td>{{ row.getItem|default('') }}</td>
|
||||
<td>{{ row.getQuantity|default('') }}</td>
|
||||
<td>{{ row.getPrice|default('') }}</td>
|
||||
<td>{{ row.getStatus|default('') }}</td>
|
||||
<td>{{ row.getAccount|default('') }}</td>
|
||||
<td>{{ row.getEnrollee|default('') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||
<div class="m-form__section">
|
||||
|
|
@ -248,4 +287,6 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue