start of logic for displaying coverage statement
This commit is contained in:
parent
5f693ad3ea
commit
442405e8a2
1 changed files with 44 additions and 1 deletions
|
|
@ -26,6 +26,17 @@
|
||||||
<textBlock
|
<textBlock
|
||||||
cmsWidgetName="UnverifiedADASNextStepsWidget"
|
cmsWidgetName="UnverifiedADASNextStepsWidget"
|
||||||
typeStyle="body"
|
typeStyle="body"
|
||||||
|
v-if="unverifiedADASNextSteps"
|
||||||
|
/>
|
||||||
|
<textBlock
|
||||||
|
cmsWidgetName="UnverifiedNonADASNextStepsWidget"
|
||||||
|
typeStyle="body"
|
||||||
|
v-if="unverifiedNonADASNextSteps"
|
||||||
|
/>
|
||||||
|
<textBlock
|
||||||
|
cmsWidgetName="UnverifiedNonADASRepairWidget"
|
||||||
|
typeStyle="body"
|
||||||
|
v-if="unverifiedNonADASRepair"
|
||||||
/>
|
/>
|
||||||
<a href="#!" data-bs-toggle="modal" data-bs-target="#RecalModal" aria-label="Modal window">Recalibration</a>
|
<a href="#!" data-bs-toggle="modal" data-bs-target="#RecalModal" aria-label="Modal window">Recalibration</a>
|
||||||
<modal cmsWidgetName="RecalModal" />
|
<modal cmsWidgetName="RecalModal" />
|
||||||
|
|
@ -55,6 +66,7 @@ import modal from "@/digital-components/modal/modal";
|
||||||
// Import Supporting Files
|
// Import Supporting Files
|
||||||
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
||||||
import { settleAllPromises } from '@/helpers/layout-helper';
|
import { settleAllPromises } from '@/helpers/layout-helper';
|
||||||
|
import { useMainStore } from "@/store"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'coverage-statement',
|
name: 'coverage-statement',
|
||||||
|
|
@ -69,7 +81,11 @@ export default {
|
||||||
modal,
|
modal,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
unverifiedADASNextSteps: false,
|
||||||
|
unverifiedNonADASNextSteps: false,
|
||||||
|
unverifiedNonADASRepair: false,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
continueWithSchedulingBodyText() {
|
continueWithSchedulingBodyText() {
|
||||||
|
|
@ -77,6 +93,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
// Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
||||||
|
|
||||||
// Settle promises and get results
|
// Settle promises and get results
|
||||||
|
|
@ -93,6 +110,9 @@ export default {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.coverageStatementToDisplay();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisiteValid() {
|
arePagePrerequisiteValid() {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -103,6 +123,29 @@ export default {
|
||||||
*/
|
*/
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
},
|
},
|
||||||
|
coverageStatementToDisplay() {
|
||||||
|
// check if repair or replace
|
||||||
|
const isRepair = useMainStore().order.damage.isRepair;
|
||||||
|
|
||||||
|
if (isRepair) {
|
||||||
|
this.unverifiedNonADASRepair === true
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// get array of parts
|
||||||
|
let parts = useMainStore().order.lineItems.glassParts;
|
||||||
|
|
||||||
|
// loop through parts to check for ADAS
|
||||||
|
for (let part of parts) {
|
||||||
|
if (part.requiresRecalibration) {
|
||||||
|
this.unverifiedADASNextSteps === true
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.unverifiedNonADASNextSteps === true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
async forwardButtonAction() {},
|
async forwardButtonAction() {},
|
||||||
resetDependentState() {},
|
resetDependentState() {},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue