From 7ff88162d7a18a8513fc9a182adeaddf13c9628f Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 14 Aug 2024 10:38:57 -0400 Subject: [PATCH 1/3] CSR-1981 show mobile fee free alert if it is 0 CSR-1981 show mobile fee free alert if it is 0 --- src/layouts/service-location/service-location.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index e1cc89f42..28223d2bc 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -61,7 +61,7 @@ ref="alertMobileFeeFree" class="my-5" cmsWidgetName="AlertMobileFeeFreeWidget" - v-if="isServiceableMobile && !isInsurance" + v-if="showMobileFreeAlert" alertClass="alert-success" /> @@ -314,6 +314,17 @@ export default { return false; } }, + showMobileFreeAlert() { + var hasMobileFee = true; + if (this.mobileFeePart?.laborAmount == 0 && this.mobileFeePart?.sellingPrice == 0 && this.mobileFeePart.kitPrice == 0) { + hasMobileFee = false; + } + + if (this.isServiceableMobile && !this.isInsurance && !hasMobileFee) { + return true; + } + return false; + }, isServiceableInshop() { if (this.isRecalibrationServiceableInshop !== null) { return this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop; @@ -400,6 +411,7 @@ export default { } if (mobileFeePart) { + console.log(JSON.stringify(mobileFeePart)); this.mobileFeePart = mobileFeePart; } From 7fee46216301eaf746df16c44f4d803af4f0d3a8 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 14 Aug 2024 10:39:41 -0400 Subject: [PATCH 2/3] CSR-1981 show mobile fee free alert if it is 0 CSR-1981 show mobile fee free alert if it is 0 --- src/layouts/service-location/service-location.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 28223d2bc..ed94e5413 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -316,7 +316,11 @@ export default { }, showMobileFreeAlert() { var hasMobileFee = true; - if (this.mobileFeePart?.laborAmount == 0 && this.mobileFeePart?.sellingPrice == 0 && this.mobileFeePart.kitPrice == 0) { + if ( + this.mobileFeePart?.laborAmount == 0 && + this.mobileFeePart?.sellingPrice == 0 && + this.mobileFeePart.kitPrice == 0 + ) { hasMobileFee = false; } @@ -411,7 +415,6 @@ export default { } if (mobileFeePart) { - console.log(JSON.stringify(mobileFeePart)); this.mobileFeePart = mobileFeePart; } From 907ed95d964d9bedd2a9d209d213ed09a02751f1 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 14 Aug 2024 10:40:46 -0400 Subject: [PATCH 3/3] CSR-1981 show mobile fee free alert if it is 0 CSR-1981 show mobile fee free alert if it is 0 --- src/layouts/service-location/service-location.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index ed94e5413..da6e4ebff 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -319,7 +319,7 @@ export default { if ( this.mobileFeePart?.laborAmount == 0 && this.mobileFeePart?.sellingPrice == 0 && - this.mobileFeePart.kitPrice == 0 + this.mobileFeePart?.kitPrice == 0 ) { hasMobileFee = false; }