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 = {
|
export const PARENT_ACCOUNT_NUMBERS = {
|
||||||
STATE_FARM: "711310",
|
STATE_FARM: "711310",
|
||||||
USAA: "900040",
|
|
||||||
GEICO: "250034",
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,10 @@ export default {
|
||||||
},
|
},
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
|
overrideQuestionText: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
maxLength: String,
|
maxLength: String,
|
||||||
questionAlignment: String, // Left or center. Left is default.
|
questionAlignment: String, // Left or center. Left is default.
|
||||||
cornerStyle: String, // Rounded or square. Square is default.
|
cornerStyle: String, // Rounded or square. Square is default.
|
||||||
|
|
@ -217,9 +221,10 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
questionText() {
|
questionText() {
|
||||||
return this.addOptionalText
|
const baseText =
|
||||||
? this.getCmsContent(this.cmsWidgetName, "QuestionText") + " (optional)"
|
this.overrideQuestionText ||
|
||||||
: this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
||||||
|
return this.addOptionalText ? baseText + " (optional)" : baseText;
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
get: function () {
|
get: function () {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
isRequired
|
isRequired
|
||||||
class="mb-1"
|
class="mb-1"
|
||||||
:cmsWidgetName="policyNumberWidgetName"
|
cmsWidgetName="PolicyNumberWidget"
|
||||||
|
:overrideQuestionText="policyNumberLabelOverride"
|
||||||
v-model="policyNumber"
|
v-model="policyNumber"
|
||||||
inputId="policyNumber"
|
inputId="policyNumber"
|
||||||
validationRules="policy-number-required" />
|
validationRules="policy-number-required" />
|
||||||
|
|
@ -288,15 +289,8 @@ export default {
|
||||||
subHeaderSubTextOverride() {
|
subHeaderSubTextOverride() {
|
||||||
return this.clientConfig?.PageInstructionsOverrideWidget?.Text || "";
|
return this.clientConfig?.PageInstructionsOverrideWidget?.Text || "";
|
||||||
},
|
},
|
||||||
isUSAA() {
|
policyNumberLabelOverride() {
|
||||||
return (
|
return this.clientConfig?.PolicyNumberLabelOverrideWidget?.Text || "";
|
||||||
store.getters.order?.payment?.parentAccountNumber?.toString() ===
|
|
||||||
PARENT_ACCOUNT_NUMBERS.USAA
|
|
||||||
);
|
|
||||||
},
|
|
||||||
policyNumberWidgetName() {
|
|
||||||
console.log("isUSAA", this.isUSAA);
|
|
||||||
return this.isUSAA ? "PolicyNumberUSAAWidget" : "PolicyNumberWidget";
|
|
||||||
},
|
},
|
||||||
policyHelperText() {
|
policyHelperText() {
|
||||||
return this.clientConfig?.PolicyHelperTextOverrideWidget?.Text;
|
return this.clientConfig?.PolicyHelperTextOverrideWidget?.Text;
|
||||||
|
|
|
||||||
|
|
@ -163,14 +163,8 @@ export default {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isGeico() {
|
|
||||||
return (
|
|
||||||
store.getters.order?.payment?.parentAccountNumber?.toString() ===
|
|
||||||
PARENT_ACCOUNT_NUMBERS.GEICO
|
|
||||||
);
|
|
||||||
},
|
|
||||||
displayDateOfBirth() {
|
displayDateOfBirth() {
|
||||||
return this.parsedClientConfig.displayDateOfBirth && this.isGeico ? true : false;
|
return this.parsedClientConfig.displayDateOfBirth ?? false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue