Add cancellation reason to JO form. #497 #1392
3 changed files with 20 additions and 5 deletions
|
|
@ -12,6 +12,7 @@ use DateTime;
|
||||||
use App\Ramcar\ModeOfPayment;
|
use App\Ramcar\ModeOfPayment;
|
||||||
use App\Ramcar\JOStatus;
|
use App\Ramcar\JOStatus;
|
||||||
use App\Ramcar\ServiceType;
|
use App\Ramcar\ServiceType;
|
||||||
|
use App\Ramcar\CMBCancelReason;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity
|
||||||
|
|
@ -704,6 +705,15 @@ class JobOrder
|
||||||
return $this->cancel_reason;
|
return $this->cancel_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getCancelReasonName()
|
||||||
|
{
|
||||||
|
$reason = CMBCancelReason::getName($this->cancel_reason);
|
||||||
|
if ($reason == 'Unknown')
|
||||||
|
$reason = $this->cancel_reason;
|
||||||
|
|
||||||
|
return $reason;
|
||||||
|
}
|
||||||
|
|
||||||
public function getTickets()
|
public function getTickets()
|
||||||
{
|
{
|
||||||
return $this->tickets;
|
return $this->tickets;
|
||||||
|
|
|
||||||
|
|
@ -334,11 +334,11 @@
|
||||||
<textarea name="delivery_instructions" class="form-control m-input" rows="4">{{ obj.getDeliveryInstructions }}</textarea>
|
<textarea name="delivery_instructions" class="form-control m-input" rows="4">{{ obj.getDeliveryInstructions }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div class="col-lg-12 form-group-inner">
|
<div class="col-lg-12 form-group-inner">
|
||||||
<label data-field="rider_plate_number">Rider Plate Number</label>
|
<label data-field="cancel_reason">Cancellation Reason</label>
|
||||||
<input type="text" id="rider-plate-number" name="rider_plate_number" class="form-control m-input" value="{{ obj.getRiderPlateNum|default('') }}" >
|
<input type="text" id="cancel-reason" name="cancel_reason" class="form-control m-input" value="{{ obj.getCancelReasonName|default('') }}" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="rider_plate_number"></div>
|
<div class="form-control-feedback hide" data-field="cancel_reason"></div>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<div class="col-lg-12 form-group-inner">
|
<div class="col-lg-12 form-group-inner">
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,11 @@
|
||||||
<div class="form-control-feedback hide" data-field="responsible_party"></div>
|
<div class="form-control-feedback hide" data-field="responsible_party"></div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
<div class="col-lg-12 form-group-inner">
|
||||||
|
<label data-field="cancel_reason">Cancellation Reason</label>
|
||||||
|
<input type="text" id="cancel-reason" name="cancel_reason" class="form-control m-input" value="{{ obj.getCancelReasonName|default('') }}" disabled>
|
||||||
|
<div class="form-control-feedback hide" data-field="cancel_reason"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue