cleaning up hard coded parent accounts
cleaning up hard coded parent accounts. use cms as much as possible for dynamic behavior.
This commit is contained in:
parent
9a82d300d3
commit
1a952b764b
4 changed files with 13 additions and 26 deletions
|
|
@ -79,12 +79,6 @@ export function coverageTypeEnum(strCoverageType) {
|
|||
}
|
||||
}
|
||||
|
||||
export const parentAccountNumbers = {
|
||||
CONNECT: "560636",
|
||||
};
|
||||
|
||||
export const PARENT_ACCOUNT_NUMBERS = {
|
||||
STATE_FARM: "711310",
|
||||
USAA: "900040",
|
||||
GEICO: "250034",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -118,6 +118,10 @@ export default {
|
|||
},
|
||||
validationRules: String,
|
||||
cmsWidgetName: String,
|
||||
overrideQuestionText: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
maxLength: String,
|
||||
questionAlignment: String, // Left or center. Left is default.
|
||||
cornerStyle: String, // Rounded or square. Square is default.
|
||||
|
|
@ -217,9 +221,10 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
questionText() {
|
||||
return this.addOptionalText
|
||||
? this.getCmsContent(this.cmsWidgetName, "QuestionText") + " (optional)"
|
||||
: this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
||||
const baseText =
|
||||
this.overrideQuestionText ||
|
||||
this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
||||
return this.addOptionalText ? baseText + " (optional)" : baseText;
|
||||
},
|
||||
value: {
|
||||
get: function () {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
<textboxQuestion
|
||||
isRequired
|
||||
class="mb-1"
|
||||
:cmsWidgetName="policyNumberWidgetName"
|
||||
cmsWidgetName="PolicyNumberWidget"
|
||||
:overrideQuestionText="policyNumberLabelOverride"
|
||||
v-model="policyNumber"
|
||||
inputId="policyNumber"
|
||||
validationRules="policy-number-required" />
|
||||
|
|
@ -288,15 +289,8 @@ export default {
|
|||
subHeaderSubTextOverride() {
|
||||
return this.clientConfig?.PageInstructionsOverrideWidget?.Text || "";
|
||||
},
|
||||
isUSAA() {
|
||||
return (
|
||||
store.getters.order?.payment?.parentAccountNumber?.toString() ===
|
||||
PARENT_ACCOUNT_NUMBERS.USAA
|
||||
);
|
||||
},
|
||||
policyNumberWidgetName() {
|
||||
console.log("isUSAA", this.isUSAA);
|
||||
return this.isUSAA ? "PolicyNumberUSAAWidget" : "PolicyNumberWidget";
|
||||
policyNumberLabelOverride() {
|
||||
return this.clientConfig?.PolicyNumberLabelOverrideWidget?.Text || "";
|
||||
},
|
||||
policyHelperText() {
|
||||
return this.clientConfig?.PolicyHelperTextOverrideWidget?.Text;
|
||||
|
|
|
|||
|
|
@ -163,14 +163,8 @@ export default {
|
|||
return {};
|
||||
}
|
||||
},
|
||||
isGeico() {
|
||||
return (
|
||||
store.getters.order?.payment?.parentAccountNumber?.toString() ===
|
||||
PARENT_ACCOUNT_NUMBERS.GEICO
|
||||
);
|
||||
},
|
||||
displayDateOfBirth() {
|
||||
return this.parsedClientConfig.displayDateOfBirth && this.isGeico ? true : false;
|
||||
return this.parsedClientConfig.displayDateOfBirth ?? false;
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue