DigitalConsumer.FixMyGlass/src/constants/progress-bar-mapper.js
CarlNation 46094b342b CASH-2466 add insurance page shells
CASH-2466 add insurance page shells
2026-04-28 08:15:24 -04:00

139 lines
2.4 KiB
JavaScript

export const pageProgressMapper = {
//Combine progress bar slide percent and button steps
vehicle: {
percent: 5,
step: 1,
},
"vehicle-damage": {
percent: 9,
step: 1,
},
estimate: {
percent: 12,
step: 1,
},
"service-zip": {
percent: 20,
step: 1,
},
"vin-lookup": {
percent: 15,
step: 1,
},
"license-plate-lookup": {
percent: 20,
step: 1,
},
"address-lookup": {
percent: 20,
step: 1,
},
"address-vehicles": {
percent: 26,
step: 1,
},
"part-questions": {
percent: 15,
step: 1,
},
"molding-questions": {
percent: 26,
step: 1,
},
"vehicle-parts": {
percent: 20,
step: 1,
},
"capability-questions": {
percent: 30,
step: 1,
},
"policy-info": {
percent: 55,
step: 2,
},
"insurance-details": {
percent: 55,
step: 2,
},
"duplicate-check": {
percent: 55,
step: 2,
},
"policy-vehicle": {
percent: 55,
step: 2,
},
"policy-driver": {
percent: 55,
step: 2,
},
"endorsements": {
percent: 55,
step: 2,
},
"policy-info-submitted": {
percent: 55,
step: 2,
},
"recalibration-info": {
percent: 55,
step: 2,
},
"coverage-statement": {
percent: 55,
step: 2,
},
"verify-details": {
percent: 55,
step: 2,
},
quote: {
percent: 60,
step: 2,
},
"insurance-company": {
percent: 60,
step: 2,
},
"service-location": {
percent: 60,
step: 2,
},
schedule: {
percent: 76,
step: 3,
},
"mobile-details": {
percent: 76,
step: 3,
},
"customer-details": {
percent: 85,
step: 3,
},
"payment-method": {
percent: 98.5,
step: 4,
},
payment: {
percent: 98.5,
step: 4,
},
"payment-adyen": {
percent: 98.5,
step: 4,
},
confirmation: {
percent: 100,
step: 4,
},
};
export const getProgressBarPercentage = (page) => {
return pageProgressMapper[page]?.percent || 0;
};
export const getProgressBarStep = (page) => {
return pageProgressMapper[page]?.step || 1;
};