diff --git a/environment-variables.js b/environment-variables.js index 55ffdf54e..e3e7ba2cd 100644 --- a/environment-variables.js +++ b/environment-variables.js @@ -12,7 +12,6 @@ const environmentVariables = { ['__VUE_APP_MY_ACCOUNT__']: "https://myaccountdev.safelite.com/", ['__VUE_APP_SAFELITE_HOP__']: "https://sv2-safelitehop-dev.safelite.com/fmgCheckoutShared.aspx", ['__VUE_APP_SESSION_TIMEOUT_MINUTES__']: 30, - ['__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__']: "", ['__VUE_APP_ADYEN_ENVIRONMENT__']: "test", ['__VUE_APP_ADYEN_CLIENT_KEY__']: "test_WYGT4F5ZT5BRRL5MPWHK6QLYOIXZXROD", ['__VUE_APP_SESSION_EXPIRATION_INTERVAL_CHECK_MILLISECONDS__']: 60000, diff --git a/public/index.html b/public/index.html index ab8f27144..0e0518fb6 100644 --- a/public/index.html +++ b/public/index.html @@ -27,7 +27,5 @@
- - <%= process.env.__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__ %> 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/constants/store-mutations.js b/src/constants/store-mutations.js index d2fc2b0fc..f95a397a0 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -22,6 +22,7 @@ const storeMutations = { UPDATE_VEHICLE_CAN_SAFELITE_SERVICE: "updateVehicleCanSafeliteService", UPDATE_SKIP_VIN_LOOKUP: "updateSkipVINLookup", UPDATE_SKIP_PART_QUESTIONS: "updateSkipPartQuestions", + UPDATE_VIN_REQUIRED: "updateVinRequired", UPDATE_IS_REPAIR: "updateIsRepair", UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips", @@ -147,6 +148,9 @@ const storeMutations = { //Affiliate Cookies UPDATE_AFFILIATE_COOKIES: "updateAffiliateCookies", + + // Submitted state (invalidates getters that read sessionStorage submittedState) + INCREMENT_SUBMITTED_STATE_REVISION: "incrementSubmittedStateRevision", }; export { storeMutations }; 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/cart/cart.vue b/src/fmg-components/cart/cart.vue index faa28376d..5d48dc5ae 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -907,7 +907,7 @@ export default { return cartItem; }, isCashItacNoComp() { - return !this.isInsurance || this.isITAC || this.isNoComp; + return !this.isInsurance || this.isItac || this.isNoComp; }, mobileFeeCartItemName() { return this.getCmsContent("MobileServiceTextWidget", "Text"); @@ -971,7 +971,7 @@ export default { const msrFeeLineItem = this.getMsrFeeLineItem; const shouldCreateMsrFeeCartItem = this.isMSRFeeApplicable && - (!this.isInsurance || !this.IsMSRFeeCoveredByInsurance) && + (this.isCashItacNoComp || !this.IsMSRFeeCoveredByInsurance) && msrFeeLineItem && this.msrFeeAmount > 0; @@ -1007,9 +1007,10 @@ export default { return this.getCmsContent("RecycleTextBlock", "Text"); }, msrToolTipBodyText() { - let cmsContentText = this.isInsurance - ? this.getCmsContent("MSRModal", "BodyText") - : this.getCmsContent("MSRModal", "BodyText2"); + let cmsContentText = + this.isInsurance && !this.isItac && !this.isNoComp + ? this.getCmsContent("MSRModal", "BodyText") + : this.getCmsContent("MSRModal", "BodyText2"); if (this.isInsurance && cmsContentText) { cmsContentText = cmsContentText.replaceAll( "{custom:mobileFee}", 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/fmg-components/insurance-nav-bar/insurance-nav-bar.vue b/src/fmg-components/insurance-nav-bar/insurance-nav-bar.vue new file mode 100644 index 000000000..653087c43 --- /dev/null +++ b/src/fmg-components/insurance-nav-bar/insurance-nav-bar.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/fmg-components/nav-bar/nav-bar.vue b/src/fmg-components/nav-bar/nav-bar.vue index 6b0397762..96b67f44e 100644 --- a/src/fmg-components/nav-bar/nav-bar.vue +++ b/src/fmg-components/nav-bar/nav-bar.vue @@ -57,6 +57,7 @@ export default { buttonSize: { type: Boolean, default: false }, isSubmitHidden: { type: Boolean, default: false }, overrideButtonText: String, + overrideBackButtonText: String, }, components: { textLink, @@ -73,7 +74,10 @@ export default { }, computed: { backLink() { - return this.getCmsContent(this.cmsWidgetName, "BackButtonText"); + return ( + this.overrideBackButtonText || + this.getCmsContent(this.cmsWidgetName, "BackButtonText") + ); }, buttonText() { return this.customButtontext diff --git a/src/helpers/date-helper.js b/src/helpers/date-helper.js index 59ffa5745..f59ac7ba8 100644 --- a/src/helpers/date-helper.js +++ b/src/helpers/date-helper.js @@ -1,3 +1,15 @@ +// .NET serializes an unset DateTime as DateTime.MinValue ("0001-01-01T00:00:00"). +// Treat that as "no date" so it doesn't masquerade as a real, validation-passing value. +const DOTNET_MIN_DATE_PREFIX = "0001-01-01"; + +export function isDotNetMinDate(value) { + return typeof value === "string" && value.startsWith(DOTNET_MIN_DATE_PREFIX); +} + +export function normalizeDotNetMinDate(value) { + return isDotNetMinDate(value) ? null : value; +} + export function getDateDifferenceInDays(startDate, endDate) { // Create date objects from the input strings var date1 = new Date(endDate); diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index 81e2657bc..acdab2f17 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -1,6 +1,10 @@