@hed-hog/operations 0.0.303 → 0.0.305
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/README.md +200 -43
- package/dist/controllers/operations-approvals.controller.d.ts +9 -0
- package/dist/controllers/operations-approvals.controller.d.ts.map +1 -0
- package/dist/controllers/operations-approvals.controller.js +64 -0
- package/dist/controllers/operations-approvals.controller.js.map +1 -0
- package/dist/controllers/operations-collaborators.controller.d.ts +223 -0
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -0
- package/dist/controllers/operations-collaborators.controller.js +96 -0
- package/dist/controllers/operations-collaborators.controller.js.map +1 -0
- package/dist/controllers/operations-contracts.controller.d.ts +683 -0
- package/dist/controllers/operations-contracts.controller.d.ts.map +1 -0
- package/dist/controllers/operations-contracts.controller.js +198 -0
- package/dist/controllers/operations-contracts.controller.js.map +1 -0
- package/dist/controllers/operations-org-structure.controller.d.ts +108 -0
- package/dist/controllers/operations-org-structure.controller.d.ts.map +1 -0
- package/dist/controllers/operations-org-structure.controller.js +143 -0
- package/dist/controllers/operations-org-structure.controller.js.map +1 -0
- package/dist/controllers/operations-projects.controller.d.ts +184 -0
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -0
- package/dist/controllers/operations-projects.controller.js +87 -0
- package/dist/controllers/operations-projects.controller.js.map +1 -0
- package/dist/controllers/operations-tasks.controller.d.ts +85 -0
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -0
- package/dist/controllers/operations-tasks.controller.js +90 -0
- package/dist/controllers/operations-tasks.controller.js.map +1 -0
- package/dist/controllers/operations-timesheets.controller.d.ts +99 -0
- package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -0
- package/dist/controllers/operations-timesheets.controller.js +154 -0
- package/dist/controllers/operations-timesheets.controller.js.map +1 -0
- package/dist/dto/create-collaborator-type.dto.d.ts +10 -0
- package/dist/dto/create-collaborator-type.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator-type.dto.js +56 -0
- package/dist/dto/create-collaborator-type.dto.js.map +1 -0
- package/dist/dto/create-collaborator.dto.d.ts +42 -0
- package/dist/dto/create-collaborator.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator.dto.js +228 -0
- package/dist/dto/create-collaborator.dto.js.map +1 -0
- package/dist/dto/create-schedule-adjustment-request.dto.d.ts +17 -0
- package/dist/dto/create-schedule-adjustment-request.dto.d.ts.map +1 -0
- package/dist/dto/create-schedule-adjustment-request.dto.js +89 -0
- package/dist/dto/create-schedule-adjustment-request.dto.js.map +1 -0
- package/dist/dto/create-task.dto.d.ts +14 -0
- package/dist/dto/create-task.dto.d.ts.map +1 -0
- package/dist/dto/create-task.dto.js +83 -0
- package/dist/dto/create-task.dto.js.map +1 -0
- package/dist/dto/create-time-off-request.dto.d.ts +9 -0
- package/dist/dto/create-time-off-request.dto.d.ts.map +1 -0
- package/dist/dto/create-time-off-request.dto.js +54 -0
- package/dist/dto/create-time-off-request.dto.js.map +1 -0
- package/dist/dto/create-timesheet-entry.dto.d.ts +12 -0
- package/dist/dto/create-timesheet-entry.dto.d.ts.map +1 -0
- package/dist/dto/create-timesheet-entry.dto.js +75 -0
- package/dist/dto/create-timesheet-entry.dto.js.map +1 -0
- package/dist/dto/list-collaborator-types.dto.d.ts +4 -0
- package/dist/dto/list-collaborator-types.dto.d.ts.map +1 -0
- package/dist/dto/list-collaborator-types.dto.js +29 -0
- package/dist/dto/list-collaborator-types.dto.js.map +1 -0
- package/dist/dto/list-collaborators.dto.d.ts +8 -0
- package/dist/dto/list-collaborators.dto.d.ts.map +1 -0
- package/dist/dto/list-collaborators.dto.js +42 -0
- package/dist/dto/list-collaborators.dto.js.map +1 -0
- package/dist/dto/list-project-options.dto.d.ts +4 -0
- package/dist/dto/list-project-options.dto.d.ts.map +1 -0
- package/dist/dto/list-project-options.dto.js +8 -0
- package/dist/dto/list-project-options.dto.js.map +1 -0
- package/dist/dto/list-tasks.dto.d.ts +7 -0
- package/dist/dto/list-tasks.dto.d.ts.map +1 -0
- package/dist/dto/list-tasks.dto.js +38 -0
- package/dist/dto/list-tasks.dto.js.map +1 -0
- package/dist/dto/list-timesheet-entries.dto.d.ts +10 -0
- package/dist/dto/list-timesheet-entries.dto.d.ts.map +1 -0
- package/dist/dto/list-timesheet-entries.dto.js +54 -0
- package/dist/dto/list-timesheet-entries.dto.js.map +1 -0
- package/dist/dto/update-collaborator-type.dto.d.ts +4 -0
- package/dist/dto/update-collaborator-type.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator-type.dto.js +8 -0
- package/dist/dto/update-collaborator-type.dto.js.map +1 -0
- package/dist/dto/update-collaborator.dto.d.ts +4 -0
- package/dist/dto/update-collaborator.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator.dto.js +8 -0
- package/dist/dto/update-collaborator.dto.js.map +1 -0
- package/dist/dto/update-task.dto.d.ts +14 -0
- package/dist/dto/update-task.dto.d.ts.map +1 -0
- package/dist/dto/update-task.dto.js +84 -0
- package/dist/dto/update-task.dto.js.map +1 -0
- package/dist/operations.controller.d.ts +0 -1045
- package/dist/operations.controller.d.ts.map +1 -1
- package/dist/operations.controller.js +0 -429
- package/dist/operations.controller.js.map +1 -1
- package/dist/operations.module.d.ts.map +1 -1
- package/dist/operations.module.js +23 -2
- package/dist/operations.module.js.map +1 -1
- package/dist/operations.service.d.ts +429 -8
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1931 -165
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +315 -1
- package/dist/operations.service.spec.js.map +1 -1
- package/dist/services/shared/operations-access.service.d.ts +16 -0
- package/dist/services/shared/operations-access.service.d.ts.map +1 -0
- package/dist/services/shared/operations-access.service.js +48 -0
- package/dist/services/shared/operations-access.service.js.map +1 -0
- package/hedhog/data/dashboard.yaml +20 -0
- package/hedhog/data/dashboard_component.yaml +274 -0
- package/hedhog/data/dashboard_component_role.yaml +174 -0
- package/hedhog/data/dashboard_item.yaml +299 -0
- package/hedhog/data/dashboard_role.yaml +20 -0
- package/hedhog/data/menu.yaml +30 -13
- package/hedhog/data/operations_collaborator_type.yaml +76 -0
- package/hedhog/data/route.yaml +196 -0
- package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +231 -0
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +125 -40
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +740 -106
- 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/department-select-with-create.tsx.ejs +38 -16
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +1504 -52
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +1017 -649
- 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 +213 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +30 -1
- package/hedhog/frontend/app/_lib/types.ts.ejs +147 -39
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +40 -9
- package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +48 -1
- package/hedhog/frontend/app/approvals/page.tsx.ejs +116 -98
- package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +502 -0
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +116 -72
- package/hedhog/frontend/app/contracts/page.tsx.ejs +938 -938
- package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +11 -9
- package/hedhog/frontend/app/departments/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/projects/page.tsx.ejs +364 -133
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +244 -120
- package/hedhog/frontend/app/team/page.tsx.ejs +15 -2
- package/hedhog/frontend/app/time-off/page.tsx.ejs +158 -82
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +814 -357
- package/hedhog/frontend/messages/en.json +268 -53
- package/hedhog/frontend/messages/pt.json +484 -271
- package/hedhog/table/operations_collaborator.yaml +26 -13
- package/hedhog/table/operations_collaborator_equity_participation.yaml +43 -0
- package/hedhog/table/operations_collaborator_type.yaml +33 -0
- package/hedhog/table/operations_job_title.yaml +24 -0
- package/hedhog/table/operations_project.yaml +9 -0
- package/hedhog/table/operations_project_assignment.yaml +9 -0
- package/hedhog/table/operations_project_role.yaml +39 -0
- package/hedhog/table/operations_task.yaml +69 -0
- package/hedhog/table/operations_timesheet_entry.yaml +12 -0
- package/package.json +6 -6
- package/src/controllers/operations-approvals.controller.ts +24 -0
- package/src/controllers/operations-collaborators.controller.ts +60 -0
- package/src/controllers/operations-contracts.controller.ts +138 -0
- package/src/controllers/operations-org-structure.controller.ts +92 -0
- package/src/controllers/operations-projects.controller.ts +50 -0
- package/src/controllers/operations-tasks.controller.ts +63 -0
- package/src/controllers/operations-timesheets.controller.ts +100 -0
- package/src/dto/create-collaborator-type.dto.ts +43 -0
- package/src/dto/create-collaborator.dto.ts +223 -0
- package/src/dto/create-schedule-adjustment-request.dto.ts +91 -0
- package/src/dto/create-task.dto.ts +75 -0
- package/src/dto/create-time-off-request.dto.ts +53 -0
- package/src/dto/create-timesheet-entry.dto.ts +67 -0
- package/src/dto/list-collaborator-types.dto.ts +15 -0
- package/src/dto/list-collaborators.dto.ts +30 -0
- package/src/dto/list-project-options.dto.ts +3 -0
- package/src/dto/list-tasks.dto.ts +25 -0
- package/src/dto/list-timesheet-entries.dto.ts +40 -0
- package/src/dto/update-collaborator-type.dto.ts +3 -0
- package/src/dto/update-collaborator.dto.ts +3 -0
- package/src/dto/update-task.dto.ts +76 -0
- package/src/operations.controller.ts +1 -278
- package/src/operations.module.ts +23 -2
- package/src/operations.service.spec.ts +450 -0
- package/src/operations.service.ts +4507 -1561
- package/src/services/shared/operations-access.service.ts +52 -0
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
|
|
24
24
|
import { useApp, useQuery } from '@hed-hog/next-app-provider';
|
|
25
25
|
import {
|
|
26
|
-
Building2,
|
|
27
26
|
CalendarDays,
|
|
28
27
|
FileText,
|
|
29
28
|
LayoutGrid,
|
|
@@ -43,8 +42,12 @@ import { OperationsHeader } from '../_components/operations-header';
|
|
|
43
42
|
import { StatusBadge } from '../_components/status-badge';
|
|
44
43
|
import { fetchOperations, mutateOperations } from '../_lib/api';
|
|
45
44
|
import { useOperationsAccess } from '../_lib/hooks/use-operations-access';
|
|
46
|
-
import type {
|
|
45
|
+
import type {
|
|
46
|
+
OperationsCollaborator,
|
|
47
|
+
OperationsCollaboratorType,
|
|
48
|
+
} from '../_lib/types';
|
|
47
49
|
import {
|
|
50
|
+
formatCurrency,
|
|
48
51
|
formatDate,
|
|
49
52
|
formatEnumLabel,
|
|
50
53
|
formatHours,
|
|
@@ -136,23 +139,6 @@ export default function OperationsCollaboratorsPage() {
|
|
|
136
139
|
}
|
|
137
140
|
};
|
|
138
141
|
|
|
139
|
-
const getCollaboratorTypeLabel = (value?: string | null) => {
|
|
140
|
-
switch (value) {
|
|
141
|
-
case 'clt':
|
|
142
|
-
return formT('options.collaboratorTypes.clt');
|
|
143
|
-
case 'pj':
|
|
144
|
-
return formT('options.collaboratorTypes.pj');
|
|
145
|
-
case 'freelancer':
|
|
146
|
-
return formT('options.collaboratorTypes.freelancer');
|
|
147
|
-
case 'intern':
|
|
148
|
-
return formT('options.collaboratorTypes.intern');
|
|
149
|
-
case 'other':
|
|
150
|
-
return formT('options.collaboratorTypes.other');
|
|
151
|
-
default:
|
|
152
|
-
return formatEnumLabel(value);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
|
|
156
142
|
const getStatusLabel = (value?: string | null) => {
|
|
157
143
|
switch (value) {
|
|
158
144
|
case 'active':
|
|
@@ -180,6 +166,30 @@ export default function OperationsCollaboratorsPage() {
|
|
|
180
166
|
),
|
|
181
167
|
});
|
|
182
168
|
|
|
169
|
+
const { data: collaboratorTypes = [] } = useQuery<
|
|
170
|
+
OperationsCollaboratorType[]
|
|
171
|
+
>({
|
|
172
|
+
queryKey: ['operations-collaborator-types-list', currentLocaleCode],
|
|
173
|
+
enabled: access.isCollaborator,
|
|
174
|
+
queryFn: () =>
|
|
175
|
+
fetchOperations<OperationsCollaboratorType[]>(
|
|
176
|
+
request,
|
|
177
|
+
'/operations/collaborator-types?active=true'
|
|
178
|
+
),
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
const getCollaboratorTypeLabel = (
|
|
182
|
+
slug?: string | null,
|
|
183
|
+
fallbackName?: string | null
|
|
184
|
+
) => {
|
|
185
|
+
if (fallbackName) {
|
|
186
|
+
return fallbackName;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const matchedType = collaboratorTypes.find((item) => item.slug === slug);
|
|
190
|
+
return matchedType?.name ?? formatEnumLabel(slug);
|
|
191
|
+
};
|
|
192
|
+
|
|
183
193
|
const filteredRows = useMemo(
|
|
184
194
|
() =>
|
|
185
195
|
collaborators.filter((item) => {
|
|
@@ -201,7 +211,10 @@ export default function OperationsCollaboratorsPage() {
|
|
|
201
211
|
const matchesStatus =
|
|
202
212
|
statusFilter === 'all' ? true : item.status === statusFilter;
|
|
203
213
|
const matchesType =
|
|
204
|
-
typeFilter === 'all'
|
|
214
|
+
typeFilter === 'all'
|
|
215
|
+
? true
|
|
216
|
+
: item.collaboratorTypeSlug === typeFilter ||
|
|
217
|
+
item.collaboratorType === typeFilter;
|
|
205
218
|
return matchesSearch && matchesStatus && matchesType;
|
|
206
219
|
}),
|
|
207
220
|
[collaborators, search, statusFilter, typeFilter]
|
|
@@ -212,18 +225,21 @@ export default function OperationsCollaboratorsPage() {
|
|
|
212
225
|
{
|
|
213
226
|
key: 'total',
|
|
214
227
|
title: t('cards.total'),
|
|
228
|
+
description: t('cards.totalDescription'),
|
|
215
229
|
value: collaborators.length,
|
|
216
230
|
icon: Users,
|
|
217
231
|
},
|
|
218
232
|
{
|
|
219
233
|
key: 'active',
|
|
220
234
|
title: t('cards.active'),
|
|
235
|
+
description: t('cards.activeDescription'),
|
|
221
236
|
value: collaborators.filter((item) => item.status === 'active').length,
|
|
222
237
|
icon: UserCheck,
|
|
223
238
|
},
|
|
224
239
|
{
|
|
225
240
|
key: 'onLeave',
|
|
226
241
|
title: t('cards.onLeave'),
|
|
242
|
+
description: t('cards.onLeaveDescription'),
|
|
227
243
|
value: collaborators.filter((item) => item.status === 'on_leave')
|
|
228
244
|
.length,
|
|
229
245
|
icon: CalendarDays,
|
|
@@ -231,6 +247,7 @@ export default function OperationsCollaboratorsPage() {
|
|
|
231
247
|
{
|
|
232
248
|
key: 'withContracts',
|
|
233
249
|
title: t('cards.withContracts'),
|
|
250
|
+
description: t('cards.withContractsDescription'),
|
|
234
251
|
value: collaborators.filter((item) => Boolean(item.contractId)).length,
|
|
235
252
|
icon: FileText,
|
|
236
253
|
},
|
|
@@ -277,12 +294,6 @@ export default function OperationsCollaboratorsPage() {
|
|
|
277
294
|
actions={
|
|
278
295
|
access.isDirector ? (
|
|
279
296
|
<div className="flex flex-wrap gap-2">
|
|
280
|
-
<Button variant="outline" size="sm" asChild>
|
|
281
|
-
<Link href="/operations/departments">
|
|
282
|
-
<Building2 className="size-4" />
|
|
283
|
-
{commonT('actions.manageDepartments')}
|
|
284
|
-
</Link>
|
|
285
|
-
</Button>
|
|
286
297
|
<Button size="sm" onClick={openCreateSheet}>
|
|
287
298
|
{commonT('actions.create')}
|
|
288
299
|
</Button>
|
|
@@ -309,17 +320,10 @@ export default function OperationsCollaboratorsPage() {
|
|
|
309
320
|
placeholder: commonT('labels.collaboratorType'),
|
|
310
321
|
options: [
|
|
311
322
|
{ value: 'all', label: commonT('filters.allTypes') },
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
label: getCollaboratorTypeLabel('freelancer'),
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
value: 'intern',
|
|
320
|
-
label: getCollaboratorTypeLabel('intern'),
|
|
321
|
-
},
|
|
322
|
-
{ value: 'other', label: getCollaboratorTypeLabel('other') },
|
|
323
|
+
...collaboratorTypes.map((item) => ({
|
|
324
|
+
value: item.slug,
|
|
325
|
+
label: item.name,
|
|
326
|
+
})),
|
|
323
327
|
],
|
|
324
328
|
},
|
|
325
329
|
{
|
|
@@ -377,7 +381,8 @@ export default function OperationsCollaboratorsPage() {
|
|
|
377
381
|
{filteredRows.map((collaborator) => (
|
|
378
382
|
<Card
|
|
379
383
|
key={collaborator.id}
|
|
380
|
-
className="overflow-hidden border-border/60 py-0 shadow-sm transition-all hover:-translate-y-0.5 hover:shadow-md"
|
|
384
|
+
className="cursor-pointer overflow-hidden border-border/60 py-0 shadow-sm transition-all hover:-translate-y-0.5 hover:shadow-md"
|
|
385
|
+
onClick={() => openEditSheet(collaborator.id)}
|
|
381
386
|
>
|
|
382
387
|
<CardContent className="space-y-4 p-4">
|
|
383
388
|
<div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
|
@@ -410,7 +415,11 @@ export default function OperationsCollaboratorsPage() {
|
|
|
410
415
|
|
|
411
416
|
<div className="flex flex-wrap gap-2">
|
|
412
417
|
<span className="inline-flex items-center rounded-full bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary">
|
|
413
|
-
{getCollaboratorTypeLabel(
|
|
418
|
+
{getCollaboratorTypeLabel(
|
|
419
|
+
collaborator.collaboratorTypeSlug ??
|
|
420
|
+
collaborator.collaboratorType,
|
|
421
|
+
collaborator.collaboratorTypeName
|
|
422
|
+
)}
|
|
414
423
|
</span>
|
|
415
424
|
{collaborator.department ? (
|
|
416
425
|
<span className="inline-flex items-center rounded-full bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground">
|
|
@@ -433,6 +442,16 @@ export default function OperationsCollaboratorsPage() {
|
|
|
433
442
|
</span>{' '}
|
|
434
443
|
{formatHours(collaborator.weeklyCapacityHours)}
|
|
435
444
|
</div>
|
|
445
|
+
<div>
|
|
446
|
+
<span className="font-medium text-foreground">
|
|
447
|
+
{formT('fields.compensationAmount')}:
|
|
448
|
+
</span>{' '}
|
|
449
|
+
{collaborator.compensationAmount != null
|
|
450
|
+
? formatCurrency(
|
|
451
|
+
Number(collaborator.compensationAmount)
|
|
452
|
+
)
|
|
453
|
+
: commonT('labels.notAvailable')}
|
|
454
|
+
</div>
|
|
436
455
|
<div>
|
|
437
456
|
<span className="font-medium text-foreground">
|
|
438
457
|
{commonT('labels.startDate')}:
|
|
@@ -443,22 +462,21 @@ export default function OperationsCollaboratorsPage() {
|
|
|
443
462
|
currentLocaleCode
|
|
444
463
|
)}
|
|
445
464
|
</div>
|
|
446
|
-
|
|
465
|
+
</div>
|
|
466
|
+
|
|
467
|
+
{collaborator.contractStatus ? (
|
|
468
|
+
<div className="flex items-center gap-2 text-xs text-muted-foreground">
|
|
447
469
|
<span className="font-medium text-foreground">
|
|
448
470
|
{commonT('labels.contractStatus')}:
|
|
449
471
|
</span>
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
/>
|
|
457
|
-
) : (
|
|
458
|
-
<span>{commonT('labels.notAssigned')}</span>
|
|
459
|
-
)}
|
|
472
|
+
<StatusBadge
|
|
473
|
+
label={getStatusLabel(collaborator.contractStatus)}
|
|
474
|
+
className={getStatusBadgeClass(
|
|
475
|
+
collaborator.contractStatus
|
|
476
|
+
)}
|
|
477
|
+
/>
|
|
460
478
|
</div>
|
|
461
|
-
|
|
479
|
+
) : null}
|
|
462
480
|
|
|
463
481
|
<div className="flex flex-wrap justify-end gap-2 border-t border-border/60 pt-3">
|
|
464
482
|
{access.isDirector ? (
|
|
@@ -530,9 +548,9 @@ export default function OperationsCollaboratorsPage() {
|
|
|
530
548
|
{commonT('labels.weeklyCapacity')}
|
|
531
549
|
</TableHead>
|
|
532
550
|
<TableHead className="hidden 2xl:table-cell">
|
|
533
|
-
{
|
|
551
|
+
{formT('fields.compensationAmount')}
|
|
534
552
|
</TableHead>
|
|
535
|
-
<TableHead className="hidden
|
|
553
|
+
<TableHead className="hidden xl:table-cell">
|
|
536
554
|
{commonT('labels.startDate')}
|
|
537
555
|
</TableHead>
|
|
538
556
|
<TableHead className="w-30 text-right sm:w-42.5">
|
|
@@ -542,7 +560,11 @@ export default function OperationsCollaboratorsPage() {
|
|
|
542
560
|
</TableHeader>
|
|
543
561
|
<TableBody>
|
|
544
562
|
{filteredRows.map((collaborator) => (
|
|
545
|
-
<TableRow
|
|
563
|
+
<TableRow
|
|
564
|
+
key={collaborator.id}
|
|
565
|
+
className="cursor-pointer hover:bg-muted/30"
|
|
566
|
+
onClick={() => openEditSheet(collaborator.id)}
|
|
567
|
+
>
|
|
546
568
|
<TableCell>
|
|
547
569
|
<div className="flex items-center gap-3">
|
|
548
570
|
<Avatar className="h-9 w-9 border border-border/60 bg-muted">
|
|
@@ -561,19 +583,46 @@ export default function OperationsCollaboratorsPage() {
|
|
|
561
583
|
{collaborator.displayName}
|
|
562
584
|
</div>
|
|
563
585
|
<div className="truncate text-xs text-muted-foreground">
|
|
564
|
-
{[
|
|
565
|
-
collaborator.code,
|
|
566
|
-
collaborator.department,
|
|
567
|
-
collaborator.title,
|
|
568
|
-
]
|
|
586
|
+
{[collaborator.code, collaborator.department]
|
|
569
587
|
.filter(Boolean)
|
|
570
|
-
.join(' • ')
|
|
588
|
+
.join(' • ') ||
|
|
589
|
+
collaborator.title ||
|
|
590
|
+
commonT('labels.notAvailable')}
|
|
591
|
+
</div>
|
|
592
|
+
<div className="mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground lg:hidden">
|
|
593
|
+
<span>
|
|
594
|
+
<span className="font-medium text-foreground/80">
|
|
595
|
+
{commonT('labels.supervisor')}:
|
|
596
|
+
</span>{' '}
|
|
597
|
+
{collaborator.supervisorName ||
|
|
598
|
+
commonT('labels.notAssigned')}
|
|
599
|
+
</span>
|
|
600
|
+
<span>
|
|
601
|
+
<span className="font-medium text-foreground/80">
|
|
602
|
+
{commonT('labels.weeklyCapacity')}:
|
|
603
|
+
</span>{' '}
|
|
604
|
+
{formatHours(collaborator.weeklyCapacityHours)}
|
|
605
|
+
</span>
|
|
606
|
+
<span>
|
|
607
|
+
<span className="font-medium text-foreground/80">
|
|
608
|
+
{commonT('labels.startDate')}:
|
|
609
|
+
</span>{' '}
|
|
610
|
+
{formatDate(
|
|
611
|
+
collaborator.joinedAt,
|
|
612
|
+
getSettingValue,
|
|
613
|
+
currentLocaleCode
|
|
614
|
+
)}
|
|
615
|
+
</span>
|
|
571
616
|
</div>
|
|
572
617
|
</div>
|
|
573
618
|
</div>
|
|
574
619
|
</TableCell>
|
|
575
620
|
<TableCell className="hidden md:table-cell">
|
|
576
|
-
{getCollaboratorTypeLabel(
|
|
621
|
+
{getCollaboratorTypeLabel(
|
|
622
|
+
collaborator.collaboratorTypeSlug ??
|
|
623
|
+
collaborator.collaboratorType,
|
|
624
|
+
collaborator.collaboratorTypeName
|
|
625
|
+
)}
|
|
577
626
|
</TableCell>
|
|
578
627
|
<TableCell className="hidden max-w-55 sm:table-cell">
|
|
579
628
|
<div className="truncate">
|
|
@@ -598,18 +647,13 @@ export default function OperationsCollaboratorsPage() {
|
|
|
598
647
|
{formatHours(collaborator.weeklyCapacityHours)}
|
|
599
648
|
</TableCell>
|
|
600
649
|
<TableCell className="hidden 2xl:table-cell">
|
|
601
|
-
{collaborator.
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
)}
|
|
607
|
-
/>
|
|
608
|
-
) : (
|
|
609
|
-
commonT('labels.notAssigned')
|
|
610
|
-
)}
|
|
650
|
+
{collaborator.compensationAmount != null
|
|
651
|
+
? formatCurrency(
|
|
652
|
+
Number(collaborator.compensationAmount)
|
|
653
|
+
)
|
|
654
|
+
: commonT('labels.notAvailable')}
|
|
611
655
|
</TableCell>
|
|
612
|
-
<TableCell className="hidden
|
|
656
|
+
<TableCell className="hidden xl:table-cell">
|
|
613
657
|
{formatDate(
|
|
614
658
|
collaborator.joinedAt,
|
|
615
659
|
getSettingValue,
|