All files / apps/timeOff/src/screens/ChooseReason utils.tsx

100% Statements 3/3
100% Branches 2/2
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20                2x               2x 11x    
import { FamilyIcon } from '@repo/ui/icons/Family';
import { PersonalReasonIcon } from '@repo/ui/icons/PersonalReason';
import { SickLeaveIcon } from '@repo/ui/icons/SickLeave';
import { SpecialEventIcon } from '@repo/ui/icons/SpecialEvent';
import { VacationIcon } from '@repo/ui/icons/Vacation';
 
import { QuickReasonOption } from './types';
 
export const quickReasons: QuickReasonOption[] = [
  { label: 'Personal Matters', icon: <PersonalReasonIcon /> },
  { label: 'Sick leave', icon: <SickLeaveIcon /> },
  { label: 'Family Matters', icon: <FamilyIcon /> },
  { label: 'Vacation', icon: <VacationIcon /> },
  { label: 'Special Events', icon: <SpecialEventIcon /> },
];
 
export const canSubmitReason = (value: string | null) => {
  return !!value && value.length > 0;
};