diff --git a/src/constants/error-messages.js b/src/constants/error-messages.js index 6899c2aec..b5cbde3fa 100644 --- a/src/constants/error-messages.js +++ b/src/constants/error-messages.js @@ -44,6 +44,10 @@ const errorMessages = { DAMAGE_TYPES_REQUIRED: "How damage occurred is required", ZIP_CODE_REQUIRED: "Please enter your ZIP code", ZIP_CODE_FORMAT: "Zip must be 5 digits", + DATE_OF_BIRTH_REQUIRED: "Please enter your date of birth", + LOSS_TIME_REQUIRED: "Please enter your loss time", + LOSS_LOCATION_REQUIRED: "Please select your loss location", + SUBROGATION_REQUIRED: "Please make a selection", }; export { errorMessages }; diff --git a/src/constants/insurance.js b/src/constants/insurance.js index 8f8cd80fd..1439fafcb 100644 --- a/src/constants/insurance.js +++ b/src/constants/insurance.js @@ -85,3 +85,8 @@ export const parentAccountNumbers = { export const NON_MANAGED_SHOW_CLAIM_NUMBER_PARENTS = [ { name: "KentuckyFarmBureau", value: "223499" }, ]; + +export const PARENT_ACCOUNT_NUMBERS = { + STATE_FARM: "711310", + USAA: "900040", +}; diff --git a/src/digital-components/date-picker-popup/date-picker-popup.vue b/src/digital-components/date-picker-popup/date-picker-popup.vue index 7f3e109ac..ea24197bc 100644 --- a/src/digital-components/date-picker-popup/date-picker-popup.vue +++ b/src/digital-components/date-picker-popup/date-picker-popup.vue @@ -26,7 +26,8 @@ :min-date="minDate" :max-date="maxDate" :auto-apply="autoApply" - :text-input="textInput" + :text-input="resolvedTextInput" + :hide-input-icon="textInputOnly" :prevent-min-max-navigation="preventMinMaxNavigation" :teleport="true" :aria-labels="{ input: questionText }" @@ -107,6 +108,12 @@ export default { type: Boolean, default: false, }, + // Force manual entry: text input enabled, calendar popup never opens + // and the calendar icon is hidden. + textInputOnly: { + type: Boolean, + default: false, + }, preventMinMaxNavigation: { type: Boolean, default: false, @@ -155,7 +162,7 @@ export default { questionText() { if (!this.cmsWidgetName) return ""; const text = this.getCmsContent - ? this.getCmsContent(this.cmsWidgetName, "BodyText") + ? this.getCmsContent(this.cmsWidgetName, "QuestionText") : ""; return this.addOptionalText ? `${text} (optional)` : text; }, @@ -193,6 +200,15 @@ export default { clearable: this.clearable, }; }, + // Forwarded to VueDatePicker's `text-input` prop. When `textInputOnly` + // is set, force text input on AND tell the picker never to open its + // menu (so focus/click on the input is a no-op visually). + resolvedTextInput() { + if (this.textInputOnly) { + return { enabled: true, openMenu: false }; + } + return this.textInput; + }, }, methods: { onDateChange(newValue) { diff --git a/src/fmg-components/funnel-header/funnel-header.vue b/src/fmg-components/funnel-header/funnel-header.vue index 7bfa3eef6..ac6e73bde 100644 --- a/src/fmg-components/funnel-header/funnel-header.vue +++ b/src/fmg-components/funnel-header/funnel-header.vue @@ -5,8 +5,17 @@
@@ -69,6 +78,10 @@ export default { type: Boolean, default: false, }, + overrideImageSrc: { + type: String, + default: "", + }, }, setup() { const { webchatGlobalNonpersistedState, launchWebchat } = webchatHelper(); @@ -76,7 +89,7 @@ export default { }, computed: { imageSrc() { - return this.getCmsContent(this.cmsWidgetName, "LogoImage"); + return this.overrideImageSrc || this.getCmsContent(this.cmsWidgetName, "LogoImage"); }, shouldShowWebchatButton() { return this.webchatGlobalNonpersistedState.showWebchatButton; @@ -199,6 +212,13 @@ export default { @include media-breakpoint-up(md) { width: 165px; } + + &--override { + width: 200px; + @include media-breakpoint-up(md) { + width: 250px; + } + } } .webchat { diff --git a/src/layouts/insurance-company/insurance-company.vue b/src/layouts/insurance-company/insurance-company.vue index c97a8589a..480cf505f 100644 --- a/src/layouts/insurance-company/insurance-company.vue +++ b/src/layouts/insurance-company/insurance-company.vue @@ -182,7 +182,7 @@ export default { await this.dispatchStoreAction( this.storeActions.SAVE_PARENT_ACCOUNT_NUMBER, - this.selectedAccount.parentAccountNumber.toString(), + Number(this.selectedAccount.parentAccountNumber).toString(), false ); diff --git a/src/layouts/policy-info/more-policy-questions/more-policy-questions.vue b/src/layouts/policy-info/more-policy-questions/more-policy-questions.vue new file mode 100644 index 000000000..0345efcda --- /dev/null +++ b/src/layouts/policy-info/more-policy-questions/more-policy-questions.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/layouts/policy-info/policy-info.spec.js b/src/layouts/policy-info/policy-info.spec.js index b3251154a..74649d20b 100644 --- a/src/layouts/policy-info/policy-info.spec.js +++ b/src/layouts/policy-info/policy-info.spec.js @@ -55,6 +55,15 @@ function setupMocks() { fetchCmsContentForPage.mockResolvedValue(mockCmsContent); settleAllPromises.mockResolvedValue({ cmsContent: mockCmsContent }); + const mockMixin = { + methods: { + getCmsContent: jest.fn((widgetName, fieldName) => { + return mockCmsContent?.[widgetName]?.[fieldName] ?? ""; + }), + setCmsContent: jest.fn(), + }, + }; + const mountOptions = getMountOptions({ route: { name: "policy-info", query: {}, params: {} }, router: { @@ -62,6 +71,7 @@ function setupMocks() { navigateWithSaving: jest.fn(), navigateWithoutSaving: jest.fn(), }, + mixins: [mockMixin], }); const wrapper = shallowMount(policyInfo, mountOptions); diff --git a/src/layouts/policy-info/policy-info.vue b/src/layouts/policy-info/policy-info.vue index ceef462a0..0918a7536 100644 --- a/src/layouts/policy-info/policy-info.vue +++ b/src/layouts/policy-info/policy-info.vue @@ -1,19 +1,206 @@