// JP default catalog seed for the workforce module. // // These are the values that used to be hard-coded platform-wide enums (employment type, work // regime, appointment type) before the enum→catalog migration. They now ship as seed data so a // host app starts with the Japanese defaults and can add/replace entries without a code change. // `erp-kit app generate seed` discovers the PascalCase exports below and writes .jsonl. // // The three catalogs are company-scoped. The shipped defaults are keyed to the well-known "default // company" whose Company row ships in the organization seed. `DEFAULT_COMPANY_ID` is derived from // the same namespace+name the organization seed uses (`uuidv5("erp-kit:organization", // "company:DEFAULT")`), so the parent Company these rows reference always exists on load — the two // seeds are coupled by that convention, not by a cross-module import. A host app that seeds its own // Company should override the id in both places (or regenerate these rows against its id). import { uuidv5 } from "../../../shared/uuidv5"; const NS = "erp-kit:workforce"; // Keep in sync with organization/seed/index.ts. export const DEFAULT_COMPANY_ID = await uuidv5("erp-kit:organization", "company:DEFAULT"); // --- EmploymentType --------------------------------------------------------------------------- export const employmentTypeIds = { FULL_TIME: await uuidv5(NS, "employmentType:FULL_TIME"), EXECUTIVE: await uuidv5(NS, "employmentType:EXECUTIVE"), CONTRACTOR: await uuidv5(NS, "employmentType:CONTRACTOR"), PART_TIME: await uuidv5(NS, "employmentType:PART_TIME"), FIXED_TERM: await uuidv5(NS, "employmentType:FIXED_TERM"), DISPATCH: await uuidv5(NS, "employmentType:DISPATCH"), OTHER: await uuidv5(NS, "employmentType:OTHER"), } as const; const employmentTypes = { [employmentTypeIds.FULL_TIME]: { companyId: DEFAULT_COMPANY_ID, key: "FULL_TIME", displayName: "Full-time", status: "ACTIVE", }, [employmentTypeIds.EXECUTIVE]: { companyId: DEFAULT_COMPANY_ID, key: "EXECUTIVE", displayName: "Executive", status: "ACTIVE", }, [employmentTypeIds.CONTRACTOR]: { companyId: DEFAULT_COMPANY_ID, key: "CONTRACTOR", displayName: "Contractor", status: "ACTIVE", }, [employmentTypeIds.PART_TIME]: { companyId: DEFAULT_COMPANY_ID, key: "PART_TIME", displayName: "Part-time", status: "ACTIVE", }, [employmentTypeIds.FIXED_TERM]: { companyId: DEFAULT_COMPANY_ID, key: "FIXED_TERM", displayName: "Fixed-term", status: "ACTIVE", }, [employmentTypeIds.DISPATCH]: { companyId: DEFAULT_COMPANY_ID, key: "DISPATCH", displayName: "Dispatch", status: "ACTIVE", }, [employmentTypeIds.OTHER]: { companyId: DEFAULT_COMPANY_ID, key: "OTHER", displayName: "Other", status: "ACTIVE", }, } as const; export { employmentTypes as EmploymentType }; // --- WorkRegime ------------------------------------------------------------------------------- export const workRegimeIds = { STANDARD: await uuidv5(NS, "workRegime:STANDARD"), FLEX: await uuidv5(NS, "workRegime:FLEX"), DISCRETIONARY: await uuidv5(NS, "workRegime:DISCRETIONARY"), MANAGERIAL: await uuidv5(NS, "workRegime:MANAGERIAL"), EXECUTIVE: await uuidv5(NS, "workRegime:EXECUTIVE"), } as const; const workRegimes = { [workRegimeIds.STANDARD]: { companyId: DEFAULT_COMPANY_ID, key: "STANDARD", displayName: "Standard working hours", status: "ACTIVE", }, [workRegimeIds.FLEX]: { companyId: DEFAULT_COMPANY_ID, key: "FLEX", displayName: "Flex-time", status: "ACTIVE", }, [workRegimeIds.DISCRETIONARY]: { companyId: DEFAULT_COMPANY_ID, key: "DISCRETIONARY", displayName: "Discretionary labour", status: "ACTIVE", }, [workRegimeIds.MANAGERIAL]: { companyId: DEFAULT_COMPANY_ID, key: "MANAGERIAL", displayName: "Managerial (supervisory)", status: "ACTIVE", }, [workRegimeIds.EXECUTIVE]: { companyId: DEFAULT_COMPANY_ID, key: "EXECUTIVE", displayName: "Executive", status: "ACTIVE", }, } as const; export { workRegimes as WorkRegime }; // --- AppointmentType -------------------------------------------------------------------------- // Each business label maps to one fixed AppointmentAction that recordAppointment branches on. export const appointmentTypeIds = { HIRE: await uuidv5(NS, "appointmentType:HIRE"), RETURN: await uuidv5(NS, "appointmentType:RETURN"), SECONDMENT: await uuidv5(NS, "appointmentType:SECONDMENT"), CONCURRENT: await uuidv5(NS, "appointmentType:CONCURRENT"), TRANSFER: await uuidv5(NS, "appointmentType:TRANSFER"), PROMOTION: await uuidv5(NS, "appointmentType:PROMOTION"), TERMINATION: await uuidv5(NS, "appointmentType:TERMINATION"), } as const; const appointmentTypes = { [appointmentTypeIds.HIRE]: { companyId: DEFAULT_COMPANY_ID, key: "HIRE", displayName: "Hire", action: "CREATE_PRIMARY_ASSIGNMENT", status: "ACTIVE", }, [appointmentTypeIds.RETURN]: { companyId: DEFAULT_COMPANY_ID, key: "RETURN", displayName: "Return", action: "CREATE_PRIMARY_ASSIGNMENT", status: "ACTIVE", }, [appointmentTypeIds.SECONDMENT]: { companyId: DEFAULT_COMPANY_ID, key: "SECONDMENT", displayName: "Secondment", action: "CREATE_SECONDARY_ASSIGNMENT", status: "ACTIVE", }, [appointmentTypeIds.CONCURRENT]: { companyId: DEFAULT_COMPANY_ID, key: "CONCURRENT", displayName: "Concurrent posting", action: "CREATE_SECONDARY_ASSIGNMENT", status: "ACTIVE", }, [appointmentTypeIds.TRANSFER]: { companyId: DEFAULT_COMPANY_ID, key: "TRANSFER", displayName: "Transfer", action: "CHANGE_ASSIGNMENT", status: "ACTIVE", }, [appointmentTypeIds.PROMOTION]: { companyId: DEFAULT_COMPANY_ID, key: "PROMOTION", displayName: "Promotion", action: "CHANGE_ASSIGNMENT", status: "ACTIVE", }, [appointmentTypeIds.TERMINATION]: { companyId: DEFAULT_COMPANY_ID, key: "TERMINATION", displayName: "Termination", action: "END_ASSIGNMENT", status: "ACTIVE", }, } as const; export { appointmentTypes as AppointmentType };