Updates for Mobile and Mobile ITAC
This commit is contained in:
parent
30d7555de9
commit
c4d3de73b2
4 changed files with 49 additions and 14 deletions
|
|
@ -10,8 +10,8 @@
|
|||
class="my-4"
|
||||
cmsWidgetName="PayInAdvanceCreditCardErrorAlertWidget"
|
||||
alertClass="alert-danger"
|
||||
@textLinkClicked="paymentFailedPayLater"
|
||||
:isDismissible="false" />
|
||||
:isDismissible="false"
|
||||
@textLinkClicked="paymentFailedPayLater" />
|
||||
|
||||
<div id="card-container">
|
||||
<iframe
|
||||
|
|
@ -562,7 +562,8 @@ export default {
|
|||
&& providerLocation.zipCode
|
||||
);
|
||||
|
||||
const isMobile = serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE;
|
||||
const isMobile = (serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE
|
||||
|| serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP);
|
||||
|
||||
const serviceLocationReqs =
|
||||
(isMobile && mobileReqs) || (!isMobile && dropOffInshopReqs);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@
|
|||
v-model="selectedProvider"
|
||||
:selectedAppointmentType="selectedAppointmentType"
|
||||
:isDisplayed="isShopQuestionDisplayed"
|
||||
cmsWidgetName="ShopQuestionWidget" />
|
||||
cmsWidgetName="ShopQuestionWidget"
|
||||
@updatedMobileProviderNumber="setMobileProviderNumber" />
|
||||
<contentGroupModal
|
||||
ref="RecalModal"
|
||||
cmsWidgetName="RecalModal" />
|
||||
|
|
@ -183,7 +184,12 @@ export default {
|
|||
const resultMap = await settleAllPromises(promiseResultMap);
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
vm.setData(resultMap.zipCodeData, resultMap.serviceabilityDetails, resultMap.mobileFeePart);
|
||||
vm.setData(
|
||||
resultMap.zipCodeData,
|
||||
resultMap.serviceabilityDetails,
|
||||
resultMap.mobileFeePart,
|
||||
resultMap.shopQuestionInitialData?.mobileProviderNumber
|
||||
);
|
||||
vm.$refs.shopQuestion.initializeComponent(resultMap.shopQuestionInitialData);
|
||||
});
|
||||
},
|
||||
|
|
@ -206,6 +212,7 @@ export default {
|
|||
selectedAppointmentType: this.getSelectedAppointmentType(),
|
||||
selectedProvider: this.getSelectedProvider(),
|
||||
mobileFeePart: null,
|
||||
mobileProviderNumber: null,
|
||||
zipContainsMilitaryBase: false,
|
||||
zipCodeCtu: null
|
||||
};
|
||||
|
|
@ -333,6 +340,19 @@ export default {
|
|||
await this.$refs.shopQuestion.reloadShopData(zipCode);
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
const providerToUse = this.isMobileLocationDisplayed
|
||||
? {
|
||||
providerNumber: this.mobileProviderNumber,
|
||||
address: {
|
||||
streetAddress: null,
|
||||
city: null,
|
||||
state: null,
|
||||
zipCode: null,
|
||||
zipCodeCtu: null
|
||||
}
|
||||
}
|
||||
: this.selectedProvider;
|
||||
|
||||
useMainStore().saveServiceLocation({
|
||||
address: this.streetAddress,
|
||||
address2: this.streetAddress2,
|
||||
|
|
@ -343,13 +363,13 @@ export default {
|
|||
appointmentType: this.selectedAppointmentType,
|
||||
isVehicleProtected: this.isVehicleProtected,
|
||||
provider: {
|
||||
providerNumber: this.selectedProvider?.providerNumber,
|
||||
providerNumber: providerToUse?.providerNumber,
|
||||
address: {
|
||||
streetAddress: this.selectedProvider?.address?.streetAddress,
|
||||
city: this.selectedProvider?.address?.city,
|
||||
state: this.selectedProvider?.address?.state,
|
||||
zipCode: this.selectedProvider?.address?.zipCode,
|
||||
zipCodeCtu: this.selectedProvider?.address?.zipCodeCtu
|
||||
streetAddress: providerToUse?.address?.streetAddress,
|
||||
city: providerToUse?.address?.city,
|
||||
state: providerToUse?.address?.state,
|
||||
zipCode: providerToUse?.address?.zipCode,
|
||||
zipCodeCtu: providerToUse?.address?.zipCodeCtu
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -386,7 +406,7 @@ export default {
|
|||
getSelectedProvider() {
|
||||
return useMainStore().order.serviceLocation.provider;
|
||||
},
|
||||
setData(zipCodeData, serviceabilityDetails, mobileFeePart) {
|
||||
setData(zipCodeData, serviceabilityDetails, mobileFeePart, mobileProviderNumber) {
|
||||
if (zipCodeData) {
|
||||
this.zipContainsMilitaryBase = zipCodeData.containsMilitaryBase;
|
||||
this.zipCodeCtu = zipCodeData.zipCodeCtu;
|
||||
|
|
@ -399,6 +419,10 @@ export default {
|
|||
if (mobileFeePart) {
|
||||
this.mobileFeePart = mobileFeePart;
|
||||
}
|
||||
|
||||
if (mobileProviderNumber) {
|
||||
this.mobileProviderNumber = mobileProviderNumber;
|
||||
}
|
||||
},
|
||||
setContainsMilitaryBase(val) {
|
||||
if (this.zipContainsMilitaryBase !== val) {
|
||||
|
|
@ -408,6 +432,9 @@ export default {
|
|||
setMobileFeePart(mobileFeePart) {
|
||||
this.mobileFeePart = mobileFeePart;
|
||||
},
|
||||
setMobileProviderNumber(providerNumber) {
|
||||
this.mobileProviderNumber = providerNumber;
|
||||
},
|
||||
resetMobileLocation() {
|
||||
this.streetAddress = '';
|
||||
this.streetAddress2 = '';
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export default {
|
|||
validationRules: String,
|
||||
isDisplayed: Boolean
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
emits: ['update:modelValue', 'updatedMobileProviderNumber'],
|
||||
data() {
|
||||
return {
|
||||
shopProviders: [],
|
||||
|
|
@ -237,6 +237,12 @@ export default {
|
|||
const result = await this.loadData(serviceZipCode);
|
||||
this.initializeComponent(result.data);
|
||||
|
||||
if (result.data?.mobileProviderNumber
|
||||
&& (this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
||||
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP)) {
|
||||
this.$emit('updatedMobileProviderNumber', result.data.mobileProviderNumber);
|
||||
}
|
||||
|
||||
this.resetAnswers();
|
||||
|
||||
await nextTick();
|
||||
|
|
|
|||
|
|
@ -1869,7 +1869,8 @@ export const useMainStore = defineStore({
|
|||
);
|
||||
|
||||
let queryString = '';
|
||||
if (appointmentType === 'Mobile') {
|
||||
if (appointmentType === AppointmentTypeStrings.MOBILE
|
||||
|| appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) {
|
||||
queryString =
|
||||
`ParentAccountNumber=${applicationConfig.CASH_PARENT_ACCOUNT_NUMBER}`
|
||||
+ `&BillToAccountNumber=${billToAccountNumber}`
|
||||
|
|
|
|||
Loading…
Reference in a new issue