@hed-hog/operations 0.0.299 → 0.0.301

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.
Files changed (97) hide show
  1. package/dist/operations.controller.d.ts +713 -31
  2. package/dist/operations.controller.d.ts.map +1 -1
  3. package/dist/operations.controller.js +157 -0
  4. package/dist/operations.controller.js.map +1 -1
  5. package/dist/operations.module.d.ts.map +1 -1
  6. package/dist/operations.module.js +5 -1
  7. package/dist/operations.module.js.map +1 -1
  8. package/dist/operations.proposal.subscriber.d.ts +11 -0
  9. package/dist/operations.proposal.subscriber.d.ts.map +1 -0
  10. package/dist/operations.proposal.subscriber.js +80 -0
  11. package/dist/operations.proposal.subscriber.js.map +1 -0
  12. package/dist/operations.proposal.subscriber.spec.d.ts +2 -0
  13. package/dist/operations.proposal.subscriber.spec.d.ts.map +1 -0
  14. package/dist/operations.proposal.subscriber.spec.js +88 -0
  15. package/dist/operations.proposal.subscriber.spec.js.map +1 -0
  16. package/dist/operations.service.d.ts +490 -46
  17. package/dist/operations.service.d.ts.map +1 -1
  18. package/dist/operations.service.js +3590 -1267
  19. package/dist/operations.service.js.map +1 -1
  20. package/dist/operations.service.spec.d.ts +2 -0
  21. package/dist/operations.service.spec.d.ts.map +1 -0
  22. package/dist/operations.service.spec.js +159 -0
  23. package/dist/operations.service.spec.js.map +1 -0
  24. package/hedhog/data/menu.yaml +232 -198
  25. package/hedhog/data/role.yaml +23 -23
  26. package/hedhog/data/role_route.yaml +39 -0
  27. package/hedhog/data/route.yaml +447 -317
  28. package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +8 -6
  29. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +1163 -327
  30. package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +256 -0
  31. package/hedhog/frontend/app/_components/contract-content-editor.tsx.ejs +258 -0
  32. package/hedhog/frontend/app/_components/contract-creation-wizard.tsx.ejs +631 -0
  33. package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +353 -27
  34. package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +1926 -87
  35. package/hedhog/frontend/app/_components/contract-template-form-screen.tsx.ejs +526 -0
  36. package/hedhog/frontend/app/_components/contract-template-select-with-create.tsx.ejs +247 -0
  37. package/hedhog/frontend/app/_components/contract-wizard-sheet.tsx.ejs +3520 -0
  38. package/hedhog/frontend/app/_components/department-select-with-create.tsx.ejs +370 -0
  39. package/hedhog/frontend/app/_components/person-select-with-create.tsx.ejs +826 -0
  40. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +1251 -364
  41. package/hedhog/frontend/app/_components/section-card.tsx.ejs +48 -13
  42. package/hedhog/frontend/app/_lib/api.ts.ejs +2 -5
  43. package/hedhog/frontend/app/_lib/types.ts.ejs +76 -33
  44. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +85 -8
  45. package/hedhog/frontend/app/approvals/page.tsx.ejs +90 -54
  46. package/hedhog/frontend/app/collaborators/[id]/edit/page.tsx.ejs +2 -2
  47. package/hedhog/frontend/app/collaborators/[id]/page.tsx.ejs +2 -2
  48. package/hedhog/frontend/app/collaborators/page.tsx.ejs +597 -140
  49. package/hedhog/frontend/app/contracts/[id]/edit/page.tsx.ejs +2 -2
  50. package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +2 -2
  51. package/hedhog/frontend/app/contracts/page.tsx.ejs +941 -262
  52. package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +384 -0
  53. package/hedhog/frontend/app/departments/page.tsx.ejs +442 -0
  54. package/hedhog/frontend/app/page.tsx.ejs +36 -12
  55. package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +2 -2
  56. package/hedhog/frontend/app/projects/new/page.tsx.ejs +2 -2
  57. package/hedhog/frontend/app/projects/page.tsx.ejs +264 -102
  58. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +50 -28
  59. package/hedhog/frontend/app/time-off/page.tsx.ejs +57 -31
  60. package/hedhog/frontend/app/timesheets/page.tsx.ejs +85 -42
  61. package/hedhog/frontend/messages/en.json +473 -12
  62. package/hedhog/frontend/messages/pt.json +528 -66
  63. package/hedhog/table/operations_approval.yaml +49 -49
  64. package/hedhog/table/operations_approval_history.yaml +29 -29
  65. package/hedhog/table/operations_collaborator.yaml +87 -67
  66. package/hedhog/table/operations_collaborator_schedule_day.yaml +34 -34
  67. package/hedhog/table/operations_contract.yaml +121 -100
  68. package/hedhog/table/operations_contract_document.yaml +40 -23
  69. package/hedhog/table/operations_contract_financial_term.yaml +40 -40
  70. package/hedhog/table/operations_contract_history.yaml +27 -27
  71. package/hedhog/table/operations_contract_party.yaml +46 -46
  72. package/hedhog/table/operations_contract_revision.yaml +38 -38
  73. package/hedhog/table/operations_contract_signature.yaml +38 -38
  74. package/hedhog/table/operations_contract_template.yaml +58 -0
  75. package/hedhog/table/operations_department.yaml +24 -0
  76. package/hedhog/table/operations_project.yaml +54 -54
  77. package/hedhog/table/operations_project_assignment.yaml +55 -55
  78. package/hedhog/table/operations_schedule_adjustment_day.yaml +34 -34
  79. package/hedhog/table/operations_schedule_adjustment_request.yaml +53 -53
  80. package/hedhog/table/operations_time_off_request.yaml +57 -57
  81. package/hedhog/table/operations_timesheet.yaml +41 -41
  82. package/hedhog/table/operations_timesheet_entry.yaml +40 -40
  83. package/package.json +5 -3
  84. package/src/operations.controller.ts +304 -182
  85. package/src/operations.module.ts +26 -22
  86. package/src/operations.proposal.subscriber.spec.ts +121 -0
  87. package/src/operations.proposal.subscriber.ts +86 -0
  88. package/src/operations.service.spec.ts +210 -0
  89. package/src/operations.service.ts +7317 -3595
  90. package/dist/operations-data.controller.d.ts +0 -139
  91. package/dist/operations-data.controller.d.ts.map +0 -1
  92. package/dist/operations-data.controller.js +0 -113
  93. package/dist/operations-data.controller.js.map +0 -1
  94. package/dist/operations-growth.controller.d.ts +0 -48
  95. package/dist/operations-growth.controller.d.ts.map +0 -1
  96. package/dist/operations-growth.controller.js +0 -90
  97. package/dist/operations-growth.controller.js.map +0 -1
@@ -1,49 +1,49 @@
1
- columns:
2
- - type: pk
3
- - name: target_type
4
- type: enum
5
- values: [timesheet, time_off_request, schedule_adjustment_request]
6
- - name: target_id
7
- type: int
8
- - name: requester_collaborator_id
9
- type: fk
10
- references:
11
- table: operations_collaborator
12
- column: id
13
- onDelete: CASCADE
14
- onUpdate: CASCADE
15
- - name: approver_collaborator_id
16
- type: fk
17
- isNullable: true
18
- references:
19
- table: operations_collaborator
20
- column: id
21
- onDelete: SET NULL
22
- onUpdate: CASCADE
23
- - name: status
24
- type: enum
25
- values: [pending, approved, rejected, cancelled]
26
- default: pending
27
- - name: submitted_at
28
- type: datetime
29
- - name: decided_at
30
- type: datetime
31
- isNullable: true
32
- - name: decision_note
33
- type: text
34
- isNullable: true
35
- - name: deleted_at
36
- type: datetime
37
- isNullable: true
38
- - type: created_at
39
- - type: updated_at
40
-
41
- indices:
42
- - columns: [target_type, target_id]
43
- isUnique: true
44
- - columns: [requester_collaborator_id]
45
- - columns: [approver_collaborator_id]
46
- - columns: [status]
47
- - columns: [submitted_at]
48
- - columns: [decided_at]
49
- - columns: [deleted_at]
1
+ columns:
2
+ - type: pk
3
+ - name: target_type
4
+ type: enum
5
+ values: [timesheet, time_off_request, schedule_adjustment_request]
6
+ - name: target_id
7
+ type: int
8
+ - name: requester_collaborator_id
9
+ type: fk
10
+ references:
11
+ table: operations_collaborator
12
+ column: id
13
+ onDelete: CASCADE
14
+ onUpdate: CASCADE
15
+ - name: approver_collaborator_id
16
+ type: fk
17
+ isNullable: true
18
+ references:
19
+ table: operations_collaborator
20
+ column: id
21
+ onDelete: SET NULL
22
+ onUpdate: CASCADE
23
+ - name: status
24
+ type: enum
25
+ values: [pending, approved, rejected, cancelled]
26
+ default: pending
27
+ - name: submitted_at
28
+ type: datetime
29
+ - name: decided_at
30
+ type: datetime
31
+ isNullable: true
32
+ - name: decision_note
33
+ type: text
34
+ isNullable: true
35
+ - name: deleted_at
36
+ type: datetime
37
+ isNullable: true
38
+ - type: created_at
39
+ - type: updated_at
40
+
41
+ indices:
42
+ - columns: [target_type, target_id]
43
+ isUnique: true
44
+ - columns: [requester_collaborator_id]
45
+ - columns: [approver_collaborator_id]
46
+ - columns: [status]
47
+ - columns: [submitted_at]
48
+ - columns: [decided_at]
49
+ - columns: [deleted_at]
@@ -1,29 +1,29 @@
1
- columns:
2
- - type: pk
3
- - name: approval_id
4
- type: fk
5
- references:
6
- table: operations_approval
7
- column: id
8
- onDelete: CASCADE
9
- onUpdate: CASCADE
10
- - name: actor_collaborator_id
11
- type: fk
12
- isNullable: true
13
- references:
14
- table: operations_collaborator
15
- column: id
16
- onDelete: SET NULL
17
- onUpdate: CASCADE
18
- - name: action
19
- type: enum
20
- values: [created, submitted, approved, rejected, cancelled, reopened]
21
- - name: note
22
- type: text
23
- isNullable: true
24
- - type: created_at
25
-
26
- indices:
27
- - columns: [approval_id]
28
- - columns: [actor_collaborator_id]
29
- - columns: [action]
1
+ columns:
2
+ - type: pk
3
+ - name: approval_id
4
+ type: fk
5
+ references:
6
+ table: operations_approval
7
+ column: id
8
+ onDelete: CASCADE
9
+ onUpdate: CASCADE
10
+ - name: actor_collaborator_id
11
+ type: fk
12
+ isNullable: true
13
+ references:
14
+ table: operations_collaborator
15
+ column: id
16
+ onDelete: SET NULL
17
+ onUpdate: CASCADE
18
+ - name: action
19
+ type: enum
20
+ values: [created, submitted, approved, rejected, cancelled, reopened]
21
+ - name: note
22
+ type: text
23
+ isNullable: true
24
+ - type: created_at
25
+
26
+ indices:
27
+ - columns: [approval_id]
28
+ - columns: [actor_collaborator_id]
29
+ - columns: [action]
@@ -1,67 +1,87 @@
1
- columns:
2
- - type: pk
3
- - name: user_id
4
- type: int
5
- - name: supervisor_collaborator_id
6
- type: fk
7
- isNullable: true
8
- references:
9
- table: operations_collaborator
10
- column: id
11
- onDelete: SET NULL
12
- onUpdate: CASCADE
13
- - name: code
14
- type: varchar
15
- length: 32
16
- - name: collaborator_type
17
- type: enum
18
- values: [clt, pj, freelancer, intern, other]
19
- default: other
20
- - name: display_name
21
- type: varchar
22
- length: 180
23
- - name: department
24
- type: varchar
25
- length: 120
26
- isNullable: true
27
- - name: title
28
- type: varchar
29
- length: 120
30
- isNullable: true
31
- - name: level_label
32
- type: varchar
33
- length: 120
34
- isNullable: true
35
- - name: weekly_capacity_hours
36
- type: decimal
37
- precision: 6
38
- scale: 2
39
- isNullable: true
40
- - name: status
41
- type: enum
42
- values: [active, on_leave, inactive]
43
- default: active
44
- - name: joined_at
45
- type: date
46
- isNullable: true
47
- - name: left_at
48
- type: date
49
- isNullable: true
50
- - name: notes
51
- type: text
52
- isNullable: true
53
- - name: deleted_at
54
- type: datetime
55
- isNullable: true
56
- - type: created_at
57
- - type: updated_at
58
-
59
- indices:
60
- - columns: [user_id]
61
- isUnique: true
62
- - columns: [code]
63
- isUnique: true
64
- - columns: [collaborator_type]
65
- - columns: [supervisor_collaborator_id]
66
- - columns: [status]
67
- - columns: [deleted_at]
1
+ columns:
2
+ - type: pk
3
+ - name: user_id
4
+ type: int
5
+ isNullable: true
6
+ - name: person_id
7
+ type: fk
8
+ isNullable: true
9
+ references:
10
+ table: person
11
+ column: id
12
+ onDelete: SET NULL
13
+ onUpdate: CASCADE
14
+ - name: supervisor_collaborator_id
15
+ type: fk
16
+ isNullable: true
17
+ references:
18
+ table: operations_collaborator
19
+ column: id
20
+ onDelete: SET NULL
21
+ onUpdate: CASCADE
22
+ - name: code
23
+ type: varchar
24
+ length: 32
25
+ - name: collaborator_type
26
+ type: enum
27
+ values: [clt, pj, freelancer, intern, other]
28
+ default: other
29
+ - name: display_name
30
+ type: varchar
31
+ length: 180
32
+ - name: department
33
+ type: varchar
34
+ length: 120
35
+ isNullable: true
36
+ - name: department_id
37
+ type: fk
38
+ isNullable: true
39
+ references:
40
+ table: operations_department
41
+ column: id
42
+ onDelete: SET NULL
43
+ onUpdate: CASCADE
44
+ - name: title
45
+ type: varchar
46
+ length: 120
47
+ isNullable: true
48
+ - name: level_label
49
+ type: varchar
50
+ length: 120
51
+ isNullable: true
52
+ - name: weekly_capacity_hours
53
+ type: decimal
54
+ precision: 6
55
+ scale: 2
56
+ isNullable: true
57
+ - name: status
58
+ type: enum
59
+ values: [active, on_leave, inactive]
60
+ default: active
61
+ - name: joined_at
62
+ type: date
63
+ isNullable: true
64
+ - name: left_at
65
+ type: date
66
+ isNullable: true
67
+ - name: notes
68
+ type: text
69
+ isNullable: true
70
+ - name: deleted_at
71
+ type: datetime
72
+ isNullable: true
73
+ - type: created_at
74
+ - type: updated_at
75
+
76
+ indices:
77
+ - columns: [user_id]
78
+ isUnique: true
79
+ - columns: [person_id]
80
+ isUnique: true
81
+ - columns: [code]
82
+ isUnique: true
83
+ - columns: [collaborator_type]
84
+ - columns: [supervisor_collaborator_id]
85
+ - columns: [department_id]
86
+ - columns: [status]
87
+ - columns: [deleted_at]
@@ -1,34 +1,34 @@
1
- columns:
2
- - type: pk
3
- - name: collaborator_id
4
- type: fk
5
- references:
6
- table: operations_collaborator
7
- column: id
8
- onDelete: CASCADE
9
- onUpdate: CASCADE
10
- - name: weekday
11
- type: enum
12
- values: [monday, tuesday, wednesday, thursday, friday, saturday, sunday]
13
- - name: is_working_day
14
- type: boolean
15
- default: true
16
- - name: start_time
17
- type: time
18
- isNullable: true
19
- - name: end_time
20
- type: time
21
- isNullable: true
22
- - name: break_minutes
23
- type: int
24
- isNullable: true
25
- - name: deleted_at
26
- type: datetime
27
- isNullable: true
28
- - type: created_at
29
- - type: updated_at
30
-
31
- indices:
32
- - columns: [collaborator_id]
33
- - columns: [weekday]
34
- - columns: [deleted_at]
1
+ columns:
2
+ - type: pk
3
+ - name: collaborator_id
4
+ type: fk
5
+ references:
6
+ table: operations_collaborator
7
+ column: id
8
+ onDelete: CASCADE
9
+ onUpdate: CASCADE
10
+ - name: weekday
11
+ type: enum
12
+ values: [monday, tuesday, wednesday, thursday, friday, saturday, sunday]
13
+ - name: is_working_day
14
+ type: boolean
15
+ default: true
16
+ - name: start_time
17
+ type: time
18
+ isNullable: true
19
+ - name: end_time
20
+ type: time
21
+ isNullable: true
22
+ - name: break_minutes
23
+ type: int
24
+ isNullable: true
25
+ - name: deleted_at
26
+ type: datetime
27
+ isNullable: true
28
+ - type: created_at
29
+ - type: updated_at
30
+
31
+ indices:
32
+ - columns: [collaborator_id]
33
+ - columns: [weekday]
34
+ - columns: [deleted_at]
@@ -1,88 +1,106 @@
1
- columns:
2
- - type: pk
3
- - name: code
4
- type: varchar
5
- length: 40
6
- - name: name
7
- type: varchar
8
- length: 180
9
- - name: contract_category
10
- type: enum
11
- values: [employee, contractor, client, supplier, vendor, partner, internal, other]
12
- default: client
13
- - name: contract_type
14
- type: enum
15
- values: [clt, pj, freelancer_agreement, service_agreement, fixed_term, recurring_service, nda, amendment, addendum, other]
16
- default: service_agreement
17
- - name: client_name
18
- type: varchar
19
- length: 180
20
- - name: signature_status
21
- type: enum
22
- values: [not_started, pending, partially_signed, signed, expired]
23
- default: not_started
24
- - name: is_active
25
- type: boolean
26
- default: true
27
- - name: billing_model
28
- type: enum
29
- values: [time_and_material, monthly_retainer, fixed_price]
30
- default: time_and_material
31
- - name: account_manager_collaborator_id
32
- type: fk
33
- isNullable: true
34
- references:
35
- table: operations_collaborator
36
- column: id
37
- onDelete: SET NULL
38
- onUpdate: CASCADE
39
- - name: related_collaborator_id
40
- type: fk
41
- isNullable: true
42
- references:
43
- table: operations_collaborator
44
- column: id
45
- onDelete: SET NULL
46
- onUpdate: CASCADE
47
- - name: origin_type
48
- type: enum
49
- values: [manual, employee_hiring, client_project]
50
- default: manual
51
- - name: origin_id
52
- type: int
53
- isNullable: true
54
- - name: start_date
55
- type: date
56
- - name: end_date
57
- type: date
58
- isNullable: true
59
- - name: signed_at
60
- type: date
61
- isNullable: true
62
- - name: effective_date
63
- type: date
64
- isNullable: true
65
- - name: budget_amount
66
- type: decimal
67
- precision: 12
68
- scale: 2
69
- isNullable: true
70
- - name: monthly_hour_cap
71
- type: int
72
- isNullable: true
73
- - name: status
74
- type: enum
75
- values: [draft, under_review, active, renewal, expired, closed, archived]
76
- default: draft
77
- - name: description
78
- type: text
79
- isNullable: true
80
- - name: content_html
81
- type: text
82
- isNullable: true
83
- - name: created_by_user_id
84
- type: int
85
- isNullable: true
1
+ columns:
2
+ - type: pk
3
+ - name: code
4
+ type: varchar
5
+ length: 40
6
+ - name: name
7
+ type: varchar
8
+ length: 180
9
+ isNullable: true
10
+ - name: contract_category
11
+ type: enum
12
+ values: [employee, contractor, client, supplier, vendor, partner, internal, other]
13
+ default: client
14
+ - name: contract_type
15
+ type: enum
16
+ values: [clt, pj, freelancer_agreement, service_agreement, fixed_term, recurring_service, nda, amendment, addendum, other]
17
+ default: service_agreement
18
+ - name: client_name
19
+ type: varchar
20
+ length: 180
21
+ isNullable: true
22
+ - name: signature_status
23
+ type: enum
24
+ values: [not_started, pending, partially_signed, signed, expired]
25
+ default: not_started
26
+ - name: is_active
27
+ type: boolean
28
+ default: true
29
+ - name: billing_model
30
+ type: enum
31
+ values: [time_and_material, monthly_retainer, fixed_price]
32
+ default: time_and_material
33
+ - name: account_manager_collaborator_id
34
+ type: fk
35
+ isNullable: true
36
+ references:
37
+ table: operations_collaborator
38
+ column: id
39
+ onDelete: SET NULL
40
+ onUpdate: CASCADE
41
+ - name: related_collaborator_id
42
+ type: fk
43
+ isNullable: true
44
+ references:
45
+ table: operations_collaborator
46
+ column: id
47
+ onDelete: SET NULL
48
+ onUpdate: CASCADE
49
+ - name: contract_template_id
50
+ type: fk
51
+ isNullable: true
52
+ references:
53
+ table: operations_contract_template
54
+ column: id
55
+ onDelete: SET NULL
56
+ onUpdate: CASCADE
57
+ - name: origin_type
58
+ type: enum
59
+ values: [manual, employee_hiring, client_project, crm_proposal]
60
+ default: manual
61
+ - name: origin_id
62
+ type: int
63
+ isNullable: true
64
+ - name: start_date
65
+ type: date
66
+ isNullable: true
67
+ - name: end_date
68
+ type: date
69
+ isNullable: true
70
+ - name: signed_at
71
+ type: date
72
+ isNullable: true
73
+ - name: effective_date
74
+ type: date
75
+ isNullable: true
76
+ - name: budget_amount
77
+ type: decimal
78
+ precision: 12
79
+ scale: 2
80
+ isNullable: true
81
+ - name: monthly_hour_cap
82
+ type: int
83
+ isNullable: true
84
+ - name: status
85
+ type: enum
86
+ values: [draft, under_review, active, renewal, expired, closed, archived]
87
+ default: draft
88
+ - name: creation_mode
89
+ type: enum
90
+ values: [blank, template, upload, duplicate]
91
+ default: blank
92
+ - name: wizard_step
93
+ type: int
94
+ default: 0
95
+ - name: description
96
+ type: text
97
+ isNullable: true
98
+ - name: content_html
99
+ type: text
100
+ isNullable: true
101
+ - name: created_by_user_id
102
+ type: int
103
+ isNullable: true
86
104
  - name: updated_by_user_id
