CSR-2067 clean up the pre reqs for service location
This commit is contained in:
CarlNation 2024-05-03 08:04:33 -04:00
parent 79456bab46
commit cfe63885cf
2 changed files with 12 additions and 8 deletions

View file

@ -139,7 +139,7 @@ import {
getShopProviderData, getShopProviderData,
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { applicationConfig } from "@/constants/application-config";
import { Provider } from "@/layouts/service-location/classes/provider"; import { Provider } from "@/layouts/service-location/classes/provider";
import store from "@/store"; import store from "@/store";
@ -350,16 +350,18 @@ export default {
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
// insurance drops the recycle fee on replace orders so it won't be in supportingItems // insurance drops the recycle fee on replace orders so it won't be in supportingItems
if (store.getters.payment.isInsurance && !store.getters.order.damage.isRepair) { // we should also have a non cash parent account and a policy number
if (store.getters.payment.isInsurance) {
return ( return (
store.getters.order.serviceLocation.zipCode !== null && store.getters.payment.parentAccountNumber !==
store.getters.payment.isInsurance !== null applicationConfig.CASH_PARENT_ACCOUNT_NUMBER &&
store.getters.order.policy.policyNumber &&
store.getters.order.serviceLocation.zipCode
); );
} else { } else {
return ( return (
store.getters.lineItems.supportingItems !== null && store.getters.lineItems.supportingItems &&
store.getters.order.serviceLocation.zipCode !== null && store.getters.order.serviceLocation.zipCode
store.getters.payment.isInsurance !== null
); );
} }
}, },

View file

@ -1383,7 +1383,9 @@ export const actions = {
getMobileFeePart(context, { pageNameToLog }) { getMobileFeePart(context, { pageNameToLog }) {
const damageType = 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 = context.getters.payment.billToAccountNumber; const billToAccountNumber = context.getters.payment.billToAccountNumber
? context.getters.payment.billToAccountNumber
: applicationConfig.CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER;
return globalMethods.callHttpClient({ return globalMethods.callHttpClient({
method: endpoints.GetMobileFeePart.method, method: endpoints.GetMobileFeePart.method,