department-of-veterans-affairs/vets-website

View on GitHub
src/applications/check-in/utils/appointment/eligibility.js

Summary

Maintainability
A
0 mins
Test Coverage
const ELIGIBILITY = Object.freeze({
  ELIGIBLE: 'ELIGIBLE',
  INELIGIBLE_BAD_STATUS: 'INELIGIBLE_BAD_STATUS',
  INELIGIBLE_TOO_EARLY: 'INELIGIBLE_TOO_EARLY',
  INELIGIBLE_TOO_LATE: 'INELIGIBLE_TOO_LATE',
  INELIGIBLE_UNSUPPORTED_LOCATION: 'INELIGIBLE_UNSUPPORTED_LOCATION',
  INELIGIBLE_UNKNOWN_REASON: 'INELIGIBLE_UNKNOWN_REASON',
  INELIGIBLE_ALREADY_CHECKED_IN: 'INELIGIBLE_ALREADY_CHECKED_IN',
});

/**
 * @param {string} a
 * @param {string} b
 */
const areEqual = (a, b) =>
  a && b ? a.toLowerCase() === b.toLowerCase() : false;

export { ELIGIBILITY, areEqual };