@codihaus/odp-app-hr 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2560,49 +2560,62 @@ export const hrSchema: ModuleSchema = {
2560
2560
  },
2561
2561
  ],
2562
2562
 
2563
- // Seed data runs after collections are created
2564
- seed: [
2565
- {
2566
- collection: "hr_employment_types",
2567
- data: [
2568
- { key: "full_time", label: "Full-time" },
2569
- { key: "part_time", label: "Part-time" },
2570
- { key: "contractor", label: "Contractor" },
2571
- { key: "intern", label: "Intern" },
2572
- ],
2573
- },
2574
- {
2575
- collection: "hr_leave_types",
2576
- data: [
2577
- { key: "annual", label: "Annual Leave", default_days: 12, paid: true },
2578
- { key: "sick", label: "Sick Leave", default_days: 5, paid: true },
2579
- { key: "unpaid", label: "Unpaid Leave", default_days: 0, paid: false },
2580
- { key: "maternity", label: "Maternity Leave", default_days: 180, paid: true },
2581
- { key: "paternity", label: "Paternity Leave", default_days: 5, paid: true },
2582
- ],
2583
- },
2584
- {
2585
- collection: "hr_settings",
2586
- data: [
2587
- {
2588
- company_name: "My Company",
2589
- currency: "VND",
2590
- fiscal_year_start: 1,
2591
- probation_months_default: 2,
2592
- leave_year_start: 1,
2593
- },
2594
- ],
2595
- },
2596
- {
2597
- collection: "hr_document_triggers",
2598
- data: [
2599
- { event: "talent_created", label: "Talent Created", auto: false },
2600
- { event: "offer_sent", label: "Offer Sent", auto: false },
2601
- { event: "offer_accepted", label: "Offer Accepted", auto: false },
2602
- { event: "hired", label: "Employee Hired", auto: false },
2603
- { event: "probation_confirmed", label: "Probation Confirmed", auto: false },
2604
- { event: "resigned", label: "Employee Resigned", auto: false },
2605
- ],
2606
- },
2563
+ // Wizard steps: create the schema (collections/fields/relations) then seed.
2564
+ // Without this the wizard has no built-in steps and creates nothing.
2565
+ // Custom handler steps (permissions, policy seed) are added in hr-setup.ts
2566
+ // with `after: "seed"`, so they chain after these.
2567
+ steps: [
2568
+ { key: "schema", type: "schema" },
2569
+ { key: "seed", type: "seed", after: "schema" },
2607
2570
  ],
2571
+
2572
+ // Seed data runs after collections are created.
2573
+ // Shape must match ModuleSchema.seed: { required?: SeedDef[], sample?: SeedDef[] }
2574
+ // and each SeedDef is { collection, items } (NOT a bare array / `data`).
2575
+ seed: {
2576
+ required: [
2577
+ {
2578
+ collection: "hr_employment_types",
2579
+ items: [
2580
+ { key: "full_time", label: "Full-time" },
2581
+ { key: "part_time", label: "Part-time" },
2582
+ { key: "contractor", label: "Contractor" },
2583
+ { key: "intern", label: "Intern" },
2584
+ ],
2585
+ },
2586
+ {
2587
+ collection: "hr_leave_types",
2588
+ items: [
2589
+ { key: "annual", label: "Annual Leave", default_days: 12, paid: true },
2590
+ { key: "sick", label: "Sick Leave", default_days: 5, paid: true },
2591
+ { key: "unpaid", label: "Unpaid Leave", default_days: 0, paid: false },
2592
+ { key: "maternity", label: "Maternity Leave", default_days: 180, paid: true },
2593
+ { key: "paternity", label: "Paternity Leave", default_days: 5, paid: true },
2594
+ ],
2595
+ },
2596
+ {
2597
+ collection: "hr_settings",
2598
+ items: [
2599
+ {
2600
+ company_name: "My Company",
2601
+ currency: "VND",
2602
+ fiscal_year_start: 1,
2603
+ probation_months_default: 2,
2604
+ leave_year_start: 1,
2605
+ },
2606
+ ],
2607
+ },
2608
+ {
2609
+ collection: "hr_document_triggers",
2610
+ items: [
2611
+ { event: "talent_created", label: "Talent Created", auto: false },
2612
+ { event: "offer_sent", label: "Offer Sent", auto: false },
2613
+ { event: "offer_accepted", label: "Offer Accepted", auto: false },
2614
+ { event: "hired", label: "Employee Hired", auto: false },
2615
+ { event: "probation_confirmed", label: "Probation Confirmed", auto: false },
2616
+ { event: "resigned", label: "Employee Resigned", auto: false },
2617
+ ],
2618
+ },
2619
+ ],
2620
+ },
2608
2621
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codihaus/odp-app-hr",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "ODP HR module — Nuxt layer for human resources",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",