@hed-hog/operations 0.0.305 → 0.0.309

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 (138) hide show
  1. package/dist/controllers/operations-approvals.controller.d.ts +114 -1
  2. package/dist/controllers/operations-approvals.controller.d.ts.map +1 -1
  3. package/dist/controllers/operations-approvals.controller.js +16 -3
  4. package/dist/controllers/operations-approvals.controller.js.map +1 -1
  5. package/dist/controllers/operations-collaborators.controller.d.ts +16 -1
  6. package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
  7. package/dist/controllers/operations-collaborators.controller.js +16 -3
  8. package/dist/controllers/operations-collaborators.controller.js.map +1 -1
  9. package/dist/controllers/operations-contracts.controller.d.ts +14 -453
  10. package/dist/controllers/operations-contracts.controller.d.ts.map +1 -1
  11. package/dist/controllers/operations-contracts.controller.js +11 -112
  12. package/dist/controllers/operations-contracts.controller.js.map +1 -1
  13. package/dist/controllers/operations-org-structure.controller.d.ts +65 -2
  14. package/dist/controllers/operations-org-structure.controller.d.ts.map +1 -1
  15. package/dist/controllers/operations-org-structure.controller.js +18 -5
  16. package/dist/controllers/operations-org-structure.controller.js.map +1 -1
  17. package/dist/controllers/operations-projects.controller.d.ts +28 -4
  18. package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
  19. package/dist/controllers/operations-projects.controller.js +17 -5
  20. package/dist/controllers/operations-projects.controller.js.map +1 -1
  21. package/dist/controllers/operations-timesheets.controller.d.ts +52 -4
  22. package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -1
  23. package/dist/controllers/operations-timesheets.controller.js +28 -11
  24. package/dist/controllers/operations-timesheets.controller.js.map +1 -1
  25. package/dist/dto/list-approvals.dto.d.ts +6 -0
  26. package/dist/dto/list-approvals.dto.d.ts.map +1 -0
  27. package/dist/dto/list-approvals.dto.js +28 -0
  28. package/dist/dto/list-approvals.dto.js.map +1 -0
  29. package/dist/dto/list-collaborator-types.dto.d.ts +3 -1
  30. package/dist/dto/list-collaborator-types.dto.d.ts.map +1 -1
  31. package/dist/dto/list-collaborator-types.dto.js +7 -1
  32. package/dist/dto/list-collaborator-types.dto.js.map +1 -1
  33. package/dist/dto/list-collaborators.dto.d.ts +1 -0
  34. package/dist/dto/list-collaborators.dto.d.ts.map +1 -1
  35. package/dist/dto/list-collaborators.dto.js +5 -0
  36. package/dist/dto/list-collaborators.dto.js.map +1 -1
  37. package/dist/dto/list-contracts.dto.d.ts +8 -0
  38. package/dist/dto/list-contracts.dto.d.ts.map +1 -0
  39. package/dist/dto/list-contracts.dto.js +38 -0
  40. package/dist/dto/list-contracts.dto.js.map +1 -0
  41. package/dist/dto/list-departments.dto.d.ts +5 -0
  42. package/dist/dto/list-departments.dto.d.ts.map +1 -0
  43. package/dist/dto/list-departments.dto.js +23 -0
  44. package/dist/dto/list-departments.dto.js.map +1 -0
  45. package/dist/dto/list-projects.dto.d.ts +5 -0
  46. package/dist/dto/list-projects.dto.d.ts.map +1 -0
  47. package/dist/dto/list-projects.dto.js +23 -0
  48. package/dist/dto/list-projects.dto.js.map +1 -0
  49. package/dist/dto/list-schedule-adjustments.dto.d.ts +5 -0
  50. package/dist/dto/list-schedule-adjustments.dto.d.ts.map +1 -0
  51. package/dist/dto/list-schedule-adjustments.dto.js +23 -0
  52. package/dist/dto/list-schedule-adjustments.dto.js.map +1 -0
  53. package/dist/dto/list-time-off-requests.dto.d.ts +5 -0
  54. package/dist/dto/list-time-off-requests.dto.d.ts.map +1 -0
  55. package/dist/dto/list-time-off-requests.dto.js +23 -0
  56. package/dist/dto/list-time-off-requests.dto.js.map +1 -0
  57. package/dist/dto/list-timesheets.dto.d.ts +5 -0
  58. package/dist/dto/list-timesheets.dto.d.ts.map +1 -0
  59. package/dist/dto/list-timesheets.dto.js +23 -0
  60. package/dist/dto/list-timesheets.dto.js.map +1 -0
  61. package/dist/dto/reorder-collaborator-types.dto.d.ts +4 -0
  62. package/dist/dto/reorder-collaborator-types.dto.d.ts.map +1 -0
  63. package/dist/dto/reorder-collaborator-types.dto.js +25 -0
  64. package/dist/dto/reorder-collaborator-types.dto.js.map +1 -0
  65. package/dist/dto/update-collaborator-type.dto.d.ts +3 -1
  66. package/dist/dto/update-collaborator-type.dto.d.ts.map +1 -1
  67. package/dist/dto/update-collaborator-type.dto.js +2 -1
  68. package/dist/dto/update-collaborator-type.dto.js.map +1 -1
  69. package/dist/operations.service.d.ts +362 -271
  70. package/dist/operations.service.d.ts.map +1 -1
  71. package/dist/operations.service.js +1195 -1098
  72. package/dist/operations.service.js.map +1 -1
  73. package/dist/operations.service.spec.js +73 -22
  74. package/dist/operations.service.spec.js.map +1 -1
  75. package/hedhog/data/menu.yaml +19 -55
  76. package/hedhog/data/operations_collaborator_type.yaml +76 -76
  77. package/hedhog/data/route.yaml +52 -70
  78. package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +5 -3
  79. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +8 -1
  80. package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +15 -10
  81. package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +108 -213
  82. package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +251 -2039
  83. package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +167 -60
  84. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +70 -301
  85. package/hedhog/frontend/app/_components/system-user-select-with-create.tsx.ejs +102 -51
  86. package/hedhog/frontend/app/_components/timesheet-task-create-sheet.tsx.ejs +1 -0
  87. package/hedhog/frontend/app/_lib/types.ts.ejs +19 -24
  88. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +14 -9
  89. package/hedhog/frontend/app/approvals/page.tsx.ejs +843 -151
  90. package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +457 -154
  91. package/hedhog/frontend/app/collaborators/page.tsx.ejs +118 -49
  92. package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +2 -2
  93. package/hedhog/frontend/app/contracts/page.tsx.ejs +215 -617
  94. package/hedhog/frontend/app/departments/page.tsx.ejs +257 -113
  95. package/hedhog/frontend/app/projects/page.tsx.ejs +90 -51
  96. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +546 -118
  97. package/hedhog/frontend/app/time-off/page.tsx.ejs +400 -123
  98. package/hedhog/frontend/app/timesheets/page.tsx.ejs +647 -342
  99. package/hedhog/frontend/messages/en.json +148 -14
  100. package/hedhog/frontend/messages/pt.json +199 -56
  101. package/hedhog/table/operations_collaborator.yaml +18 -18
  102. package/hedhog/table/operations_collaborator_equity_participation.yaml +43 -43
  103. package/hedhog/table/operations_collaborator_type.yaml +33 -33
  104. package/hedhog/table/operations_contract.yaml +0 -9
  105. package/hedhog/table/operations_contract_document.yaml +33 -33
  106. package/package.json +4 -4
  107. package/src/controllers/operations-approvals.controller.ts +9 -3
  108. package/src/controllers/operations-collaborators.controller.ts +15 -2
  109. package/src/controllers/operations-contracts.controller.ts +8 -92
  110. package/src/controllers/operations-org-structure.controller.ts +17 -4
  111. package/src/controllers/operations-projects.controller.ts +10 -4
  112. package/src/controllers/operations-timesheets.controller.ts +30 -8
  113. package/src/dto/create-collaborator-type.dto.ts +43 -43
  114. package/src/dto/create-collaborator.dto.ts +223 -223
  115. package/src/dto/list-approvals.dto.ts +12 -0
  116. package/src/dto/list-collaborator-types.dto.ts +20 -15
  117. package/src/dto/list-collaborators.dto.ts +34 -30
  118. package/src/dto/list-contracts.dto.ts +20 -0
  119. package/src/dto/list-departments.dto.ts +8 -0
  120. package/src/dto/list-projects.dto.ts +8 -0
  121. package/src/dto/list-schedule-adjustments.dto.ts +8 -0
  122. package/src/dto/list-time-off-requests.dto.ts +8 -0
  123. package/src/dto/list-timesheets.dto.ts +8 -0
  124. package/src/dto/reorder-collaborator-types.dto.ts +10 -0
  125. package/src/dto/update-collaborator-type.dto.ts +4 -3
  126. package/src/dto/update-collaborator.dto.ts +3 -3
  127. package/src/operations.service.spec.ts +96 -30
  128. package/src/operations.service.ts +1738 -1777
  129. package/hedhog/frontend/app/_components/contract-creation-wizard.tsx.ejs +0 -631
  130. package/hedhog/frontend/app/_components/contract-template-form-screen.tsx.ejs +0 -526
  131. package/hedhog/frontend/app/_components/contract-template-select-with-create.tsx.ejs +0 -247
  132. package/hedhog/frontend/app/_components/contract-wizard-sheet.tsx.ejs +0 -3520
  133. package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +0 -380
  134. package/hedhog/frontend/app/team/page.tsx.ejs +0 -352
  135. package/hedhog/table/operations_contract_financial_term.yaml +0 -40
  136. package/hedhog/table/operations_contract_revision.yaml +0 -38
  137. package/hedhog/table/operations_contract_signature.yaml +0 -38
  138. package/hedhog/table/operations_contract_template.yaml +0 -58
@@ -1,43 +1,43 @@
1
- import { Transform } from 'class-transformer';
2
- import {
3
- IsBoolean,
4
- IsInt,
5
- IsOptional,
6
- IsString,
7
- MaxLength,
8
- } from 'class-validator';
9
-
10
- export class CreateCollaboratorTypeDto {
11
- @IsString()
12
- @MaxLength(120)
13
- name!: string;
14
-
15
- @IsOptional()
16
- @IsString()
17
- @MaxLength(80)
18
- slug?: string | null;
19
-
20
- @IsOptional()
21
- @IsString()
22
- description?: string | null;
23
-
24
- @IsOptional()
25
- @IsString()
26
- @MaxLength(60)
27
- category?: string | null;
28
-
29
- @IsOptional()
30
- @IsBoolean()
31
- isActive?: boolean;
32
-
33
- @IsOptional()
34
- @Transform(({ value }) =>
35
- value === '' || value === undefined || value === null ? undefined : Number(value)
36
- )
37
- @IsInt()
38
- sortOrder?: number | null;
39
-
40
- @IsOptional()
41
- @IsString()
42
- status?: 'active' | 'inactive';
43
- }
1
+ import { Transform } from 'class-transformer';
2
+ import {
3
+ IsBoolean,
4
+ IsInt,
5
+ IsOptional,
6
+ IsString,
7
+ MaxLength,
8
+ } from 'class-validator';
9
+
10
+ export class CreateCollaboratorTypeDto {
11
+ @IsString()
12
+ @MaxLength(120)
13
+ name!: string;
14
+
15
+ @IsOptional()
16
+ @IsString()
17
+ @MaxLength(80)
18
+ slug?: string | null;
19
+
20
+ @IsOptional()
21
+ @IsString()
22
+ description?: string | null;
23
+
24
+ @IsOptional()
25
+ @IsString()
26
+ @MaxLength(60)
27
+ category?: string | null;
28
+
29
+ @IsOptional()
30
+ @IsBoolean()
31
+ isActive?: boolean;
32
+
33
+ @IsOptional()
34
+ @Transform(({ value }) =>
35
+ value === '' || value === undefined || value === null ? undefined : Number(value)
36
+ )
37
+ @IsInt()
38
+ sortOrder?: number | null;
39
+
40
+ @IsOptional()
41
+ @IsString()
42
+ status?: 'active' | 'inactive';
43
+ }
@@ -1,223 +1,223 @@
1
- import { Transform, Type } from 'class-transformer';
2
- import {
3
- IsBoolean,
4
- IsIn,
5
- IsInt,
6
- IsNumber,
7
- IsObject,
8
- IsOptional,
9
- IsString,
10
- MaxLength,
11
- ValidateNested,
12
- } from 'class-validator';
13
-
14
- class CollaboratorWeeklyScheduleDayDto {
15
- @IsString()
16
- @IsIn([
17
- 'monday',
18
- 'tuesday',
19
- 'wednesday',
20
- 'thursday',
21
- 'friday',
22
- 'saturday',
23
- 'sunday',
24
- ])
25
- weekday!:
26
- | 'monday'
27
- | 'tuesday'
28
- | 'wednesday'
29
- | 'thursday'
30
- | 'friday'
31
- | 'saturday'
32
- | 'sunday';
33
-
34
- @IsOptional()
35
- @IsBoolean()
36
- isWorkingDay?: boolean;
37
-
38
- @IsOptional()
39
- @IsString()
40
- startTime?: string | null;
41
-
42
- @IsOptional()
43
- @IsString()
44
- endTime?: string | null;
45
-
46
- @IsOptional()
47
- @Transform(({ value }) =>
48
- value === '' || value === undefined || value === null ? undefined : Number(value)
49
- )
50
- @IsNumber()
51
- breakMinutes?: number | null;
52
- }
53
-
54
- export class CollaboratorEquityParticipationDto {
55
- @IsOptional()
56
- @IsIn([
57
- 'partner_quota_holder',
58
- 'common_shareholder',
59
- 'preferred_shareholder',
60
- 'administrator',
61
- 'other',
62
- ])
63
- participationType?:
64
- | 'partner_quota_holder'
65
- | 'common_shareholder'
66
- | 'preferred_shareholder'
67
- | 'administrator'
68
- | 'other';
69
-
70
- @IsOptional()
71
- @Transform(({ value }) =>
72
- value === '' || value === undefined || value === null ? undefined : Number(value)
73
- )
74
- @IsNumber()
75
- percentage?: number | null;
76
-
77
- @IsOptional()
78
- @Transform(({ value }) =>
79
- value === '' || value === undefined || value === null ? undefined : Number(value)
80
- )
81
- @IsNumber()
82
- votingPower?: number | null;
83
-
84
- @IsOptional()
85
- @IsString()
86
- startDate?: string | null;
87
-
88
- @IsOptional()
89
- @IsString()
90
- endDate?: string | null;
91
-
92
- @IsOptional()
93
- @IsString()
94
- notes?: string | null;
95
- }
96
-
97
- export class CreateCollaboratorDto {
98
- @IsOptional()
99
- @Transform(({ value }) =>
100
- value === '' || value === undefined || value === null ? undefined : Number(value)
101
- )
102
- @IsInt()
103
- userId?: number | null;
104
-
105
- @IsOptional()
106
- @Transform(({ value }) =>
107
- value === '' || value === undefined || value === null ? undefined : Number(value)
108
- )
109
- @IsInt()
110
- personId?: number | null;
111
-
112
- @IsOptional()
113
- @IsString()
114
- @MaxLength(32)
115
- code?: string | null;
116
-
117
- @IsOptional()
118
- @IsString()
119
- @MaxLength(180)
120
- displayName?: string | null;
121
-
122
- @IsOptional()
123
- @Transform(({ value }) =>
124
- value === '' || value === undefined || value === null ? undefined : Number(value)
125
- )
126
- @IsInt()
127
- collaboratorTypeId?: number | null;
128
-
129
- @IsOptional()
130
- @IsString()
131
- @MaxLength(80)
132
- collaboratorTypeSlug?: string | null;
133
-
134
- @IsOptional()
135
- @IsString()
136
- @MaxLength(80)
137
- collaboratorType?: string | null;
138
-
139
- @IsOptional()
140
- @IsString()
141
- @MaxLength(120)
142
- department?: string | null;
143
-
144
- @IsOptional()
145
- @Transform(({ value }) =>
146
- value === '' || value === undefined || value === null ? undefined : Number(value)
147
- )
148
- @IsInt()
149
- departmentId?: number | null;
150
-
151
- @IsOptional()
152
- @Transform(({ value }) =>
153
- value === '' || value === undefined || value === null ? undefined : Number(value)
154
- )
155
- @IsInt()
156
- jobTitleId?: number | null;
157
-
158
- @IsOptional()
159
- @IsString()
160
- @MaxLength(120)
161
- title?: string | null;
162
-
163
- @IsOptional()
164
- @IsString()
165
- @MaxLength(120)
166
- levelLabel?: string | null;
167
-
168
- @IsOptional()
169
- @Transform(({ value }) =>
170
- value === '' || value === undefined || value === null ? undefined : Number(value)
171
- )
172
- @IsInt()
173
- supervisorCollaboratorId?: number | null;
174
-
175
- @IsOptional()
176
- @Transform(({ value }) =>
177
- value === '' || value === undefined || value === null ? undefined : Number(value)
178
- )
179
- @IsNumber()
180
- weeklyCapacityHours?: number | null;
181
-
182
- @IsOptional()
183
- @IsIn(['draft', 'active', 'on_leave', 'inactive'])
184
- status?: 'draft' | 'active' | 'on_leave' | 'inactive';
185
-
186
- @IsOptional()
187
- @IsString()
188
- joinedAt?: string | null;
189
-
190
- @IsOptional()
191
- @IsString()
192
- leftAt?: string | null;
193
-
194
- @IsOptional()
195
- @Transform(({ value }) =>
196
- value === '' || value === undefined || value === null ? undefined : Number(value)
197
- )
198
- @IsNumber()
199
- compensationAmount?: number | null;
200
-
201
- @IsOptional()
202
- @IsString()
203
- contractDescription?: string | null;
204
-
205
- @IsOptional()
206
- @IsBoolean()
207
- autoGenerateContractDraft?: boolean;
208
-
209
- @IsOptional()
210
- @ValidateNested({ each: true })
211
- @Type(() => CollaboratorWeeklyScheduleDayDto)
212
- weeklySchedule?: CollaboratorWeeklyScheduleDayDto[];
213
-
214
- @IsOptional()
215
- @IsObject()
216
- @ValidateNested()
217
- @Type(() => CollaboratorEquityParticipationDto)
218
- equityParticipation?: CollaboratorEquityParticipationDto | null;
219
-
220
- @IsOptional()
221
- @IsString()
222
- notes?: string | null;
223
- }
1
+ import { Transform, Type } from 'class-transformer';
2
+ import {
3
+ IsBoolean,
4
+ IsIn,
5
+ IsInt,
6
+ IsNumber,
7
+ IsObject,
8
+ IsOptional,
9
+ IsString,
10
+ MaxLength,
11
+ ValidateNested,
12
+ } from 'class-validator';
13
+
14
+ class CollaboratorWeeklyScheduleDayDto {
15
+ @IsString()
16
+ @IsIn([
17
+ 'monday',
18
+ 'tuesday',
19
+ 'wednesday',
20
+ 'thursday',
21
+ 'friday',
22
+ 'saturday',
23
+ 'sunday',
24
+ ])
25
+ weekday!:
26
+ | 'monday'
27
+ | 'tuesday'
28
+ | 'wednesday'
29
+ | 'thursday'
30
+ | 'friday'
31
+ | 'saturday'
32
+ | 'sunday';
33
+
34
+ @IsOptional()
35
+ @IsBoolean()
36
+ isWorkingDay?: boolean;
37
+
38
+ @IsOptional()
39
+ @IsString()
40
+ startTime?: string | null;
41
+
42
+ @IsOptional()
43
+ @IsString()
44
+ endTime?: string | null;
45
+
46
+ @IsOptional()
47
+ @Transform(({ value }) =>
48
+ value === '' || value === undefined || value === null ? undefined : Number(value)
49
+ )
50
+ @IsNumber()
51
+ breakMinutes?: number | null;
52
+ }
53
+
54
+ export class CollaboratorEquityParticipationDto {
55
+ @IsOptional()
56
+ @IsIn([
57
+ 'partner_quota_holder',
58
+ 'common_shareholder',
59
+ 'preferred_shareholder',
60
+ 'administrator',
61
+ 'other',
62
+ ])
63
+ participationType?:
64
+ | 'partner_quota_holder'
65
+ | 'common_shareholder'
66
+ | 'preferred_shareholder'
67
+ | 'administrator'
68
+ | 'other';
69
+
70
+ @IsOptional()
71
+ @Transform(({ value }) =>
72
+ value === '' || value === undefined || value === null ? undefined : Number(value)
73
+ )
74
+ @IsNumber()
75
+ percentage?: number | null;
76
+
77
+ @IsOptional()
78
+ @Transform(({ value }) =>
79
+ value === '' || value === undefined || value === null ? undefined : Number(value)
80
+ )
81
+ @IsNumber()
82
+ votingPower?: number | null;
83
+
84
+ @IsOptional()
85
+ @IsString()
86
+ startDate?: string | null;
87
+
88
+ @IsOptional()
89
+ @IsString()
90
+ endDate?: string | null;
91
+
92
+ @IsOptional()
93
+ @IsString()
94
+ notes?: string | null;
95
+ }
96
+
97
+ export class CreateCollaboratorDto {
98
+ @IsOptional()
99
+ @Transform(({ value }) =>
100
+ value === '' || value === undefined || value === null ? undefined : Number(value)
101
+ )
102
+ @IsInt()
103
+ userId?: number | null;
104
+
105
+ @IsOptional()
106
+ @Transform(({ value }) =>
107
+ value === '' || value === undefined || value === null ? undefined : Number(value)
108
+ )
109
+ @IsInt()
110
+ personId?: number | null;
111
+
112
+ @IsOptional()
113
+ @IsString()
114
+ @MaxLength(32)
115
+ code?: string | null;
116
+
117
+ @IsOptional()
118
+ @IsString()
119
+ @MaxLength(180)
120
+ displayName?: string | null;
121
+
122
+ @IsOptional()
123
+ @Transform(({ value }) =>
124
+ value === '' || value === undefined || value === null ? undefined : Number(value)
125
+ )
126
+ @IsInt()
127
+ collaboratorTypeId?: number | null;
128
+
129
+ @IsOptional()
130
+ @IsString()
131
+ @MaxLength(80)
132
+ collaboratorTypeSlug?: string | null;
133
+
134
+ @IsOptional()
135
+ @IsString()
136
+ @MaxLength(80)
137
+ collaboratorType?: string | null;
138
+
139
+ @IsOptional()
140
+ @IsString()
141
+ @MaxLength(120)
142
+ department?: string | null;
143
+
144
+ @IsOptional()
145
+ @Transform(({ value }) =>
146
+ value === '' || value === undefined || value === null ? undefined : Number(value)
147
+ )
148
+ @IsInt()
149
+ departmentId?: number | null;
150
+
151
+ @IsOptional()
152
+ @Transform(({ value }) =>
153
+ value === '' || value === undefined || value === null ? undefined : Number(value)
154
+ )
155
+ @IsInt()
156
+ jobTitleId?: number | null;
157
+
158
+ @IsOptional()
159
+ @IsString()
160
+ @MaxLength(120)
161
+ title?: string | null;
162
+
163
+ @IsOptional()
164
+ @IsString()
165
+ @MaxLength(120)
166
+ levelLabel?: string | null;
167
+
168
+ @IsOptional()
169
+ @Transform(({ value }) =>
170
+ value === '' || value === undefined || value === null ? undefined : Number(value)
171
+ )
172
+ @IsInt()
173
+ supervisorCollaboratorId?: number | null;
174
+
175
+ @IsOptional()
176
+ @Transform(({ value }) =>
177
+ value === '' || value === undefined || value === null ? undefined : Number(value)
178
+ )
179
+ @IsNumber()
180
+ weeklyCapacityHours?: number | null;
181
+
182
+ @IsOptional()
183
+ @IsIn(['draft', 'active', 'on_leave', 'inactive'])
184
+ status?: 'draft' | 'active' | 'on_leave' | 'inactive';
185
+
186
+ @IsOptional()
187
+ @IsString()
188
+ joinedAt?: string | null;
189
+
190
+ @IsOptional()
191
+ @IsString()
192
+ leftAt?: string | null;
193
+
194
+ @IsOptional()
195
+ @Transform(({ value }) =>
196
+ value === '' || value === undefined || value === null ? undefined : Number(value)
197
+ )
198
+ @IsNumber()
199
+ compensationAmount?: number | null;
200
+
201
+ @IsOptional()
202
+ @IsString()
203
+ contractDescription?: string | null;
204
+
205
+ @IsOptional()
206
+ @IsBoolean()
207
+ autoGenerateContractDraft?: boolean;
208
+
209
+ @IsOptional()
210
+ @ValidateNested({ each: true })
211
+ @Type(() => CollaboratorWeeklyScheduleDayDto)
212
+ weeklySchedule?: CollaboratorWeeklyScheduleDayDto[];
213
+
214
+ @IsOptional()
215
+ @IsObject()
216
+ @ValidateNested()
217
+ @Type(() => CollaboratorEquityParticipationDto)
218
+ equityParticipation?: CollaboratorEquityParticipationDto | null;
219
+
220
+ @IsOptional()
221
+ @IsString()
222
+ notes?: string | null;
223
+ }
@@ -0,0 +1,12 @@
1
+ import { PaginationDTO } from '@hed-hog/api-pagination';
2
+ import { IsOptional, IsString } from 'class-validator';
3
+
4
+ export class ListApprovalsDto extends PaginationDTO {
5
+ @IsOptional()
6
+ @IsString()
7
+ status?: string;
8
+
9
+ @IsOptional()
10
+ @IsString()
11
+ targetType?: string;
12
+ }
@@ -1,15 +1,20 @@
1
- import { Transform } from 'class-transformer';
2
- import { IsBoolean, IsOptional } from 'class-validator';
3
-
4
- export class ListCollaboratorTypesDto {
5
- @IsOptional()
6
- @Transform(({ value }) => {
7
- if (value === '' || value === undefined || value === null) {
8
- return undefined;
9
- }
10
-
11
- return value === true || value === 'true' || value === '1';
12
- })
13
- @IsBoolean()
14
- active?: boolean;
15
- }
1
+ import { PaginationDTO } from '@hed-hog/api-pagination';
2
+ import { Transform } from 'class-transformer';
3
+ import { IsBoolean, IsOptional, IsString } from 'class-validator';
4
+
5
+ export class ListCollaboratorTypesDto extends PaginationDTO {
6
+ @IsOptional()
7
+ @Transform(({ value }) => {
8
+ if (value === '' || value === undefined || value === null) {
9
+ return undefined;
10
+ }
11
+
12
+ return value === true || value === 'true' || value === '1';
13
+ })
14
+ @IsBoolean()
15
+ active?: boolean;
16
+
17
+ @IsOptional()
18
+ @IsString()
19
+ status?: string;
20
+ }
@@ -1,30 +1,34 @@
1
- import { PaginationDTO } from '@hed-hog/api-pagination';
2
- import { Transform } from 'class-transformer';
3
- import { IsInt, IsOptional, IsString } from 'class-validator';
4
-
5
- export class ListCollaboratorsDto extends PaginationDTO {
6
- @IsOptional()
7
- @IsString()
8
- status?: string;
9
-
10
- @IsOptional()
11
- @Transform(({ value }) =>
12
- value === '' || value === undefined || value === null ? undefined : Number(value)
13
- )
14
- @IsInt()
15
- collaboratorTypeId?: number;
16
-
17
- @IsOptional()
18
- @Transform(({ value }) =>
19
- value === '' || value === undefined || value === null ? undefined : Number(value)
20
- )
21
- @IsInt()
22
- departmentId?: number;
23
-
24
- @IsOptional()
25
- @Transform(({ value }) =>
26
- value === '' || value === undefined || value === null ? undefined : Number(value)
27
- )
28
- @IsInt()
29
- jobTitleId?: number;
30
- }
1
+ import { PaginationDTO } from '@hed-hog/api-pagination';
2
+ import { Transform } from 'class-transformer';
3
+ import { IsInt, IsOptional, IsString } from 'class-validator';
4
+
5
+ export class ListCollaboratorsDto extends PaginationDTO {
6
+ @IsOptional()
7
+ @IsString()
8
+ status?: string;
9
+
10
+ @IsOptional()
11
+ @IsString()
12
+ collaboratorType?: string;
13
+
14
+ @IsOptional()
15
+ @Transform(({ value }) =>
16
+ value === '' || value === undefined || value === null ? undefined : Number(value)
17
+ )
18
+ @IsInt()
19
+ collaboratorTypeId?: number;
20
+
21
+ @IsOptional()
22
+ @Transform(({ value }) =>
23
+ value === '' || value === undefined || value === null ? undefined : Number(value)
24
+ )
25
+ @IsInt()
26
+ departmentId?: number;
27
+
28
+ @IsOptional()
29
+ @Transform(({ value }) =>
30
+ value === '' || value === undefined || value === null ? undefined : Number(value)
31
+ )
32
+ @IsInt()
33
+ jobTitleId?: number;
34
+ }
@@ -0,0 +1,20 @@
1
+ import { PaginationDTO } from '@hed-hog/api-pagination';
2
+ import { IsBooleanString, IsOptional, IsString } from 'class-validator';
3
+
4
+ export class ListContractsDto extends PaginationDTO {
5
+ @IsOptional()
6
+ @IsString()
7
+ status?: string;
8
+
9
+ @IsOptional()
10
+ @IsString()
11
+ contractCategory?: string;
12
+
13
+ @IsOptional()
14
+ @IsString()
15
+ originType?: string;
16
+
17
+ @IsOptional()
18
+ @IsBooleanString()
19
+ isActive?: string;
20
+ }
@@ -0,0 +1,8 @@
1
+ import { PaginationDTO } from '@hed-hog/api-pagination';
2
+ import { IsOptional, IsString } from 'class-validator';
3
+
4
+ export class ListDepartmentsDto extends PaginationDTO {
5
+ @IsOptional()
6
+ @IsString()
7
+ status?: string;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { PaginationDTO } from '@hed-hog/api-pagination';
2
+ import { IsOptional, IsString } from 'class-validator';
3
+
4
+ export class ListProjectsDto extends PaginationDTO {
5
+ @IsOptional()
6
+ @IsString()
7
+ status?: string;
8
+ }