Now retrieving the actual mobile fee but we're mocking the part call

This commit is contained in:
Leah Schumann 2023-02-20 13:14:51 -05:00
parent 52e5c7d532
commit 023a521ec1
3 changed files with 6 additions and 7 deletions

View file

@ -70,7 +70,7 @@ const endpoints = {
url: "/parts/api/v1/parts/rain-defense",
method: "GET",
},
GetMobileFeePart: {
GetMobileFeePart: {
url: "/parts/api/v1/parts/mobile-fee",
method: "GET",
},

View file

@ -63,7 +63,7 @@ export default {
return {
internalModel: this.copyModel(this.modelValue),
displayInvalidZipAlert: false,
mobileFee: ""
mobileFee: "",
};
},
props: {
@ -147,24 +147,23 @@ export default {
isZipServiceableInShop: modelToCopy.isZipServiceableInShop,
};
},
async getMobileFee() {
// Get the Mobile Fee Part
const mobileFeePart = await baseMixin.methods.dispatchStoreAction(
storeActions.GET_MOBILE_FEE_PART,
null,
null,
false
);
// Get the Mobile Fee Part Price
const pricingResults = await baseMixin.methods.dispatchStoreAction(
storeActions.PRICE_ORDER_ITEMS,
[ mobileFeePart.data ],
[mobileFeePart.data],
false
);
return await baseMixin.methods.getTotalLineItemPrice(pricingResults[0]);
},
openModal() {

View file

@ -912,7 +912,7 @@ export const actions = {
method: endpoints.GetMobileFeePart.method,
endpoint: "https://run.mocky.io/v3/795de4cb-d014-48b4-9338-dab33261adce", //TODO: Remove Mocky Endpoint
});
},
},
getSupportingItems(context) {
const glassPartsArray = context.getters.lineItems.glassParts ?? [];