Merge pull request #819 from Safelite/defect/digital/cleanup-reset-fields
Pass at making sure store fields are reset when reentering the flow
This commit is contained in:
commit
30f8729dae
1 changed files with 22 additions and 0 deletions
|
|
@ -1572,6 +1572,8 @@ export const useMainStore = defineStore({
|
||||||
resetServiceLocationProvider() {
|
resetServiceLocationProvider() {
|
||||||
this.order.serviceLocation.provider = {
|
this.order.serviceLocation.provider = {
|
||||||
providerNumber: null,
|
providerNumber: null,
|
||||||
|
companyName: null,
|
||||||
|
phoneNumber: null,
|
||||||
address: {
|
address: {
|
||||||
streetAddress: null,
|
streetAddress: null,
|
||||||
city: null,
|
city: null,
|
||||||
|
|
@ -1757,10 +1759,17 @@ export const useMainStore = defineStore({
|
||||||
|
|
||||||
resetPolicy() {
|
resetPolicy() {
|
||||||
this.order.policy.policyNumber = null;
|
this.order.policy.policyNumber = null;
|
||||||
|
this.order.policy.policyZipCode = null;
|
||||||
this.order.policy.dateOfLoss = null;
|
this.order.policy.dateOfLoss = null;
|
||||||
this.order.policy.damageCause = null;
|
this.order.policy.damageCause = null;
|
||||||
this.order.policy.damageCity = null;
|
this.order.policy.damageCity = null;
|
||||||
this.order.policy.damageState = null;
|
this.order.policy.damageState = null;
|
||||||
|
this.order.policy.vehicles = [];
|
||||||
|
this.order.policy.endorsements = [];
|
||||||
|
this.order.policy.endorsementQuestionAnswers = [];
|
||||||
|
this.order.policy.policyData = null;
|
||||||
|
this.order.policy.deductible.repair = null;
|
||||||
|
this.order.policy.deductible.replace = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
resetCustomer() {
|
resetCustomer() {
|
||||||
|
|
@ -1813,6 +1822,7 @@ export const useMainStore = defineStore({
|
||||||
resetGlassPartsState() {
|
resetGlassPartsState() {
|
||||||
this.order.lineItems.glassParts = null;
|
this.order.lineItems.glassParts = null;
|
||||||
this.order.lineItems.supportingItems = null;
|
this.order.lineItems.supportingItems = null;
|
||||||
|
this.order.lineItems.vaps = null;
|
||||||
this.order.lineItems.feeItems = [];
|
this.order.lineItems.feeItems = [];
|
||||||
this.order.lineItems.serverData = null;
|
this.order.lineItems.serverData = null;
|
||||||
this.order.damage.partQuestionAnswers = null;
|
this.order.damage.partQuestionAnswers = null;
|
||||||
|
|
@ -2490,6 +2500,16 @@ export const useMainStore = defineStore({
|
||||||
this.resetServiceLocationAndDependencies();
|
this.resetServiceLocationAndDependencies();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetServiceLocation() {
|
||||||
|
this.order.serviceLocation.state = null;
|
||||||
|
this.order.serviceLocation.zipCode = null;
|
||||||
|
this.order.serviceLocation.zipCodeCtu = null;
|
||||||
|
this.order.serviceLocation.defaultProviderNumber = null;
|
||||||
|
this.order.serviceLocation.appointmentType = null;
|
||||||
|
this.order.serviceLocation.IsSafeliteProvider = null;
|
||||||
|
this.resetServiceLocationProvider();
|
||||||
|
},
|
||||||
|
|
||||||
resetPageFields() {
|
resetPageFields() {
|
||||||
this.resetOrder();
|
this.resetOrder();
|
||||||
this.resetCustomer();
|
this.resetCustomer();
|
||||||
|
|
@ -2499,6 +2519,8 @@ export const useMainStore = defineStore({
|
||||||
this.resetDamageState();
|
this.resetDamageState();
|
||||||
this.resetGlassPartsState();
|
this.resetGlassPartsState();
|
||||||
this.resetInsurance();
|
this.resetInsurance();
|
||||||
|
this.resetServiceLocation();
|
||||||
|
this.resetSchedule();
|
||||||
this.resetBailout();
|
this.resetBailout();
|
||||||
this.resetSubmittedOrder();
|
this.resetSubmittedOrder();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue