// JP default catalog seed for the leave-management module. // // These LeaveType entries are the Japanese defaults whose `category` values used to be baked into // a fixed enum before the enum→catalog migration (Step 5a). They now ship as seed data, keyed by // stable `key`, so a host app starts with the JP leave catalog and can add jurisdiction-specific // types (US bereavement/jury-duty, etc.) without a code change. `erp-kit app generate seed` // discovers the PascalCase export below and writes LeaveType.jsonl. // // `timeEntryCodeKey` references a work-rules TimeEntryCode of the LEAVE classification by key // (cross-module, by key — not a FK); the host app seeds the matching TimeEntryCode rows. import { uuidv5 } from "../../../shared/uuidv5"; const NS = "erp-kit:leave-management"; export const leaveTypeIds = { PAID_LEAVE: await uuidv5(NS, "leaveType:PAID_LEAVE"), COMPENSATORY_LEAVE: await uuidv5(NS, "leaveType:COMPENSATORY_LEAVE"), SPECIAL_LEAVE: await uuidv5(NS, "leaveType:SPECIAL_LEAVE"), MENSTRUAL_LEAVE: await uuidv5(NS, "leaveType:MENSTRUAL_LEAVE"), } as const; const leaveTypes = { [leaveTypeIds.PAID_LEAVE]: { key: "PAID_LEAVE", displayName: "Annual Paid Leave", category: "PAID_LEAVE_FULL", requiresBalance: true, drawsFromCompensatoryGrants: null, timeEntryCodeKey: "LEAVE_PAID", isActive: true, requestUnit: null, }, [leaveTypeIds.COMPENSATORY_LEAVE]: { key: "COMPENSATORY_LEAVE", displayName: "Compensatory Leave", category: "COMPENSATORY", requiresBalance: true, drawsFromCompensatoryGrants: true, timeEntryCodeKey: "LEAVE_COMPENSATORY", isActive: true, requestUnit: null, }, [leaveTypeIds.SPECIAL_LEAVE]: { key: "SPECIAL_LEAVE", displayName: "Special Leave", category: "SPECIAL", requiresBalance: false, drawsFromCompensatoryGrants: null, timeEntryCodeKey: "LEAVE_SPECIAL", isActive: true, requestUnit: null, }, [leaveTypeIds.MENSTRUAL_LEAVE]: { key: "MENSTRUAL_LEAVE", displayName: "Menstrual Leave", category: "MENSTRUAL", requiresBalance: false, drawsFromCompensatoryGrants: null, timeEntryCodeKey: "LEAVE_MENSTRUAL", isActive: true, requestUnit: null, }, } as const; export { leaveTypes as LeaveType };