CASH-2420: Check mobile fee when changing shop locations
This commit is contained in:
parent
53995d7535
commit
3ba56a13a0
3 changed files with 24 additions and 1 deletions
|
|
@ -125,7 +125,8 @@
|
|||
:zipCodeFromParent="zipCode"
|
||||
:isShopQuestionDisplayed="isShopQuestionDisplayed"
|
||||
@shop-selected="onShopSelected"
|
||||
@updated-serviceability="setServiceabilityDetails" />
|
||||
@updated-serviceability="setServiceabilityDetails"
|
||||
@updated-mobile-fee-part="setMobileFeePart" />
|
||||
</div>
|
||||
<div>
|
||||
<textBlock
|
||||
|
|
@ -1318,6 +1319,15 @@ export default {
|
|||
moreShopTimeSlots.mobileTimeSlotsData.days
|
||||
);
|
||||
|
||||
if (!this.selectableDatesMobile.estimatedServiceMinutesMinimum) {
|
||||
this.selectableDatesMobile.estimatedServiceMinutesMinimum =
|
||||
moreShopTimeSlots.mobileTimeSlotsData.estimatedServiceMinutesMinimum;
|
||||
}
|
||||
if (!this.selectableDatesMobile.estimatedServiceMinutesMaximum) {
|
||||
this.selectableDatesMobile.estimatedServiceMinutesMaximum =
|
||||
moreShopTimeSlots.mobileTimeSlotsData.estimatedServiceMinutesMaximum;
|
||||
}
|
||||
|
||||
return moreShopTimeSlots;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
:zipCodeFromParent="zipCodeFromParent"
|
||||
@shop-selected="onShopSelected"
|
||||
@updated-serviceability="setServiceabilityDetails"
|
||||
@updated-mobile-fee-part="setMobileFeePart"
|
||||
cmsWidgetName="YourSafeliteShopWidget" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -76,6 +77,9 @@ export default {
|
|||
setServiceabilityDetails(serviceabilityDetails) {
|
||||
this.$emit("updated-serviceability", serviceabilityDetails);
|
||||
},
|
||||
setMobileFeePart(mobileFeePart) {
|
||||
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ import {
|
|||
getServiceabilityDetails,
|
||||
getClosestApplicableShops,
|
||||
getShopProviderData,
|
||||
getPricedMobileFeePart,
|
||||
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
||||
|
||||
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
||||
|
|
@ -338,6 +339,14 @@ export default {
|
|||
);
|
||||
|
||||
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
||||
|
||||
// retrieve mobile fee part
|
||||
const mobileFeePart = await getPricedMobileFeePart(
|
||||
this.zipCodeData.zipCode,
|
||||
this.pageName
|
||||
);
|
||||
|
||||
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
||||
}
|
||||
|
||||
this.closeModal();
|
||||
|
|
|
|||
Loading…
Reference in a new issue