@@ -26,12 +26,7 @@
@@ -61,6 +56,7 @@ import {
} from '@/helpers/cms-content-helper';
export default {
name: 'servicePackageRadio',
+ emits:['link-event'],
mixins: [inputButtonWrapperMixin],
components: {
baseInputButton,
@@ -85,8 +81,13 @@ export default {
.split('- ') //At some point we'll want a better delimiter
.filter((lineItem) => lineItem);
}
+ },
+ textLinkEmit(copy) {
+ this.$parent.$emit('link-event', {
+ args: getRouterLinkRouteFromCopy(copy)
+ });
}
- },
+ }
};
diff --git a/src/layouts/service-packages/service-packages.vue b/src/layouts/service-packages/service-packages.vue
index 1158c14c..14adb371 100644
--- a/src/layouts/service-packages/service-packages.vue
+++ b/src/layouts/service-packages/service-packages.vue
@@ -12,7 +12,7 @@
groupName="ServicePackageQuestion"
:availableLineItems="availableLineItems"
@vapsItemsSelected="vapsItemsSelectedAction"
- v-on="{ 'buttonEvent.openModal': openModalAction }"
+ v-on:link-event="openModalAction"
validationRules="option-required"
isRequired />
// Components
- import baseFormMixin from '@/mixins/base-form-mixin';
+ import baseFormMixin from '@/mixins/base-form-mixin';
import siteHeader from '@/iss-components/site-header/site-header';
import siteFooter from '@/iss-components/site-footer/site-footer';
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header';
@@ -52,12 +52,12 @@
defineRule('option-required', required(errorMessages.OPTION_REQUIRED));
+ const store = useMainStore();
+
export default {
name: 'service-packages',
mixins: [baseFormMixin],
async beforeRouteEnter(to, from, next) {
- const store = useMainStore();
-
// Call APIs
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
@@ -106,18 +106,17 @@
},
data() {
return {
- selectedVaps: null,
- availableLineItems: null,
- supportingItems: null,
- pricedGlassParts: null
+ selectedVaps: [],
+ availableLineItems: [],
+ supportingItems: [],
+ pricedGlassParts: []
};
},
methods: {
openModalAction(modalName) {
- this.$refs[modalName].openModal();
+ this.$refs[modalName.args].openModal();
},
arePagePrerequisitesValid() {
- const store = useMainStore();
return (
store.order.serviceLocation.zipCode &&
store.order.serviceLocation.zipCodeCtu &&
@@ -134,8 +133,48 @@
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
},
forwardButtonAction() {
- //TODO: save items
+ if (!this.allGlassPartsAndItemsHavePrices()) {
+ console.error('One or more items have no price assigned!');
+ }
+ if (this.pricedGlassParts.length > 0) {
+
+ store.saveGlassParts(this.pricedGlassParts);
+ }
+ store.saveSupportingItems(this.supportingItems);
+ store.saveVaps(this.selectedVaps);
+
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route);
+ },
+ allGlassPartsAndItemsHavePrices() {
+ if (this.pricedGlassParts) {
+ for (let i = 0; i < this.pricedGlassParts.length; i++) {
+ if (this.priceIsNullOrZero(this.pricedGlassParts[i])) {
+ return false;
+ }
+ }
+ }
+ if (this.supportingItems) {
+ for (let i = 0; i < this.supportingItems.length; i++) {
+ if (this.priceIsNullOrZero(this.supportingItems[i])) {
+ return false;
+ }
+ }
+ }
+ if (this.selectedVaps) {
+ for (let i = 0; i < this.selectedVaps.length; i++) {
+ if (this.priceIsNullOrZero(this.selectedVaps[i])) {
+ return false;
+ }
+ }
+ }
+ return true;
+ },
+ priceIsNullOrZero(lineItem) {
+ return (
+ (lineItem.kitPrice == null || lineItem.kitPrice == 0) &&
+ (lineItem.laborAmount == null || lineItem.laborAmount == 0) &&
+ (lineItem.sellingPrice == null || lineItem.sellingPrice == 0)
+ );
}
},
components: {
diff --git a/src/layouts/tpa-search/tpa-search.vue b/src/layouts/tpa-search/tpa-search.vue
new file mode 100644
index 00000000..f3bb24f5
--- /dev/null
+++ b/src/layouts/tpa-search/tpa-search.vue
@@ -0,0 +1,71 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/router/router-constants/issPage-values.js b/src/router/router-constants/issPage-values.js
index 70da2a0e..10b5d315 100644
--- a/src/router/router-constants/issPage-values.js
+++ b/src/router/router-constants/issPage-values.js
@@ -10,6 +10,7 @@ export const issPageValues = {
COVERAGE_STATEMENT: 'coverage-statement',
LICENSE_PLATE_LOOKUP: 'license-plate-lookup',
MOLDING_QUESTIONS: 'molding-questions',
+ ORDER_CONFIRMATION: 'order-confirmation',
PAYMENT_PAGE: 'payment-page',
PART_QUESTIONS: 'part-questions',
POLICY_HOLDER_DETAILS: 'policy-holder-details',
@@ -30,5 +31,6 @@ export const issPageValues = {
VIN_LOOKUP: 'vin-lookup',
TPA_SUBMIT: 'tpa-submit',
BAILOUT_PAGE: 'bailout-page',
+ TPA_SEARCH: 'tpa-search'
};
\ No newline at end of file
diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js
index 1376ed00..a46e90d7 100644
--- a/src/router/router-constants/routing-table.js
+++ b/src/router/router-constants/routing-table.js
@@ -435,7 +435,7 @@ const routingTable = function(store) {
},
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE,
- destinationIssPageValue: issPageValues.SERVICE_PACKAGES
+ destinationIssPageValue: issPageValues.SERVICE_LOCATION
}
]
},
@@ -444,7 +444,7 @@ const routingTable = function(store) {
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
- destinationIssPageValue: issPageValues.SERVICE_PACKAGES,
+ destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE,
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
@@ -474,7 +474,7 @@ const routingTable = function(store) {
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
- destinationIssPageValue: issPageValues.REVIEW_PAGE
+ destinationIssPageValue: issPageValues.SERVICE_PACKAGES
}
]
},
@@ -483,11 +483,11 @@ const routingTable = function(store) {
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
- destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
+ destinationIssPageValue: issPageValues.CONTACT_DETAILS
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
- destinationIssPageValue: issPageValues.SERVICE_LOCATION
+ destinationIssPageValue: issPageValues.REVIEW_PAGE
}
]
},
@@ -497,7 +497,7 @@ const routingTable = function(store) {
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
- destinationIssPageValue: issPageValues.CONTACT_DETAILS
+ destinationIssPageValue: issPageValues.SERVICE_PACKAGES
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
@@ -516,7 +516,7 @@ const routingTable = function(store) {
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
- destinationIssPageValue: issPageValues.WELCOME_PAGE
+ destinationIssPageValue: issPageValues.ORDER_CONFIRMATION,
}
]
},
@@ -545,6 +545,30 @@ const routingTable = function(store) {
destinationIssPageValue: issPageValues.TPA_CONFIRMATION,
},
]
+ },
+ {
+ issPageValue: issPageValues.ORDER_CONFIRMATION,
+ maps: [
+
+ {
+ scenario: navigationScenarios.CLICKED_FORWARD,
+ destinationIssPageValue: issPageValues.WELCOME_PAGE
+ },
+
+ ],
+ },
+ {
+ issPageValue: issPageValues.TPA_SEARCH,
+ maps: [
+ {
+ scenario: navigationScenarios.CLICKED_BACK,
+ destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
+ },
+ {
+ scenario: navigationScenarios.CLICKED_FORWARD,
+ destinationIssPageValue: issPageValues.TPA_SUBMIT,
+ },
+ ]
}
];
};
diff --git a/src/store/index.js b/src/store/index.js
index eab34cce..27d8af1a 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -497,8 +497,8 @@ export const useMainStore = defineStore({
///WARNING
///TODO: this is temp test code until serviceLocation is complete.
/// and ctu is available. Also, EON may need to be implemented.
- zipCodeToUse = "44902"
- ctuToUse = "01820"
+ zipCodeToUse = "44902";
+ ctuToUse = "01820";
let queryString =
`ParentAccountNumber=${applicationConfig.CASH_PARENT_ACCOUNT_NUMBER}` +
`&CTU=${ctuToUse}` +
@@ -905,7 +905,15 @@ export const useMainStore = defineStore({
// Save new values
this.updateCapabilityQuestionAnswers(capabilityQuestionAnswersArray);
},
-
+ saveGlassParts(glassParts) {
+ this.order.lineItems.glassParts = glassParts;
+ },
+ saveSupportingItems(supportingItems) {
+ this.order.lineItems.supportingItems = supportingItems;
+ },
+ saveVaps(vaps) {
+ this.order.lineItems.vaps = vaps;
+ },
addEventToBus (event) {
this.applicationUser.eventBus.push(event);
},
@@ -1178,7 +1186,7 @@ export const useMainStore = defineStore({
resetPartsAndDependencies() {
this.resetGlassPartsState();
this.updateSupportingItems(null);
- },
+ }
},
persist: true
});