Merge pull request #1718 from Safelite/feature/CSR-1072
CSR-1072 save coverage status value as string
This commit is contained in:
commit
c0c6e7634d
2 changed files with 22 additions and 2 deletions
18
src/constants/coverage-status.js
Normal file
18
src/constants/coverage-status.js
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
const coverageStatus = {
|
||||||
|
PENDING: "Pending",
|
||||||
|
NOCOMP: "NoComp",
|
||||||
|
VERIFIED: "Verified",
|
||||||
|
};
|
||||||
|
|
||||||
|
export function coverageStatusValue(intCoverageStatus) {
|
||||||
|
switch (intCoverageStatus) {
|
||||||
|
case 0:
|
||||||
|
return coverageStatus.PENDING;
|
||||||
|
case 1:
|
||||||
|
return coverageStatus.NOCOMP;
|
||||||
|
case 2:
|
||||||
|
return coverageStatus.VERIFIED;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -29,6 +29,7 @@ import {
|
||||||
} from "@/helpers/promotions-helper";
|
} from "@/helpers/promotions-helper";
|
||||||
import { getDateDifferenceInDays } from "@/helpers/date-helper";
|
import { getDateDifferenceInDays } from "@/helpers/date-helper";
|
||||||
import sharedMutations from "./vuex-shared-mutations/vuexSharedMutations";
|
import sharedMutations from "./vuex-shared-mutations/vuexSharedMutations";
|
||||||
|
import { coverageStatusValue } from "@/constants/coverage-status";
|
||||||
// Export State
|
// Export State
|
||||||
const getDefaultState = () => {
|
const getDefaultState = () => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -559,8 +560,9 @@ export const mutations = {
|
||||||
state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance;
|
state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance;
|
||||||
state.order.payment.insuranceCoverage.isVerified =
|
state.order.payment.insuranceCoverage.isVerified =
|
||||||
sessionInformation?.order.payment.insuranceCoverage.isVerified;
|
sessionInformation?.order.payment.insuranceCoverage.isVerified;
|
||||||
state.order.payment.insuranceCoverage.coverageStatus =
|
state.order.payment.insuranceCoverage.coverageStatus = coverageStatusValue(
|
||||||
sessionInformation?.order.payment.insuranceCoverage.coverageStatus;
|
sessionInformation?.order.payment.insuranceCoverage.coverageStatus
|
||||||
|
);
|
||||||
state.order.payment.insuranceCoverage.coverageVerificationType =
|
state.order.payment.insuranceCoverage.coverageVerificationType =
|
||||||
sessionInformation?.order.payment.insuranceCoverage.coverageVerificationType;
|
sessionInformation?.order.payment.insuranceCoverage.coverageVerificationType;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue