SSR-488 disable policyzip and lossdate on welcome page

This commit is contained in:
Matt Caimi 2024-02-02 14:49:26 -05:00
parent 93e502ada8
commit 68a97846be
3 changed files with 11 additions and 1 deletions

View file

@ -165,6 +165,7 @@ export default {
case 'lossdate': case 'lossdate':
// NOTE: May need some date parsing logic in here depending on client. // NOTE: May need some date parsing logic in here depending on client.
this.mainStore.order.policy.dateOfLoss = value; this.mainStore.order.policy.dateOfLoss = value;
this.mainStore.issConfig.disabledFields.dateOfLoss = true;
break; break;
case 'successreturnurl': case 'successreturnurl':

View file

@ -34,6 +34,7 @@
inputId="policyZipCode" inputId="policyZipCode"
cmsWidgetName="PolicyZipQuestion" cmsWidgetName="PolicyZipQuestion"
isRequired isRequired
:isDisabled="isPolicyZipEnabled"
:validationRules="rules.policyZip" /> :validationRules="rules.policyZip" />
</div> </div>
</div> </div>
@ -46,6 +47,7 @@
cmsWidgetName="DateOfLossQuestion" cmsWidgetName="DateOfLossQuestion"
inputId="dateOfLossField" inputId="dateOfLossField"
isRequired isRequired
:isDisabled="isDateOfLossEnabled"
disableAutoFill disableAutoFill
:max="new Date().toJSON().slice(0, 10)" :max="new Date().toJSON().slice(0, 10)"
:min="'1972-12-01'" :min="'1972-12-01'"
@ -306,6 +308,12 @@ export default {
isPolicyHolderEnabled() { isPolicyHolderEnabled() {
return !!this.mainStore.issConfig.disabledFields.policyNumber; return !!this.mainStore.issConfig.disabledFields.policyNumber;
}, },
isPolicyZipEnabled() {
return !!this.mainStore.issConfig.disabledFields.policyZipCode;
},
isDateOfLossEnabled() {
return !!this.mainStore.issConfig.disabledFields.dateOfLoss;
},
isCoverageEnabled() { isCoverageEnabled() {
return this.mainStore.issConfig.isCoverageEnabled; return this.mainStore.issConfig.isCoverageEnabled;
}, },

View file

@ -202,7 +202,8 @@ const getDefaultState = () => ({
failureReturnURL: null, // Client URL to return the user to when they encounter an error or bailout and are unable to complete the flow. failureReturnURL: null, // Client URL to return the user to when they encounter an error or bailout and are unable to complete the flow.
disabledFields: { // Fields that are disabled and read only if sent over from a client. disabledFields: { // Fields that are disabled and read only if sent over from a client.
policyNumber: null, policyNumber: null,
policyZipCode: null policyZipCode: null,
dateOfLoss: null
} }
} }
}); });