87
105
  type: int
88
106
  isNullable: true
@@ -92,18 +110,21 @@ columns:
92
110
  - type: created_at
93
111
  - type: updated_at
94
112
 
95
- indices:
96
- - columns: [code]
97
- isUnique: true
98
- - columns: [account_manager_collaborator_id]
99
- - columns: [related_collaborator_id]
100
- - columns: [contract_category]
101
- - columns: [contract_type]
102
- - columns: [origin_type]
103
- - columns: [origin_id]
104
- - columns: [signature_status]
105
- - columns: [is_active]
106
- - columns: [status]
107
- - columns: [start_date]
108
- - columns: [end_date]
109
- - columns: [deleted_at]
113
+ indices:
114
+ - columns: [code]
115
+ isUnique: true
116
+ - columns: [account_manager_collaborator_id]
117
+ - columns: [related_collaborator_id]
118
+ - columns: [contract_template_id]
119
+ - columns: [contract_category]
120
+ - columns: [contract_type]
121
+ - columns: [origin_type]
122
+ - columns: [origin_id]
123
+ - columns: [signature_status]
124
+ - columns: [is_active]
125
+ - columns: [status]
126
+ - columns: [creation_mode]
127
+ - columns: [wizard_step]
128
+ - columns: [start_date]
129
+ - columns: [end_date]
130
+ - columns: [deleted_at]