Merge branch '419-resq-search-optimization' into 'master'
Move the setting of JO search fields to the entity. Move the sql script to the... Closes #419 See merge request jankstudio/resq!481
This commit is contained in:
commit
711082cf23
2 changed files with 11 additions and 5 deletions
|
|
@ -506,6 +506,12 @@ class JobOrder
|
|||
public function setCustomer(Customer $customer)
|
||||
{
|
||||
$this->customer = $customer;
|
||||
|
||||
// set the search fields for first name, last name, and mobile
|
||||
$this->setFirstName($customer->getFirstName());
|
||||
$this->setLastName($customer->getLastName());
|
||||
$this->setPhoneMobile($customer->getPhoneMobile());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
@ -517,6 +523,10 @@ class JobOrder
|
|||
public function setCustomerVehicle(CustomerVehicle $cus_vehicle)
|
||||
{
|
||||
$this->cus_vehicle = $cus_vehicle;
|
||||
|
||||
// set the search field for plate number
|
||||
$this->setPlateNumber($cus_vehicle->getPlateNumber());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -343,11 +343,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
|||
->setORName($req->request->get('or_name'))
|
||||
->setPromoDetail($req->request->get('promo_detail'))
|
||||
->setModeOfPayment($req->request->get('mode_of_payment'))
|
||||
->setLandmark($req->request->get('landmark'))
|
||||
->setFirstName($cust_vehicle->getCustomer()->getFirstName())
|
||||
->setLastName($cust_vehicle->getCustomer()->getLastName())
|
||||
->setPhoneMobile($cust_vehicle->getCustomer()->getPhoneMobile())
|
||||
->setPlateNumber($cust_vehicle->getPlateNumber());
|
||||
->setLandmark($req->request->get('landmark'));
|
||||
|
||||
// check if user is null, meaning call to create came from API
|
||||
if ($user != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue