CASH-816
CASH-816 fix for issues with 816,updating watcher for now, but can try to use a different approach for refactoring. added in css from before
This commit is contained in:
parent
b7ac78aaca
commit
b5562ee714
1 changed files with 23 additions and 1 deletions
|
|
@ -422,6 +422,7 @@ export default {
|
||||||
navigatingForward: false,
|
navigatingForward: false,
|
||||||
isMobileAddressValid: true,
|
isMobileAddressValid: true,
|
||||||
shopListButton: shopListButton,
|
shopListButton: shopListButton,
|
||||||
|
lastInshopProvider: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -1601,11 +1602,28 @@ export default {
|
||||||
appointmentType: {
|
appointmentType: {
|
||||||
handler(newValue, oldValue) {
|
handler(newValue, oldValue) {
|
||||||
if (newValue === AppointmentTypeStrings.MOBILE) {
|
if (newValue === AppointmentTypeStrings.MOBILE) {
|
||||||
|
const providerExists = this.shopProviderData.shopProviders.some(
|
||||||
|
(p) => p.providerNumber === this.selectedProvider?.providerNumber
|
||||||
|
);
|
||||||
|
if (providerExists) {
|
||||||
|
this.lastInshopProvider = this.selectedProvider;
|
||||||
|
}
|
||||||
this.selectedProvider = new Provider(
|
this.selectedProvider = new Provider(
|
||||||
this.shopProviderData.mobileProviderNumber
|
this.shopProviderData.mobileProviderNumber
|
||||||
);
|
);
|
||||||
this.isMobileSelected = true;
|
this.isMobileSelected = true;
|
||||||
} else {
|
}
|
||||||
|
else if(newValue === AppointmentTypeStrings.DROP_OFF || newValue === AppointmentTypeStrings.IN_SHOP || newValue === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF) {
|
||||||
|
const providerExists = this.shopProviderData.shopProviders.some(
|
||||||
|
(p) => p.providerNumber === this.selectedProvider?.providerNumber
|
||||||
|
);
|
||||||
|
if (providerExists) {
|
||||||
|
this.selectedProvider = this.lastInshopProvider;
|
||||||
|
} else {
|
||||||
|
this.selectedProvider = this.shopProviderData.shopProviders[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
this.selectedProvider = this.shopProviderData.shopProviders[0];
|
this.selectedProvider = this.shopProviderData.shopProviders[0];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -1707,4 +1725,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.shop-question-button .list-button-content {
|
||||||
|
background: $blue-100;
|
||||||
|
box-shadow: 0 0 0 1px $primary;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue