CASH-1348 - Updated the response object model for closestShops
This commit is contained in:
parent
b24c32781c
commit
cee54f8b4c
9 changed files with 9 additions and 9 deletions
|
|
@ -757,7 +757,7 @@ function setupMocks({
|
|||
wrapper.vm.$refs.navbar.removeLoader = jest.fn();
|
||||
const closestShops = {
|
||||
data: {
|
||||
providers: [
|
||||
inShopProviders: [
|
||||
{ id: 1, name: "Shop 1" },
|
||||
{ id: 2, name: "Shop 2" },
|
||||
],
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ export default {
|
|||
this.serviceZipCode,
|
||||
this.carId
|
||||
);
|
||||
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
|
||||
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
|
||||
if (this.displayNoServiceAlert) {
|
||||
return this.$refs.navbar.removeLoader();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -722,7 +722,7 @@ function setupMocks({
|
|||
wrapper.vm.$refs.navbar.removeLoader = jest.fn();
|
||||
const closestShops = {
|
||||
data: {
|
||||
providers: [
|
||||
inShopProviders: [
|
||||
{ id: 1, name: "Shop 1" },
|
||||
{ id: 2, name: "Shop 2" },
|
||||
],
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ export default {
|
|||
this.serviceZipCode,
|
||||
this.carId
|
||||
);
|
||||
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
|
||||
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
|
||||
if (this.displayNoServiceAlert) {
|
||||
return this.$refs.navbar.removeLoader();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ export default {
|
|||
"service-location"
|
||||
);
|
||||
|
||||
if (!closestShops || closestShops.providers?.length === 0) {
|
||||
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
||||
this.displayNoServiceAlert = true;
|
||||
this.focusOnZipInput();
|
||||
this.resetModalButtonStyle();
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ export default {
|
|||
"service-location"
|
||||
);
|
||||
|
||||
if (!closestShops || closestShops.providers?.length === 0) {
|
||||
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
||||
// We need an alert for heavy trucks
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ export default {
|
|||
this.serviceZipCode,
|
||||
this.carId
|
||||
);
|
||||
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
|
||||
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
|
||||
if (this.displayNoServiceAlert) {
|
||||
return this.$refs.navbar.removeLoader();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ export default {
|
|||
"vehicle"
|
||||
);
|
||||
|
||||
if (!closestShops || closestShops.data?.providers?.length === 0) {
|
||||
if (!closestShops || closestShops.data?.inShopProviders?.length === 0) {
|
||||
this.displayNoServiceAlert = true;
|
||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||
return baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ export default {
|
|||
this.serviceZipCode,
|
||||
this.carId
|
||||
);
|
||||
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
|
||||
this.displayNoServiceAlert = !closestShops?.data?.inShopProviders?.length;
|
||||
if (this.displayNoServiceAlert) {
|
||||
return this.$refs.navbar.removeLoader();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue