Merge branch 'develop' into CSR-1357-customer-details

This commit is contained in:
Bryan Mauger 2023-05-05 10:18:20 -04:00
commit 9e93aad88e
7 changed files with 21 additions and 26 deletions

View file

@ -525,7 +525,6 @@ describe("license-plate-lookup.vue", () => {
});
const registrationZip = "12345";
const serviceZip = "12345";
console.log("this is the test I care about");
wrapper.vm.navigateForward = jest.fn();
const vinLookup = { data: { vehicle: { carId: "TESTID1" } } };

View file

@ -48,7 +48,7 @@ describe("service-location-helper.js", () => {
it("Should return null if no service zip code is passed in", async () => {
// Arrange
const serviceZipCode = null;
const serviceType = "Replace";
const damageType = "Replace";
const parentAccountNumber = 167132;
const billToAccountNumber = 1234;
const expected = null;
@ -56,7 +56,7 @@ describe("service-location-helper.js", () => {
// Act
const result = await getPricedMobileFeePart(
serviceZipCode,
serviceType,
damageType,
parentAccountNumber,
billToAccountNumber
);
@ -68,7 +68,7 @@ describe("service-location-helper.js", () => {
it("Should return the priced mobile fee part", async () => {
// Arrange
const serviceZipCode = "43235";
const serviceType = "Replace";
const damageType = "Replace";
const parentAccountNumber = 167132;
const billToAccountNumber = 1234;
@ -84,7 +84,7 @@ describe("service-location-helper.js", () => {
// Act
const result = await getPricedMobileFeePart(
serviceZipCode,
serviceType,
damageType,
parentAccountNumber,
billToAccountNumber
);

View file

@ -75,7 +75,6 @@
v-model="providerNumber"
:serviceZipCode="zipCode"
:selectedAppointmentType="selectedAppointmentType"
:shopQuestionData="shopQuestionInitialData"
cmsWidgetName="ShopQuestionWidget" />
</Transition>
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
@ -296,12 +295,6 @@ export default {
displayNoShopsAlert() {
return !this.isServiceableInshop && !this.isServiceableMobile;
},
isDropoff() {
return this.selectedAppointmentType === "Dropoff";
},
isMobile() {
return this.selectedAppointmentType === "Mobile";
},
},
methods: {
arePagePrerequisitesValid() {

View file

@ -12,6 +12,7 @@ jest.mock("@/mixins/base-mixin", () => ({
});
}
},
scrollToPageBottom() {},
},
}));

View file

@ -59,7 +59,6 @@ export default {
return {
shops: [],
shopListButton: shopListButton,
availability: "high",
answers: [],
shopIndex: 0,
displaySeeMoreLocationsLink: false,
@ -102,10 +101,10 @@ export default {
},
async getNextShopsFromList(numberToGet = 3) {
const shopIterator = (array, n) => {
let l = array.length;
const l = array.length;
return () => {
var end = this.shopIndex + n;
var part = array.slice(this.shopIndex, end);
const end = this.shopIndex + n;
const part = array.slice(this.shopIndex, end);
this.shopIndex = end < l ? end : this.shops.length;
return part;
};
@ -120,7 +119,6 @@ export default {
buttonLabel: shop.city,
buttonLabelSubCopy: `${shop.distance} mi`,
buttonBodyCopy: `${shop.streetAddress}, ${shop.city}, ${shop.state} ${shop.zipCode}`,
//buttonAuxillaryCopy: `foo`,
};
});
@ -142,7 +140,7 @@ export default {
await this.$nextTick();
this.scrollToBottom();
this.scrollToPageBottom();
},
resetShopList() {
this.answers = [];
@ -150,10 +148,6 @@ export default {
this.selectedValue = "";
this.$refs.buttonQuestion.resetField();
},
scrollToBottom() {
const container = document.getElementsByClassName("page-container-grouped-styles")[0];
container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" });
},
async reloadShopData(serviceZipCode) {
const result = await this.loadInitialData(serviceZipCode);
this.initializeComponent(result.data);
@ -176,7 +170,7 @@ export default {
await this.$nextTick();
this.scrollToBottom();
this.scrollToPageBottom();
},
},
shops: {

View file

@ -99,6 +99,14 @@ export default {
getTotalLineItemPrice(lineItem) {
return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice;
},
scrollToPageTop() {
const container = document.getElementsByClassName("page-container-grouped-styles")[0];
container.scrollTo({ top: 0, left: 0, behavior: "smooth" });
},
scrollToPageBottom() {
const container = document.getElementsByClassName("page-container-grouped-styles")[0];
container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" });
},
},
computed: {
storeActions() {

View file

@ -954,13 +954,13 @@ export const actions = {
},
getMobileFeePart(context) {
const serviceType = context.getters.damage.isRepair ? "Repair" : "Replace";
const damageType = context.getters.damage.isRepair ? "Repair" : "Replace";
const parentAccountNumber = context.getters.payment.parentAccountNumber;
const billToAccountNumber = 87291; // TODO: MAKE THIS REAL
return globalMethods.callHttpClient({
method: endpoints.GetMobileFeePart.method,
endpoint: `${endpoints.GetMobileFeePart.url}/${serviceType}/${parentAccountNumber}/${billToAccountNumber}`,
endpoint: `${endpoints.GetMobileFeePart.url}/${damageType}/${parentAccountNumber}/${billToAccountNumber}`,
});
},
@ -999,7 +999,7 @@ export const actions = {
endpoint: endpoints.GetSupportingItems.url,
payload: {
carId: carId,
serviceType: isRepair ? "Repair" : "Replace",
damageType: isRepair ? "Repair" : "Replace",
parentAccountNumber: applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
parts: glassPartsArray,
numberOfRepairChips: isRepair ? numberOfChips : 0,