CASH-2978 page prereqs for non-c&c
CASH-2978 page prereqs for non-c&c
This commit is contained in:
parent
0e119272f3
commit
4245128985
4 changed files with 35 additions and 10 deletions
|
|
@ -87,6 +87,12 @@ import contentGroupModal from "@/fmg-components/content-group-modal/content-grou
|
||||||
import textBlock from "@/digital-components/text-block/text-block.vue";
|
import textBlock from "@/digital-components/text-block/text-block.vue";
|
||||||
import { debugLog } from "@/helpers/debug-log-helper";
|
import { debugLog } from "@/helpers/debug-log-helper";
|
||||||
import { loadSessionIfPresent } from "@/helpers/heritage-integration/order-helper";
|
import { loadSessionIfPresent } from "@/helpers/heritage-integration/order-helper";
|
||||||
|
import {
|
||||||
|
flushPagePrereqsLogs,
|
||||||
|
hasServiceZipInfo,
|
||||||
|
hasInsuranceInfo,
|
||||||
|
hasGlassPartsOrRepairInfo,
|
||||||
|
} from "@/helpers/page-prerequisites-helper.js";
|
||||||
export default {
|
export default {
|
||||||
name: "coverage-statement",
|
name: "coverage-statement",
|
||||||
mixins: [],
|
mixins: [],
|
||||||
|
|
@ -199,7 +205,20 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return true;
|
const order = store.getters.order;
|
||||||
|
if (order.payment.isClaimAndCoverage) {
|
||||||
|
return true; //TODO: Future card when C&C flow is implemented
|
||||||
|
}
|
||||||
|
|
||||||
|
const logQueue = [];
|
||||||
|
|
||||||
|
const serviceZip = hasServiceZipInfo(order, logQueue);
|
||||||
|
const glassPartsOrRepair = hasGlassPartsOrRepairInfo(order, logQueue);
|
||||||
|
const insuranceInfo = hasInsuranceInfo(order, logQueue);
|
||||||
|
const preReqResult = serviceZip && glassPartsOrRepair && insuranceInfo;
|
||||||
|
|
||||||
|
flushPagePrereqsLogs("coverage-statement.vue", preReqResult, logQueue);
|
||||||
|
return preReqResult;
|
||||||
},
|
},
|
||||||
openModalAction(modalName) {
|
openModalAction(modalName) {
|
||||||
this.$refs[modalName]?.openModal();
|
this.$refs[modalName]?.openModal();
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,12 @@ import { regex } from "@/helpers/validation-rules";
|
||||||
import { coverageStatus, coverageStatusEnum } from "@/constants/insurance";
|
import { coverageStatus, coverageStatusEnum } from "@/constants/insurance";
|
||||||
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
|
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
|
||||||
import { debugLog } from "@/helpers/debug-log-helper";
|
import { debugLog } from "@/helpers/debug-log-helper";
|
||||||
|
import {
|
||||||
|
flushPagePrereqsLogs,
|
||||||
|
hasServiceZipInfo,
|
||||||
|
hasGlassPartsOrRepairInfo,
|
||||||
|
hasInsuranceInfo,
|
||||||
|
} from "@/helpers/page-prerequisites-helper.js";
|
||||||
|
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule(
|
defineRule(
|
||||||
|
|
@ -363,7 +369,15 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return true;
|
const order = store.getters.order;
|
||||||
|
const logQueue = [];
|
||||||
|
|
||||||
|
const serviceZip = hasServiceZipInfo(order, logQueue);
|
||||||
|
const glassPartsOrRepair = hasGlassPartsOrRepairInfo(order, logQueue);
|
||||||
|
const preReqResult = serviceZip && glassPartsOrRepair;
|
||||||
|
|
||||||
|
flushPagePrereqsLogs("insurance-details.vue", preReqResult, logQueue);
|
||||||
|
return preReqResult;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@
|
||||||
<script>
|
<script>
|
||||||
import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
|
import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
|
||||||
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
||||||
import { parentAccountNumbers } from "@/constants/insurance";
|
|
||||||
import buttonMain from "@/ux-components/button-main/button-main";
|
import buttonMain from "@/ux-components/button-main/button-main";
|
||||||
import { Form } from "vee-validate";
|
import { Form } from "vee-validate";
|
||||||
|
|
||||||
|
|
@ -98,9 +97,6 @@ export default {
|
||||||
displayDisclaimerText() {
|
displayDisclaimerText() {
|
||||||
return this.disclaimerText !== null && this.disclaimerText !== "";
|
return this.disclaimerText !== null && this.disclaimerText !== "";
|
||||||
},
|
},
|
||||||
parentAccountNumbers() {
|
|
||||||
return parentAccountNumbers;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ import insuranceNavBar from "@/fmg-components/insurance-nav-bar/insurance-nav-ba
|
||||||
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import buttonMain from "@/ux-components/button-main/button-main";
|
import buttonMain from "@/ux-components/button-main/button-main";
|
||||||
import { parentAccountNumbers } from "@/constants/insurance";
|
|
||||||
import { debugLog } from "@/helpers/debug-log-helper";
|
import { debugLog } from "@/helpers/debug-log-helper";
|
||||||
|
|
||||||
import { Form } from "vee-validate";
|
import { Form } from "vee-validate";
|
||||||
|
|
@ -106,9 +105,6 @@ export default {
|
||||||
displayDisclaimerText() {
|
displayDisclaimerText() {
|
||||||
return this.disclaimerText !== null && this.disclaimerText !== "";
|
return this.disclaimerText !== null && this.disclaimerText !== "";
|
||||||
},
|
},
|
||||||
parentAccountNumbers() {
|
|
||||||
return parentAccountNumbers;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue