CASH-3086 properly save policy city, state, zip.

CASH-3086 properly save policy city, state, zip.
The policy zip will trigger a state lookup and should be saved in the customer address.
The damage city, state should save to the referral  loss city and referral loss state.
This commit is contained in:
Carl Nation 2026-07-27 10:50:19 -04:00
parent 75cb617c69
commit 9941d3c1df
2 changed files with 14 additions and 5 deletions

View file

@ -572,10 +572,10 @@ export default {
return match ?? value; return match ?? value;
}, },
getPolicyStateFromStore() { getPolicyStateFromStore() {
return store.getters.order.customer.address.state; return store.getters.order.damage.damageState;
}, },
getCityFromStore() { getCityFromStore() {
return store.getters.order.customer.address.city; return store.getters.order.damage.damageCity;
}, },
getDateOfBirthFromStore() { getDateOfBirthFromStore() {
return store.getters.order.policy.dateOfBirth; return store.getters.order.policy.dateOfBirth;
@ -626,8 +626,8 @@ export default {
zipCode: this.policyZip, zipCode: this.policyZip,
phoneNumber: this.phoneNumber, phoneNumber: this.phoneNumber,
phoneExtension: this.phoneExtension, phoneExtension: this.phoneExtension,
state: this.policyState, state: null,
city: this.city, city: null,
morePolicyQuestions: this.morePolicyQuestions, morePolicyQuestions: this.morePolicyQuestions,
lossLocation: this.lossLocation, lossLocation: this.lossLocation,
lossTime: this.lossTime, lossTime: this.lossTime,
@ -645,6 +645,8 @@ export default {
{ {
dateOfLoss: this.dateOfLoss, dateOfLoss: this.dateOfLoss,
damageCause: this.damageCause, damageCause: this.damageCause,
damageState: this.policyState,
damageCity: this.city,
}, },
false false
); );

View file

@ -133,6 +133,8 @@ const getDefaultState = () => {
dateOfLoss: null, dateOfLoss: null,
damageCause: null, damageCause: null,
installOemGlass: null, installOemGlass: null,
damageCity: null,
damageState: null,
}, },
lineItems: { lineItems: {
glassParts: null, glassParts: null,
@ -618,6 +620,8 @@ export const mutations = {
if (damageDetails) { if (damageDetails) {
state.order.damage.dateOfLoss = damageDetails.dateOfLoss; state.order.damage.dateOfLoss = damageDetails.dateOfLoss;
state.order.damage.damageCause = damageDetails.damageCause; state.order.damage.damageCause = damageDetails.damageCause;
state.order.damage.damageState = damageDetails.damageState;
state.order.damage.damageCity = damageDetails.damageCity;
} }
}, },
@ -891,7 +895,8 @@ export const mutations = {
sessionInformation.order.damage?.dateOfLoss sessionInformation.order.damage?.dateOfLoss
); );
state.order.damage.damageCause = sessionInformation.order.damage?.damageCause; state.order.damage.damageCause = sessionInformation.order.damage?.damageCause;
state.order.damage.damageState = sessionInformation.order.damage?.damageState;
state.order.damage.damageCity = sessionInformation.order.damage?.damageCity;
state.order.damage.partQuestionAnswers = state.order.damage.partQuestionAnswers =
sessionInformation.order.damage.partQuestionAnswers; sessionInformation.order.damage.partQuestionAnswers;
state.order.damage.moldingQuestionAnswers = state.order.damage.moldingQuestionAnswers =
@ -2852,6 +2857,8 @@ export const actions = {
installOemGlass: order.damage.installOemGlass, installOemGlass: order.damage.installOemGlass,
dateOfLoss: order.damage.dateOfLoss, dateOfLoss: order.damage.dateOfLoss,
damageCause: order.damage.damageCause, damageCause: order.damage.damageCause,
damageState: order.damage.damageState,
damageCity: order.damage.damageCity,
}, },
lineItems: { lineItems: {
glassParts: lineItems.glassParts, glassParts: lineItems.glassParts,