@hed-hog/operations 0.0.304 → 0.0.306
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.
- package/dist/controllers/operations-projects.controller.d.ts +15 -0
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
- package/dist/controllers/operations-tasks.controller.d.ts +41 -10
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -1
- package/dist/controllers/operations-tasks.controller.js +11 -0
- package/dist/controllers/operations-tasks.controller.js.map +1 -1
- package/dist/controllers/operations-timesheets.controller.d.ts +21 -0
- package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -1
- package/dist/controllers/operations-timesheets.controller.js +12 -0
- package/dist/controllers/operations-timesheets.controller.js.map +1 -1
- package/dist/dto/create-task.dto.d.ts +7 -1
- package/dist/dto/create-task.dto.d.ts.map +1 -1
- package/dist/dto/create-task.dto.js +38 -5
- package/dist/dto/create-task.dto.js.map +1 -1
- package/dist/dto/list-tasks.dto.d.ts +1 -1
- package/dist/dto/list-tasks.dto.d.ts.map +1 -1
- package/dist/dto/list-tasks.dto.js +2 -2
- package/dist/dto/list-tasks.dto.js.map +1 -1
- package/dist/dto/update-collaborator-type.dto.d.ts +3 -1
- package/dist/dto/update-collaborator-type.dto.d.ts.map +1 -1
- package/dist/dto/update-collaborator-type.dto.js +2 -1
- package/dist/dto/update-collaborator-type.dto.js.map +1 -1
- package/dist/dto/update-task.dto.d.ts +7 -1
- package/dist/dto/update-task.dto.d.ts.map +1 -1
- package/dist/dto/update-task.dto.js +38 -5
- package/dist/dto/update-task.dto.js.map +1 -1
- package/dist/operations.service.d.ts +90 -12
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +560 -148
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +73 -0
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/menu.yaml +26 -26
- package/hedhog/data/operations_collaborator_type.yaml +76 -76
- package/hedhog/data/route.yaml +26 -0
- package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +5 -3
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +44 -44
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +168 -213
- package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +256 -256
- package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +7 -7
- package/hedhog/frontend/app/_components/contract-template-form-screen.tsx.ejs +306 -306
- package/hedhog/frontend/app/_components/contract-template-select-with-create.tsx.ejs +247 -247
- package/hedhog/frontend/app/_components/contract-wizard-sheet.tsx.ejs +3520 -3520
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +1504 -52
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +528 -403
- package/hedhog/frontend/app/_components/section-card.tsx.ejs +25 -18
- package/hedhog/frontend/app/_components/system-user-select-with-create.tsx.ejs +609 -0
- package/hedhog/frontend/app/_components/timesheet-task-create-sheet.tsx.ejs +1 -0
- package/hedhog/frontend/app/_lib/types.ts.ejs +5 -0
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +7 -7
- package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +48 -1
- package/hedhog/frontend/app/approvals/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +513 -502
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +10 -7
- package/hedhog/frontend/app/contracts/page.tsx.ejs +938 -938
- package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/projects/page.tsx.ejs +360 -133
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +235 -72
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +344 -134
- package/hedhog/frontend/messages/en.json +32 -4
- package/hedhog/frontend/messages/pt.json +34 -6
- package/hedhog/table/operations_collaborator.yaml +18 -18
- package/hedhog/table/operations_collaborator_equity_participation.yaml +43 -43
- package/hedhog/table/operations_collaborator_type.yaml +33 -33
- package/hedhog/table/operations_contract_document.yaml +33 -33
- package/hedhog/table/operations_project.yaml +9 -0
- package/hedhog/table/operations_task.yaml +43 -4
- package/package.json +6 -6
- package/src/controllers/operations-tasks.controller.ts +11 -0
- package/src/controllers/operations-timesheets.controller.ts +13 -0
- package/src/dto/create-collaborator-type.dto.ts +43 -43
- package/src/dto/create-collaborator.dto.ts +223 -223
- package/src/dto/create-task.dto.ts +47 -7
- package/src/dto/list-collaborator-types.dto.ts +15 -15
- package/src/dto/list-collaborators.dto.ts +30 -30
- package/src/dto/list-tasks.dto.ts +3 -3
- package/src/dto/update-collaborator-type.dto.ts +4 -3
- package/src/dto/update-collaborator.dto.ts +3 -3
- package/src/dto/update-task.dto.ts +47 -7
- package/src/operations.service.spec.ts +96 -0
- package/src/operations.service.ts +813 -135
|
@@ -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
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Transform } from 'class-transformer';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IsIn,
|
|
4
|
+
IsInt,
|
|
5
|
+
IsNumber,
|
|
6
|
+
IsOptional,
|
|
7
|
+
IsString,
|
|
8
|
+
MaxLength,
|
|
9
|
+
} from 'class-validator';
|
|
3
10
|
|
|
4
11
|
export class CreateOperationsTaskDto {
|
|
5
12
|
@IsOptional()
|
|
@@ -16,20 +23,53 @@ export class CreateOperationsTaskDto {
|
|
|
16
23
|
@IsInt({ message: 'projectAssignmentId must be an integer' })
|
|
17
24
|
projectAssignmentId?: number;
|
|
18
25
|
|
|
26
|
+
@IsOptional()
|
|
27
|
+
@Transform(({ value }) =>
|
|
28
|
+
value === '' || value === undefined || value === null ? undefined : Number(value)
|
|
29
|
+
)
|
|
30
|
+
@IsInt({ message: 'assigneeCollaboratorId must be an integer' })
|
|
31
|
+
assigneeCollaboratorId?: number;
|
|
32
|
+
|
|
19
33
|
@IsString({ message: 'name must be a string' })
|
|
20
34
|
@MaxLength(180, { message: 'name must have at most 180 characters' })
|
|
21
35
|
name!: string;
|
|
22
36
|
|
|
23
37
|
@IsOptional()
|
|
24
38
|
@IsString({ message: 'description must be a string' })
|
|
25
|
-
@MaxLength(
|
|
26
|
-
message: 'description must have at most 500 characters',
|
|
27
|
-
})
|
|
39
|
+
@MaxLength(2000, { message: 'description must have at most 2000 characters' })
|
|
28
40
|
description?: string;
|
|
29
41
|
|
|
30
42
|
@IsOptional()
|
|
31
|
-
@IsIn(['
|
|
32
|
-
message: '
|
|
43
|
+
@IsIn(['low', 'medium', 'high'], {
|
|
44
|
+
message: 'priority must be low, medium, or high',
|
|
33
45
|
})
|
|
34
|
-
|
|
46
|
+
priority?: 'low' | 'medium' | 'high';
|
|
47
|
+
|
|
48
|
+
@IsOptional()
|
|
49
|
+
@IsIn(['todo', 'doing', 'review', 'done'], {
|
|
50
|
+
message: 'status must be todo, doing, review, or done',
|
|
51
|
+
})
|
|
52
|
+
status?: 'todo' | 'doing' | 'review' | 'done';
|
|
53
|
+
|
|
54
|
+
@IsOptional()
|
|
55
|
+
@IsString({ message: 'dueDate must be a string' })
|
|
56
|
+
dueDate?: string;
|
|
57
|
+
|
|
58
|
+
@IsOptional()
|
|
59
|
+
@Transform(({ value }) =>
|
|
60
|
+
value === '' || value === undefined || value === null ? undefined : Number(value)
|
|
61
|
+
)
|
|
62
|
+
@IsNumber({}, { message: 'estimateHours must be a number' })
|
|
63
|
+
estimateHours?: number;
|
|
64
|
+
|
|
65
|
+
@IsOptional()
|
|
66
|
+
@Transform(({ value }) =>
|
|
67
|
+
value === '' || value === undefined || value === null ? undefined : Number(value)
|
|
68
|
+
)
|
|
69
|
+
@IsInt({ message: 'position must be an integer' })
|
|
70
|
+
position?: number;
|
|
71
|
+
|
|
72
|
+
@IsOptional()
|
|
73
|
+
@IsString({ message: 'tags must be a string' })
|
|
74
|
+
tags?: string;
|
|
35
75
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
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 { 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
|
+
}
|