-
1) {
returnString = "match"
} else {
- switch(damageLocations[0]?.location) {
+ switch(damageLocations[0]?.glassLocation) {
case "Windshield":
returnString = "windshield"
break;
@@ -36,7 +36,7 @@ export function getDamageString() {
export function getIsWindshieldOnly () {
const damageLocations = store.getters.damage.glassToReplace;
- const returnString = damageLocations.length === 1 && damageLocations[0]?.location === "Windshield" ? "windshield" : "glass";
+ const returnString = damageLocations.length === 1 && damageLocations[0]?.glassLocation === "Windshield" ? "windshield" : "glass";
return returnString;
}
@@ -56,7 +56,7 @@ export async function isGlassAvailableForCarId(carId){
}
for(const option of currentGlassOptions){
- if(!newGlassOptions.data[optionsMap[option.location]].availableReplacementOptions.includes(option.name)){
+ if(!newGlassOptions.data[optionsMap[option.glassLocation]].availableReplacementOptions.includes(option.glassName)){
return false;
}
}
diff --git a/src/helpers/damage-helper.spec.js b/src/helpers/damage-helper.spec.js
index 2a46978dc..210bf96cc 100644
--- a/src/helpers/damage-helper.spec.js
+++ b/src/helpers/damage-helper.spec.js
@@ -16,7 +16,7 @@ jest.mock("@/mixins/base-mixin.js", () => ({
it("Should return match when multiple selected damage options are in the store", () => {
// Arrange / Act
- store.getters.damage.glassToReplace = [{location: "Windshield", name: "windshield"}, {location: "Passenger", name: "sideWindow"}];
+ store.getters.damage.glassToReplace = [{glassLocation: "Windshield", glassName: "windshield"}, {glassLocation: "Passenger", glassName: "sideWindow"}];
const damage = getDamageString();
@@ -29,7 +29,7 @@ jest.mock("@/mixins/base-mixin.js", () => ({
it("Should return windshield when Windshield is the only selected damage option in the store", () => {
// Arrange / Act
- store.getters.damage.glassToReplace = [{location: "Windshield", name: "windshield"}];
+ store.getters.damage.glassToReplace = [{glassLocation: "Windshield", glassName: "windshield"}];
const damage = getDamageString();
@@ -42,7 +42,7 @@ jest.mock("@/mixins/base-mixin.js", () => ({
it("Should return side window when Driver or Passenger is the only selected damage option in the store", () => {
// Arrange / Act
- store.getters.damage.glassToReplace = [{location: "Passenger", name: "sideWindow"}];
+ store.getters.damage.glassToReplace = [{glassLocation: "Passenger", glassName: "sideWindow"}];
const damage = getDamageString();
@@ -55,7 +55,7 @@ jest.mock("@/mixins/base-mixin.js", () => ({
it("Should return rear window when Rear is the only selected damage option in the store", () => {
// Arrange / Act
- store.getters.damage.glassToReplace = [{location: "Rear", name: "rear"}];
+ store.getters.damage.glassToReplace = [{glassLocation: "Rear", glassName: "rear"}];
const damage = getDamageString();
@@ -67,7 +67,7 @@ jest.mock("@/mixins/base-mixin.js", () => ({
describe("damage-helper.js", () => {
it("Should return true if no mismatches between each array exist", async () => {
// Arrange
- store.getters.damage.glassToReplace = [{location: "Windshield", name: "windshield"}];
+ store.getters.damage.glassToReplace = [{glassLocation: "Windshield", glassName: "windshield"}];
// Act
const isGlassAvailable = await isGlassAvailableForCarId();
@@ -80,7 +80,7 @@ jest.mock("@/mixins/base-mixin.js", () => ({
describe("damage-helper.js", () => {
it("Should return false if any mismatches between each array exist", async () => {
// Arrange
- store.getters.damage.glassToReplace = [{location: "Windshield", name: "sideWindow"}];
+ store.getters.damage.glassToReplace = [{glassLocation: "Windshield", glassName: "sideWindow"}];
const isGlassAvailable = await isGlassAvailableForCarId();
diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue
index 59acf4765..455a83f14 100644
--- a/src/layouts/address-lookup/address-lookup.vue
+++ b/src/layouts/address-lookup/address-lookup.vue
@@ -9,7 +9,7 @@
-
+
-
+
-
+