Add new warranty source. #548
This commit is contained in:
parent
61fb0e68ef
commit
d4c3dfadc7
3 changed files with 12 additions and 8 deletions
|
|
@ -420,7 +420,7 @@ class CustomerWarrantyController extends APIController
|
||||||
$cust->setFirstName($req->request->get('first_name'))
|
$cust->setFirstName($req->request->get('first_name'))
|
||||||
->setLastName($req->request->get('last_name'))
|
->setLastName($req->request->get('last_name'))
|
||||||
->setEmail($req->request->get('email'))
|
->setEmail($req->request->get('email'))
|
||||||
->setCreateSource('web_warranty')
|
->setCreateSource(CustomerSource::WEB_WARRANTY)
|
||||||
->setPrivacyPromo($priv_promo)
|
->setPrivacyPromo($priv_promo)
|
||||||
->setPhoneMobile($req->request->get('contact_num'));
|
->setPhoneMobile($req->request->get('contact_num'));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ use App\Ramcar\WarrantyClass;
|
||||||
use App\Ramcar\WarrantyStatus;
|
use App\Ramcar\WarrantyStatus;
|
||||||
use App\Ramcar\FuelType;
|
use App\Ramcar\FuelType;
|
||||||
use App\Ramcar\VehicleStatusCondition;
|
use App\Ramcar\VehicleStatusCondition;
|
||||||
|
use App\Ramcar\CustomerSource;
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
|
||||||
|
|
@ -636,7 +637,8 @@ class WarrantyController extends APIController
|
||||||
$new_cust = new Customer();
|
$new_cust = new Customer();
|
||||||
$new_cust->setFirstName($w_first_name)
|
$new_cust->setFirstName($w_first_name)
|
||||||
->setLastName($w_last_name)
|
->setLastName($w_last_name)
|
||||||
->setPhoneMobile($w_mobile_num);
|
->setPhoneMobile($w_mobile_num)
|
||||||
|
->setCreateSource(CustomerSource::APP_WARRANTY);
|
||||||
|
|
||||||
$em->persist($new_cust);
|
$em->persist($new_cust);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,18 @@ namespace App\Ramcar;
|
||||||
|
|
||||||
class CustomerSource extends NameValue
|
class CustomerSource extends NameValue
|
||||||
{
|
{
|
||||||
const MOBILE = 'mobile_api';
|
const MOBILE = 'mobile_api';
|
||||||
const THIRD_PARTY = 'third_party_api';
|
const THIRD_PARTY = 'third_party_api';
|
||||||
const WARRANTY = 'warranty';
|
const WEB_WARRANTY = 'web_warranty';
|
||||||
const ADMIN_PANEL = 'admin_panel';
|
const APP_WARRANTY = 'app_warranty';
|
||||||
const LEGACY = 'legacy';
|
const ADMIN_PANEL = 'admin_panel';
|
||||||
|
const LEGACY = 'legacy';
|
||||||
|
|
||||||
const COLLECTION = [
|
const COLLECTION = [
|
||||||
'mobile_api' => 'Mobile API',
|
'mobile_api' => 'Mobile API',
|
||||||
'third_party_api' => 'Third Party API',
|
'third_party_api' => 'Third Party API',
|
||||||
'warranty' => 'Warranty',
|
'web_warranty' => 'Web Warranty',
|
||||||
|
'app_warranty' => 'App Warranty',
|
||||||
'admin_panel' => 'Admin Panel',
|
'admin_panel' => 'Admin Panel',
|
||||||
'legacy' => 'Legacy',
|
'legacy' => 'Legacy',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue