Merge branch 'release/2025.05.22' into feature/CASH-535

This commit is contained in:
mvalaiyapathi 2025-05-09 10:52:01 -04:00 committed by GitHub
commit a082dc00f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 43 additions and 13 deletions

View file

@ -34,6 +34,7 @@ export default {
isServiceableInshop: Boolean, isServiceableInshop: Boolean,
isServiceableDropoff: Boolean, isServiceableDropoff: Boolean,
mobileFeeApplies: Boolean, mobileFeeApplies: Boolean,
zipCode: String,
}, },
computed: { computed: {
questionText() { questionText() {
@ -47,6 +48,7 @@ export default {
const shouldShowInshop = this.isServiceableInshop; const shouldShowInshop = this.isServiceableInshop;
const shouldShowDropoff = const shouldShowDropoff =
this.isServiceableDropoff && !this.$store.getters.damage.isRepair; this.isServiceableDropoff && !this.$store.getters.damage.isRepair;
const zipCode = this.zipCode;
var answers = this.answersFromCms var answers = this.answersFromCms
? this.answersFromCms.filter((answer) => { ? this.answersFromCms.filter((answer) => {
@ -87,12 +89,15 @@ export default {
watch: { watch: {
answersToDisplay: { answersToDisplay: {
handler(newValue) { handler(newValue) {
// If there is only one option to display and that option is 'Mobile' then select it // If there is only one option to display and that option is 'Mobile' or 'Inshop' then select it
if ( if (newValue.length == 1) {
newValue.length == 1 && const name = newValue[0].Name;
newValue.findIndex((answer) => answer.Name == "Mobile") != -1 if (
) { name === AppointmentTypeStrings.MOBILE ||
this.selectedValue = "Mobile"; name === AppointmentTypeStrings.IN_SHOP
) {
this.selectedValue = name;
}
} }
}, },
immediate: true, immediate: true,
@ -100,14 +105,14 @@ export default {
isMobileOnly: { isMobileOnly: {
handler(newValue) { handler(newValue) {
if (newValue) { if (newValue) {
this.selectedValue = "Mobile"; this.selectedValue = AppointmentTypeStrings.MOBILE;
} }
}, },
}, },
isInshopOnly: { isInshopOnly: {
handler(newValue) { handler(newValue) {
if (newValue) { if (newValue) {
this.selectedValue = "Inshop"; this.selectedValue = AppointmentTypeStrings.IN_SHOP;
} }
}, },
}, },

View file

@ -8,6 +8,7 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) {
} }
const zipCodeData = await getZipCodeData(serviceZipCode); const zipCodeData = await getZipCodeData(serviceZipCode);
const providerData = await getShopProviderData(serviceZipCode);
// Get the Mobile Fee Part // Get the Mobile Fee Part
const mobileFeePart = await baseMixin.methods.dispatchStoreActionWithLogging( const mobileFeePart = await baseMixin.methods.dispatchStoreActionWithLogging(
@ -15,6 +16,7 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) {
{ {
serviceZipCode: serviceZipCode, serviceZipCode: serviceZipCode,
serviceZipCodeCtu: zipCodeData.zipCodeCtu, serviceZipCodeCtu: zipCodeData.zipCodeCtu,
mobileProviderNumber: providerData.data.mobileProviderNumber,
}, },
pageNameToLog, pageNameToLog,
false false

View file

@ -91,6 +91,7 @@ const mockStoreActionPriceOrderItemsAndSaveServerData =
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA; storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA;
const mockStoreActionGetServiceabilityDetails = storeActions.GET_SERVICEABILITY_DETAILS; const mockStoreActionGetServiceabilityDetails = storeActions.GET_SERVICEABILITY_DETAILS;
const mockStoreActionGetShopTimeSlots = storeActions.GET_SHOP_TIME_SLOTS; const mockStoreActionGetShopTimeSlots = storeActions.GET_SHOP_TIME_SLOTS;
const mockStoreActionGetProviders = storeActions.GET_PROVIDERS;
const mockGetShopTimeSlotsGoodAvailability = { const mockGetShopTimeSlotsGoodAvailability = {
data: { data: {
@ -236,6 +237,15 @@ jest.mock("@/mixins/base-mixin.js", () => ({
return Promise.resolve(mockGetShopTimeSlotsLowAvailability); return Promise.resolve(mockGetShopTimeSlotsLowAvailability);
} }
if (actionName === mockStoreActionGetProviders) {
return Promise.resolve({
data: {
mobileProviderNumber: "001820",
shopProviders: [{}],
},
});
}
}), }),
}, },
})); }));

View file

@ -79,6 +79,7 @@
:isServiceableDropoff="isServiceableDropoff" :isServiceableDropoff="isServiceableDropoff"
:isDisplayed="isAppointmentTypeDisplayed" :isDisplayed="isAppointmentTypeDisplayed"
:mobileFeeApplies="mobileFeeApplies" :mobileFeeApplies="mobileFeeApplies"
:zipCode="zipCode"
ref="appointmentTypeQuestion" ref="appointmentTypeQuestion"
groupName="appointmentTypeQuestion" groupName="appointmentTypeQuestion"
cmsWidgetName="AppointmentTypeQuestionWidget" cmsWidgetName="AppointmentTypeQuestionWidget"
@ -112,14 +113,17 @@
:selectedAppointmentType="selectedAppointmentType" :selectedAppointmentType="selectedAppointmentType"
:shopProviderData="shopProviderData" :shopProviderData="shopProviderData"
:isDisplayed="isShopQuestionDisplayed" :isDisplayed="isShopQuestionDisplayed"
cmsWidgetName="ShopQuestionWidget" /> cmsWidgetName="ShopQuestionWidget"
:isInshopOnly="isInshopOnly" />
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" /> <contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
<navbar <navbar
cmsWidgetName="FunnelFooterWidget" cmsWidgetName="FunnelFooterWidget"
ref="navbar" ref="navbar"
:isForwardActionDisabled="!meta.valid || displayNoShopsAlert" :isForwardActionDisabled="
!meta.valid || displayNoShopsAlert || mobileLocationModalOpened
"
@back-clicked="backButtonAction" @back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction" /> @ForwardClicked="forwardButtonAction" />
</div> </div>
@ -419,6 +423,11 @@ export default {
isNoComp() { isNoComp() {
return store.getters.order.policy.isNoComp; return store.getters.order.policy.isNoComp;
}, },
isInshopOnly() {
return (
this.isServiceableInshop && !this.isServiceableMobile && !this.isServiceableDropoff
);
},
}, },
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {

View file

@ -77,6 +77,7 @@ export default {
cmsWidgetName: String, cmsWidgetName: String,
validationRules: String, validationRules: String,
isDisplayed: Boolean, isDisplayed: Boolean,
isInshopOnly: Boolean,
}, },
computed: { computed: {
questionText() { questionText() {
@ -233,9 +234,8 @@ export default {
// nothing to do with this component. We could mitigate this by showing / hiding this component with v-if but that messes // nothing to do with this component. We could mitigate this by showing / hiding this component with v-if but that messes
// up the component initialization on page load. // up the component initialization on page load.
async handler() { async handler() {
this.resetAnswers();
await nextTick(); await nextTick();
this.resetAnswers();
this.getNextShopsFromList(); this.getNextShopsFromList();
}, },
}, },

View file

@ -1736,7 +1736,10 @@ export const actions = {
return response; return response;
}, },
getMobileFeePart(context, { payload: { serviceZipCode, serviceZipCodeCtu }, pageNameToLog }) { getMobileFeePart(
context,
{ payload: { serviceZipCode, serviceZipCodeCtu, mobileProviderNumber }, pageNameToLog }
) {
const serviceType = context.getters.damage.isRepair ? "Repair" : "Install"; const serviceType = context.getters.damage.isRepair ? "Repair" : "Install";
const facilityType = "Mobile"; const facilityType = "Mobile";
const parentAccountNumber = context.getters.payment.parentAccountNumber; const parentAccountNumber = context.getters.payment.parentAccountNumber;
@ -1754,6 +1757,7 @@ export const actions = {
order.serviceLocation?.zipCode; order.serviceLocation?.zipCode;
var providerNumber = var providerNumber =
mobileProviderNumber ??
serviceZipCodeCtu ?? serviceZipCodeCtu ??
order.serviceLocation?.provider?.providerNumber ?? order.serviceLocation?.provider?.providerNumber ??
order.serviceLocation?.zipCodeCtu; order.serviceLocation?.zipCodeCtu;