Merge pull request #1841 from Safelite/feature/CSR-2067

CSR-2067
This commit is contained in:
CarlNation 2024-05-03 08:41:10 -04:00 committed by GitHub
commit f3e18fa756
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 12 deletions

View file

@ -139,7 +139,7 @@ import {
getShopProviderData,
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { applicationConfig } from "@/constants/application-config";
import { Provider } from "@/layouts/service-location/classes/provider";
import store from "@/store";
@ -350,17 +350,26 @@ export default {
methods: {
arePagePrerequisitesValid() {
// 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) {
return (
store.getters.order.serviceLocation.zipCode !== null &&
store.getters.payment.isInsurance !== null
);
if (store.getters.payment.isInsurance) {
if (
store.getters.payment.parentAccountNumber !==
applicationConfig.CASH_PARENT_ACCOUNT_NUMBER &&
store.getters.order.policy.policyNumber &&
store.getters.order.serviceLocation.zipCode
) {
return true;
} else {
return false;
}
} else {
return (
store.getters.lineItems.supportingItems !== null &&
store.getters.order.serviceLocation.zipCode !== null &&
store.getters.payment.isInsurance !== null
);
if (
store.getters.lineItems.supportingItems &&
store.getters.order.serviceLocation.zipCode
) {
return true;
} else {
return false;
}
}
},
setData(zipCodeData, serviceabilityDetails, mobileFeePart, shopProviderData) {

View file

@ -1383,7 +1383,9 @@ export const actions = {
getMobileFeePart(context, { pageNameToLog }) {
const damageType = context.getters.damage.isRepair ? "Repair" : "Replace";
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({
method: endpoints.GetMobileFeePart.method,