From 947d56c47b93cf7cb2c1b1fdc46119ed51eec71a Mon Sep 17 00:00:00 2001
From: scottkiener-at-safelite
Date: Thu, 15 Jan 2026 11:49:17 -0500
Subject: [PATCH 01/43] Recal - Verified - Deductible | Text styling
Including cost styling for
---
.../coverage-statement/coverage-statement.vue | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 19059edb..8579927b 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -27,7 +27,7 @@
v-html="secondaryText">
+ class="d-flex cost">
{{ formatAmountInDollars(deductibleValue) }}
Date: Fri, 16 Jan 2026 08:13:01 -0500
Subject: [PATCH 02/43] Changes to allow cost savings show up in secondary text
---
src/layouts/coverage-statement/coverage-statement.vue | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 8579927b..bca6aa37 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -226,11 +226,6 @@ export default {
},
computed: {
coverageStatementSubHeader() {
- console.log('coverageStatementSubHeader', this.widget.subheader);
- console.log('getTextFromCmsWithCustomIfStatements', this.getTextFromCmsWithCustomIfStatements(
- this.widget.subheader,
- widgetFields.SUB_HEADER_WIDGET.SUB_HEADER_TEXT
- ));
return this.getTextFromCmsWithCustomIfStatements(
this.widget.subheader,
widgetFields.SUB_HEADER_WIDGET.SUB_HEADER_TEXT
@@ -254,9 +249,14 @@ export default {
);
},
secondaryText() {
+ const itacCostSavings =
+ this.deductibleValue - this.totalServicePrice;
return this.getTextFromCmsWithCustomIfStatements(
this.widget.subheader,
widgetFields.SUB_HEADER_WIDGET.SECONDARY_TEXT
+ )?.replaceAll(
+ '{custom:costSavings}',
+ formatAmountInDollars(itacCostSavings)
);
},
disclaimerText() {
From b26b00c954747b64c3cb0a54cdc193829b7c2268 Mon Sep 17 00:00:00 2001
From: scottkiener-at-safelite
Date: Fri, 16 Jan 2026 11:11:04 -0500
Subject: [PATCH 03/43] NonRecal - Verified - ITAC | Components re-arranged
---
.../coverage-statement/coverage-statement.vue | 66 +++++++++----------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index bca6aa37..29c6ad83 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -43,44 +43,37 @@
formatAmountInDollars(deductibleValue)
}}
-
-
-
-
-
-
+
+
+
+
+
@@ -107,9 +100,9 @@ import siteHeader from '@/iss-components/site-header/site-header.vue';
import alert from '@/ux-components/alert/alert.vue';
import cancelClaimModal from '@/layouts/coverage-statement/cancel-claim-modal/cancel-claim-modal.vue';
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal.vue';
-import buttonQuestion from '@/digital-components/button-question/button-question.vue';
import textBlock from '@/digital-components/text-block/text-block.vue';
-
+import textLink from '@/ux-components/text-link/text-link.vue';
+import buttonMain from '@/ux-components/button-main/button-main.vue';
// Import Supporting Files
import {
fetchCmsContentForPage,
@@ -148,8 +141,9 @@ export default {
alert,
cancelClaimModal,
contentGroupModal,
- buttonQuestion,
- textBlock
+ buttonMain,
+ textBlock,
+ textLink
},
mixins: [baseFormMixin, vehicleQuestionsMixin],
async beforeRouteEnter(to, from, next) {
@@ -526,6 +520,12 @@ export default {
.sub-header {
line-height: 2rem;
}
+ .full-width-button {
+ width: 100%;
+ }
+ .underlined-text {
+ text-decoration: underline;
+ }
:deep(ol) {
padding: 0;
padding-left: 1.125rem;
From 2319848c87c79e84af27c8082220e3dd0274c818 Mon Sep 17 00:00:00 2001
From: scottkiener-at-safelite
Date: Fri, 16 Jan 2026 14:02:19 -0500
Subject: [PATCH 04/43] ITAC - No Recal | Add in ITAC price viewer
---
.../coverage-statement/coverage-statement.vue | 72 +++++++++++++++----
1 file changed, 59 insertions(+), 13 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 29c6ad83..8a2ddc0e 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -25,24 +25,31 @@
ref="secondaryText"
class="mt-4 mb-1 fw-bold text-black"
v-html="secondaryText">
+
+
+
Your deductible:
+
+ {{ formatAmountInDollars(deductibleValue) }}
+
+
+
+
+
Safelite price*:
+
+ {{ formatAmountInDollars(totalServicePrice) }}
+
+
+
+ v-if="showDeductibleOnly"
+ class="d-flex cost cost-underline">
{{ formatAmountInDollars(deductibleValue) }}
+ class="d-flex justify-content-center cost mb-0 cost-underline">
{{ formatAmountInDollars(totalServicePrice) }}
-
- {{ deductibleText }}
- {{
- formatAmountInDollars(deductibleValue)
- }}
-
@@ -63,7 +70,7 @@
href="#"
@clickEvent="cancelClaim" />
Date: Fri, 16 Jan 2026 14:16:52 -0500
Subject: [PATCH 05/43] No Recal - ITAC | Fix bullet list styling
---
src/layouts/coverage-statement/coverage-statement.vue | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 8a2ddc0e..2d7e244e 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -541,6 +541,11 @@ export default {
.underlined-text {
text-decoration: underline;
}
+ :deep(.body-text > ol > ul) {
+ list-style-position: outside;
+ list-style-type: disc;
+ padding-left: 0;
+ }
:deep(ol) {
padding: 0;
padding-left: 1.125rem;
From e78e96ab37daf9087306b5b914c2425c39994f25 Mon Sep 17 00:00:00 2001
From: scottkiener-at-safelite
Date: Fri, 16 Jan 2026 14:46:15 -0500
Subject: [PATCH 06/43] ITAC - No Recal | Finish styling and spacing
---
.../coverage-statement/coverage-statement.vue | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 2d7e244e..d2ea4c47 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -56,20 +56,20 @@
-
-
-
-
@@ -541,6 +541,10 @@ export default {
.underlined-text {
text-decoration: underline;
}
+ .cancel-link {
+ display: block;
+ margin: 24px auto 0 auto;
+ }
:deep(.body-text > ol > ul) {
list-style-position: outside;
list-style-type: disc;
From d7cd7f00638b1bc8cad317b06cdd7155e711231f Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Tue, 20 Jan 2026 16:03:07 -0500
Subject: [PATCH 07/43] unverified scenarios WIP
---
src/constants/bailoutCode.js | 2 +-
src/constants/bailoutMessage.js | 14 +++---
src/constants/progress-bar-mapper.js | 2 +-
.../coverage-statement/coverage-statement.vue | 48 ++++++++++++++-----
4 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/src/constants/bailoutCode.js b/src/constants/bailoutCode.js
index fb1ac071..caffbda7 100644
--- a/src/constants/bailoutCode.js
+++ b/src/constants/bailoutCode.js
@@ -4,7 +4,7 @@ const bailoutCode = Object.freeze({
VehicleNotFound: 2,
VehicleVinLookupError: 3,
CoverageStatementInvalidState: 4,
- DoNotSeeMyShop: 5,
+ NeedHelp: 5,
PricingResponseError: 6,
TPANotEnabled: 7,
RequestCallback: 8,
diff --git a/src/constants/bailoutMessage.js b/src/constants/bailoutMessage.js
index 4215d868..33fe8956 100644
--- a/src/constants/bailoutMessage.js
+++ b/src/constants/bailoutMessage.js
@@ -33,9 +33,9 @@ const bailoutMessage = Object.freeze({
code: bailoutCode.CoverageStatementInvalidState,
message: 'Coverage Statement has entered an invalid state'
}),
- doNotSeeMyShop: () => ({
- code: bailoutCode.DoNotSeeMyShop,
- message: 'User does not see their shop.'
+ needHelp: () => ({
+ code: bailoutCode.NeedHelp,
+ message: 'User clicked Need Help link.'
}),
pricingResponseError: (lineItems, error) => ({
code: bailoutCode.PricingResponseError,
@@ -66,9 +66,9 @@ const bailoutMessage = Object.freeze({
message: 'User selected to continue a referral where a TPA shop was previously selected.'
}),
vehicleYMMSLookupError: (year, make, model, style, error) => {
- const baseMessage = "An error occurred looking up vehicle";
+ const baseMessage = 'An error occurred looking up vehicle';
const errorMessage = `Error: ${getItemData(error)}`;
-
+
const getMessage = (year, make, model, style) => {
if (!year) return `${baseMessage} years. ${errorMessage}`;
if (!make) return `${baseMessage} makes for Year: ${year}. ${errorMessage}`;
@@ -76,12 +76,12 @@ const bailoutMessage = Object.freeze({
if (!style) return `${baseMessage} styles for Year: ${year}, Make: ${make}, Model: ${model}. ${errorMessage}`;
return `${baseMessage} with Year: ${year}, Make: ${make}, Model: ${model}, Style: ${style}. ${errorMessage}`;
};
-
+
return {
code: bailoutCode.VehicleYMMSLookupError,
message: getMessage(year, make, model, style)
};
- },
+ }
});
export default bailoutMessage;
diff --git a/src/constants/progress-bar-mapper.js b/src/constants/progress-bar-mapper.js
index b9f3af77..154601fa 100644
--- a/src/constants/progress-bar-mapper.js
+++ b/src/constants/progress-bar-mapper.js
@@ -45,7 +45,7 @@ export const pageProgressMapper = {
percent: 50
},
'coverage-statement': {
- percent: 55
+ percent: 50
},
'provider-preference': {
percent: 60
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index d2ea4c47..748b1173 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -15,26 +15,32 @@
-
+
-
Your deductible:
+
+ Your deductible:
+
{{ formatAmountInDollars(deductibleValue) }}
-
Safelite price*:
+
+ Safelite price*:
+
{{ formatAmountInDollars(totalServicePrice) }}
@@ -57,30 +63,31 @@
class="body-text"
v-html="nextStepsBody">
-
+ @backClicked="navigateBackByVehicleQuestions" />
@@ -104,7 +111,6 @@
import { Form } from 'vee-validate';
import siteFooter from '@/iss-components/site-footer/site-footer.vue';
import siteHeader from '@/iss-components/site-header/site-header.vue';
-import alert from '@/ux-components/alert/alert.vue';
import cancelClaimModal from '@/layouts/coverage-statement/cancel-claim-modal/cancel-claim-modal.vue';
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal.vue';
import textBlock from '@/digital-components/text-block/text-block.vue';
@@ -145,7 +151,6 @@ export default {
siteHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form,
- alert,
cancelClaimModal,
contentGroupModal,
buttonMain,
@@ -354,6 +359,12 @@ export default {
},
isRepair() {
return this.mainStore.order.damage.isRepair;
+ },
+ isUnverifiedADAS() {
+ return this.isUnverifiedVisible && this.isADAS;
+ },
+ isUnverifiedNonADAS() {
+ return this.isUnverifiedVisible && !this.isADAS;
}
},
watch: {
@@ -487,6 +498,10 @@ export default {
return !isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
case 'verifiedReplaceDeductibleOverZero':
return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
+ case 'unverifiedADAS':
+ return this.isUnverifiedADAS;
+ case 'unverifiedNonADAS':
+ return this.isUnverifiedNonADAS;
default:
return null;
}
@@ -534,6 +549,8 @@ export default {
}
.sub-header {
line-height: 2rem;
+ margin-top: 20px;
+ margin-bottom: 20px;
}
.full-width-button {
width: 100%;
@@ -569,6 +586,11 @@ export default {
}
:deep(.body-text) {
line-height: 1.5rem;
+ color: $darker-gray;
+ strong {
+ color: $black;
+ font-weight: 500;
+ }
}
:deep(.question-text) {
margin-top: 1.5rem;
@@ -597,7 +619,7 @@ export default {
font-weight: $font-weight-bold;
color: $black;
padding: 10px;
-
+
.itac-deductible-value-container {
display: flex;
flex-direction: column;
From 6834c5b88e5ad721c3339194107869cb369a016f Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Wed, 21 Jan 2026 10:16:59 -0500
Subject: [PATCH 08/43] remove unused lines
---
src/layouts/coverage-statement/coverage-statement.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 748b1173..5ee189ff 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -211,8 +211,6 @@ export default {
return {
baseServiceLineItems: [],
selectedProvider: '',
- deductibleText: 'Your deductible is',
- // TODO update when design team gives appropriate text
rules: {
selectionRequired: globalRules.OPTION_REQUIRED
},
From 081c2fef7b2e684374c88512534cf3eaf7b61989 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 22 Jan 2026 14:05:22 -0500
Subject: [PATCH 09/43] deductible and ITAC WIP
---
src/helpers/text-helper.js | 11 +++
.../coverage-statement/coverage-statement.vue | 82 ++++++++++++++-----
src/styles/client-customizations.scss | 7 +-
3 files changed, 78 insertions(+), 22 deletions(-)
diff --git a/src/helpers/text-helper.js b/src/helpers/text-helper.js
index 13e65e11..b99d0d0e 100644
--- a/src/helpers/text-helper.js
+++ b/src/helpers/text-helper.js
@@ -27,6 +27,17 @@ export function createOrderedListFromStringOfParagraphs(stringOfParagraphs) {
return `${stringOfParagraphs.replaceAll('', '').replaceAll('', '
- ').replaceAll('
', '')}`;
}
+/**
+ * @function createUnorderedListFromStringOfParagraphs
+ * @summary
+ * Returns string with tags changed to
and wrapped in an
+ * @param {string} stringOfParagraphs single string with 1 to N tags
+ * @returns {string} converted string wrapped in an
+ */
+export function createUnorderedListFromStringOfParagraphs(stringOfParagraphs) {
+ return `${stringOfParagraphs.replaceAll('', '').replaceAll('', '
- ').replaceAll('', '
')}
`;
+}
+
/**
* @function toTitleCase
* @summary Returns title cased string version of 'text'
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 5ee189ff..8cbdc94e 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -21,6 +21,10 @@
ref="explanatoryText"
class="body-text"
v-html="explanatoryText">
+
{{ formatAmountInDollars(deductibleValue) }}
+
+
+
+
+ Safelite price*:
+
{{ formatAmountInDollars(totalServicePrice) }}
-
-
0
- );
+ return this.isDeductibleVisible && this.deductibleValue > 0;
case 'isDeductibleZero':
- return (
- this.isDeductibleVisible && this.deductibleValue <= 0
- );
+ return this.isDeductibleVisible && this.deductibleValue <= 0;
case 'verifiedRepair':
return isRepair && this.isDeductibleVisible;
case 'verifiedReplaceZeroDeductible':
@@ -500,6 +528,10 @@ export default {
return this.isUnverifiedADAS;
case 'unverifiedNonADAS':
return this.isUnverifiedNonADAS;
+ case 'verifiedReplaceDeductibleOverZeroNonADAS':
+ return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0 && !this.isADAS;
+ case 'verifiedReplaceDeductibleOverZeroADAS':
+ return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0 && this.isADAS;
default:
return null;
}
@@ -546,7 +578,7 @@ export default {
line-height: 1.5rem;
}
.sub-header {
- line-height: 2rem;
+ line-height: 1.5rem;
margin-top: 20px;
margin-bottom: 20px;
}
@@ -565,11 +597,11 @@ export default {
list-style-type: disc;
padding-left: 0;
}
- :deep(ol) {
+ :deep(ul) {
padding: 0;
- padding-left: 1.125rem;
- padding-right: 1.125rem;
- line-height: 1.5rem;
+ padding-left: 1.25rem;
+ padding-right: 1.25rem;
+ line-height: 1.25rem;
li {
margin-bottom: .5rem;
@@ -589,6 +621,7 @@ export default {
color: $black;
font-weight: 500;
}
+ margin-top: 6px;
}
:deep(.question-text) {
margin-top: 1.5rem;
@@ -617,6 +650,7 @@ export default {
font-weight: $font-weight-bold;
color: $black;
padding: 10px;
+ margin-top: 20px;
.itac-deductible-value-container {
display: flex;
@@ -639,6 +673,14 @@ export default {
background-color: #cacbcc;
}
}
+ .no-comp-price-text {
+ font-weight: 500;
+ color: $black;
+ }
+ :deep(.line-two) {
+ margin-top: 20px;
+ display: block;
+ }
}
:deep(.deductible-modal) {
diff --git a/src/styles/client-customizations.scss b/src/styles/client-customizations.scss
index 487a63ae..0392e5f2 100644
--- a/src/styles/client-customizations.scss
+++ b/src/styles/client-customizations.scss
@@ -6,15 +6,18 @@
//Define colors for namespaced classes
$header-background: #ffd100;
$accent-fill: #e6f1f3; // Calendar background
- $accent-color: #09748b;
- $link: #09748b;
+ $accent-color: #0070d1;
+ $link: #0070d1;
$svg-fill-color: '%2309748b'; // Color of calendar icon. Place HEX code *after* %23
$progress-bar-success-color: #1a1446;
$progress-bar-background-color: #ffffff;
+ a,
svg,
.modal-text {
fill: $accent-color;
+ color: $accent-color;
+ font-weight: 500;
}
.container-fluid {
From 6514249932a7df437803cf320023b4126f7be281 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 22 Jan 2026 15:36:13 -0500
Subject: [PATCH 10/43] ITAC and Unverified updates
---
src/layouts/coverage-statement/coverage-statement.vue | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 8cbdc94e..7e570f4e 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -558,8 +558,8 @@ export default {
.coverage-statement-container {
position: relative;
min-height: 1px;
- padding-left: .9375rem;
- padding-right: .9375rem;
+ padding-left: .75rem;
+ padding-right: .75rem;
}
}
@@ -681,6 +681,9 @@ export default {
margin-top: 20px;
display: block;
}
+ :deep(a) {
+ text-decoration: none;
+ }
}
:deep(.deductible-modal) {
From 3b342bf3e7d916456b9424f021a461b81b95a21e Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 22 Jan 2026 16:01:10 -0500
Subject: [PATCH 11/43] remove old components/classes
---
.../coverage-statement/coverage-statement.vue | 32 +------------------
1 file changed, 1 insertion(+), 31 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 7e570f4e..2dae3b4f 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -109,10 +109,6 @@
:ref="RECAL_MODAL_REF_NAME"
cssModalHeadlineClass="text-center"
cmsWidgetName="RecalModal" />
-
Date: Tue, 27 Jan 2026 16:34:01 -0500
Subject: [PATCH 12/43] coverage-statement updates WIP
---
.../coverage-statement/coverage-statement.vue | 54 ++++++++++++++-----
1 file changed, 42 insertions(+), 12 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 2dae3b4f..7d1f03ed 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -64,8 +64,13 @@
class="mt-4"
v-html="nextStepsSubheader">
+
@@ -92,7 +97,7 @@
@clickEvent="cancelClaim" />
+
+
+
@@ -142,7 +155,7 @@ import baseFormMixin from '@/mixins/base-form-mixin.js';
import navigationScenarios from '@/router/router-constants/navigation-scenarios.js';
import bailoutMessage from '@/constants/bailoutMessage';
import widgetFields from '@/constants/cms-widget-fields.js';
-import { formatAmountInDollars, createUnorderedListFromStringOfParagraphs } from '@/helpers/text-helper.js';
+import { formatAmountInDollars, createUnorderedListFromStringOfParagraphs, createOrderedListFromStringOfParagraphs } from '@/helpers/text-helper.js';
import showIssLoadingModal from '@/helpers/loading-modal-helper';
import { getPriceOfLineItems } from '@/helpers/price-calculator';
import coverageStatuses from '@/constants/coverage-statuses';
@@ -229,6 +242,7 @@ export default {
verifiedItacAlert: 'VerifiedITACAlert',
explanatoryText: 'ExplanatoryTextWidget',
nextStep: 'NextStepsWidget',
+ nextStepITACNoComp: 'NextStepsWidgetITACNoComp',
serviceProviderQuestion: 'ServiceProviderQuestion'
},
CANCEL_CLAIM_REF_NAME,
@@ -307,6 +321,14 @@ export default {
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
)?.replaceAll('{custom:damage}', this.damageText);
+ return createOrderedListFromStringOfParagraphs(cmsText);
+ },
+ nextStepsBodyITACNoComp() {
+ const cmsText = this.getTextFromCmsWithCustomIfStatements(
+ this.widget.nextStepITACNoComp,
+ widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
+ );
+
return createUnorderedListFromStringOfParagraphs(cmsText);
},
damageText() {
@@ -496,21 +518,27 @@ export default {
return this.isITACQuoteVisible;
case 'verifiedNoComp':
return this.isNoCompQuoteVisible;
- case 'ADASReplace':
- return !isRepair && this.isADAS;
- case 'nonADASReplace':
- return !isRepair && !this.isADAS;
+ case 'ADASReplace': //
+ return !isRepair && this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
+ case 'nonADASReplace': //
+ return !isRepair && !this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
case 'nonADASRepair':
return isRepair;
case 'deductibleOverZero':
return this.isDeductibleVisible && this.deductibleValue > 0;
case 'isDeductibleZero':
return this.isDeductibleVisible && this.deductibleValue <= 0;
- case 'verifiedRepair':
+ case 'verifiedRepairDeductible': //
return isRepair && this.isDeductibleVisible;
- case 'verifiedReplaceZeroDeductible':
+ case 'verifiedRepairZeroDeductible': //
+ return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
+ case 'verifiedRepairDeductibleOverZero': //
+ return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
+ case 'verifiedReplaceDeductible': //
+ return !isRepair && this.isDeductibleVisible;
+ case 'verifiedReplaceZeroDeductible': //
return !isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
- case 'verifiedReplaceDeductibleOverZero':
+ case 'verifiedReplaceDeductibleOverZero': //
return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
case 'unverifiedADAS':
return this.isUnverifiedADAS;
@@ -577,11 +605,16 @@ export default {
display: block;
margin: 24px auto 0 auto;
}
+ .back-link {
+ display: inline-block;
+ align-items: center;
+ }
:deep(.body-text > ol > ul) {
list-style-position: outside;
list-style-type: disc;
padding-left: 0;
}
+ // revisit this
:deep(ul) {
padding: 0;
padding-left: 1.25rem;
@@ -666,9 +699,6 @@ export default {
margin-top: 20px;
display: block;
}
- :deep(a) {
- text-decoration: none;
- }
}
.modal {
From c148de71a6ee30fa2b8d250158fb833cced33ed9 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Wed, 28 Jan 2026 12:08:59 -0500
Subject: [PATCH 13/43] updating deductible logic WIP
---
.../coverage-statement/coverage-statement.vue | 2 +-
src/store/index.js | 31 ++++++++++++++-----
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 7d1f03ed..ea253ead 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -336,7 +336,7 @@ export default {
return damageString === 'match' ? '' : damageString;
},
deductibleValue() {
- return useMainStore().order.currentDeductible;
+ return this.isRepair ? useMainStore().order.currentRepairDeductible : useMainStore().order.currentReplaceDeductible;
},
isNoCompQuoteVisible() {
return this.mainStore.isVerified && this.mainStore.isNoComp;
diff --git a/src/store/index.js b/src/store/index.js
index daa02d03..9e6545f3 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -222,6 +222,12 @@ export const getDefaultState = () => ({
customerPortalLoginToken: null,
originalDeductible: null,
currentDeductible: null,
+ originalReplaceDeductible: null,
+ currentReplaceDeductible: null,
+ originalRepairDeductible: null,
+ currentRepairDeductible: null,
+ totalTaxAmount: null,
+ waiverReasons: null,
carrierPhoneNumber: null,
loadedFromCookie: false,
loadedFromDupeCheck: null,
@@ -653,7 +659,7 @@ export const useMainStore = defineStore({
safelitePolicy: {
policies: []
},
- actualDeductible: this.order.currentDeductible?.toString() ?? ''
+ actualDeductible: this.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
},
lossInfo: {
dateOfLoss: this.order.policy.dateOfLoss,
@@ -716,8 +722,8 @@ export const useMainStore = defineStore({
manualGlassNames: manualGlassNamesArray,
policyState: this.order.customer.address.state,
status: this.order.policy.status,
- originalDeductible: this.order.originalDeductible,
- currentDeductible: this.order.currentDeductible,
+ originalDeductible: this.isRepair ? this.order.originalRepairDeductible : this.order.originalReplaceDeductible,
+ currentDeductible: this.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible,
noCoverage: false,
isRepair: this.order.damage.isRepair,
policyNumber: this.order.policy.policyNumber,
@@ -731,7 +737,8 @@ export const useMainStore = defineStore({
}
}).then((r) => {
this.order.policy.policyData = r.data.policyData;
- this.updateDeductible(r.data.deductible);
+ this.updateDeductible(r.data);
+ // this.updateDeductible(r.data);
return resolve(r);
}).catch((error) => reject(error));
});
@@ -2031,8 +2038,12 @@ export const useMainStore = defineStore({
this.order.policy.endorsements = coverage?.endorsements;
// TODO logic should be more complicated later on
- this.order.originalDeductible = coverage.deductible;
- this.order.currentDeductible = coverage.deductible;
+ this.order.originalReplaceDeductible = coverage.deductible;
+ this.order.currentReplaceDeductible = coverage.deductible;
+ this.order.originalReplaceDeductible = this.order.policy.deductible.replace;
+ this.order.currentReplaceDeductible = this.order.policy.deductible.replace;
+ this.order.originalRepairDeductible = this.order.policy.deductible.repair;
+ this.order.currentRepairDeductible = this.order.policy.deductible.repair;
},
resetOrder() {
@@ -2316,8 +2327,12 @@ export const useMainStore = defineStore({
updateIsSafeliteProvider(isSafelite) {
this.order.serviceLocation.IsSafeliteProvider = isSafelite;
},
- updateDeductible(finalDeductible) {
- this.order.currentDeductible = finalDeductible;
+ updateDeductible(deductibleInfo) {
+ if (!this.order.damage.isRepair) {
+ this.order.currentReplaceDeductible = deductibleInfo.deductible;
+ } else {
+ this.order.currentRepairDeductible = deductibleInfo.deductible;
+ }
},
savePartQuestionAnswers(partQuestionAnswersArray) {
// if part question answers have changed, reset subsequent question answers
From 49b930cecbf02153336cb8e01e9f9dd62c8a8feb Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Wed, 28 Jan 2026 13:35:23 -0500
Subject: [PATCH 14/43] deductible updates WIP
---
src/layouts/coverage-statement/coverage-statement.vue | 4 +++-
src/store/index.js | 8 ++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index ea253ead..04c9c555 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -301,7 +301,7 @@ export default {
return this.getTextFromCmsWithCustomIfStatements(
this.widget.explanatoryText,
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2
- );
+ )?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.order.currentReplaceDeductible));
},
nextStepsHeader() {
return this.getTextFromCmsWithCustomIfStatements(
@@ -532,6 +532,8 @@ export default {
return isRepair && this.isDeductibleVisible;
case 'verifiedRepairZeroDeductible': //
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
+ case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
+ return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
case 'verifiedRepairDeductibleOverZero': //
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
case 'verifiedReplaceDeductible': //
diff --git a/src/store/index.js b/src/store/index.js
index 9e6545f3..4b19b465 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -659,7 +659,7 @@ export const useMainStore = defineStore({
safelitePolicy: {
policies: []
},
- actualDeductible: this.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
+ actualDeductible: this.order.damage.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
},
lossInfo: {
dateOfLoss: this.order.policy.dateOfLoss,
@@ -2328,10 +2328,10 @@ export const useMainStore = defineStore({
this.order.serviceLocation.IsSafeliteProvider = isSafelite;
},
updateDeductible(deductibleInfo) {
- if (!this.order.damage.isRepair) {
- this.order.currentReplaceDeductible = deductibleInfo.deductible;
- } else {
+ if (this.order.damage.isRepair) {
this.order.currentRepairDeductible = deductibleInfo.deductible;
+ } else {
+ this.order.currentReplaceDeductible = deductibleInfo.deductible;
}
},
savePartQuestionAnswers(partQuestionAnswersArray) {
From 38254d0b46fcd46c036ec6701bd5de4129a1db4f Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Wed, 28 Jan 2026 16:19:27 -0500
Subject: [PATCH 15/43] remove outdated code
---
.../coverage-statement/coverage-statement.vue | 138 ++++--------------
1 file changed, 29 insertions(+), 109 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 04c9c555..1a722e19 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -56,21 +56,11 @@
{{ formatAmountInDollars(deductibleValue) }}
-
-
@@ -82,12 +72,11 @@
{{ formatAmountInDollars(totalServicePrice) }}
+ :buttonText="buttonText"
+ @clickEvent="navigateForward" />
-
-
+
// Import Component
import { Form } from 'vee-validate';
-import siteFooter from '@/iss-components/site-footer/site-footer.vue';
import siteHeader from '@/iss-components/site-header/site-header.vue';
import cancelClaimModal from '@/layouts/coverage-statement/cancel-claim-modal/cancel-claim-modal.vue';
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal.vue';
@@ -169,7 +149,6 @@ const SITE_FOOTER_REF_NAME = 'siteFooter';
export default {
name: 'coverage-statement',
components: {
- siteFooter,
siteHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form,
@@ -257,23 +236,6 @@ export default {
widgetFields.SUB_HEADER_WIDGET.SUB_HEADER_TEXT
);
},
- verifiedItacAlertHeader() {
- return this.getCmsContent(
- this.widget.verifiedItacAlert,
- widgetFields.ALERT_WIDGET.HEADLINE_TEXT
- );
- },
- verifiedItacAlertBody() {
- const itacCostSavings =
- this.deductibleValue - this.totalServicePrice;
- return this.getCmsContent(
- this.widget.verifiedItacAlert,
- widgetFields.ALERT_WIDGET.BODY_TEXT
- )?.replaceAll(
- '{custom:costSavings}',
- formatAmountInDollars(itacCostSavings)
- );
- },
secondaryText() {
const itacCostSavings =
this.deductibleValue - this.totalServicePrice;
@@ -309,28 +271,17 @@ export default {
widgetFields.CONTENT_GROUP_WIDGET.HEADER_TEXT
);
},
- nextStepsSubheader() {
- return this.getTextFromCmsWithCustomIfStatements(
- this.widget.nextStep,
- widgetFields.CONTENT_GROUP_WIDGET.SUBHEADER_TEXT
- );
- },
nextStepsBody() {
const cmsText = this.getTextFromCmsWithCustomIfStatements(
this.widget.nextStep,
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
)?.replaceAll('{custom:damage}', this.damageText);
+ if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
+ return createUnorderedListFromStringOfParagraphs(cmsText);
+ }
return createOrderedListFromStringOfParagraphs(cmsText);
},
- nextStepsBodyITACNoComp() {
- const cmsText = this.getTextFromCmsWithCustomIfStatements(
- this.widget.nextStepITACNoComp,
- widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
- );
-
- return createUnorderedListFromStringOfParagraphs(cmsText);
- },
damageText() {
const damageString = getDamageString();
return damageString === 'match' ? '' : damageString;
@@ -360,18 +311,6 @@ export default {
totalServicePrice() {
return getPriceOfLineItems(this.baseServiceLineItems);
},
- serviceProviderQuestionText() {
- return this.getCmsContent(
- this.widget.serviceProviderQuestion,
- widgetFields.INPUT_QUESTION_WIDGET.QUESTION_TEXT
- );
- },
- serviceProviderQuestionAnswers() {
- return this.getCmsContent(
- this.widget.serviceProviderQuestion,
- widgetFields.INPUT_QUESTION_WIDGET.ANSWERS
- );
- },
isQuoteDisplayed() {
return this.isNoCompQuoteVisible;
},
@@ -406,11 +345,17 @@ export default {
isUnverifiedNonADAS() {
return this.isUnverifiedVisible && !this.isADAS;
},
- isReplaceZeroDeductible() {
- return !this.isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
- },
isRepairZeroDeductible() {
return this.isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
+ },
+ buttonText() {
+ return (this.isITACQuoteVisible || this.isNoCompQuoteVisible) ? 'Continue scheduling' : 'Continue';
+ },
+ getVariant() {
+ if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
+ return 'text-center';
+ }
+ return 'text-left';
}
},
watch: {
@@ -484,15 +429,10 @@ export default {
if (this.isUnverifiedVisible || this.isDeductibleVisible) {
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD);
} else if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
- useMainStore().updateIsSafeliteProvider(this.selectedProvider === SAFELITE_PROVIDER);
- if (this.selectedProvider === SAFELITE_PROVIDER) {
- this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
- } else {
- useMainStore().setBailout(bailoutMessage.RequestCallback());
- this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP);
- }
+ this.mainStore.updateIsSafeliteProvider(true);
+ this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
} else {
- useMainStore().setBailout(bailoutMessage.coverageStatementInvalidState());
+ this.mainStore.setBailout(bailoutMessage.coverageStatementInvalidState());
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_INVALID_STATE);
}
},
@@ -512,44 +452,28 @@ export default {
switch (str) {
case 'coverageUnverified':
return this.isUnverifiedVisible;
- case 'verifiedDeductible':
- return this.isDeductibleVisible;
case 'verifiedITAC':
return this.isITACQuoteVisible;
case 'verifiedNoComp':
return this.isNoCompQuoteVisible;
- case 'ADASReplace': //
+ case 'ADASReplace':
return !isRepair && this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
- case 'nonADASReplace': //
+ case 'nonADASReplace':
return !isRepair && !this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
- case 'nonADASRepair':
- return isRepair;
- case 'deductibleOverZero':
- return this.isDeductibleVisible && this.deductibleValue > 0;
- case 'isDeductibleZero':
- return this.isDeductibleVisible && this.deductibleValue <= 0;
- case 'verifiedRepairDeductible': //
+ case 'verifiedRepairDeductible':
return isRepair && this.isDeductibleVisible;
- case 'verifiedRepairZeroDeductible': //
+ case 'verifiedRepairZeroDeductible':
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
- case 'verifiedRepairDeductibleOverZero': //
+ case 'verifiedRepairDeductibleOverZero':
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
- case 'verifiedReplaceDeductible': //
+ case 'verifiedReplaceDeductible':
return !isRepair && this.isDeductibleVisible;
- case 'verifiedReplaceZeroDeductible': //
+ case 'verifiedReplaceZeroDeductible':
return !isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
- case 'verifiedReplaceDeductibleOverZero': //
+ case 'verifiedReplaceDeductibleOverZero':
return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
- case 'unverifiedADAS':
- return this.isUnverifiedADAS;
- case 'unverifiedNonADAS':
- return this.isUnverifiedNonADAS;
- case 'verifiedReplaceDeductibleOverZeroNonADAS':
- return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0 && !this.isADAS;
- case 'verifiedReplaceDeductibleOverZeroADAS':
- return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0 && this.isADAS;
default:
return null;
}
@@ -559,13 +483,9 @@ export default {
},
formatAmountInDollars,
cancelClaim() {
- useMainStore().updateIsSafeliteProvider(false);
- useMainStore().setBailout(bailoutMessage.RequestCallback());
+ this.mainStore.updateIsSafeliteProvider(false);
+ this.mainStore.setBailout(bailoutMessage.RequestCallback());
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP);
- },
- continueClaim() {
- useMainStore().updateIsSafeliteProvider(true);
- this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
}
}
};
From 6a5e7e54022b4127b73ca4eb55f220a0ed70d31e Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Wed, 28 Jan 2026 16:28:34 -0500
Subject: [PATCH 16/43] update references to currentDeductible
---
src/helpers/cart-helper.js | 2 +-
src/layouts/payment-method/payment-method.vue | 3 ++-
src/layouts/tpa-submit/tpa-submit.vue | 2 +-
src/store/index.js | 6 +++---
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/helpers/cart-helper.js b/src/helpers/cart-helper.js
index 6cf54498..8faf1557 100644
--- a/src/helpers/cart-helper.js
+++ b/src/helpers/cart-helper.js
@@ -76,7 +76,7 @@ export function getMobileFeeLineItem(order) {
* @returns {number|undefined|null} current deductible
*/
export function getDeductible(order) {
- return order.currentDeductible;
+ return order.damage.isRepair ? order.currentRepairDeductible : order.currentReplaceDeductible;
}
/**
diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue
index d0d6c341..1ef4bc0b 100644
--- a/src/layouts/payment-method/payment-method.vue
+++ b/src/layouts/payment-method/payment-method.vue
@@ -153,7 +153,8 @@ export default {
isPayInAdvanceDisabled() {
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
const isEnabled = piaExperience === 'true';
- const isDeductibleTotalEqualToZero = useMainStore().order.currentDeductible === 0;
+ const isDeductibleTotalEqualToZero = useMainStore().order.damage.isRepair ? useMainStore().order.currentRepairDeductible === 0
+ : useMainStore().order.currentReplaceDeductible === 0;
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
},
diff --git a/src/layouts/tpa-submit/tpa-submit.vue b/src/layouts/tpa-submit/tpa-submit.vue
index 85a85d52..c84575b4 100644
--- a/src/layouts/tpa-submit/tpa-submit.vue
+++ b/src/layouts/tpa-submit/tpa-submit.vue
@@ -207,7 +207,7 @@ export default {
return this.mainStore.isVerified;
},
currentDeductible() {
- return this.mainStore.order.currentDeductible;
+ return this.mainStore.order.damage.isRepair ? this.mainStore.order.currentRepairDeductible : this.mainStore.order.currentReplaceDeductible;
},
deductibleBoxValue() {
return this.isVerified
diff --git a/src/store/index.js b/src/store/index.js
index 4b19b465..c84f84b7 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1204,7 +1204,7 @@ export const useMainStore = defineStore({
Model: vehicle.model
},
Insurance: {
- Deductible: this.order.currentDeductible ?? 0,
+ Deductible: this.order.damage.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible ?? 0,
PolicyNumber: policy.policyNumber,
CoverageStatus: insuranceCoverage.coverageStatus,
CoverageType: insuranceCoverage.coverageType
@@ -1454,8 +1454,8 @@ export const useMainStore = defineStore({
},
policyNumber: policy.policyNumber,
policyZipCode: policy.policyZipCode,
- originalDeductible: this.order.originalDeductible,
- currentDeductible: this.order.currentDeductible,
+ originalDeductible: this.isRepair ? this.order.originalRepairDeductible : this.order.originalReplaceDeductible,
+ currentDeductible: this.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible,
OemEndorsement: this.hasOemEndorsement,
noCoverage: this.isNoComp,
isItac: this.isITAC
From 0cc788a5ea35f2d48b7f5b595056bfc0c2d9fae8 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 08:41:19 -0500
Subject: [PATCH 17/43] add comments
---
src/store/index.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/store/index.js b/src/store/index.js
index c84f84b7..94811d8d 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -220,7 +220,9 @@ export const getDefaultState = () => ({
settledTenderAmount: null,
lockToken: null,
customerPortalLoginToken: null,
+ // TO DO: remove one replace/repair logic is in place
originalDeductible: null,
+ // TO DO: remove one replace/repair logic is in place
currentDeductible: null,
originalReplaceDeductible: null,
currentReplaceDeductible: null,
From 67a3ae062b2b907148fb8f794b03d1065dfc592d Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 10:00:18 -0500
Subject: [PATCH 18/43] remove NeedHelp bailout, add DoNotSeeShop back
---
src/constants/bailoutCode.js | 2 +-
src/constants/bailoutMessage.js | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/constants/bailoutCode.js b/src/constants/bailoutCode.js
index caffbda7..fb1ac071 100644
--- a/src/constants/bailoutCode.js
+++ b/src/constants/bailoutCode.js
@@ -4,7 +4,7 @@ const bailoutCode = Object.freeze({
VehicleNotFound: 2,
VehicleVinLookupError: 3,
CoverageStatementInvalidState: 4,
- NeedHelp: 5,
+ DoNotSeeMyShop: 5,
PricingResponseError: 6,
TPANotEnabled: 7,
RequestCallback: 8,
diff --git a/src/constants/bailoutMessage.js b/src/constants/bailoutMessage.js
index 33fe8956..1daa702e 100644
--- a/src/constants/bailoutMessage.js
+++ b/src/constants/bailoutMessage.js
@@ -33,9 +33,9 @@ const bailoutMessage = Object.freeze({
code: bailoutCode.CoverageStatementInvalidState,
message: 'Coverage Statement has entered an invalid state'
}),
- needHelp: () => ({
- code: bailoutCode.NeedHelp,
- message: 'User clicked Need Help link.'
+ doNotSeeMyShop: () => ({
+ code: bailoutCode.DoNotSeeMyShop,
+ message: 'User does not see their shop.'
}),
pricingResponseError: (lineItems, error) => ({
code: bailoutCode.PricingResponseError,
From 26b8c0fa20b8ea73251cfd9a396c4a2c667d4b4b Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 10:05:43 -0500
Subject: [PATCH 19/43] remove old modals and related properties
---
.../coverage-statement/coverage-statement.vue | 25 +------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 1a722e19..30a9bf3c 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -103,10 +103,6 @@
:ref="RECAL_MODAL_REF_NAME"
cssModalHeadlineClass="text-center"
cmsWidgetName="RecalModal" />
-
@@ -114,7 +110,6 @@
// Import Component
import { Form } from 'vee-validate';
import siteHeader from '@/iss-components/site-header/site-header.vue';
-import cancelClaimModal from '@/layouts/coverage-statement/cancel-claim-modal/cancel-claim-modal.vue';
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal.vue';
import textBlock from '@/digital-components/text-block/text-block.vue';
import textLink from '@/ux-components/text-link/text-link.vue';
@@ -141,10 +136,7 @@ import { getPriceOfLineItems } from '@/helpers/price-calculator';
import coverageStatuses from '@/constants/coverage-statuses';
import coverageType from '@/constants/coverage-type';
-const CANCEL_CLAIM_REF_NAME = 'CancelClaimModal';
-const SAFELITE_PROVIDER = 'Safelite';
const RECAL_MODAL_REF_NAME = 'RecalModal';
-const SITE_FOOTER_REF_NAME = 'siteFooter';
export default {
name: 'coverage-statement',
@@ -152,7 +144,6 @@ export default {
siteHeader,
// eslint-disable-next-line vue/no-reserved-component-names
Form,
- cancelClaimModal,
contentGroupModal,
buttonMain,
textBlock,
@@ -211,7 +202,6 @@ export default {
data() {
return {
baseServiceLineItems: [],
- selectedProvider: '',
rules: {
selectionRequired: globalRules.OPTION_REQUIRED
},
@@ -224,9 +214,7 @@ export default {
nextStepITACNoComp: 'NextStepsWidgetITACNoComp',
serviceProviderQuestion: 'ServiceProviderQuestion'
},
- CANCEL_CLAIM_REF_NAME,
- RECAL_MODAL_REF_NAME,
- SITE_FOOTER_REF_NAME
+ RECAL_MODAL_REF_NAME
};
},
computed: {
@@ -359,17 +347,6 @@ export default {
}
},
watch: {
- selectedProvider() {
- if (this.selectedProvider) {
- if (this.selectedProvider !== SAFELITE_PROVIDER) {
- this.$refs[this.CANCEL_CLAIM_REF_NAME].openModal();
- this.selectedProvider = '';
- this.$refs.siteFooter.disableForwardButton();
- } else {
- this.$refs.siteFooter.enableForwardAction();
- }
- }
- },
nextStepsBody(newValue, oldValue) {
if (newValue !== oldValue) {
setupModalLink(this, RECAL_MODAL_REF_NAME);
From 14650b7bbb08ef777094923b65fdd56f85e1ce4e Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 10:11:01 -0500
Subject: [PATCH 20/43] cursor fixes - remove unneeded code
---
src/layouts/coverage-statement/coverage-statement.vue | 6 ------
src/store/index.js | 3 ---
2 files changed, 9 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 30a9bf3c..ddc959cd 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -327,12 +327,6 @@ export default {
isRepair() {
return this.mainStore.order.damage.isRepair;
},
- isUnverifiedADAS() {
- return this.isUnverifiedVisible && this.isADAS;
- },
- isUnverifiedNonADAS() {
- return this.isUnverifiedVisible && !this.isADAS;
- },
isRepairZeroDeductible() {
return this.isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
},
diff --git a/src/store/index.js b/src/store/index.js
index 94811d8d..d1d6cd85 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -2039,9 +2039,6 @@ export const useMainStore = defineStore({
this.order.policy.deductible.repair = coverage?.repairWaived ?? false ? 0 : coverage.deductible;
this.order.policy.endorsements = coverage?.endorsements;
- // TODO logic should be more complicated later on
- this.order.originalReplaceDeductible = coverage.deductible;
- this.order.currentReplaceDeductible = coverage.deductible;
this.order.originalReplaceDeductible = this.order.policy.deductible.replace;
this.order.currentReplaceDeductible = this.order.policy.deductible.replace;
this.order.originalRepairDeductible = this.order.policy.deductible.repair;
From ea14a7f888d836b888cb3a609a9005bc72886b4c Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 10:45:42 -0500
Subject: [PATCH 21/43] removing more unneeded code
---
src/layouts/coverage-statement/coverage-statement.vue | 1 -
src/store/index.js | 1 -
2 files changed, 2 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index ddc959cd..fab95579 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -211,7 +211,6 @@ export default {
verifiedItacAlert: 'VerifiedITACAlert',
explanatoryText: 'ExplanatoryTextWidget',
nextStep: 'NextStepsWidget',
- nextStepITACNoComp: 'NextStepsWidgetITACNoComp',
serviceProviderQuestion: 'ServiceProviderQuestion'
},
RECAL_MODAL_REF_NAME
diff --git a/src/store/index.js b/src/store/index.js
index d1d6cd85..f0245855 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -740,7 +740,6 @@ export const useMainStore = defineStore({
}).then((r) => {
this.order.policy.policyData = r.data.policyData;
this.updateDeductible(r.data);
- // this.updateDeductible(r.data);
return resolve(r);
}).catch((error) => reject(error));
});
From b73f4b2a0566dc74fb69ea39a889681877bec0f3 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 11:46:00 -0500
Subject: [PATCH 22/43] create getters for deductible / cursor fixes
---
src/helpers/cart-helper.js | 2 +-
.../coverage-statement/coverage-statement.vue | 2 +-
src/layouts/tpa-submit/tpa-submit.vue | 2 +-
src/store/index.js | 40 ++++++++++---------
4 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/src/helpers/cart-helper.js b/src/helpers/cart-helper.js
index 8faf1557..af2cb1b9 100644
--- a/src/helpers/cart-helper.js
+++ b/src/helpers/cart-helper.js
@@ -76,7 +76,7 @@ export function getMobileFeeLineItem(order) {
* @returns {number|undefined|null} current deductible
*/
export function getDeductible(order) {
- return order.damage.isRepair ? order.currentRepairDeductible : order.currentReplaceDeductible;
+ return order.damage.isRepair ? order.currentDeductible.repair : order.currentDeductible.replace;
}
/**
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index fab95579..d7119497 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -274,7 +274,7 @@ export default {
return damageString === 'match' ? '' : damageString;
},
deductibleValue() {
- return this.isRepair ? useMainStore().order.currentRepairDeductible : useMainStore().order.currentReplaceDeductible;
+ return this.mainStore.currentDeductible;
},
isNoCompQuoteVisible() {
return this.mainStore.isVerified && this.mainStore.isNoComp;
diff --git a/src/layouts/tpa-submit/tpa-submit.vue b/src/layouts/tpa-submit/tpa-submit.vue
index 8b96d450..ae67e022 100644
--- a/src/layouts/tpa-submit/tpa-submit.vue
+++ b/src/layouts/tpa-submit/tpa-submit.vue
@@ -207,7 +207,7 @@ export default {
return this.mainStore.isVerified;
},
currentDeductible() {
- return this.mainStore.order.damage.isRepair ? this.mainStore.order.currentRepairDeductible : this.mainStore.order.currentReplaceDeductible;
+ return this.mainStore.currentDeductible;
},
deductibleBoxValue() {
return this.isVerified
diff --git a/src/store/index.js b/src/store/index.js
index f0245855..8248cdd9 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -220,14 +220,14 @@ export const getDefaultState = () => ({
settledTenderAmount: null,
lockToken: null,
customerPortalLoginToken: null,
- // TO DO: remove one replace/repair logic is in place
- originalDeductible: null,
- // TO DO: remove one replace/repair logic is in place
- currentDeductible: null,
- originalReplaceDeductible: null,
- currentReplaceDeductible: null,
- originalRepairDeductible: null,
- currentRepairDeductible: null,
+ originalDeductible: {
+ repair: null,
+ replace: null
+ },
+ currentDeductible: {
+ repair: null,
+ replace: null
+ },
totalTaxAmount: null,
waiverReasons: null,
carrierPhoneNumber: null,
@@ -447,7 +447,9 @@ export const useMainStore = defineStore({
experimentSettings: (state) => state.applicationUser.experiments
.filter((x) => !!x.isActive)
.map((x) => x.settings)
- .reduce((r, c) => Object.assign(r, c), {}) ?? {}
+ .reduce((r, c) => Object.assign(r, c), {}) ?? {},
+ originalDeductible: (state) => (state.order.damage.isRepair ? state.originalDeductible.repair : state.originalDeductible.replace),
+ currentDeductible: (state) => (state.order.damage.isRepair ? state.currentDeductible.repair : state.currentDeductible.replace)
},
actions:
{
@@ -724,8 +726,8 @@ export const useMainStore = defineStore({
manualGlassNames: manualGlassNamesArray,
policyState: this.order.customer.address.state,
status: this.order.policy.status,
- originalDeductible: this.isRepair ? this.order.originalRepairDeductible : this.order.originalReplaceDeductible,
- currentDeductible: this.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible,
+ originalDeductible: this.originalDeductible,
+ currentDeductible: this.currentDeductible,
noCoverage: false,
isRepair: this.order.damage.isRepair,
policyNumber: this.order.policy.policyNumber,
@@ -1455,8 +1457,8 @@ export const useMainStore = defineStore({
},
policyNumber: policy.policyNumber,
policyZipCode: policy.policyZipCode,
- originalDeductible: this.isRepair ? this.order.originalRepairDeductible : this.order.originalReplaceDeductible,
- currentDeductible: this.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible,
+ originalDeductible: this.originalDeductible,
+ currentDeductible: this.currentDeductible,
OemEndorsement: this.hasOemEndorsement,
noCoverage: this.isNoComp,
isItac: this.isITAC
@@ -2038,10 +2040,10 @@ export const useMainStore = defineStore({
this.order.policy.deductible.repair = coverage?.repairWaived ?? false ? 0 : coverage.deductible;
this.order.policy.endorsements = coverage?.endorsements;
- this.order.originalReplaceDeductible = this.order.policy.deductible.replace;
- this.order.currentReplaceDeductible = this.order.policy.deductible.replace;
- this.order.originalRepairDeductible = this.order.policy.deductible.repair;
- this.order.currentRepairDeductible = this.order.policy.deductible.repair;
+ this.order.originalDeductible.replace = this.order.policy.deductible.replace;
+ this.order.currentDeductible.replace = this.order.policy.deductible.replace;
+ this.order.originalDeductible.repair = this.order.policy.deductible.repair;
+ this.order.currentDeductible.repair = this.order.policy.deductible.repair;
},
resetOrder() {
@@ -2327,9 +2329,9 @@ export const useMainStore = defineStore({
},
updateDeductible(deductibleInfo) {
if (this.order.damage.isRepair) {
- this.order.currentRepairDeductible = deductibleInfo.deductible;
+ this.order.currentDeductible.repair = deductibleInfo.deductible;
} else {
- this.order.currentReplaceDeductible = deductibleInfo.deductible;
+ this.order.currentDeductible.replace = deductibleInfo.deductible;
}
},
savePartQuestionAnswers(partQuestionAnswersArray) {
From d613f4f2b614c124a9dd5709ff70f1f68fe120cf Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 12:05:20 -0500
Subject: [PATCH 23/43] fix deductible references
---
.../coverage-statement/coverage-statement.vue | 2 +-
src/layouts/payment-method/payment-method.vue | 3 +--
src/store/index.js | 12 ++++++------
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index d7119497..1dc77c5f 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -250,7 +250,7 @@ export default {
return this.getTextFromCmsWithCustomIfStatements(
this.widget.explanatoryText,
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2
- )?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.order.currentReplaceDeductible));
+ )?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.currentDeductible));
},
nextStepsHeader() {
return this.getTextFromCmsWithCustomIfStatements(
diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue
index 1ef4bc0b..3dbacbe2 100644
--- a/src/layouts/payment-method/payment-method.vue
+++ b/src/layouts/payment-method/payment-method.vue
@@ -153,8 +153,7 @@ export default {
isPayInAdvanceDisabled() {
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
const isEnabled = piaExperience === 'true';
- const isDeductibleTotalEqualToZero = useMainStore().order.damage.isRepair ? useMainStore().order.currentRepairDeductible === 0
- : useMainStore().order.currentReplaceDeductible === 0;
+ const isDeductibleTotalEqualToZero = useMainStore().currentDeductible === 0;
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
},
diff --git a/src/store/index.js b/src/store/index.js
index 8248cdd9..073b414b 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -448,8 +448,8 @@ export const useMainStore = defineStore({
.filter((x) => !!x.isActive)
.map((x) => x.settings)
.reduce((r, c) => Object.assign(r, c), {}) ?? {},
- originalDeductible: (state) => (state.order.damage.isRepair ? state.originalDeductible.repair : state.originalDeductible.replace),
- currentDeductible: (state) => (state.order.damage.isRepair ? state.currentDeductible.repair : state.currentDeductible.replace)
+ originalDeductible: (state) => (state.order.damage.isRepair ? state.order.originalDeductible.repair : state.order.originalDeductible.replace),
+ currentDeductible: (state) => (state.order.damage.isRepair ? state.order.currentDeductible.repair : state.order.currentDeductible.replace)
},
actions:
{
@@ -663,7 +663,7 @@ export const useMainStore = defineStore({
safelitePolicy: {
policies: []
},
- actualDeductible: this.order.damage.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
+ actualDeductible: this.currentDeductible ?? ''
},
lossInfo: {
dateOfLoss: this.order.policy.dateOfLoss,
@@ -1207,7 +1207,7 @@ export const useMainStore = defineStore({
Model: vehicle.model
},
Insurance: {
- Deductible: this.order.damage.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible ?? 0,
+ Deductible: this.currentDeductible ?? 0,
PolicyNumber: policy.policyNumber,
CoverageStatus: insuranceCoverage.coverageStatus,
CoverageType: insuranceCoverage.coverageType
@@ -2056,8 +2056,8 @@ export const useMainStore = defineStore({
this.order.settledTenderAmount = null;
this.order.lockToken = null;
this.order.eon = null;
- this.order.originalDeductible = null;
- this.order.currentDeductible = null;
+ this.order.originalDeductible = { repair: null, replace: null };
+ this.order.currentDeductible = { repair: null, replace: null };
this.order.loadedFromDupeCheck = null;
this.order.loadedSessionClearedPreviousData = null;
this.order.availableVaps = null;
From 453b1fe5615f9ede7dcc5aacd863155fc065fc56 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 12:07:04 -0500
Subject: [PATCH 24/43] fix %
---
src/constants/progress-bar-mapper.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/constants/progress-bar-mapper.js b/src/constants/progress-bar-mapper.js
index 02b9c9be..c12bdf13 100644
--- a/src/constants/progress-bar-mapper.js
+++ b/src/constants/progress-bar-mapper.js
@@ -45,7 +45,7 @@ export const pageProgressMapper = {
percent: 50
},
'coverage-statement': {
- percent: 50
+ percent: 55
},
'provider-preference': {
percent: 60
From 4ca3ec67bbeca1c8904432072e72eb55b491f83b Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 12:43:33 -0500
Subject: [PATCH 25/43] remove more old data
---
src/layouts/coverage-statement/coverage-statement.vue | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 1dc77c5f..e972ab96 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -202,16 +202,12 @@ export default {
data() {
return {
baseServiceLineItems: [],
- rules: {
- selectionRequired: globalRules.OPTION_REQUIRED
- },
widget: {
disclaimerText: 'DisclaimerWidget',
subheader: 'SiteSubHeaderWidget',
verifiedItacAlert: 'VerifiedITACAlert',
explanatoryText: 'ExplanatoryTextWidget',
- nextStep: 'NextStepsWidget',
- serviceProviderQuestion: 'ServiceProviderQuestion'
+ nextStep: 'NextStepsWidget'
},
RECAL_MODAL_REF_NAME
};
From debbdcf57f1a986b127251fa59a07336818f9df3 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Thu, 29 Jan 2026 13:09:59 -0500
Subject: [PATCH 26/43] resetOrder fix
---
src/store/index.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/store/index.js b/src/store/index.js
index 073b414b..8e46d16d 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -2056,8 +2056,10 @@ export const useMainStore = defineStore({
this.order.settledTenderAmount = null;
this.order.lockToken = null;
this.order.eon = null;
- this.order.originalDeductible = { repair: null, replace: null };
- this.order.currentDeductible = { repair: null, replace: null };
+ this.order.originalDeductible.repair = null;
+ this.order.originalDeductible.replace = null;
+ this.order.currentDeductible.repair = null;
+ this.order.currentDeductible.replace = null;
this.order.loadedFromDupeCheck = null;
this.order.loadedSessionClearedPreviousData = null;
this.order.availableVaps = null;
From bfb30c42b04e3b615d41889d413701c65e3fb2ba Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Fri, 30 Jan 2026 13:51:13 -0500
Subject: [PATCH 27/43] updates/styling
---
src/layouts/coverage-statement/coverage-statement.vue | 11 +++++++++--
src/store/index.js | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index e972ab96..96ef7bdb 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -502,7 +502,13 @@ export default {
list-style-type: disc;
padding-left: 0;
}
- // revisit this
+ :deep(ol) {
+ padding-left: 1.25rem;
+ }
+ :deep(li) {
+ margin-top: 1px;
+ padding-left: 5px;
+ }
:deep(ul) {
padding: 0;
padding-left: 1.25rem;
@@ -510,7 +516,8 @@ export default {
line-height: 1.25rem;
li {
- margin-bottom: .5rem;
+ margin-top: .5rem;
+ padding-left: 5px;
}
}
:deep(p) {
diff --git a/src/store/index.js b/src/store/index.js
index 204070ea..66d49aa0 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -663,7 +663,7 @@ export const useMainStore = defineStore({
safelitePolicy: {
policies: []
},
- actualDeductible: this.currentDeductible ?? ''
+ actualDeductible: this.currentDeductible.toString() ?? ''
},
lossInfo: {
dateOfLoss: this.order.policy.dateOfLoss,
From b7aaca00e520dca33f82b669934881d5edae7e26 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Fri, 30 Jan 2026 15:03:10 -0500
Subject: [PATCH 28/43] fix unit tests
---
.../coverage-statement.spec.js.snap | 10 -----
.../coverage-statement.spec.js | 43 +++++++++----------
.../coverage-statement/coverage-statement.vue | 2 -
3 files changed, 21 insertions(+), 34 deletions(-)
diff --git a/src/layouts/coverage-statement/__snapshots__/coverage-statement.spec.js.snap b/src/layouts/coverage-statement/__snapshots__/coverage-statement.spec.js.snap
index f6f6b40f..ef566a55 100644
--- a/src/layouts/coverage-statement/__snapshots__/coverage-statement.spec.js.snap
+++ b/src/layouts/coverage-statement/__snapshots__/coverage-statement.spec.js.snap
@@ -2,23 +2,13 @@
exports[`coverageStatement.vue returns the initial data 1`] = `
Object {
- "CANCEL_CLAIM_REF_NAME": "CancelClaimModal",
- "DEDUCTIBLE_MODAL_REF_NAME": "DeductibleModal",
"RECAL_MODAL_REF_NAME": "RecalModal",
- "SITE_FOOTER_REF_NAME": "siteFooter",
"baseServiceLineItems": Array [],
- "deductibleText": "Your deductible is",
- "rules": Object {
- "selectionRequired": "option-required",
- },
- "selectedProvider": "",
"widget": Object {
"disclaimerText": "DisclaimerWidget",
"explanatoryText": "ExplanatoryTextWidget",
"nextStep": "NextStepsWidget",
- "serviceProviderQuestion": "ServiceProviderQuestion",
"subheader": "SiteSubHeaderWidget",
- "verifiedItacAlert": "VerifiedITACAlert",
},
}
`;
diff --git a/src/layouts/coverage-statement/coverage-statement.spec.js b/src/layouts/coverage-statement/coverage-statement.spec.js
index 3ec6a0be..28a74195 100644
--- a/src/layouts/coverage-statement/coverage-statement.spec.js
+++ b/src/layouts/coverage-statement/coverage-statement.spec.js
@@ -29,6 +29,7 @@ jest.mock('@/helpers/cms-content-helper', () => ({
jest.mock('@/helpers/text-helper', () => ({
createOrderedListFromStringOfParagraphs: jest.fn(),
+ createUnorderedListFromStringOfParagraphs: jest.fn(),
formatAmountInDollars: jest.fn()
}));
@@ -98,9 +99,6 @@ function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRu
fetchCmsContentForPage.mockImplementation(() => Promise.resolve());
const wrapper = shallowMount(coverageStatement, mountOptions);
- wrapper.vm.$refs[CANCEL_CLAIM_REF_NAME].openModal = jest.fn();
- wrapper.vm.$refs.siteFooter.disableForwardButton = jest.fn();
- wrapper.vm.$refs.siteFooter.enableForwardAction = jest.fn();
return { wrapper };
}
@@ -165,16 +163,6 @@ describe('coverageStatement.vue', () => {
// Assert
expect(secondaryText.exists()).toBe(true);
});
- test('Should render site footer', () => {
- // Arrange
- const { wrapper } = getMountedComponent({});
-
- // Act
- const footer = wrapper.findComponent({ ref: 'siteFooter' });
-
- // Assert
- expect(footer.exists()).toBe(true);
- });
});
describe('Computed', () => {
describe.each([
@@ -373,7 +361,7 @@ describe('coverageStatement.vue', () => {
[false, coverageStatuses.PENDING, coverageType.NO_COMP],
[false, coverageStatuses.PENDING, coverageType.Deductible],
[true, coverageStatuses.VERIFIED, coverageType.NO_COMP],
- [true, coverageStatuses.VERIFIED, coverageType.ITAC],
+ [false, coverageStatuses.VERIFIED, coverageType.ITAC],
[false, coverageStatuses.VERIFIED, coverageType.Deductible],
[false, coverageStatuses.NO_COVERAGE, coverageType.NO_COMP],
[false, coverageStatuses.NO_COVERAGE, coverageType.ITAC],
@@ -512,7 +500,10 @@ describe('coverageStatement.vue', () => {
coverageStatus: coverageStatuses.PENDING,
coverageType: coverageType.NONE
},
- currentDeductible: null
+ currentDeductible: {
+ repair: null,
+ replace: null
+ }
}
};
const { wrapper } = getMountedComponent(mainInitialState);
@@ -539,7 +530,9 @@ describe('coverageStatement.vue', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: coverageType.Deductible
},
- currentDeductible: deductible
+ currentDeductible: {
+ replace: deductible
+ }
}
};
const { wrapper } = getMountedComponent(mainInitialState);
@@ -566,7 +559,9 @@ describe('coverageStatement.vue', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: coverageType.ITAC
},
- currentDeductible: deductible
+ currentDeductible: {
+ replace: deductible
+ }
}
};
const { wrapper } = getMountedComponent(mainInitialState);
@@ -584,7 +579,7 @@ describe('coverageStatement.vue', () => {
undefined
);
});
- test('If Verified ITAC, selected other shop, navigate forward w/ CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP', () => {
+ test('If Verified ITAC, selected Cancel, navigate forward w/ CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP', () => {
// Arrange
const deductible = servicePrice + 1;
const mainInitialState = {
@@ -596,7 +591,9 @@ describe('coverageStatement.vue', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: coverageType.ITAC
},
- currentDeductible: deductible
+ currentDeductible: {
+ replace: deductible
+ }
}
};
const { wrapper } = getMountedComponent(mainInitialState);
@@ -605,7 +602,7 @@ describe('coverageStatement.vue', () => {
});
// Act
- wrapper.vm.navigateForward();
+ wrapper.vm.cancelClaim();
// Assert
expect(wrapper.vm.$router.navigate)
@@ -667,7 +664,7 @@ describe('coverageStatement.vue', () => {
});
// Act
- wrapper.vm.navigateForward();
+ wrapper.vm.cancelClaim();
// Assert
expect(wrapper.vm.$router.navigate)
@@ -776,7 +773,9 @@ describe('coverageStatement.vue', () => {
vehicle: {
policyVehicleId: 1
},
- currentDeductible: deductible
+ currentDeductible: {
+ replace: deductible
+ }
},
issConfig: {
isClaimRegistrationRequired: true
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index 96ef7bdb..ce6a788d 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -125,7 +125,6 @@ import settleAllPromises from '@/helpers/layout-helper.js';
import { getDamageString } from '@/helpers/damage-helper.js';
import { useMainStore } from '@/store/index.js';
import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin.js';
-import globalRules from '@/constants/global-rules.js';
import baseFormMixin from '@/mixins/base-form-mixin.js';
import navigationScenarios from '@/router/router-constants/navigation-scenarios.js';
import bailoutMessage from '@/constants/bailoutMessage';
@@ -205,7 +204,6 @@ export default {
widget: {
disclaimerText: 'DisclaimerWidget',
subheader: 'SiteSubHeaderWidget',
- verifiedItacAlert: 'VerifiedITACAlert',
explanatoryText: 'ExplanatoryTextWidget',
nextStep: 'NextStepsWidget'
},
From a74773c0fec368c22018a0acc1e882de1302332e Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Fri, 30 Jan 2026 15:14:09 -0500
Subject: [PATCH 29/43] fixed store value reference
---
src/layouts/coverage-statement/coverage-statement.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue
index ce6a788d..a9cab0a3 100644
--- a/src/layouts/coverage-statement/coverage-statement.vue
+++ b/src/layouts/coverage-statement/coverage-statement.vue
@@ -428,8 +428,8 @@ export default {
return isRepair && this.isDeductibleVisible;
case 'verifiedRepairZeroDeductible':
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
- case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
- return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
+ case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero':
+ return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentDeductible.replace > 0;
case 'verifiedRepairDeductibleOverZero':
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
case 'verifiedReplaceDeductible':
From a7dd2c983c66e8949723f41296cc62aea3675feb Mon Sep 17 00:00:00 2001
From: Alex Humphries
Date: Fri, 30 Jan 2026 17:14:22 -0500
Subject: [PATCH 30/43] Fix alert icon alignment so that it aligns with first
line of multiline alert header
---
src/ux-components/alert/alert.vue | 59 ++++++++++++++++++++++---------
1 file changed, 43 insertions(+), 16 deletions(-)
diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue
index 0537599f..b6c0e697 100644
--- a/src/ux-components/alert/alert.vue
+++ b/src/ux-components/alert/alert.vue
@@ -8,9 +8,21 @@
cssClassNameForCmsWidget,
]">
-
+ :id="collapseId"
+ class="alert-body">
@@ -69,9 +92,7 @@
:text="getRouterLinkDisplayTextFromCopy(copy)"
href="#!"
:data-bs-target="'#' + getRouterLinkRouteFromCopy(copy)"
- @click-event="
- $emit('textLinkClicked', getRouterLinkRouteFromCopy(copy))
- " />
+ @clickEvent="$emit('textLinkClicked', getRouterLinkRouteFromCopy(copy))" />
@@ -210,13 +232,18 @@ export default {
margin-bottom: 2rem;
.alert-header {
display: flex;
- align-items: center;
+ align-items: flex-start;
justify-content: center;
flex-direction: row;
padding: .75rem 1rem .75rem 1rem;
font-weight: 600;
color: $black;
}
+ .alert-icon-container {
+ display: flex;
+ align-items: center;
+ height: 1.625rem;
+ }
.alert-icon {
min-width: 1rem;
max-height: 1rem;
@@ -259,7 +286,7 @@ export default {
padding: .5rem 1rem .75rem 1rem;
border-top: 1px solid;
color: $darker-gray;
- line-height: 26px;
+ line-height: 1.625rem;
font-weight: 400;
}
&.alert-info {
From 6854a2b489a92b4395176b56938241ee072484e1 Mon Sep 17 00:00:00 2001
From: Katie Kroell
Date: Mon, 2 Feb 2026 12:19:41 -0500
Subject: [PATCH 31/43] update unit tests to match deductible store value
structure
---
src/helpers/cart-helper.spec.js | 51 +++++++++--
.../order-confirmation.spec.js | 17 +++-
.../payment-method/payment-method.spec.js | 6 +-
src/layouts/tpa-submit/tpa-submit.spec.js | 18 ++--
src/layouts/tpa-submit/tpa-submit.vue | 29 ++++---
src/store/store.spec.js | 86 ++++++++++++++-----
6 files changed, 158 insertions(+), 49 deletions(-)
diff --git a/src/helpers/cart-helper.spec.js b/src/helpers/cart-helper.spec.js
index 367c9329..aec728c0 100644
--- a/src/helpers/cart-helper.spec.js
+++ b/src/helpers/cart-helper.spec.js
@@ -239,8 +239,13 @@ describe('cart-helper', () => {
describe('getDeductible', () => {
test('Returns deductible on the order', () => {
// Arrange
- const deductible = 100;
+ const deductible = {
+ replace: 100
+ };
const order = {
+ damage: {
+ isRepair: false
+ },
currentDeductible: deductible
};
@@ -249,7 +254,7 @@ describe('cart-helper', () => {
// Assert
expect(result).not.toBeNull();
- expect(result).toBe(deductible);
+ expect(result).toBe(deductible.replace);
});
});
@@ -349,7 +354,12 @@ describe('cart-helper', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: type
},
- currentDeductible: 100,
+ damage: {
+ isRepair: false
+ },
+ currentDeductible: {
+ replace: 100
+ },
lineItems: nullLineItems
};
@@ -373,7 +383,12 @@ describe('cart-helper', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: type
},
- currentDeductible: 100,
+ damage: {
+ isRepair: false
+ },
+ currentDeductible: {
+ replace: 100
+ },
lineItems: emptyLineItems
};
@@ -397,7 +412,12 @@ describe('cart-helper', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: type
},
- currentDeductible: 100,
+ damage: {
+ isRepair: false
+ },
+ currentDeductible: {
+ replace: 100
+ },
lineItems: defaultLineItems
};
@@ -495,7 +515,12 @@ describe('cart-helper', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: type
},
- currentDeductible: 100,
+ damage: {
+ isRepair: false
+ },
+ currentDeductible: {
+ replace: 100
+ },
lineItems: nullLineItems
};
@@ -520,7 +545,12 @@ describe('cart-helper', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: type
},
- currentDeductible: 100,
+ damage: {
+ isRepair: false
+ },
+ currentDeductible: {
+ replace: 100
+ },
lineItems: emptyLineItems
};
@@ -545,7 +575,12 @@ describe('cart-helper', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: type
},
- currentDeductible: 100,
+ damage: {
+ isRepair: false
+ },
+ currentDeductible: {
+ replace: 100
+ },
lineItems: defaultLineItems
};
diff --git a/src/layouts/order-confirmation/order-confirmation.spec.js b/src/layouts/order-confirmation/order-confirmation.spec.js
index f8dd40b7..88f9c71c 100644
--- a/src/layouts/order-confirmation/order-confirmation.spec.js
+++ b/src/layouts/order-confirmation/order-confirmation.spec.js
@@ -84,6 +84,13 @@ const initialStore = {
lastName: 'Test',
servicePhone: '111-111-1111',
emailAddress: 'test@email.com'
+ },
+ damage: {
+ isRepair: false
+ },
+ currentDeductible: {
+ replace: 100,
+ repair: 0
}
}
};
@@ -123,14 +130,20 @@ const sessionStorage = {
vaps: []
},
policy: {},
- damage: {},
+ damage: {
+ isRepair: false
+ },
vehicle: {
year: 2000,
make: 'Honda',
model: 'Civic'
},
customer: {},
- customerPortalLoginToken: 'token'
+ customerPortalLoginToken: 'token',
+ currentDeductible: {
+ replace: 100,
+ repair: 0
+ }
};
function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRun = () => {}, mixin = mockMixin) {
diff --git a/src/layouts/payment-method/payment-method.spec.js b/src/layouts/payment-method/payment-method.spec.js
index 58811293..5acf7f33 100644
--- a/src/layouts/payment-method/payment-method.spec.js
+++ b/src/layouts/payment-method/payment-method.spec.js
@@ -232,7 +232,9 @@ describe('payment-method.vue', () => {
coverageStatus: coverageStatuses.VERIFIED,
coverageType: coverageType.Deductible
},
- currentDeductible: 123
+ currentDeductible: {
+ replace: 123
+ }
},
issConfig: {
isClaimRegistrationRequired: true,
@@ -286,7 +288,7 @@ describe('payment-method.vue', () => {
test('returns true when coverageStatus is verified and deductibleTotal = 0', () => {
// Arrange
store.order.insuranceCoverage.coverageStatus = coverageStatuses.VERIFIED;
- store.order.currentDeductible = 0;
+ store.order.currentDeductible.replace = 0;
const wrapper = setupMocks({}, store, mixin);
// Act
diff --git a/src/layouts/tpa-submit/tpa-submit.spec.js b/src/layouts/tpa-submit/tpa-submit.spec.js
index ab42d2f5..63b61c40 100644
--- a/src/layouts/tpa-submit/tpa-submit.spec.js
+++ b/src/layouts/tpa-submit/tpa-submit.spec.js
@@ -386,7 +386,7 @@ describe('tpa-submit', () => {
serviceLocation: {
provider: {
companyName: providerCompanyName
- }
+ }
},
contactInfo: {
firstName,
@@ -431,7 +431,7 @@ describe('tpa-submit', () => {
serviceLocation: {
provider: {
companyName: providerCompanyName
- }
+ }
},
contactInfo: {
firstName,
@@ -520,7 +520,9 @@ describe('tpa-submit', () => {
// Arrange
const initialStore = {
order: {
- currentDeductible: storeValue
+ currentDeductible: {
+ replace: storeValue
+ }
}
};
const { wrapper } = getMountedComponent(initialStore);
@@ -568,7 +570,10 @@ describe('tpa-submit', () => {
insuranceCoverage: {
coverageStatus: status
},
- currentDeductible: deductible
+ currentDeductible: {
+ replace: deductible,
+ repair: deductible
+ }
}
};
const { wrapper } = getMountedComponent(initialStore);
@@ -596,7 +601,10 @@ describe('tpa-submit', () => {
insuranceCoverage: {
coverageStatus: status
},
- currentDeductible: deductible
+ currentDeductible: {
+ replace: deductible,
+ repair: deductible
+ }
}
};
const { wrapper } = getMountedComponent(initialStore);
diff --git a/src/layouts/tpa-submit/tpa-submit.vue b/src/layouts/tpa-submit/tpa-submit.vue
index ae67e022..5ccecbd7 100644
--- a/src/layouts/tpa-submit/tpa-submit.vue
+++ b/src/layouts/tpa-submit/tpa-submit.vue
@@ -16,12 +16,11 @@
+ :cmsWidgetName="widget.alertIncomplete" />
+ class="tpa-submit-title" />
-
-
-
+
+
+
@@ -155,7 +160,7 @@ export default {
alertIncomplete: 'AlertIncompleteWidget',
alertRecalWarning: 'AlertRecalWarningWidget',
editShopLinkText: 'EditShopLinkTextWidget',
- contactDetails: 'ContactDetailsSectionWidget'
+ contactDetails: 'ContactDetailsSectionWidget'
},
modalPositions
};
@@ -269,7 +274,7 @@ export default {
bodyText: this.getCmsContent(widgetName, widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT),
footerButtonText: this.getCmsContent(widgetName, widgetFields.CONTENT_GROUP_WIDGET.FOOTER_TEXT),
image: this.getCmsContent(widgetName, widgetFields.CONTENT_GROUP_WIDGET.IMAGE)
- }
+ };
},
recalibrationRequired() {
return this.mainStore.hasRecalibrationPart;
@@ -281,9 +286,9 @@ export default {
}
return {
glassShop: this.getPreferredShopTitle,
- contactPhone: contactPhone,
+ contactPhone,
contactEmail: this.mainStore.contactInfo.emailAddress ?? ''
- }
+ };
}
},
methods: {
@@ -293,7 +298,7 @@ export default {
this.getPreferredShopTitle,
this.getPreferredShopLines,
this.getEditShopLinkText,
- () => this.navigate(this.navigationScenarios.EDIT_PREFERRED_SHOP),
+ () => this.navigate(this.navigationScenarios.EDIT_PREFERRED_SHOP)
),
// eslint-disable-next-line max-len
this.getSection(
@@ -306,7 +311,7 @@ export default {
},
getSection(title, lines, editLinkText, onClick) {
return {
- title: title,
+ title,
lines,
editLinkText,
onClickEdit: onClick
diff --git a/src/store/store.spec.js b/src/store/store.spec.js
index 239589ee..4a035c63 100644
--- a/src/store/store.spec.js
+++ b/src/store/store.spec.js
@@ -12,7 +12,6 @@ import coverageStatuses from '@/constants/coverage-statuses.js';
import { paymentMethods } from '@/constants/payment-method-constants';
import endpoints from '@/constants/endpoints';
import { AppointmentTypeStrings } from '@/constants/schedule-constants';
-import bailoutCode from '@/constants/bailoutCode';
import coverageType from '@/constants/coverage-type';
import { getEnumName } from '@/helpers/unit-test-helper';
@@ -227,6 +226,10 @@ describe('Store', () => {
test(`CoverageType is set to expected ${getEnumName(coverageType, expected)} when vehicle noCoverage is ${noCoverage} and enableNoCompQuote is ${enableNoCompQuote}`, () => {
// Arrange
store.issConfig.enableNoCompQuote = enableNoCompQuote;
+ store.order.currentDeductible = {
+ replace: 500,
+ repair: 0
+ };
const vehicleCoverage = {
noCoverage
};
@@ -407,6 +410,10 @@ describe('Store', () => {
}
};
store.order.insuranceCoverage.coverageType = coverageType.NO_COMP;
+ store.order.currentDeductible = {
+ replace: 500,
+ repair: 0
+ };
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve(response));
@@ -434,6 +441,10 @@ describe('Store', () => {
}
};
store.order.insuranceCoverage.coverageType = coverageType.Deductible;
+ store.order.currentDeductible = {
+ replace: 500,
+ repair: 0
+ };
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve(response));
@@ -453,6 +464,10 @@ describe('Store', () => {
const error = 'register claim error';
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.reject(error));
store.order.insuranceCoverage.coverageStatus = coverageStatuses.PENDING;
+ store.order.currentDeductible = {
+ replace: 500,
+ repair: 0
+ };
// Act
await store.registerClaim().catch((e) => {
@@ -501,7 +516,7 @@ describe('Store', () => {
home: homePhone,
service: servicePhone,
alternative: altPhone,
- extension: extension
+ extension
});
// Assert
@@ -670,10 +685,22 @@ describe('Store', () => {
const policyZipCode = getRandomString(6, 6);
const status = getRandomEnum(coverageStatuses);
const type = getRandomEnum(coverageType);
- const originalDeductible = getRandomString(6, 6);
- const currentDeductible = getRandomString(6, 6);
- store.order.originalDeductible = originalDeductible;
- store.order.currentDeductible = currentDeductible;
+ const originalDeductible = {
+ replace: 500,
+ repair: 0
+ };
+ const currentDeductible = {
+ replace: 500,
+ repair: 0
+ };
+ store.order.originalDeductible = {
+ replace: originalDeductible.replace,
+ repair: originalDeductible.repair
+ };
+ store.order.currentDeductible = {
+ replace: currentDeductible.replace,
+ repair: currentDeductible.repair
+ };
store.order.customer.firstName = customerFirstName;
store.order.customer.lastName = customerLastName;
store.order.customer.emailAddress = customerEmail;
@@ -684,6 +711,7 @@ describe('Store', () => {
store.order.policy.policyZipCode = policyZipCode;
store.order.insuranceCoverage.coverageStatus = status;
store.order.insuranceCoverage.coverageType = type;
+ store.order.damage.isRepair = false;
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({}));
// Act
@@ -702,8 +730,8 @@ describe('Store', () => {
}),
policyNumber,
policyZipCode,
- originalDeductible,
- currentDeductible
+ originalDeductible: originalDeductible.replace,
+ currentDeductible: currentDeductible.replace
}),
insuranceCoverage: expect.objectContaining({
coverageStatus: status,
@@ -1717,8 +1745,8 @@ describe('Store', () => {
const manualGlassNames = [location];
const policyState = getRandomString(2, 2);
const status = getRandomString(6, 8);
- const currentDeductible = getRandomInt(0, 5000);
- const originalDeductible = getRandomInt(0, 5000);
+ const currentDeductible = 500;
+ const originalDeductible = 500;
const isRepair = getRandomBoolean();
const policyNumber = getRandomString(10, 20);
const insuredFirstName = getRandomString(10, 20);
@@ -1730,8 +1758,14 @@ describe('Store', () => {
store.order.referralCorrelationId = referralCorrelationId;
store.order.parentAccountNumber = parentAccountNumber;
- store.order.currentDeductible = currentDeductible;
- store.order.originalDeductible = originalDeductible;
+ store.order.currentDeductible = {
+ replace: currentDeductible,
+ repair: currentDeductible
+ };
+ store.order.originalDeductible = {
+ replace: originalDeductible,
+ repair: originalDeductible
+ };
store.order.policy.status = status;
store.order.customer.address.state = policyState;
store.order.damage.isRepair = isRepair;
@@ -1827,8 +1861,14 @@ describe('Store', () => {
store.order.referralCorrelationId = referralCorrelationId;
store.order.parentAccountNumber = parentAccountNumber;
- store.order.currentDeductible = currentDeductible;
- store.order.originalDeductible = originalDeductible;
+ store.order.currentDeductible = {
+ replace: currentDeductible,
+ repair: currentDeductible
+ };
+ store.order.originalDeductible = {
+ replace: originalDeductible,
+ repair: originalDeductible
+ };
store.order.policy.status = status;
store.order.customer.address.state = policyState;
store.order.policy.endorsementQuestionAnswers = endorsementAnswers;
@@ -1898,23 +1938,29 @@ describe('Store', () => {
describe('updateDeductible method', () => {
it('final deductible is saved as currentDeductible in store', () => {
// Arrange
- const finalDeductible = getRandomInt(0, 5000);
+ store.order.damage.isRepair = false;
+ const deductibleInfo = {
+ deductible: 500
+ };
// Act
- store.updateDeductible(finalDeductible);
+ store.updateDeductible(deductibleInfo);
// Assert
- expect(store.order.currentDeductible).toEqual(finalDeductible);
+ expect(store.order.currentDeductible.replace).toEqual(deductibleInfo.deductible);
});
it('null final deductible => currentDeductible in store set to null', () => {
// Arrange
- const finalDeductible = null;
+ store.order.damage.isRepair = false;
+ const deductibleInfo = {
+ deductible: null
+ };
// Act
- store.updateDeductible(finalDeductible);
+ store.updateDeductible(deductibleInfo);
// Assert
- expect(store.order.currentDeductible).toEqual(finalDeductible);
+ expect(store.order.currentDeductible.replace).toEqual(deductibleInfo.deductible);
});
});
From f06332c066c1fb661be90564bd6a1c3d72d70e3a Mon Sep 17 00:00:00 2001
From: Bill Richardson
Date: Thu, 22 Jan 2026 13:19:36 -0500
Subject: [PATCH 32/43] initial check in
---
src/constants/progress-bar-mapper.js | 3 -
.../date-picker/date-picker.vue | 151 ++----
src/helpers/cms-content-helper.js | 1 +
src/helpers/service-location-helper.js | 7 +-
src/layouts/schedule-page/schedule-page.vue | 345 +++++++++---
.../appointment-type-question.vue | 11 +-
.../mobile-location-modal-questions.vue | 7 +-
.../vehicle-protected-question.vue | 0
.../service-location/service-location.spec.js | 81 ++-
.../service-location/service-location.vue | 491 +++++++-----------
.../service-zip-modal-question.spec.js | 2 +-
.../service-zip-modal-question.vue | 5 +-
.../service-zip-question.spec.js | 2 +-
.../service-zip-question.vue | 19 +-
.../shop-address/shop-address.vue | 56 +-
src/mixins/vehicle-questions-mixin.spec.js | 2 +-
src/router/router-constants/issPage-values.js | 1 -
src/router/router-constants/routing-table.js | 25 +-
18 files changed, 622 insertions(+), 587 deletions(-)
rename src/layouts/{ => schedule-page}/service-location/appointment-type-question/appointment-type-question.vue (93%)
rename src/layouts/{service-location/mobile-location-modal-questions => schedule-page/service-location/mobile-location-modal-question}/mobile-location-modal-questions.vue (98%)
rename src/layouts/{service-location/mobile-location-modal-questions => schedule-page/service-location/mobile-location-modal-question}/vehicle-protected-question/vehicle-protected-question.vue (100%)
rename src/layouts/{ => schedule-page}/service-location/service-location.spec.js (78%)
rename src/layouts/{ => schedule-page}/service-location/service-location.vue (52%)
rename src/layouts/{ => schedule-page}/service-location/service-zip-modal-question/service-zip-modal-question.spec.js (97%)
rename src/layouts/{ => schedule-page}/service-location/service-zip-modal-question/service-zip-modal-question.vue (80%)
rename src/layouts/{ => schedule-page}/service-location/service-zip-question/service-zip-question.spec.js (89%)
rename src/layouts/{ => schedule-page}/service-location/service-zip-question/service-zip-question.vue (93%)
rename src/layouts/{ => schedule-page}/service-location/shop-address/shop-address.vue (91%)
diff --git a/src/constants/progress-bar-mapper.js b/src/constants/progress-bar-mapper.js
index c12bdf13..e80fbb5c 100644
--- a/src/constants/progress-bar-mapper.js
+++ b/src/constants/progress-bar-mapper.js
@@ -50,9 +50,6 @@ export const pageProgressMapper = {
'provider-preference': {
percent: 60
},
- 'service-location': {
- percent: 65
- },
'schedule-page': {
percent: 70
},
diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue
index bdd971cf..cf24627b 100644
--- a/src/digital-components/date-picker/date-picker.vue
+++ b/src/digital-components/date-picker/date-picker.vue
@@ -161,6 +161,10 @@ export default {
},
default: selectableDaysOptions.PAST
},
+ isMobileView: {
+ type: Boolean,
+ default: false
+ },
modelValue: {
type: Object
},
@@ -241,8 +245,7 @@ export default {
daysLoaded: 0,
appointmentDurationMinutesMinimum: 90,
appointmentDurationMinutesMaximum: 120,
- initialDaysToLoad: 15,
- isMobileView: false
+ initialDaysToLoad: 15
};
},
computed: {
@@ -284,6 +287,16 @@ export default {
}
},
watch: {
+ isMobileView(newValue, oldValue) {
+ if (newValue !== oldValue) {
+ this.activePageIndex = 0;
+ this.selectedDate = null;
+ this.selectedTimeOfDayGrouping = null;
+ this.selectedTime = null;
+ this.selectedTimeSlot = null;
+ this.findFirstAvailableDateInView();
+ }
+ },
selectedTimeSlot(newValue, oldValue) {
if (newValue !== oldValue) {
const testObj = this.getSelectedTimeSlotInfoObject(newValue);
@@ -296,20 +309,30 @@ export default {
}
}
},
- mounted() {
- this.mql = window.matchMedia('(min-width: 1200px)');
- this.isMobileView = !this.mql.matches;
- this.mql.addEventListener('change', this.handleMqlChange);
- },
- unmounted() {
- if (this.mql) {
- this.mql.removeEventListener('change', this.handleMqlChange);
- }
- },
methods: {
initializeComponent(initialData) {
+ this.resetComponent();
this.setCalendarData(initialData);
},
+ resetComponent() {
+ this.isLoading = true;
+ this.selectableDatesData = []; // NOTE: uses monthNum (1-based), NOT monthIndex (0-based)
+ this.selectableTimeSlotsData = [];
+ this.selectedTimeOfDayGrouping = null;
+ this.selectedDate = null;
+ this.selectedTime = null;
+ this.selectedTimeSlot = null;
+ this.activeDate = new Date();
+ this.activePageIndex = 0;
+ this.todaysDate = new Date();
+ this.mql = null;
+ this.daysInViewMobile = 3;
+ this.daysInViewStandard = 5;
+ this.daysLoaded = 0;
+ this.appointmentDurationMinutesMinimum = 90;
+ this.appointmentDurationMinutesMaximum = 120;
+ this.initialDaysToLoad = 15;
+ },
addPremiumFlagToInput(routeCode) {
return (`${routeCode}${PREMIUM_TIME_SLOT_ID_FLAG}`);
},
@@ -352,15 +375,6 @@ export default {
isPremiumAppointment: null
};
},
- handleMqlChange(e) {
- this.isMobileView = !e.matches;
- this.activePageIndex = 0;
- this.selectedDate = null;
- this.selectedTimeOfDayGrouping = null;
- this.selectedTime = null;
- this.selectedTimeSlot = null;
- this.findFirstAvailableDateInView();
- },
displayTimeSlotTime(timeSlot) {
const { appointmentType } = this.mainStore.order.serviceLocation;
if (appointmentType === AppointmentTypeStrings.MOBILE || appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) {
@@ -434,38 +448,6 @@ export default {
const dateToShow = this.getDateToShow(index);
return convertDateToDateString(dateToShow);
},
- getEndDateForExistingDate(startDate, selectedDateString, daysInView) {
- const endDate = new Date(startDate);
- endDate.setDate(endDate.getDate() + (daysInView - 1));
-
- if (selectedDateString) {
- const selectedDate = new Date(`${selectedDateString}T00:00:00`);
- const daysDifferenceComparedToStartDate = Math.ceil((selectedDate - startDate) / (1000 * 60 * 60 * 24));
- if (selectedDate > endDate) {
- const daysDifferenceComparedToStartDateAsPages = Math.ceil(daysDifferenceComparedToStartDate / daysInView);
- const newEndDate = new Date(startDate);
- newEndDate.setDate(newEndDate.getDate() + (daysDifferenceComparedToStartDateAsPages * daysInView) - 1);
-
- return {
- endDateString: convertDateToDateString(newEndDate),
- newDaysLoaded: (daysDifferenceComparedToStartDateAsPages * daysInView),
- daysFromStart: daysDifferenceComparedToStartDate
- };
- }
-
- return {
- endDateString: convertDateToDateString(endDate),
- newDaysLoaded: null,
- daysFromStart: daysDifferenceComparedToStartDate
- };
- }
-
- return {
- endDateString: convertDateToDateString(endDate),
- newDaysLoaded: null,
- daysFromStart: null
- };
- },
async gotoNextPage() {
const maxPageIndex = Math.floor((this.daysLoaded - 1) / this.daysToAdd);
if (this.activePageIndex >= maxPageIndex) {
@@ -572,66 +554,9 @@ export default {
timeSlotInputChanged(timeSlot) {
this.selectTimeSlotForDay(timeSlot);
},
- async loadInitialData(config) {
- /*
- ** NOTE: this _could_ be called by a parent before fully loaded, so data or computeds might not be available
- */
- let todayDateString;
- const todayDateObject = new Date();
- const calendarViewDirection = 'future';
- const initialDays = 15;
-
- if (this.todayString) {
- todayDateString = this.todayString;
- } else if (config.todayOverrideDateString) {
- todayDateString = config.todayOverrideDateString;
- } else {
- todayDateString = convertDateToDateString(todayDateObject);
- }
-
- const initialViewStartDate = todayDateString;
- const initialEndDate = new Date();
- initialEndDate.setDate(initialEndDate.getDate() + (initialDays - 1));
- let initialViewEndDate = convertDateToDateString(initialEndDate);
-
- const endDateObject = this.getEndDateForExistingDate(
- todayDateObject,
- config.preSelectedDate,
- initialDays
- );
-
- if (endDateObject.endDateString !== initialViewEndDate) {
- initialViewEndDate = endDateObject.endDateString;
- }
-
- const loadInitialDataPromise = new Promise((resolve) => {
- const response = config.customSelectableDatesCallback(
- initialViewStartDate,
- initialViewEndDate,
- useMainStore().order.serviceLocation.appointmentType,
- useMainStore().order.serviceLocation.provider.providerNumber
- );
- resolve(response);
- });
-
- return loadInitialDataPromise.then((response) => {
- const initialData = {
- todayDate: todayDateString,
- initialViewStartDate,
- initialViewEndDate,
- calendarViewDirection,
- initialShopTimeSlotsResponse: response,
- preSelectedDate: config.preSelectedDate,
- initialDaysLoaded: endDateObject.newDaysLoaded || initialDays,
- daysFromStart: endDateObject.daysFromStart || null
- };
-
- return initialData;
- });
- },
async setCalendarData(config = {}) {
- const initialMql = window.matchMedia('(min-width: 1200px)');
- this.isMobileView = !initialMql.matches;
+ // const initialMql = window.matchMedia('(min-width: 1200px)');
+ // this.isMobileView = !initialMql.matches;
config.initialShopTimeSlotsResponse.days.forEach((selectableDate) => {
const dateObjectToPush = {
date: selectableDate.date,
@@ -899,7 +824,7 @@ export default {
border-radius: $border-radius-list-button;
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .2);
color: #525656;
- padding: 0.5rem 0;
+ padding: 0.625rem 0;
margin-top: 0.625rem;
text-align: center;
cursor: pointer;
diff --git a/src/helpers/cms-content-helper.js b/src/helpers/cms-content-helper.js
index b5dd2e97..bc550684 100644
--- a/src/helpers/cms-content-helper.js
+++ b/src/helpers/cms-content-helper.js
@@ -306,6 +306,7 @@ function mapStringToState(str) {
const valueFromStore = getStoreValueFromString(match[2]);
if (!valueFromStore) {
console.warn('Unable to resolve global state data.');
+ console.warn(`Tried to resolve: ${match[2]}`);
return ''; // if we can't map our string to state data, return an empty string.
}
const stringWithReplacement = str.replace(match[0], valueFromStore);
diff --git a/src/helpers/service-location-helper.js b/src/helpers/service-location-helper.js
index 7e10ccd2..106aa34c 100644
--- a/src/helpers/service-location-helper.js
+++ b/src/helpers/service-location-helper.js
@@ -58,11 +58,16 @@ export async function getAvailabilityRating(
providerNumber
) {
// For a given shop provider number and date range, get the appointment time slots available
+ console.log('Getting shop time slots for availability rating...');
+ console.log(`Provider Number: ${providerNumber}`);
+ console.log(`Start Date: ${startDate}`);
+ console.log(`End Date: ${endDate}`);
+ console.log(`Shop Appointment Type: ${shopAppointmentType}`);
const shopTimeSlots = await useMainStore().getShopTimeSlots(startDate, endDate, shopAppointmentType, providerNumber);
const numberOfDaysToEvaluate = 2;
const isGoodAvailability =
- shopTimeSlots.data.days.filter((x) => x.timeSlots.length > 0).length
+ shopTimeSlots.data.days.filter((x) => x.timeSlots.length > 6).length
>= numberOfDaysToEvaluate;
const shopStatus = isGoodAvailability ? 'high' : 'low';
diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue
index aa08e79a..f800cb62 100644
--- a/src/layouts/schedule-page/schedule-page.vue
+++ b/src/layouts/schedule-page/schedule-page.vue
@@ -15,7 +15,19 @@
cmsWidgetName="ScheduleSubHeaderWidget"
secondaryTextClasses="text-center small sub-text"
class="mt-4" />
-
+
+
@@ -25,21 +37,23 @@
customComponentId="dateQuestion"
selectableDatesSetting="custom"
class="text-link-small"
+ :isMobileView="isMobileView"
:showTimeSlotError="showDatePickerError"
- :customSelectableDatesCallback="
- getAvailableDatesMethod
- "
+ :customSelectableDatesCallback="getAvailableDatesMethod"
@dateSelected="dateSelectedFromPicker"
@timeSlotSelected="timeSlotSelectedFromPicker" />
-
+
@@ -50,6 +64,7 @@ import siteHeader from '@/iss-components/site-header/site-header.vue';
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
import locationAlerts from '@/layouts/schedule-page/location-alerts/location-alerts.vue';
import datePicker from '@/digital-components/date-picker/date-picker.vue';
+import serviceLocation from '@/layouts/schedule-page/service-location/service-location.vue';
import siteFooter from '@/iss-components/site-footer/site-footer.vue';
// Supporting files
@@ -65,9 +80,22 @@ import {
} from '@/helpers/cms-content-helper';
import {
calcDaysBetweenDates,
+ convertDateToDateString,
+ // convertDateToShortMonth,
+ // convertDateToTwoDigitDay,
+ // convertDateToTwoDigitMonth,
+ // getDisplayTextForDurationLength,
+ // isAfternoon,
+ // militaryToTwelveHourTime,
sumDateString
} from '@/helpers/date-helper';
import settleAllPromises from '@/helpers/layout-helper';
+import {
+ getPricedMobileFeePart,
+ getServiceabilityDetails,
+ getZipCodeData,
+ getMobileZipCodeData
+} from '@/helpers/service-location-helper';
import { Form } from 'vee-validate';
import BaseFormMixin from '@/mixins/base-form-mixin.js';
import { useMainStore } from '@/store';
@@ -182,6 +210,7 @@ export default {
siteSubHeader,
locationAlerts,
datePicker,
+ serviceLocation,
siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names
Form
@@ -195,17 +224,14 @@ export default {
}
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
-
- const datePickerInitialDataPromise =
- await datePicker.methods.loadInitialData({
- selectableDatesSetting: 'custom',
- initialViewRowsToShow: 5,
- customSelectableDatesCallback: getAvailableDates,
- preSelectedDate
- });
+ const serviceZipCode = useMainStore().order.serviceLocation.zipCode || useMainStore().order.customer.address.zipCode;
+ const zipCodeData = getZipCodeData(serviceZipCode);
+ const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode);
+ const serviceabilityDetailsPromise = getServiceabilityDetails(serviceZipCode);
+ const getGlassFeesPromise = useMainStore().getGlassFees();
+ const providersPromise = useMainStore().getProviders(serviceZipCode);
const premiumFeePromise = useMainStore().getMobilePremiumFee();
-
const premiumFeeWithPricePromise = premiumFeePromise.then((result) => {
if (result.data) {
return useMainStore().getCombinedQuote(result.data);
@@ -213,24 +239,35 @@ export default {
return result.data;
});
- const alertReasonsPromise = locationAlerts.methods.loadInitialData(
- useMainStore().order.serviceLocation.zipCodeCtu,
- useMainStore().order.serviceLocation.provider?.address?.zipCodeCtu
- );
-
// Settle promises and get results
const promiseResultMap = [
{
resultKey: 'cmsContent',
promise: cmsContentPromise
},
+ // {
+ // resultKey: 'datePickerInitialData',
+ // promise: datePickerInitialDataPromise
+ // },
{
- resultKey: 'alertReasons',
- promise: alertReasonsPromise
+ resultKey: 'mobileFeePart',
+ promise: mobileFeePartPromise
},
{
- resultKey: 'datePickerInitialData',
- promise: datePickerInitialDataPromise
+ resultKey: 'glassFees',
+ promise: getGlassFeesPromise
+ },
+ {
+ resultKey: 'serviceabilityDetails',
+ promise: serviceabilityDetailsPromise
+ },
+ {
+ resultKey: 'zipCodeData',
+ promise: zipCodeData
+ },
+ {
+ resultKey: 'providers',
+ promise: providersPromise
},
{
resultKey: 'premiumFeeWithPrice',
@@ -240,14 +277,26 @@ export default {
// use resultMap to populate layout content.
const resultMap = await settleAllPromises(promiseResultMap);
- next((vm) => {
+ const serviceLocationData = {
+ glassFees: resultMap.glassFees,
+ mobileFeePart: resultMap.mobileFeePart,
+ providers: resultMap.providers,
+ serviceabilityDetails: resultMap.serviceabilityDetails,
+ zipCodeData: resultMap.zipCodeData
+ };
+ useMainStore().updateIsSafeliteProvider(true);
+ next(async (vm) => {
+ const initialServiceLocationObj = {
+ provider: resultMap.providers?.shopProviders[0],
+ zipCode: useMainStore().order.serviceLocation.zipCode || useMainStore().order.customer.address.zipCode,
+ zipCodeCtu: resultMap.zipCodeData?.zipCodeCtu
+ };
+
vm.setCmsContent(resultMap.cmsContent);
- vm.$refs.datePicker.initializeComponent(resultMap.datePickerInitialData);
- vm.$refs.locationAlerts.initializeComponent(resultMap.alertReasons);
- vm.setData(
- resultMap.datePickerInitialData.initialShopTimeSlotsResponse,
- resultMap.premiumFeeWithPrice
- );
+ // vm.$refs.datePicker.initializeComponent(resultMap.datePickerInitialData);
+ // vm.$refs.locationAlerts.initializeComponent(resultMap.alertReasons);
+ vm.$refs.serviceLocation.initializeComponent(serviceLocationData);
+ await vm.setData(resultMap.premiumFeeWithPrice, initialServiceLocationObj);
});
},
setup() {
@@ -256,23 +305,51 @@ export default {
},
data() {
return {
- selectedDate: this.getSelectedDate(),
- selectedTimeSlotInfo: this.getSelectedTimeSlotInfo(),
+ isMobileView: false,
+ mobilePremiumAppointmentFee: null,
selectableDatesData: [],
- showDatePickerError: false,
- mobilePremiumAppointmentFee: null
+ selectedAppointmentType: this.getAppointmentType(),
+ selectedDate: this.getSelectedDate(),
+ selectedProvider: this.getSelectedProvider(),
+ selectedServiceLocation: this.getServiceLocation(),
+ selectedTimeSlotInfo: this.getSelectedTimeSlotInfo(),
+ showDatePickerError: false
};
},
computed: {
- ChangeShopLinkText() {
- return this.getCmsContent('ChangeShopLink', 'Text');
- },
- ChangeShopLink() {
- return this.splitCopyOnCMSPlaceHolder(this.ChangeShopLinkText);
- },
appointmentType() {
return useMainStore().order.serviceLocation.appointmentType;
},
+ daysToAdd() {
+ return this.isMobileView ? this.daysInViewMobile : this.daysInViewStandard;
+ },
+ hasNeededServiceLocationData() {
+ const serviceLocationToUse = this.selectedServiceLocation;
+ if (!serviceLocationToUse || !this.selectedAppointmentType) {
+ return false;
+ }
+ const serviceLocationPreReqs = serviceLocationToUse.zipCode !== null
+ && serviceLocationToUse.zipCodeCtu !== null
+ && serviceLocationToUse.appointmentType !== null
+ && (serviceLocationToUse.appointmentType === AppointmentTypeStrings.MOBILE
+ || serviceLocationToUse.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
+ || serviceLocationToUse.provider.providerNumber);
+
+ const damageInfo = useMainStore().order.damage.isRepair
+ || (useMainStore().order.lineItems?.glassParts != null && useMainStore().order.lineItems.glassParts.length > 0);
+
+ const supportingItems = this.supportingItems !== null;
+
+ console.log('Has Needed Service Location Data Check:', {
+ serviceLocationPreReqs,
+ supportingItems,
+ damageInfo
+ });
+
+ console.log('Result:', (serviceLocationPreReqs && supportingItems && damageInfo));
+
+ return (serviceLocationPreReqs && supportingItems && damageInfo);
+ },
isFormValid() {
const hasTimeSlotSelected = this.selectedTimeSlotInfo?.timeSlot?.routeCode != null;
return hasTimeSlotSelected;
@@ -281,34 +358,50 @@ export default {
return useMainStore().lineItems.supportingItems;
}
},
+ mounted() {
+ this.mql = window.matchMedia('(min-width: 1200px)');
+ this.isMobileView = !this.mql.matches;
+ this.mql.addEventListener('change', this.handleMqlChange);
+ },
+ unmounted() {
+ if (this.mql) {
+ this.mql.removeEventListener('change', this.handleMqlChange);
+ }
+ },
methods: {
splitCopyOnCMSPlaceHolder,
arePagePrerequisitesValid() {
- const { serviceLocation } = useMainStore().order;
- const serviceLocationPreReqs =
- serviceLocation.zipCode
- && serviceLocation.zipCodeCtu
- && serviceLocation.appointmentType
- && (serviceLocation.appointmentType
- === AppointmentTypeStrings.MOBILE
- || serviceLocation.appointmentType
- === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
- || serviceLocation.provider.providerNumber);
- const supportingItems = this.supportingItems !== null;
- const damageInfo =
- useMainStore().order.damage.isRepair
- || (useMainStore().order.lineItems?.glassParts != null
- && useMainStore().order.lineItems.glassParts.length > 0);
-
- return serviceLocationPreReqs && supportingItems && damageInfo;
+ return useMainStore().order.serviceLocation.zipCode !== null;
},
- setData(initialShopTimeSlotsResponse, premiumFeeWithPriceResponse) {
- this.selectableDatesData = initialShopTimeSlotsResponse;
+ async setData(premiumFeeWithPriceResponse, initialServiceLocationObj) {
+ // this.selectableDatesData = initialShopTimeSlotsResponse;
this.mobilePremiumAppointmentFee = premiumFeeWithPriceResponse
? premiumFeeWithPriceResponse[0]
: null;
+ this.selectedServiceLocation = initialServiceLocationObj;
+
+ if (this.selectedAppointmentType !== AppointmentTypeStrings.MOBILE
+ && this.selectedAppointmentType !== AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) {
+ const initialData = await this.getDatePickerInitialData(initialServiceLocationObj.provider?.providerNumber);
+ this.selectableDatesData = initialData.initialShopTimeSlotsResponse;
+ this.$refs.datePicker.setCalendarData(initialData);
+ }
+ },
+ appointmentTypeChangedFromServiceLocation(newAppointmentType) {
+ console.log('Parent - Appointment Type Changed from Service Location:', newAppointmentType);
+ this.selectedAppointmentType = newAppointmentType;
+ this.shouldRefreshDatePicker();
+ },
+ dateSelectedFromPicker(date) {
+ this.selectedDate = date;
+ this.showDatePickerError = false;
+ },
+ getAppointmentType() {
+ return this.mainStore.order?.serviceLocation?.appointmentType;
},
async getAvailableDatesMethod(startDate, endDate) {
+ console.log('Fetching Available Dates from Method...');
+ console.log('More Data concatenation called with Start Date:', startDate, 'End Date:', endDate);
const newShopTimeSlots = await getAvailableDates(
startDate,
endDate,
@@ -321,12 +414,103 @@ export default {
return newShopTimeSlots;
},
getAvailableDates,
+ async getDatePickerInitialData(defaultProviderNumber = null) {
+ console.log('Fetching Date Picker Initial Data...');
+ console.log('defaultProviderNumber:', defaultProviderNumber);
+ let todayDateString;
+ const todayDateObject = new Date();
+ const calendarViewDirection = 'future';
+ const initialDays = 15;
+
+ if (this.todayString) {
+ todayDateString = this.todayString;
+ } else {
+ todayDateString = convertDateToDateString(todayDateObject);
+ }
+
+ const initialViewStartDate = todayDateString;
+ const initialEndDate = new Date();
+ initialEndDate.setDate(initialEndDate.getDate() + (initialDays - 1));
+ let initialViewEndDate = convertDateToDateString(initialEndDate);
+ const preSelectedDate = this.mainStore.order.schedule.date;
+
+ const endDateObject = this.getEndDateForExistingDate(
+ todayDateObject,
+ preSelectedDate,
+ initialDays
+ );
+
+ if (endDateObject.endDateString !== initialViewEndDate) {
+ initialViewEndDate = endDateObject.endDateString;
+ }
+
+ const initialDataPickerDataPromise = new Promise((resolve) => {
+ const response = getAvailableDates(
+ initialViewStartDate,
+ initialViewEndDate,
+ this.selectedAppointmentType || AppointmentTypeStrings.IN_SHOP,
+ this.selectedProvider.providerNumber || defaultProviderNumber
+ );
+ resolve(response);
+ });
+
+ const initialData = await initialDataPickerDataPromise.then((response) => ({
+ todayDate: todayDateString,
+ initialViewStartDate,
+ initialViewEndDate,
+ calendarViewDirection,
+ initialShopTimeSlotsResponse: response,
+ preSelectedDate,
+ initialDaysLoaded: endDateObject.newDaysLoaded || initialDays,
+ daysFromStart: endDateObject.daysFromStart || null
+ }));
+
+ console.log('Date Picker Initial Data:');
+ console.log(initialData);
+
+ return initialData;
+ },
+ getEndDateForExistingDate(startDate, selectedDateString, daysInView) {
+ const endDate = new Date(startDate);
+ endDate.setDate(endDate.getDate() + (daysInView - 1));
+
+ if (selectedDateString) {
+ const selectedDate = new Date(`${selectedDateString}T00:00:00`);
+ const daysDifferenceComparedToStartDate = Math.ceil((selectedDate - startDate) / (1000 * 60 * 60 * 24));
+ if (selectedDate > endDate) {
+ const daysDifferenceComparedToStartDateAsPages = Math.ceil(daysDifferenceComparedToStartDate / daysInView);
+ const newEndDate = new Date(startDate);
+ newEndDate.setDate(newEndDate.getDate() + (daysDifferenceComparedToStartDateAsPages * daysInView) - 1);
+
+ return {
+ endDateString: convertDateToDateString(newEndDate),
+ newDaysLoaded: (daysDifferenceComparedToStartDateAsPages * daysInView),
+ daysFromStart: daysDifferenceComparedToStartDate
+ };
+ }
+
+ return {
+ endDateString: convertDateToDateString(endDate),
+ newDaysLoaded: null,
+ daysFromStart: daysDifferenceComparedToStartDate
+ };
+ }
+
+ return {
+ endDateString: convertDateToDateString(endDate),
+ newDaysLoaded: null,
+ daysFromStart: null
+ };
+ },
getServiceZipCtuCodeFromStore() {
return this.mainStore.order.serviceLocation.zipCodeCtu;
},
getSelectedDate() {
return this.mainStore.order.schedule.date;
},
+ getSelectedProvider() {
+ return this.mainStore.order.serviceLocation.provider;
+ },
getSelectedTimeSlotInfo() {
const isPremiumAppointment =
!!(
@@ -341,9 +525,29 @@ export default {
return selectedTimeSlotInfo;
},
- dateSelectedFromPicker(date) {
- this.selectedDate = date;
- this.showDatePickerError = false;
+ getServiceLocation() {
+ return this.mainStore.order.serviceLocation;
+ },
+ handleMqlChange(e) {
+ this.isMobileView = !e.matches;
+ },
+ mobileZipUpdatedFromChild(newMobileZip) {
+ console.log('Parent - Mobile Zip Updated from Child:', newMobileZip);
+ },
+ providerChangedFromChild(newProvider) {
+ console.log('Parent - Provider Changed from Child:', newProvider);
+ this.selectedProvider = newProvider;
+ // this.shouldRefreshDatePicker();
+ },
+ serviceLocationUpdatedFromChild(serviceLocationFromChild) {
+ this.selectedServiceLocation = serviceLocationFromChild;
+ },
+ async shouldRefreshDatePicker() {
+ if (this.selectedAppointmentType === AppointmentTypeStrings.IN_SHOP && 1 === 2) {
+ const initialData = await this.getDatePickerInitialData();
+ this.selectableDatesData = initialData.initialShopTimeSlotsResponse;
+ this.$refs.datePicker.initializeComponent(initialData);
+ }
},
timeSlotSelectedFromPicker(timeSlot) {
this.selectedTimeSlotInfo = timeSlot;
@@ -369,11 +573,12 @@ export default {
$page-side-padding: 1.5rem;
.iss-heritage-container-width {
+ padding-right: 0.9375rem;
+ padding-left: 0.9375rem;
+
.schedule-page-container {
position: relative;
min-height: 1px;
- padding-left: .9375rem;
- padding-right: .9375rem;
}
}
diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/schedule-page/service-location/appointment-type-question/appointment-type-question.vue
similarity index 93%
rename from src/layouts/service-location/appointment-type-question/appointment-type-question.vue
rename to src/layouts/schedule-page/service-location/appointment-type-question/appointment-type-question.vue
index f14c51c4..1883d346 100644
--- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue
+++ b/src/layouts/schedule-page/service-location/appointment-type-question/appointment-type-question.vue
@@ -19,12 +19,10 @@
diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/schedule-page/service-location/mobile-location-modal-question/mobile-location-modal-questions.vue
similarity index 98%
rename from src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
rename to src/layouts/schedule-page/service-location/mobile-location-modal-question/mobile-location-modal-questions.vue
index 9647c322..a82fbc52 100644
--- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
+++ b/src/layouts/schedule-page/service-location/mobile-location-modal-question/mobile-location-modal-questions.vue
@@ -79,8 +79,6 @@ import modal from '@/digital-components/modal/modal.vue';
import alert from '@/ux-components/alert/alert.vue';
import { useField } from 'vee-validate';
import addressQuestions from '@/iss-components/address-questions/address-questions.vue';
-// eslint-disable-next-line max-len
-import vehicleProtectedQuestion from '@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue';
// Constants
import { experimentSettings } from '@/constants/experiments';
@@ -90,10 +88,11 @@ import { useMainStore } from '@/store';
import {
getMobileZipCodeData,
getPricedMobileFeePart,
- getServiceabilityDetails,
- getZipCodeData
+ getServiceabilityDetails
} from '@/helpers/service-location-helper';
import { deepClone } from '@/helpers/object-helper.js';
+// eslint-disable-next-line max-len
+import vehicleProtectedQuestion from '@/layouts/schedule-page/service-location/mobile-location-modal-question/vehicle-protected-question/vehicle-protected-question.vue';
export default {
name: 'mobile-location-modal-questions',
diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/schedule-page/service-location/mobile-location-modal-question/vehicle-protected-question/vehicle-protected-question.vue
similarity index 100%
rename from src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue
rename to src/layouts/schedule-page/service-location/mobile-location-modal-question/vehicle-protected-question/vehicle-protected-question.vue
diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/schedule-page/service-location/service-location.spec.js
similarity index 78%
rename from src/layouts/service-location/service-location.spec.js
rename to src/layouts/schedule-page/service-location/service-location.spec.js
index a09c0542..20e0596b 100644
--- a/src/layouts/service-location/service-location.spec.js
+++ b/src/layouts/schedule-page/service-location/service-location.spec.js
@@ -1,13 +1,12 @@
/* eslint-env jest */
import baseMixin from '@/mixins/base-mixin';
-import { mount, flushPromises } from '@vue/test-utils';
+import { mount } from '@vue/test-utils';
import { createTestingPinia } from '@pinia/testing';
import { AppointmentTypeStrings } from '@/constants/schedule-constants';
import navigationScenarios from '@/router/router-constants/navigation-scenarios';
import routerParams from '@/router/router-constants/router-params';
import { useMainStore } from '@/store';
-import serviceLocation from '@/layouts/service-location/service-location.vue';
-import { getZipCodeData } from '@/helpers/service-location-helper';
+import serviceLocation from '@/layouts/schedule-page/service-location/service-location.vue';
const mockGetServiceabilityDetails = () => {
const serviceabilityDetails = {
@@ -50,43 +49,41 @@ const mockZipcodeData = (zip) => {
state: null,
zipCodeCtu: null
});
-}
-const mockProviders = () => {
- return Promise.resolve([
- {
- "address": {
- "city": "COLUMBUS",
- "country": "US",
- "state": "OH",
- "streetAddress": "6826 Sawmill Rd",
- "streetAddress2": "",
- "zipCode": "43235",
- "zipCodeCtu": "03357"
- },
- "distanceInMiles": 4.136335989015438,
- "providerNumber": "003357",
- "companyName": "SAFELITE AUTOGLASS - COLUMBUS, OH",
- "phoneNumber": "6142336400",
- "isSafeliteShop": true
+};
+const mockProviders = () => Promise.resolve([
+ {
+ address: {
+ city: 'COLUMBUS',
+ country: 'US',
+ state: 'OH',
+ streetAddress: '6826 Sawmill Rd',
+ streetAddress2: '',
+ zipCode: '43235',
+ zipCodeCtu: '03357'
},
- {
- "address": {
- "city": "Lewis Center",
- "country": "US",
- "state": "OH",
- "streetAddress": "1343 Cameron Ave",
- "streetAddress2": "",
- "zipCode": "43035",
- "zipCodeCtu": "03357"
- },
- "distanceInMiles": 8.193072412262042,
- "providerNumber": "003417",
- "companyName": "SAFELITE AUTOGLASS - LEWIS CENTER, OH",
- "phoneNumber": "6147815433",
- "isSafeliteShop": true
- }
- ])
-}
+ distanceInMiles: 4.136335989015438,
+ providerNumber: '003357',
+ companyName: 'SAFELITE AUTOGLASS - COLUMBUS, OH',
+ phoneNumber: '6142336400',
+ isSafeliteShop: true
+ },
+ {
+ address: {
+ city: 'Lewis Center',
+ country: 'US',
+ state: 'OH',
+ streetAddress: '1343 Cameron Ave',
+ streetAddress2: '',
+ zipCode: '43035',
+ zipCodeCtu: '03357'
+ },
+ distanceInMiles: 8.193072412262042,
+ providerNumber: '003417',
+ companyName: 'SAFELITE AUTOGLASS - LEWIS CENTER, OH',
+ phoneNumber: '6147815433',
+ isSafeliteShop: true
+ }
+]);
jest.mock(
'@/helpers/service-location-helper',
() => ({
@@ -138,13 +135,13 @@ const mountOptions = {
}
}
};
-function setupMocks({ appointmentType = AppointmentTypeStrings.IN_SHOP }) {
+function setupMocks({ appointmentType = AppointmentTypeStrings.IN_SHOP }) {
mountOptions.global.plugins = [createTestingPinia({
initialState: {
main: {
order: {
serviceLocation: {
- appointmentType: appointmentType
+ appointmentType
}
}
}
@@ -204,7 +201,7 @@ describe('service-location.vue', () => {
expect(wrapper.vm.zipContainsMilitaryBase).toBe(false);
- const newMobileServiceZipCode = '45433'
+ const newMobileServiceZipCode = '45433';
// Act
mobileServiceZipCodeQuestion.vm.$emit('update:modelValue', newMobileServiceZipCode);
diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/schedule-page/service-location/service-location.vue
similarity index 52%
rename from src/layouts/service-location/service-location.vue
rename to src/layouts/schedule-page/service-location/service-location.vue
index 2084a282..975accdc 100644
--- a/src/layouts/service-location/service-location.vue
+++ b/src/layouts/schedule-page/service-location/service-location.vue
@@ -1,166 +1,142 @@
-