Add odometer and pictures when viewing JO. #432
This commit is contained in:
parent
e9981b24fa
commit
32c83aa40c
2 changed files with 70 additions and 0 deletions
|
|
@ -1487,6 +1487,51 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
|
||||
$params['jo_service_charges'] = $sc_array;
|
||||
|
||||
// get odometer
|
||||
$odometer = $obj->getMeta('odometer');
|
||||
|
||||
$params['odometer'] = $odometer;
|
||||
|
||||
// get images if any
|
||||
$jo_extra = $obj->getJOExtra();
|
||||
$pic_array = [];
|
||||
if ($jo_extra != null)
|
||||
{
|
||||
$b_speed_img = $jo_extra->getBeforeSpeedImageFilename();
|
||||
$a_speed_img = $jo_extra->getAfterSpeedImageFilename();
|
||||
$b_plate_img = $jo_extra->getBeforePlateNumImageFilename();
|
||||
$a_plate_img = $jo_extra->getAfterPlateNumImageFilename();
|
||||
$b_batt_img = $jo_extra->getBeforeBattImageFilename();
|
||||
$a_batt_img = $jo_extra->getAfterBattImageFilename();
|
||||
|
||||
$b_other_images = $jo_extra->getBeforeOtherImages();
|
||||
$a_other_images = $jo_extra->getAfterOtherImages();
|
||||
|
||||
if ($b_speed_img != null)
|
||||
$pic_array[] = $b_speed_img;
|
||||
if ($a_speed_img != null)
|
||||
$pic_array[] = $a_speed_img;
|
||||
if ($b_plate_img != null)
|
||||
$pic_array[] = $b_plate_img;
|
||||
if ($a_plate_img != null)
|
||||
$pic_array[] = $a_plate_img;
|
||||
if ($b_batt_img != null)
|
||||
$pic_array[] = $b_batt_img;
|
||||
if ($a_batt_img != null)
|
||||
$pic_array[] = $a_batt_img;
|
||||
|
||||
foreach($b_other_images as $b_img)
|
||||
{
|
||||
$pic_array[] = $b_img;
|
||||
}
|
||||
foreach ($a_other_images as $a_img)
|
||||
{
|
||||
$pic_array[] = $a_img;
|
||||
}
|
||||
}
|
||||
|
||||
$params['jo_pictures'] = $pic_array;
|
||||
|
||||
$this->fillDropdownParameters($params);
|
||||
$this->fillFormTags($params);
|
||||
|
||||
|
|
|
|||
|
|
@ -492,6 +492,31 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% if mode in ['onestep-edit'] %}
|
||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||
<div class="m-form__section">
|
||||
<div class="m-form__heading">
|
||||
<h3 class="m-form__heading-title">
|
||||
Other Information
|
||||
</h3>
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-3">
|
||||
<label data-field="odometer">Odometer Reading</label>
|
||||
<input type="text" name="odometer" id="odometer" class="form-control m-input other_info_field" value="{{ odometer }}" data-vehicle-field="1" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-12">
|
||||
<label data-field="picture">Pictures</label>
|
||||
{% for picture in jo_pictures %}
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||
<div class="m-form__section" id="sc-section">
|
||||
<div class="m-form__heading">
|
||||
|
|
|
|||
Loading…
Reference in a new issue