From 0e2afaa4001ae3e56866bbfc952a79143d8a5ef1 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 30 Jan 2024 01:30:09 -0500 Subject: [PATCH 1/7] Add new fields for transaction origin. #784 --- src/Ramcar/TransactionOrigin.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Ramcar/TransactionOrigin.php b/src/Ramcar/TransactionOrigin.php index a204b35f..2a742c0a 100644 --- a/src/Ramcar/TransactionOrigin.php +++ b/src/Ramcar/TransactionOrigin.php @@ -17,6 +17,10 @@ class TransactionOrigin extends NameValue const YOKOHAMA_TWITTER = 'yokohama_twitter'; const YOKOHAMA_INSTAGRAM = 'yokohama_instagram'; const YOKOHAMA_CAROUSELL = 'yokohama_carousell'; + const HOTLINE_MANILA = 'hotline_manila'; + const HOTLINE_CEBU = 'hotline_cebu'; + const FACEBOOK_MANILA = 'facebook_manila'; + const FACEBOOK_CEBU = 'facebook_cebu'; // TODO: for now, resq also gets the walk-in option // resq also gets new YOKOHAMA options @@ -34,5 +38,9 @@ class TransactionOrigin extends NameValue 'yokohama_twitter' => 'Yokohama Twitter', 'yokohama_instagram' => 'Yokohama Instagram', 'yokohama_carousell' => 'Yokohama Carousell', + 'hotline_manila' => 'Hotline Manila', + 'hotline_cebu' => 'Hotline Cebu', + 'facebook_manila' => 'Facebook Manila', + 'facebook_cebu' => 'Facebook Cebu' ]; } From 9b52d4578f13f46f25d07794b31610c9f039ffbb Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 30 Jan 2024 02:02:24 -0500 Subject: [PATCH 2/7] Add checking for discount rejection reason. #785 --- src/Service/JobOrderHandler/ResqJobOrderHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Service/JobOrderHandler/ResqJobOrderHandler.php b/src/Service/JobOrderHandler/ResqJobOrderHandler.php index 361c0b22..38571fdd 100644 --- a/src/Service/JobOrderHandler/ResqJobOrderHandler.php +++ b/src/Service/JobOrderHandler/ResqJobOrderHandler.php @@ -4252,6 +4252,10 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface if ($rejection->getReason() == JORejectionReason::ADMINISTRATIVE) return null; + // check if reason is discount + if ($rejection->getReason() == JORejectionReason::DISCOUNT) + return null; + // sms content // Job Order # - can get from jo // Order Date and Time - get from jo From f7c8034538693fa1453754a78931628be5d861a2 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 30 Jan 2024 02:12:08 -0500 Subject: [PATCH 3/7] Comment out the geofence call for admin panel. #786 --- templates/job-order/form.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/job-order/form.html.twig b/templates/job-order/form.html.twig index ca68e922..d0d7e834 100644 --- a/templates/job-order/form.html.twig +++ b/templates/job-order/form.html.twig @@ -1231,6 +1231,8 @@ $(function() { function selectPoint(lat, lng) { // check if point is in coverage area + // commenting out the geofence call for CRM + /* $.ajax({ method: "GET", url: "{{ url('jo_geofence') }}", @@ -1248,7 +1250,7 @@ $(function() { type: 'warning', }); } - }); + }); */ // clear markers markerLayerGroup.clearLayers(); From 5717eddaa04f17802f0982d18fd356417f11bf63 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 30 Jan 2024 02:24:08 -0500 Subject: [PATCH 4/7] Update geofence message in the app. #787 --- src/Controller/CustomerAppAPI/ApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/CustomerAppAPI/ApiController.php b/src/Controller/CustomerAppAPI/ApiController.php index 6a25eb80..fdc0ec59 100644 --- a/src/Controller/CustomerAppAPI/ApiController.php +++ b/src/Controller/CustomerAppAPI/ApiController.php @@ -162,6 +162,6 @@ class ApiController extends BaseApiController protected function getGeoErrorMessage() { - return 'Oops! Our service is limited to some areas in Metro Manila, Laguna, Cavite, Pampanga and Baguio only. We will update you as soon as we are able to cover your area'; + return 'Our services are currently limited to some areas in Metro Manila, Baguio, Batangas, Laguna, Cavite, Pampanga, and Palawan. We will update you as soon as we are available in your area. Thank you for understanding. Keep safe!'; } } From 33eaf9bbff1965ce6b65714bb332dae77f86b90a Mon Sep 17 00:00:00 2001 From: Ramon Gutierrez Date: Wed, 31 Jan 2024 22:05:42 +0800 Subject: [PATCH 5/7] Fix transaction origin list to replace existing facebook and hotline with manila entries #784 --- src/Ramcar/TransactionOrigin.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Ramcar/TransactionOrigin.php b/src/Ramcar/TransactionOrigin.php index 2a742c0a..7f459e96 100644 --- a/src/Ramcar/TransactionOrigin.php +++ b/src/Ramcar/TransactionOrigin.php @@ -17,17 +17,17 @@ class TransactionOrigin extends NameValue const YOKOHAMA_TWITTER = 'yokohama_twitter'; const YOKOHAMA_INSTAGRAM = 'yokohama_instagram'; const YOKOHAMA_CAROUSELL = 'yokohama_carousell'; - const HOTLINE_MANILA = 'hotline_manila'; const HOTLINE_CEBU = 'hotline_cebu'; - const FACEBOOK_MANILA = 'facebook_manila'; const FACEBOOK_CEBU = 'facebook_cebu'; // TODO: for now, resq also gets the walk-in option // resq also gets new YOKOHAMA options const COLLECTION = [ - 'call' => 'Hotline', + 'call' => 'Hotline Manila', + 'hotline_cebu' => 'Hotline Cebu', 'online' => 'Online', - 'facebook' => 'Facebook', + 'facebook' => 'Facebook Manila', + 'facebook_cebu' => 'Facebook Cebu', 'vip' => 'VIP', 'mobile_app' => 'Mobile App', 'walk_in' => 'Walk-in', @@ -37,10 +37,6 @@ class TransactionOrigin extends NameValue 'yokohama_op_facebook' => 'Yokohama OP Facebook', 'yokohama_twitter' => 'Yokohama Twitter', 'yokohama_instagram' => 'Yokohama Instagram', - 'yokohama_carousell' => 'Yokohama Carousell', - 'hotline_manila' => 'Hotline Manila', - 'hotline_cebu' => 'Hotline Cebu', - 'facebook_manila' => 'Facebook Manila', - 'facebook_cebu' => 'Facebook Cebu' + 'yokohama_carousell' => 'Yokohama Carousell' ]; } From 0e5365a0151ed4d5c0506553b0dd878d2f287520 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 31 Jan 2024 20:13:41 -0500 Subject: [PATCH 6/7] Comment out geofence message when viewing JO. Initialize branch_codes array. #788 --- src/Service/JobOrderHandler/ResqJobOrderHandler.php | 1 + templates/job-order/form.view.html.twig | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Service/JobOrderHandler/ResqJobOrderHandler.php b/src/Service/JobOrderHandler/ResqJobOrderHandler.php index 38571fdd..ed10c764 100644 --- a/src/Service/JobOrderHandler/ResqJobOrderHandler.php +++ b/src/Service/JobOrderHandler/ResqJobOrderHandler.php @@ -2910,6 +2910,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface $params['status_cancelled'] = JOStatus::CANCELLED; $params['hubs'] = []; + $branch_codes = []; // format duration and distance into friendly time foreach ($hubs as $hub) { // duration diff --git a/templates/job-order/form.view.html.twig b/templates/job-order/form.view.html.twig index cc463f11..33d6fc5b 100644 --- a/templates/job-order/form.view.html.twig +++ b/templates/job-order/form.view.html.twig @@ -635,6 +635,8 @@ $(function() { function selectPoint(lat, lng) { // check if point is in coverage area + // commenting out the geofence call for CRM + /* $.ajax({ method: "GET", url: "{{ url('jo_geofence') }}", @@ -652,7 +654,7 @@ $(function() { type: 'warning', }); } - }); + }); */ // clear markers markerLayerGroup.clearLayers(); From 270a4cfb1082a041ff8daae760e7e45e173638a0 Mon Sep 17 00:00:00 2001 From: Ramon Gutierrez Date: Thu, 22 Feb 2024 16:51:26 +0800 Subject: [PATCH 7/7] Add endpoint for insurance premiums banner #791 --- .gitignore | 1 + config/routes/apiv2.yaml | 5 +++++ config/services.yaml | 1 + .../CustomerAppAPI/InsuranceController.php | 14 ++++++++++++++ 4 files changed, 21 insertions(+) diff --git a/.gitignore b/.gitignore index cf3b012e..c99c0c14 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ *.swp /public/warranty_uploads/* +.vscode diff --git a/config/routes/apiv2.yaml b/config/routes/apiv2.yaml index 9f183530..deb3b11b 100644 --- a/config/routes/apiv2.yaml +++ b/config/routes/apiv2.yaml @@ -303,3 +303,8 @@ apiv2_insurance_application_create: path: /apiv2/insurance/application controller: App\Controller\CustomerAppAPI\InsuranceController::createApplication methods: [POST] + +apiv2_insurance_premiums_banner: + path: /apiv2/insurance/premiums_banner + controller: App\Controller\CustomerAppAPI\InsuranceController::getPremiumsBanner + methods: [GET] \ No newline at end of file diff --git a/config/services.yaml b/config/services.yaml index b19ecabc..4cd646ec 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -15,6 +15,7 @@ parameters: api_version: "%env(API_VERSION)%" android_app_version: "%env(ANDROID_APP_VERSION)%" ios_app_version: "%env(IOS_APP_VERSION)%" + insurance_premiums_banner_url: "%env(INSURANCE_PREMIUMS_BANNER_URL)%" services: # default configuration for services in *this* file diff --git a/src/Controller/CustomerAppAPI/InsuranceController.php b/src/Controller/CustomerAppAPI/InsuranceController.php index a3c5624a..8685060b 100644 --- a/src/Controller/CustomerAppAPI/InsuranceController.php +++ b/src/Controller/CustomerAppAPI/InsuranceController.php @@ -293,6 +293,20 @@ class InsuranceController extends ApiController ]); } + public function getPremiumsBanner(Request $req) + { + // validate params + $validity = $this->validateRequest($req); + + if (!$validity['is_valid']) { + return new ApiResponse(false, $validity['error']); + } + + return new ApiResponse(true, '', [ + 'url' => $this->getParameter('insurance_premiums_banner_url'), + ]); + } + protected function getLineType($mv_type_id, $vehicle_use_type, $is_public = false) { $line = '';