logic to display correct coverage statement
This commit is contained in:
parent
442405e8a2
commit
1898949565
1 changed files with 23 additions and 23 deletions
|
|
@ -82,11 +82,21 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
isRepair: useMainStore().order.damage.isRepair,
|
||||
unverifiedADASNextSteps: false,
|
||||
unverifiedNonADASNextSteps: false,
|
||||
unverifiedNonADASRepair: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// check if repair or replace, if repair, display NonADASRepair
|
||||
if (this.isRepair) {
|
||||
this.unverifiedNonADASRepair = true;
|
||||
}
|
||||
else {
|
||||
this.coverageStatementToDisplay();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
continueWithSchedulingBodyText() {
|
||||
return this.getCmsContent('continueWithSchedulingCopy', 'BodyText');
|
||||
|
|
@ -110,9 +120,6 @@ export default {
|
|||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.coverageStatementToDisplay();
|
||||
},
|
||||
methods: {
|
||||
arePagePrerequisiteValid() {
|
||||
return true;
|
||||
|
|
@ -124,31 +131,24 @@ export default {
|
|||
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;
|
||||
// get array of parts for vehicle
|
||||
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
|
||||
}
|
||||
// loop through parts to check for ADAS
|
||||
for (let part of parts) {
|
||||
// if ADAS, display ADASNextSteps
|
||||
if (part.requiresRecalibration) {
|
||||
this.unverifiedADASNextSteps = true
|
||||
}
|
||||
// if non-ADAS, display NonADASNextSteps
|
||||
else {
|
||||
this.unverifiedNonADASNextSteps = true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
async forwardButtonAction() {},
|
||||
resetDependentState() {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue