Resolve "Allow for JO creation from customer vehicle" #863
6 changed files with 91 additions and 26 deletions
|
|
@ -27,6 +27,9 @@ customer_create_submit:
|
||||||
controller: App\Controller\CustomerController::addSubmit
|
controller: App\Controller\CustomerController::addSubmit
|
||||||
methods: [POST]
|
methods: [POST]
|
||||||
|
|
||||||
|
customer_update_blank:
|
||||||
|
path: /customers
|
||||||
|
|
||||||
customer_update:
|
customer_update:
|
||||||
path: /customers/{id}
|
path: /customers/{id}
|
||||||
controller: App\Controller\CustomerController::updateForm
|
controller: App\Controller\CustomerController::updateForm
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,14 @@ jo_in:
|
||||||
controller: App\Controller\JobOrderController::incomingForm
|
controller: App\Controller\JobOrderController::incomingForm
|
||||||
methods: [GET]
|
methods: [GET]
|
||||||
|
|
||||||
|
jo_in_vehicle:
|
||||||
|
path: /job-order/incoming/cvehicle/{cvid}
|
||||||
|
controller: App\Controller\JobOrderController::incomingVehicleForm
|
||||||
|
methods: [GET]
|
||||||
|
|
||||||
|
jo_in_vehicle_blank:
|
||||||
|
path: /job-order/incoming/cvehicle
|
||||||
|
|
||||||
jo_in_submit:
|
jo_in_submit:
|
||||||
path: /job-order/incoming
|
path: /job-order/incoming
|
||||||
controller: App\Controller\JobOrderController::incomingSubmit
|
controller: App\Controller\JobOrderController::incomingSubmit
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,8 @@ class CustomerController extends BaseController
|
||||||
|
|
||||||
// return successful response
|
// return successful response
|
||||||
return $this->json([
|
return $this->json([
|
||||||
'success' => 'Changes have been saved!'
|
'success' => 'Changes have been saved!',
|
||||||
|
'id' => $row->getID()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -457,7 +458,8 @@ class CustomerController extends BaseController
|
||||||
|
|
||||||
// return successful response
|
// return successful response
|
||||||
return $this->json([
|
return $this->json([
|
||||||
'success' => 'Changes have been saved!'
|
'success' => 'Changes have been saved!',
|
||||||
|
'id' => $cust->getID()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,38 @@ class JobOrderController extends BaseController
|
||||||
return $this->render('job-order/form.html.twig', $params);
|
return $this->render('job-order/form.html.twig', $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function incomingVehicleForm($cvid)
|
||||||
|
{
|
||||||
|
$this->denyAccessUnlessGranted('jo_in.list', null, 'No access.');
|
||||||
|
|
||||||
|
$params = $this->initParameters('jo_in');
|
||||||
|
$params['mode'] = 'create_vehicle';
|
||||||
|
$params['submit_url'] = $this->generateUrl('jo_in_submit');
|
||||||
|
$params['return_url'] = $this->generateUrl('jo_in');
|
||||||
|
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
// get customer vehicle
|
||||||
|
$cv = $em->getRepository(CustomerVehicle::class)->find($cvid);
|
||||||
|
|
||||||
|
// make sure this customer vehicle exists
|
||||||
|
if (empty($cv))
|
||||||
|
{
|
||||||
|
$em->getConnection()->rollback();
|
||||||
|
throw $this->createNotFoundException('The job order does not exist');
|
||||||
|
}
|
||||||
|
|
||||||
|
$jo = new JobOrder();
|
||||||
|
$jo->setCustomerVehicle($cv)
|
||||||
|
->setCustomer($cv->getCustomer());
|
||||||
|
|
||||||
|
$params['obj'] = $jo;
|
||||||
|
$this->fillDropdownParameters($params);
|
||||||
|
|
||||||
|
// response
|
||||||
|
return $this->render('job-order/form.html.twig', $params);
|
||||||
|
}
|
||||||
|
|
||||||
public function incomingSubmit(Request $req, ValidatorInterface $validator, InvoiceCreator $ic)
|
public function incomingSubmit(Request $req, ValidatorInterface $validator, InvoiceCreator $ic)
|
||||||
{
|
{
|
||||||
$this->denyAccessUnlessGranted('jo_in.list', null, 'No access.');
|
$this->denyAccessUnlessGranted('jo_in.list', null, 'No access.');
|
||||||
|
|
|
||||||
|
|
@ -434,7 +434,7 @@
|
||||||
{% if app.request.query.get('ref') == 'jo' %}
|
{% if app.request.query.get('ref') == 'jo' %}
|
||||||
window.location.href = "{{ url('jo_in') }}";
|
window.location.href = "{{ url('jo_in') }}";
|
||||||
{% else %}
|
{% else %}
|
||||||
window.location.href = "{{ url('customer_list') }}";
|
window.location.href = "{{ url('customer_update_blank') }}/" + response.id;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -666,6 +666,27 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// forward to job edit form
|
||||||
|
$(document).on("click", ".btn-jo-vehicle", function() {
|
||||||
|
var form = $("#vehicle-form");
|
||||||
|
var tr = $(this).closest('tr');
|
||||||
|
var index = parseInt(tr.find("[name='index']").val());
|
||||||
|
var rowData = findVehicleRow(index);
|
||||||
|
|
||||||
|
if (!rowData) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
row = rowData.row;
|
||||||
|
|
||||||
|
// check if we can forward to job order
|
||||||
|
if (row.id == '') {
|
||||||
|
alert('Customer has to be saved first.');
|
||||||
|
} else {
|
||||||
|
window.location.href = "{{ url("jo_in_vehicle_blank") }}/" + row.id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// display edit vehicle form
|
// display edit vehicle form
|
||||||
$(document).on("click", ".btn-edit-vehicle", function() {
|
$(document).on("click", ".btn-edit-vehicle", function() {
|
||||||
var form = $("#vehicle-form");
|
var form = $("#vehicle-form");
|
||||||
|
|
@ -1010,15 +1031,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'Actions',
|
field: 'Actions',
|
||||||
width: 70,
|
width: 100,
|
||||||
title: 'Actions',
|
title: 'Actions',
|
||||||
sortable: false,
|
sortable: false,
|
||||||
overflow: 'visible',
|
overflow: 'visible',
|
||||||
template: function (row, index, datatable) {
|
template: function (row, index, datatable) {
|
||||||
html = '<input type="hidden" name="index" value="' + row.index + '">';
|
html = '<input type="hidden" name="index" value="' + row.index + '">';
|
||||||
|
|
||||||
html += '<button type="button" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit-vehicle" title="Edit"><i class="la la-edit"></i></button>' +
|
html += '<button type="button" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-jo-vehicle" title="Job Order"><i class="flaticon-calendar-3"></i></button>';
|
||||||
'<button data-index="' + row.index + '" type="button" class="m-portlet__nav-link btn m-btn m-btn--hover-danger m-btn--icon m-btn--icon-only m-btn--pill btn-delete-vehicle" title="Delete"><i class="la la-trash"></i></button>';
|
html += '<button type="button" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit-vehicle" title="Edit"><i class="la la-edit"></i></button>';
|
||||||
|
html += '<button data-index="' + row.index + '" type="button" class="m-portlet__nav-link btn m-btn m-btn--hover-danger m-btn--icon m-btn--icon-only m-btn--pill btn-delete-vehicle" title="Delete"><i class="la la-trash"></i></button>';
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% elseif obj.getReferenceJO %}
|
||||||
|
|
||||||
{% if mode != 'create' and obj.getReferenceJO %}
|
|
||||||
<div class="m-form__section m-form__section--first">
|
<div class="m-form__section m-form__section--first">
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
|
|
@ -95,12 +93,12 @@
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<label data-field="customer_first_name">First Name</label>
|
<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="{{ obj.getCustomer ? obj.getCustomer.getFirstName }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="customer_first_name" id="customer-first-name" class="form-control m-input" value="{{ obj.getCustomer.getFirstName|default('') }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="customer_first_name"></div>
|
<div class="form-control-feedback hide" data-field="customer_first_name"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<label data-field="customer_last_name">Last Name</label>
|
<label data-field="customer_last_name">Last Name</label>
|
||||||
<input type="text" name="customer_last_name" id="customer-last-name" class="form-control m-input" value="{{ obj.getCustomer ? obj.getCustomer.getLastName }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="customer_last_name" id="customer-last-name" class="form-control m-input" value="{{ obj.getCustomer.getLastName|default('') }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="customer_last_name"></div>
|
<div class="form-control-feedback hide" data-field="customer_last_name"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -109,7 +107,7 @@
|
||||||
<label data-field="customer_phone_mobile">Mobile Phone</label>
|
<label data-field="customer_phone_mobile">Mobile Phone</label>
|
||||||
<div class="input-group m-input-group">
|
<div class="input-group m-input-group">
|
||||||
<span class="input-group-addon">+63</span>
|
<span class="input-group-addon">+63</span>
|
||||||
<input type="text" name="customer_phone_mobile" id="customer-phone-mobile" class="form-control m-input" value="{{ obj.getCustomer.getPhoneMobile|default('') }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="customer_phone_mobile" id="customer-phone-mobile" class="form-control m-input" value="{{ obj.getCustomer.getPhoneMobile|default('') }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="customer_phone_mobile"></div>
|
<div class="form-control-feedback hide" data-field="customer_phone_mobile"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -117,7 +115,7 @@
|
||||||
<label data-field="customer_phone_landline">Landline</label>
|
<label data-field="customer_phone_landline">Landline</label>
|
||||||
<div class="input-group m-input-group">
|
<div class="input-group m-input-group">
|
||||||
<span class="input-group-addon">+63</span>
|
<span class="input-group-addon">+63</span>
|
||||||
<input type="text" name="customer_phone_landline" id="customer-phone-landline" class="form-control m-input" value="{{ obj.getCustomer.getPhoneLandline|default('') }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="customer_phone_landline" id="customer-phone-landline" class="form-control m-input" value="{{ obj.getCustomer.getPhoneLandline|default('') }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="customer_phone_landline"></div>
|
<div class="form-control-feedback hide" data-field="customer_phone_landline"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -127,7 +125,7 @@
|
||||||
<label data-field="customer_phone_office">Office Phone</label>
|
<label data-field="customer_phone_office">Office Phone</label>
|
||||||
<div class="input-group m-input-group">
|
<div class="input-group m-input-group">
|
||||||
<span class="input-group-addon">+63</span>
|
<span class="input-group-addon">+63</span>
|
||||||
<input type="text" name="customer_phone_office" id="customer-phone-office" class="form-control m-input" value="{{ obj.getCustomer.getPhoneOffice|default('') }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="customer_phone_office" id="customer-phone-office" class="form-control m-input" value="{{ obj.getCustomer.getPhoneOffice|default('') }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="customer_phone_office"></div>
|
<div class="form-control-feedback hide" data-field="customer_phone_office"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -135,7 +133,7 @@
|
||||||
<label data-field="customer_phone_fax">Fax</label>
|
<label data-field="customer_phone_fax">Fax</label>
|
||||||
<div class="input-group m-input-group">
|
<div class="input-group m-input-group">
|
||||||
<span class="input-group-addon">+63</span>
|
<span class="input-group-addon">+63</span>
|
||||||
<input type="text" name="customer_phone_fax" id="customer-phone-fax" class="form-control m-input" value="{{ obj.getCustomer.getPhoneFax|default('') }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="customer_phone_fax" id="customer-phone-fax" class="form-control m-input" value="{{ obj.getCustomer.getPhoneFax|default('') }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="customer_phone_fax"></div>
|
<div class="form-control-feedback hide" data-field="customer_phone_fax"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -143,7 +141,7 @@
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
<label data-field="customer_customer_notes">Customer Notes</label>
|
<label data-field="customer_customer_notes">Customer Notes</label>
|
||||||
<textarea name="customer_customer_notes" id="customer-customer-notes" class="form-control m-input" placeholder="Select a vehicle first" data-vehicle-field="1" rows="4" disabled>{{ obj.getCustomer ? obj.getCustomer.getCustomerNotes }}</textarea>
|
<textarea name="customer_customer_notes" id="customer-customer-notes" class="form-control m-input" data-vehicle-field="1" rows="4" disabled>{{ obj.getCustomer ? obj.getCustomer.getCustomerNotes }}</textarea>
|
||||||
<div class="form-control-feedback hide" data-field="customer_customer_notes"></div>
|
<div class="form-control-feedback hide" data-field="customer_customer_notes"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -157,29 +155,29 @@
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="vmfg">Manufacturer</label>
|
<label data-field="vmfg">Manufacturer</label>
|
||||||
<input type="text" name="vmfg" id="vmfg" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getVehicle.getManufacturer.getName }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="vmfg" id="vmfg" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getVehicle.getManufacturer.getName }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="vmfg"></div>
|
<div class="form-control-feedback hide" data-field="vmfg"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="vehicle_make">Make</label>
|
<label data-field="vehicle_make">Make</label>
|
||||||
<input type="text" name="vehicle_make" id="vehicle-make" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getVehicle.getMake }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="vehicle_make" id="vehicle-make" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getVehicle.getMake }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="vehicle_make"></div>
|
<div class="form-control-feedback hide" data-field="vehicle_make"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="vehicle_year">Model Year</label>
|
<label data-field="vehicle_year">Model Year</label>
|
||||||
<input type="text" name="vehicle_year" id="vehicle-year" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getModelYear }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="vehicle_year" id="vehicle-year" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getModelYear }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="vehicle_year"></div>
|
<div class="form-control-feedback hide" data-field="vehicle_year"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="vehicle_plate">Plate #</label>
|
<label data-field="vehicle_plate">Plate #</label>
|
||||||
<input type="text" name="vehicle_plate" id="vehicle-plate" class="form-control m-input" value="{{ obj.getCustomerVehicle.getPlateNumber|default('') }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="vehicle_plate" id="vehicle-plate" class="form-control m-input" value="{{ obj.getCustomerVehicle.getPlateNumber|default('') }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="vehicle_color"></div>
|
<div class="form-control-feedback hide" data-field="vehicle_color"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="vehicle_color">Color</label>
|
<label data-field="vehicle_color">Color</label>
|
||||||
<input type="text" name="vehicle_color" id="vehicle-color" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getColor }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="vehicle_color" id="vehicle-color" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getColor }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="vehicle_color"></div>
|
<div class="form-control-feedback hide" data-field="vehicle_color"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -193,17 +191,17 @@
|
||||||
<div class="form-group m-form__group row">
|
<div class="form-group m-form__group row">
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="current_battery">Current Battery</label>
|
<label data-field="current_battery">Current Battery</label>
|
||||||
<input type="text" name="current_battery" id="current-battery" class="form-control m-input" value="{{ obj.getCustomerVehicle and obj.getCustomerVehicle.getCurrentBattery ? obj.getCustomerVehicle.getCurrentBattery.getManufacturer.getName ~ ' ' ~ obj.getCustomerVehicle.getCurrentBattery.getModel.getName ~ ' ' ~ obj.getCustomerVehicle.getCurrentBattery.getSize.getName ~ ' (' ~ obj.getCustomerVehicle.getCurrentBattery.getProductCode ~ ')' }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="current_battery" id="current-battery" class="form-control m-input" value="{{ obj.getCustomerVehicle and obj.getCustomerVehicle.getCurrentBattery ? obj.getCustomerVehicle.getCurrentBattery.getManufacturer.getName ~ ' ' ~ obj.getCustomerVehicle.getCurrentBattery.getModel.getName ~ ' ' ~ obj.getCustomerVehicle.getCurrentBattery.getSize.getName ~ ' (' ~ obj.getCustomerVehicle.getCurrentBattery.getProductCode ~ ')' }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="current_battery"></div>
|
<div class="form-control-feedback hide" data-field="current_battery"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="warranty_code">Warranty Code</label>
|
<label data-field="warranty_code">Warranty Code</label>
|
||||||
<input type="text" name="warranty_code" id="warranty-code" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getWarrantyCode }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="warranty_code" id="warranty-code" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getWarrantyCode }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="warranty_code"></div>
|
<div class="form-control-feedback hide" data-field="warranty_code"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<label data-field="warranty_expiration">Warranty Expiration Date</label>
|
<label data-field="warranty_expiration">Warranty Expiration Date</label>
|
||||||
<input type="text" name="warranty_expiration" id="warranty-expiration" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getWarrantyExpiration|date("d M Y") }}" placeholder="Select a vehicle first" data-vehicle-field="1" disabled>
|
<input type="text" name="warranty_expiration" id="warranty-expiration" class="form-control m-input" value="{{ obj.getCustomerVehicle ? obj.getCustomerVehicle.getWarrantyExpiration|date("d M Y") }}" data-vehicle-field="1" disabled>
|
||||||
<div class="form-control-feedback hide" data-field="warranty_expiration"></div>
|
<div class="form-control-feedback hide" data-field="warranty_expiration"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -774,7 +772,7 @@
|
||||||
{% if mode != 'update-all' %}
|
{% if mode != 'update-all' %}
|
||||||
<button type="submit" class="btn btn-success">{{ mode == 'update-fulfillment' ? 'Fulfill' : 'Submit' }}</button>
|
<button type="submit" class="btn btn-success">{{ mode == 'update-fulfillment' ? 'Fulfill' : 'Submit' }}</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if mode != 'create' and is_granted('joborder.cancel') and obj.getStatus != status_cancelled %}
|
{% if mode != 'create' and mode != 'create_vehicle' and is_granted('joborder.cancel') and obj.getStatus != 'status_cancelled' %}
|
||||||
<a href="{{ url('jo_cancel', {'id': obj.getID}) }}" class="btn btn-danger btn-cancel-job-order">Cancel Job Order</button>
|
<a href="{{ url('jo_cancel', {'id': obj.getID}) }}" class="btn btn-danger btn-cancel-job-order">Cancel Job Order</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if mode != 'create' %}
|
{% if mode != 'create' %}
|
||||||
|
|
@ -853,7 +851,7 @@ $(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
{% if mode != 'create' %}
|
{% if mode != 'create' and mode != 'create_vehicle'%}
|
||||||
// check if we need to set map
|
// check if we need to set map
|
||||||
var latlng = new google.maps.LatLng({{ obj.getCoordinates.getLatitude }}, {{ obj.getCoordinates.getLongitude }});
|
var latlng = new google.maps.LatLng({{ obj.getCoordinates.getLatitude }}, {{ obj.getCoordinates.getLongitude }});
|
||||||
selectPoint(map, latlng);
|
selectPoint(map, latlng);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue