Merge pull request #979 from Safelite/feature/INSR-2206
INSR-2206: Big Truck updates for service-location page
This commit is contained in:
commit
996f7fd3d6
3 changed files with 21 additions and 12 deletions
|
|
@ -53,6 +53,12 @@
|
||||||
class="my-5"
|
class="my-5"
|
||||||
cmsWidgetName="AlertNoShopsWidget"
|
cmsWidgetName="AlertNoShopsWidget"
|
||||||
alertClass="alert-warning" />
|
alertClass="alert-warning" />
|
||||||
|
<alert
|
||||||
|
v-if="displayBigTruckNoShops"
|
||||||
|
ref="alertBigTruckNoShops"
|
||||||
|
class="my-5"
|
||||||
|
cmsWidgetName="AlertBigTruckNoShopsWidget"
|
||||||
|
alertClass="alert-warning" />
|
||||||
<div class="appointment-type">
|
<div class="appointment-type">
|
||||||
<appointmentTypeQuestion
|
<appointmentTypeQuestion
|
||||||
v-show="isAppointmentTypeDisplayed"
|
v-show="isAppointmentTypeDisplayed"
|
||||||
|
|
@ -361,7 +367,10 @@ export default {
|
||||||
return this.zipContainsMilitaryBase && this.isServiceableMobile;
|
return this.zipContainsMilitaryBase && this.isServiceableMobile;
|
||||||
},
|
},
|
||||||
displayNoShopsAlert() {
|
displayNoShopsAlert() {
|
||||||
return !this.isServiceableInshop && !this.isServiceableMobile;
|
return !this.isBigTruck && !this.isServiceableInshop && !this.isServiceableMobile;
|
||||||
|
},
|
||||||
|
displayBigTruckNoShops() {
|
||||||
|
return this.isBigTruck && !this.isServiceableInshop && !this.isServiceableMobile;
|
||||||
},
|
},
|
||||||
displayRecalibrationWarning() {
|
displayRecalibrationWarning() {
|
||||||
return this.requiresInshopRecalibration;
|
return this.requiresInshopRecalibration;
|
||||||
|
|
@ -381,6 +390,9 @@ export default {
|
||||||
return isNoComp || isITAC
|
return isNoComp || isITAC
|
||||||
? this.navigationScenarios.CLICKED_BACK_CANNOT_REACH_TPA_FLOW
|
? this.navigationScenarios.CLICKED_BACK_CANNOT_REACH_TPA_FLOW
|
||||||
: this.navigationScenarios.CLICKED_BACK_CAN_REACH_TPA_FLOW;
|
: this.navigationScenarios.CLICKED_BACK_CAN_REACH_TPA_FLOW;
|
||||||
|
},
|
||||||
|
isBigTruck() {
|
||||||
|
return this.mainStore.order.vehicle.isBigTruck;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -1032,7 +1032,7 @@ export const useMainStore = defineStore({
|
||||||
},
|
},
|
||||||
|
|
||||||
getTpaProviders(zipCode, radius) {
|
getTpaProviders(zipCode, radius) {
|
||||||
const { carId } = this.order.vehicle;
|
const { carId, isBigTruck } = this.order.vehicle;
|
||||||
const damageType = this.damage.isRepair ? 'Repair' : 'Replace';
|
const damageType = this.damage.isRepair ? 'Repair' : 'Replace';
|
||||||
const { parentAccountNumber } = this.order;
|
const { parentAccountNumber } = this.order;
|
||||||
const partsWithRecal = getTopLevelGlassPartsWithRecal(this.order.lineItems.glassParts);
|
const partsWithRecal = getTopLevelGlassPartsWithRecal(this.order.lineItems.glassParts);
|
||||||
|
|
@ -1043,6 +1043,7 @@ export const useMainStore = defineStore({
|
||||||
if (windshieldPartWithRecal) {
|
if (windshieldPartWithRecal) {
|
||||||
url += `/${windshieldPartWithRecal.partNumber}`;
|
url += `/${windshieldPartWithRecal.partNumber}`;
|
||||||
}
|
}
|
||||||
|
url += `/${isBigTruck}`;
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
globalMethods.callHttpClient({
|
globalMethods.callHttpClient({
|
||||||
|
|
@ -1242,16 +1243,9 @@ export const useMainStore = defineStore({
|
||||||
if (availableLineItems && availableLineItems.length > 0) {
|
if (availableLineItems && availableLineItems.length > 0) {
|
||||||
const { vehicle, serviceLocation, policy, eon, referralNumber, referralDate, referralSequenceNumber, lineItems } = this.order;
|
const { vehicle, serviceLocation, policy, eon, referralNumber, referralDate, referralSequenceNumber, lineItems } = this.order;
|
||||||
|
|
||||||
const availableLineItemsFiltered = availableLineItems.filter((lineItem) => {
|
const availableLineItemsFiltered = availableLineItems.filter((lineItem) => !!(lineItem.partNumber));
|
||||||
if ( lineItem.partNumber )
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
const lineItemsWithOnlyPartNumbers = availableLineItemsFiltered.map((lineItem) => {
|
const lineItemsWithOnlyPartNumbers = availableLineItemsFiltered.map((lineItem) => ({ partNumber: lineItem.partNumber }));
|
||||||
return {partNumber: lineItem.partNumber};
|
|
||||||
});
|
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
ParentAccountNumber: this.order.parentAccountNumber,
|
ParentAccountNumber: this.order.parentAccountNumber,
|
||||||
|
|
|
||||||
|
|
@ -1930,6 +1930,8 @@ describe('Store', () => {
|
||||||
store.order.vehicle.carId = carId;
|
store.order.vehicle.carId = carId;
|
||||||
const zipCode = getRandomString(6, 6);
|
const zipCode = getRandomString(6, 6);
|
||||||
const radius = getRandomInt(5, 100);
|
const radius = getRandomInt(5, 100);
|
||||||
|
const isBigTruck = false;
|
||||||
|
store.order.vehicle.isBigTruck = isBigTruck;
|
||||||
const expectedEndpoint = [
|
const expectedEndpoint = [
|
||||||
endpoints.GetProviders.url,
|
endpoints.GetProviders.url,
|
||||||
zipCode,
|
zipCode,
|
||||||
|
|
@ -1937,7 +1939,8 @@ describe('Store', () => {
|
||||||
radius,
|
radius,
|
||||||
parentAccountNumber,
|
parentAccountNumber,
|
||||||
'false',
|
'false',
|
||||||
carId
|
carId,
|
||||||
|
isBigTruck
|
||||||
].join('/');
|
].join('/');
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue