change serviceType to damageType

This commit is contained in:
Bill Richardson 2023-05-02 12:15:41 -04:00
parent 55b8c5061f
commit 3394266714
2 changed files with 7 additions and 7 deletions

View file

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

View file

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