DigitalConsumer.ISS/src/constants/coverage-type.js
2024-10-01 13:55:45 -05:00

38 lines
1.1 KiB
JavaScript

const coverageType = Object.freeze({
/**
* We attempted policy lookup and it failed or we are no comp and no comp quotes are disabled for this client
*/
NONE: 0,
/**
* We attempted policy lookup and got success response
* We have selected a vehicle that has comprehensive coverage
* We are not considered ITAC
*/
Deductible: 1,
/**
* We attempted policy lookup and got a success response
* We determined that we are in an ITAC case
*/
ITAC: 2,
/**
* We attempted policy lookup and got a success response
* The vehicle policy does not have comprehensive coverage
* No Comp quotes are enabled by the client
*/
NO_COMP: 3,
mapToApi: (status) => {
switch (status) {
case coverageType.NONE: return 'None';
case coverageType.Deductible: return 'Deductible';
case coverageType.ITAC: return 'ITAC';
case coverageType.NO_COMP: return 'NoComp';
default: return null;
}
}
});
export default coverageType;