// Default TimeEntryCode seed for the time-tracking module. // // The leave-management LeaveType seed maps each leave type to a work-rules TimeEntryCode by key // (cross-module, by key). Those codes have to exist or a seeded LeaveType would reference a // nonexistent code — and createLeaveType validates the key against this catalog — so the LEAVE // classification codes ship here alongside the leave defaults. `category` is "LEAVE": leave hours // are neither worked time nor a premium-bearing span, they are carried as a distinct classification // the calculation strategy excludes from worked totals. import { uuidv5 } from "../../../shared/uuidv5"; const NS = "erp-kit:time-tracking"; export const timeEntryCodeIds = { LEAVE_PAID: await uuidv5(NS, "timeEntryCode:LEAVE_PAID"), LEAVE_COMPENSATORY: await uuidv5(NS, "timeEntryCode:LEAVE_COMPENSATORY"), LEAVE_SPECIAL: await uuidv5(NS, "timeEntryCode:LEAVE_SPECIAL"), LEAVE_MENSTRUAL: await uuidv5(NS, "timeEntryCode:LEAVE_MENSTRUAL"), } as const; const timeEntryCodes = { [timeEntryCodeIds.LEAVE_PAID]: { key: "LEAVE_PAID", category: "LEAVE", displayName: "Paid Leave", payMapKey: "LEAVE_PAID", }, [timeEntryCodeIds.LEAVE_COMPENSATORY]: { key: "LEAVE_COMPENSATORY", category: "LEAVE", displayName: "Compensatory Leave", payMapKey: "LEAVE_COMPENSATORY", }, [timeEntryCodeIds.LEAVE_SPECIAL]: { key: "LEAVE_SPECIAL", category: "LEAVE", displayName: "Special Leave", payMapKey: "LEAVE_SPECIAL", }, [timeEntryCodeIds.LEAVE_MENSTRUAL]: { key: "LEAVE_MENSTRUAL", category: "LEAVE", displayName: "Menstrual Leave", payMapKey: "LEAVE_MENSTRUAL", }, } as const; export { timeEntryCodes as TimeEntryCode };