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"
|
:zipCodeFromParent="zipCode"
|
||||||
:isShopQuestionDisplayed="isShopQuestionDisplayed"
|
:isShopQuestionDisplayed="isShopQuestionDisplayed"
|
||||||
@shop-selected="onShopSelected"
|
@shop-selected="onShopSelected"
|
||||||
@updated-serviceability="setServiceabilityDetails" />
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
|
@updated-mobile-fee-part="setMobileFeePart" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<textBlock
|
<textBlock
|
||||||
|
|
@ -1318,6 +1319,15 @@ export default {
|
||||||
moreShopTimeSlots.mobileTimeSlotsData.days
|
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;
|
return moreShopTimeSlots;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
:zipCodeFromParent="zipCodeFromParent"
|
:zipCodeFromParent="zipCodeFromParent"
|
||||||
@shop-selected="onShopSelected"
|
@shop-selected="onShopSelected"
|
||||||
@updated-serviceability="setServiceabilityDetails"
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
|
@updated-mobile-fee-part="setMobileFeePart"
|
||||||
cmsWidgetName="YourSafeliteShopWidget" />
|
cmsWidgetName="YourSafeliteShopWidget" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -76,6 +77,9 @@ export default {
|
||||||
setServiceabilityDetails(serviceabilityDetails) {
|
setServiceabilityDetails(serviceabilityDetails) {
|
||||||
this.$emit("updated-serviceability", serviceabilityDetails);
|
this.$emit("updated-serviceability", serviceabilityDetails);
|
||||||
},
|
},
|
||||||
|
setMobileFeePart(mobileFeePart) {
|
||||||
|
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ import {
|
||||||
getServiceabilityDetails,
|
getServiceabilityDetails,
|
||||||
getClosestApplicableShops,
|
getClosestApplicableShops,
|
||||||
getShopProviderData,
|
getShopProviderData,
|
||||||
|
getPricedMobileFeePart,
|
||||||
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
||||||
|
|
||||||
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
@ -338,6 +339,14 @@ export default {
|
||||||
);
|
);
|
||||||
|
|
||||||
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
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();
|
this.closeModal();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue