CASH-1348 - Updated the response object model for closestShops

This commit is contained in:
Minojhini Valaiyapathi 2025-08-21 11:54:45 -04:00
parent b24c32781c
commit cee54f8b4c
9 changed files with 9 additions and 9 deletions

View file

@ -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" },
],

View file

@ -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();
}

View file

@ -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" },
],

View file

@ -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();
}

View file

@ -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();

View file

@ -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;
}

View file

@ -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();
}

View file

@ -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();

View file

@ -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();
}