Merge pull request #2150 from Safelite/CSR-2417-close-cart-on-submit
CSR-2417 close cart on submit
This commit is contained in:
commit
0acbbc3144
7 changed files with 26 additions and 18 deletions
|
|
@ -199,6 +199,7 @@ export default {
|
||||||
shouldHideRecalibration: Boolean,
|
shouldHideRecalibration: Boolean,
|
||||||
isItac: Boolean,
|
isItac: Boolean,
|
||||||
isNoComp: Boolean,
|
isNoComp: Boolean,
|
||||||
|
isExpandedOnLoad: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -217,7 +218,7 @@ export default {
|
||||||
this.isExpanded = !this.isExpanded;
|
this.isExpanded = !this.isExpanded;
|
||||||
},
|
},
|
||||||
updateIsExpandedWithDefault() {
|
updateIsExpandedWithDefault() {
|
||||||
this.isExpanded = this.shouldHideRecalibration;
|
this.isExpanded = this.isExpandedOnLoad;
|
||||||
},
|
},
|
||||||
getVapsPrice(packageName) {
|
getVapsPrice(packageName) {
|
||||||
const vapsItems = this.getVapsCartItemsForSelectedPackage(packageName);
|
const vapsItems = this.getVapsCartItemsForSelectedPackage(packageName);
|
||||||
|
|
@ -331,9 +332,8 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isCartReadyToLoad() {
|
isCartReadyToLoad() {
|
||||||
var myReturn = this.shouldHideRecalibration !== null;
|
|
||||||
this.updateIsExpandedWithDefault();
|
this.updateIsExpandedWithDefault();
|
||||||
return myReturn;
|
return this.isExpandedOnLoad !== null;
|
||||||
},
|
},
|
||||||
lineItems: {
|
lineItems: {
|
||||||
get: function () {
|
get: function () {
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
:insuranceCompanyName="insuranceCompanyName"
|
:insuranceCompanyName="insuranceCompanyName"
|
||||||
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
||||||
:shouldHideRecalibration="shouldHideRecalibration"
|
:shouldHideRecalibration="shouldHideRecalibration"
|
||||||
|
:isExpandedOnLoad="false"
|
||||||
:isItac="isItac"
|
:isItac="isItac"
|
||||||
:isNoComp="isNoComp" />
|
:isNoComp="isNoComp" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
:insuranceCompanyName="insuranceCompanyName"
|
:insuranceCompanyName="insuranceCompanyName"
|
||||||
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
||||||
:shouldHideRecalibration="shouldHideRecalibration"
|
:shouldHideRecalibration="shouldHideRecalibration"
|
||||||
|
:isExpandedOnLoad="false"
|
||||||
:isItac="isItac"
|
:isItac="isItac"
|
||||||
:isNoComp="isNoComp" />
|
:isNoComp="isNoComp" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,8 @@
|
||||||
:insuranceCompanyName="insuranceCompanyName"
|
:insuranceCompanyName="insuranceCompanyName"
|
||||||
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
||||||
:isItac="isItac"
|
:isItac="isItac"
|
||||||
:isNocomp="isNocomp" />
|
:isNocomp="isNocomp"
|
||||||
|
:isExpandedOnLoad="true" />
|
||||||
|
|
||||||
<hr class="mb-5" />
|
<hr class="mb-5" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -429,7 +429,11 @@ export default {
|
||||||
},
|
},
|
||||||
shouldHideRecalibration() {
|
shouldHideRecalibration() {
|
||||||
if (this.isInsuranceSelected) return false;
|
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() {
|
showAfterpayBanner() {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,11 @@ import {
|
||||||
coverageTypeValue,
|
coverageTypeValue,
|
||||||
coverageTypeEnum,
|
coverageTypeEnum,
|
||||||
} from "@/constants/insurance";
|
} 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 { externalParameterStatus } from "@/constants/external-parameters";
|
||||||
import { experimentSettings } from "@/constants/experiments";
|
import { experimentSettings } from "@/constants/experiments";
|
||||||
import experimentMixin from "@/mixins/experiment-mixin.js";
|
import experimentMixin from "@/mixins/experiment-mixin.js";
|
||||||
|
|
@ -1651,9 +1655,10 @@ export const actions = {
|
||||||
const partialLineItemsObjects = context.getters.order.lineItems.glassParts?.map(
|
const partialLineItemsObjects = context.getters.order.lineItems.glassParts?.map(
|
||||||
(lineItem) => ({
|
(lineItem) => ({
|
||||||
partNumber: lineItem.partNumber,
|
partNumber: lineItem.partNumber,
|
||||||
recalibrationType: lineItem.recalibrationType
|
recalibrationType:
|
||||||
? escapeRecalibrationType(lineItem.recalibrationType)
|
lineItem.recalibrationType && isRecalPartOrHasChildRecalPart(lineItem)
|
||||||
: undefined,
|
? escapeRecalibrationType(lineItem.recalibrationType)
|
||||||
|
: undefined,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,11 +71,7 @@ body {
|
||||||
|
|
||||||
// Fix "iOS viewport scroll bug" issue on iPhone
|
// Fix "iOS viewport scroll bug" issue on iPhone
|
||||||
// where bottom of page is covered by address bar
|
// where bottom of page is covered by address bar
|
||||||
@media only screen
|
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: portrait) {
|
||||||
and (min-device-width: 375px)
|
|
||||||
and (max-device-width: 812px)
|
|
||||||
and (-webkit-min-device-pixel-ratio: 3)
|
|
||||||
and (orientation: portrait) {
|
|
||||||
.page-container-grouped-styles {
|
.page-container-grouped-styles {
|
||||||
padding-bottom: 3rem;
|
padding-bottom: 3rem;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue