From 9b3e8191b163c922a31658137bca6c9b21425b57 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Tue, 26 Nov 2024 20:43:44 +0530 Subject: [PATCH 1/2] CSR-2398 check actual recalibration required on the part or the child parts --- src/store/index.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index a5d1f4e68..c91f9a63c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -41,7 +41,11 @@ import { coverageTypeValue, coverageTypeEnum, } from "@/constants/insurance"; -import { containsRecalParts, getTopLevelPartsWithRecal } from "@/helpers/recal-helper"; +import { + containsRecalParts, + getTopLevelPartsWithRecal, + isRecalPartOrHasChildRecalPart, +} from "@/helpers/recal-helper"; import { externalParameterStatus } from "@/constants/external-parameters"; import { experimentSettings } from "@/constants/experiments"; import experimentMixin from "@/mixins/experiment-mixin.js"; @@ -1651,9 +1655,10 @@ export const actions = { const partialLineItemsObjects = context.getters.order.lineItems.glassParts?.map( (lineItem) => ({ partNumber: lineItem.partNumber, - recalibrationType: lineItem.recalibrationType - ? escapeRecalibrationType(lineItem.recalibrationType) - : undefined, + recalibrationType: + lineItem.recalibrationType && isRecalPartOrHasChildRecalPart(lineItem) + ? escapeRecalibrationType(lineItem.recalibrationType) + : undefined, }) ); From 4ad6704439429d04542a56d4990a5a7306fb36f5 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Tue, 26 Nov 2024 15:14:50 -0500 Subject: [PATCH 2/2] CSR-2417 collapse cart on all pages regardless of experiment except payment. --- src/fmg-components/cart/cart.vue | 6 +++--- src/layouts/confirmation/confirmation.vue | 1 + src/layouts/payment-method/payment-method.vue | 1 + src/layouts/payment/payment.vue | 3 ++- src/layouts/quote/quote.vue | 6 +++++- src/styles/common-styles.scss | 14 +++++--------- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 52049b0c9..2af4ba6ea 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -199,6 +199,7 @@ export default { shouldHideRecalibration: Boolean, isItac: Boolean, isNoComp: Boolean, + isExpandedOnLoad: Boolean, }, data() { return { @@ -217,7 +218,7 @@ export default { this.isExpanded = !this.isExpanded; }, updateIsExpandedWithDefault() { - this.isExpanded = this.shouldHideRecalibration; + this.isExpanded = this.isExpandedOnLoad; }, getVapsPrice(packageName) { const vapsItems = this.getVapsCartItemsForSelectedPackage(packageName); @@ -331,9 +332,8 @@ export default { }, computed: { isCartReadyToLoad() { - var myReturn = this.shouldHideRecalibration !== null; this.updateIsExpandedWithDefault(); - return myReturn; + return this.isExpandedOnLoad !== null; }, lineItems: { get: function () { diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index 09b666920..d2dde2e05 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -60,6 +60,7 @@ :insuranceCompanyName="insuranceCompanyName" :showInsuranceCoverageAs="showInsuranceCoverageAs" :shouldHideRecalibration="shouldHideRecalibration" + :isExpandedOnLoad="false" :isItac="isItac" :isNoComp="isNoComp" /> diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index f4972a054..d8d4518f1 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -31,6 +31,7 @@ :insuranceCompanyName="insuranceCompanyName" :showInsuranceCoverageAs="showInsuranceCoverageAs" :shouldHideRecalibration="shouldHideRecalibration" + :isExpandedOnLoad="false" :isItac="isItac" :isNoComp="isNoComp" /> diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 75ad840e0..7103091e6 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -59,7 +59,8 @@ :insuranceCompanyName="insuranceCompanyName" :showInsuranceCoverageAs="showInsuranceCoverageAs" :isItac="isItac" - :isNocomp="isNocomp" /> + :isNocomp="isNocomp" + :isExpandedOnLoad="true" />
diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 5b8695d3e..357db44dd 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -429,7 +429,11 @@ export default { }, shouldHideRecalibration() { if (this.isInsuranceSelected) return false; - return (experimentMixin.methods.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === "true" && this.isRecalibrationOnOrder); + return ( + experimentMixin.methods + .getSettingValue(experimentSettings.RECAL_PRICE_REMOVE) + ?.toLowerCase() === "true" && this.isRecalibrationOnOrder + ); }, showAfterpayBanner() { return ( diff --git a/src/styles/common-styles.scss b/src/styles/common-styles.scss index 32b837dc3..002debed8 100644 --- a/src/styles/common-styles.scss +++ b/src/styles/common-styles.scss @@ -71,15 +71,11 @@ body { // Fix "iOS viewport scroll bug" issue on iPhone // where bottom of page is covered by address bar - @media only screen - and (min-device-width: 375px) - and (max-device-width: 812px) - and (-webkit-min-device-pixel-ratio: 3) - and (orientation: portrait) { - .page-container-grouped-styles { - padding-bottom: 3rem; - } - } + @media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: portrait) { + .page-container-grouped-styles { + padding-bottom: 3rem; + } + } } .modal-open { .container-fluid {