@hed-hog/operations 0.0.322 → 0.0.325
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-collaborators.controller.d.ts +9 -0
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
- package/dist/controllers/operations-collaborators.controller.js +25 -0
- package/dist/controllers/operations-collaborators.controller.js.map +1 -1
- package/dist/controllers/operations-project-costs.controller.d.ts +422 -0
- package/dist/controllers/operations-project-costs.controller.d.ts.map +1 -0
- package/dist/controllers/operations-project-costs.controller.js +250 -0
- package/dist/controllers/operations-project-costs.controller.js.map +1 -0
- package/dist/controllers/operations-reports.controller.d.ts +9 -0
- package/dist/controllers/operations-reports.controller.d.ts.map +1 -1
- package/dist/controllers/operations-tasks.controller.d.ts +42 -0
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -1
- package/dist/controllers/operations-tasks.controller.js +48 -0
- package/dist/controllers/operations-tasks.controller.js.map +1 -1
- package/dist/controllers/operations-timesheets.controller.d.ts +1 -0
- package/dist/controllers/operations-timesheets.controller.d.ts.map +1 -1
- package/dist/dto/create-collaborator-project-assignment.dto.d.ts +5 -0
- package/dist/dto/create-collaborator-project-assignment.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator-project-assignment.dto.js +30 -0
- package/dist/dto/create-collaborator-project-assignment.dto.js.map +1 -0
- package/dist/dto/create-project-cost-category.dto.d.ts +10 -0
- package/dist/dto/create-project-cost-category.dto.d.ts.map +1 -0
- package/dist/dto/create-project-cost-category.dto.js +59 -0
- package/dist/dto/create-project-cost-category.dto.js.map +1 -0
- package/dist/dto/create-project-cost-type.dto.d.ts +14 -0
- package/dist/dto/create-project-cost-type.dto.d.ts.map +1 -0
- package/dist/dto/create-project-cost-type.dto.js +87 -0
- package/dist/dto/create-project-cost-type.dto.js.map +1 -0
- package/dist/dto/create-project-cost.dto.d.ts +22 -0
- package/dist/dto/create-project-cost.dto.d.ts.map +1 -0
- package/dist/dto/create-project-cost.dto.js +135 -0
- package/dist/dto/create-project-cost.dto.js.map +1 -0
- package/dist/dto/get-project-cost-report.dto.d.ts +10 -0
- package/dist/dto/get-project-cost-report.dto.d.ts.map +1 -0
- package/dist/dto/get-project-cost-report.dto.js +65 -0
- package/dist/dto/get-project-cost-report.dto.js.map +1 -0
- package/dist/dto/list-project-cost-categories.dto.d.ts +6 -0
- package/dist/dto/list-project-cost-categories.dto.d.ts.map +1 -0
- package/dist/dto/list-project-cost-categories.dto.js +34 -0
- package/dist/dto/list-project-cost-categories.dto.js.map +1 -0
- package/dist/dto/list-project-cost-types.dto.d.ts +8 -0
- package/dist/dto/list-project-cost-types.dto.d.ts.map +1 -0
- package/dist/dto/list-project-cost-types.dto.js +45 -0
- package/dist/dto/list-project-cost-types.dto.js.map +1 -0
- package/dist/dto/list-project-costs.dto.d.ts +14 -0
- package/dist/dto/list-project-costs.dto.d.ts.map +1 -0
- package/dist/dto/list-project-costs.dto.js +81 -0
- package/dist/dto/list-project-costs.dto.js.map +1 -0
- package/dist/dto/list-tasks.dto.d.ts +1 -0
- package/dist/dto/list-tasks.dto.d.ts.map +1 -1
- package/dist/dto/list-tasks.dto.js +6 -0
- package/dist/dto/list-tasks.dto.js.map +1 -1
- package/dist/dto/list-timesheets.dto.d.ts +1 -0
- package/dist/dto/list-timesheets.dto.d.ts.map +1 -1
- package/dist/dto/list-timesheets.dto.js +7 -0
- package/dist/dto/list-timesheets.dto.js.map +1 -1
- package/dist/dto/update-collaborator-project-assignment.dto.d.ts +11 -0
- package/dist/dto/update-collaborator-project-assignment.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator-project-assignment.dto.js +65 -0
- package/dist/dto/update-collaborator-project-assignment.dto.js.map +1 -0
- package/dist/dto/update-project-cost-category.dto.d.ts +6 -0
- package/dist/dto/update-project-cost-category.dto.d.ts.map +1 -0
- package/dist/dto/update-project-cost-category.dto.js +9 -0
- package/dist/dto/update-project-cost-category.dto.js.map +1 -0
- package/dist/dto/update-project-cost-type.dto.d.ts +6 -0
- package/dist/dto/update-project-cost-type.dto.d.ts.map +1 -0
- package/dist/dto/update-project-cost-type.dto.js +9 -0
- package/dist/dto/update-project-cost-type.dto.js.map +1 -0
- package/dist/dto/update-project-cost.dto.d.ts +6 -0
- package/dist/dto/update-project-cost.dto.d.ts.map +1 -0
- package/dist/dto/update-project-cost.dto.js +9 -0
- package/dist/dto/update-project-cost.dto.js.map +1 -0
- package/dist/operations.module.d.ts.map +1 -1
- package/dist/operations.module.js +2 -0
- package/dist/operations.module.js.map +1 -1
- package/dist/operations.service.d.ts +562 -0
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1657 -47
- package/dist/operations.service.js.map +1 -1
- package/hedhog/data/menu.yaml +52 -0
- package/hedhog/data/operations_project_cost_category.yaml +80 -0
- package/hedhog/data/operations_project_cost_type.yaml +503 -0
- package/hedhog/data/route.yaml +274 -0
- package/hedhog/frontend/app/_components/collaborator-costs-section.tsx.ejs +2 -18
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +185 -276
- package/hedhog/frontend/app/_components/collaborator-tasks-tab.tsx.ejs +358 -0
- package/hedhog/frontend/app/_components/collaborator-timesheets-tab.tsx.ejs +242 -0
- package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +167 -59
- package/hedhog/frontend/app/_components/person-select-with-create.tsx.ejs +1 -853
- package/hedhog/frontend/app/_components/project-assignments-tab.tsx.ejs +450 -0
- package/hedhog/frontend/app/_components/project-cost-report-screen.tsx.ejs +602 -0
- package/hedhog/frontend/app/_components/project-costs-section.tsx.ejs +1401 -0
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +2003 -1846
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +56 -11
- package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +297 -2
- package/hedhog/frontend/app/_components/task-form-sheet.tsx.ejs +530 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +247 -0
- package/hedhog/frontend/app/_lib/types.ts.ejs +196 -7
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +9 -3
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +18 -7
- package/hedhog/frontend/app/my-tasks/page.tsx.ejs +219 -122
- package/hedhog/frontend/app/project-cost-categories/page.tsx.ejs +674 -0
- package/hedhog/frontend/app/project-cost-types/page.tsx.ejs +845 -0
- package/hedhog/frontend/app/projects/[id]/costs-report/page.tsx.ejs +10 -0
- package/hedhog/frontend/app/reports/collaborators/page.tsx.ejs +20 -349
- package/hedhog/frontend/app/reports/projects/page.tsx.ejs +192 -484
- package/hedhog/frontend/messages/en.json +279 -10
- package/hedhog/frontend/messages/en.json.ejs +2043 -0
- package/hedhog/frontend/messages/operations/en.json +2068 -0
- package/hedhog/frontend/messages/operations/operations/en.json +2102 -0
- package/hedhog/frontend/messages/operations/operations/pt.json +2111 -0
- package/hedhog/frontend/messages/operations/pt.json +2072 -0
- package/hedhog/frontend/messages/pt.json +284 -13
- package/hedhog/frontend/messages/pt.json.ejs +2056 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.d.ts +29 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.js +95 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.tsx +233 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.d.ts +10 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.js +577 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.tsx +868 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.js +337 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.tsx +476 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.d.ts +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.js +1348 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.tsx +2233 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.d.ts +12 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.js +162 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.tsx +261 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.d.ts +18 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.js +145 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.tsx +258 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.js +223 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.tsx +342 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.d.ts +58 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.js +438 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.tsx +698 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.d.ts +20 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.js +233 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.tsx +392 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.js +814 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.tsx +1288 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.d.ts +21 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.js +174 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.tsx +306 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.d.ts +10 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.js +12 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.tsx +29 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.d.ts +15 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.js +501 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.tsx +853 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.js +847 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.tsx +1340 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.js +2930 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.tsx +4378 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.d.ts +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.js +1013 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.tsx +1745 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.d.ts +13 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.js +38 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.tsx +74 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.d.ts +7 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.js +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.tsx +15 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.d.ts +18 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.js +406 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.tsx +660 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.d.ts +26 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.js +332 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.tsx +518 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js +255 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.tsx +388 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.d.ts +10 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.js +131 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.tsx +214 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.d.ts +108 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.js +162 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.ts +428 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.d.ts +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.js +36 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.ts +44 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.d.ts +836 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.js +3 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.ts +860 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.d.ts +16 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.js +182 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.ts +250 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.js +51 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.ts +61 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.js +954 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.tsx +1277 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.js +488 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.tsx +805 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.js +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.tsx +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.js +612 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.tsx +939 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.tsx +17 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.js +348 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.tsx +536 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.js +401 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.tsx +607 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.d.ts +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.js +7 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.tsx +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.js +321 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.tsx +440 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.js +939 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.tsx +1499 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.d.ts +29 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.js +95 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.tsx +233 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.d.ts +10 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.js +577 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.tsx +868 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.js +337 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.tsx +476 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.d.ts +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.js +1348 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.tsx +2233 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.d.ts +12 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.js +162 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.tsx +261 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.d.ts +18 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.js +145 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.tsx +258 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.js +223 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.tsx +342 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.d.ts +58 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.js +438 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.tsx +698 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.d.ts +20 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.js +233 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.tsx +392 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.js +814 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.tsx +1288 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.d.ts +21 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.js +174 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.tsx +306 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.d.ts +10 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.js +12 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.tsx +29 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.d.ts +15 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.js +501 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.tsx +853 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.js +459 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.tsx +598 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.js +876 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.tsx +1368 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.js +2930 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.tsx +4378 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.d.ts +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.js +1013 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.tsx +1745 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.d.ts +13 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.js +38 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.tsx +74 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.d.ts +7 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.js +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.tsx +15 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.d.ts +18 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.js +406 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.tsx +660 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.d.ts +26 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.js +332 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.tsx +518 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.js +255 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.tsx +388 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.d.ts +10 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.js +131 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.tsx +214 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.d.ts +108 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.js +162 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.ts +428 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.d.ts +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.js +36 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.ts +44 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.d.ts +836 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.js +3 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.ts +860 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.d.ts +16 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.js +182 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.ts +250 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.d.ts +4 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.js +51 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.ts +61 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.js +954 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.tsx +1277 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.js +488 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.tsx +805 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.js +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.tsx +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.js +612 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.tsx +939 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.tsx +17 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.js +348 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.tsx +536 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.js +401 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.tsx +607 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.d.ts +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.js +7 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.tsx +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.js +321 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.tsx +440 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.js +939 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.tsx +1499 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.js +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.tsx +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.js +436 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.tsx +675 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.js +563 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.tsx +846 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.tsx +10 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.js +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.tsx +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.js +492 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.tsx +757 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.js +342 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.tsx +430 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.js +338 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.tsx +428 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.js +660 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.tsx +992 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.js +515 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.tsx +707 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.js +1141 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.tsx +1705 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.js +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.tsx +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.js +436 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.tsx +675 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.js +563 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.tsx +846 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.d.ts +6 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.js +9 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.tsx +11 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.js +8 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.tsx +5 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.js +492 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.tsx +757 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.js +342 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.tsx +430 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.js +338 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.tsx +428 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.js +660 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.tsx +992 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.js +515 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.tsx +707 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.d.ts +2 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.d.ts.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.js +1141 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.js.map +1 -0
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.tsx +1705 -0
- package/hedhog/table/operations_project_assignment.yaml +1 -0
- package/hedhog/table/operations_project_cost.yaml +93 -0
- package/hedhog/table/operations_project_cost_category.yaml +37 -0
- package/hedhog/table/operations_project_cost_type.yaml +55 -0
- package/hedhog/table/operations_task_comment.yaml +26 -0
- package/package.json +6 -6
- package/src/controllers/operations-collaborators.controller.ts +26 -0
- package/src/controllers/operations-project-costs.controller.ts +249 -0
- package/src/controllers/operations-tasks.controller.ts +49 -0
- package/src/dto/create-collaborator-project-assignment.dto.ts +14 -0
- package/src/dto/create-project-cost-category.dto.ts +37 -0
- package/src/dto/create-project-cost-type.dto.ts +64 -0
- package/src/dto/create-project-cost.dto.ts +126 -0
- package/src/dto/get-project-cost-report.dto.ts +46 -0
- package/src/dto/list-project-cost-categories.dto.ts +17 -0
- package/src/dto/list-project-cost-types.dto.ts +28 -0
- package/src/dto/list-project-costs.dto.ts +59 -0
- package/src/dto/list-tasks.dto.ts +7 -0
- package/src/dto/list-timesheets.dto.ts +7 -1
- package/src/dto/update-collaborator-project-assignment.dto.ts +58 -0
- package/src/dto/update-project-cost-category.dto.ts +4 -0
- package/src/dto/update-project-cost-type.dto.ts +4 -0
- package/src/dto/update-project-cost.dto.ts +4 -0
- package/src/operations.module.ts +2 -0
- package/src/operations.service.ts +2274 -39
|
@@ -0,0 +1,1348 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CollaboratorFormScreen = CollaboratorFormScreen;
|
|
8
|
+
const person_form_sheet_1 = require("@/app/(app)/(libraries)/contact/person/_components/person-form-sheet");
|
|
9
|
+
const entity_list_1 = require("@/components/entity-list");
|
|
10
|
+
const accordion_1 = require("@/components/ui/accordion");
|
|
11
|
+
const avatar_1 = require("@/components/ui/avatar");
|
|
12
|
+
const button_1 = require("@/components/ui/button");
|
|
13
|
+
const command_1 = require("@/components/ui/command");
|
|
14
|
+
const entity_picker_1 = require("@/components/ui/entity-picker");
|
|
15
|
+
const form_actions_1 = require("@/components/ui/form-actions");
|
|
16
|
+
const input_1 = require("@/components/ui/input");
|
|
17
|
+
const input_money_1 = require("@/components/ui/input-money");
|
|
18
|
+
const label_1 = require("@/components/ui/label");
|
|
19
|
+
const popover_1 = require("@/components/ui/popover");
|
|
20
|
+
const select_1 = require("@/components/ui/select");
|
|
21
|
+
const switch_1 = require("@/components/ui/switch");
|
|
22
|
+
const textarea_1 = require("@/components/ui/textarea");
|
|
23
|
+
const tooltip_1 = require("@/components/ui/tooltip");
|
|
24
|
+
const next_app_provider_1 = require("@hed-hog/next-app-provider");
|
|
25
|
+
const lucide_react_1 = require("lucide-react");
|
|
26
|
+
const next_intl_1 = require("next-intl");
|
|
27
|
+
const link_1 = __importDefault(require("next/link"));
|
|
28
|
+
const navigation_1 = require("next/navigation");
|
|
29
|
+
const react_1 = require("react");
|
|
30
|
+
const api_1 = require("../_lib/api");
|
|
31
|
+
const use_operations_access_1 = require("../_lib/hooks/use-operations-access");
|
|
32
|
+
const format_1 = require("../_lib/utils/format");
|
|
33
|
+
const forms_1 = require("../_lib/utils/forms");
|
|
34
|
+
const collaborator_costs_section_1 = require("./collaborator-costs-section");
|
|
35
|
+
const department_select_with_create_1 = require("./department-select-with-create");
|
|
36
|
+
const operations_header_1 = require("./operations-header");
|
|
37
|
+
const person_select_with_create_1 = require("./person-select-with-create");
|
|
38
|
+
const status_badge_1 = require("./status-badge");
|
|
39
|
+
const system_user_select_with_create_1 = require("./system-user-select-with-create");
|
|
40
|
+
const weekdays = [
|
|
41
|
+
'monday',
|
|
42
|
+
'tuesday',
|
|
43
|
+
'wednesday',
|
|
44
|
+
'thursday',
|
|
45
|
+
'friday',
|
|
46
|
+
'saturday',
|
|
47
|
+
'sunday',
|
|
48
|
+
];
|
|
49
|
+
const SUPERVISOR_PAGE_SIZE = 10;
|
|
50
|
+
const COLLABORATOR_LEVEL_OPTIONS = [
|
|
51
|
+
'junior',
|
|
52
|
+
'mid',
|
|
53
|
+
'senior',
|
|
54
|
+
'coordinator',
|
|
55
|
+
'manager',
|
|
56
|
+
];
|
|
57
|
+
function normalizeCollaboratorLevel(value) {
|
|
58
|
+
const normalizedValue = String(value !== null && value !== void 0 ? value : '')
|
|
59
|
+
.trim()
|
|
60
|
+
.toLowerCase()
|
|
61
|
+
.normalize('NFD')
|
|
62
|
+
.replace(/[\u0300-\u036f]/g, '');
|
|
63
|
+
switch (normalizedValue) {
|
|
64
|
+
case 'junior':
|
|
65
|
+
case 'junior level':
|
|
66
|
+
return 'junior';
|
|
67
|
+
case 'mid':
|
|
68
|
+
case 'middle':
|
|
69
|
+
case 'pleno':
|
|
70
|
+
return 'mid';
|
|
71
|
+
case 'senior':
|
|
72
|
+
return 'senior';
|
|
73
|
+
case 'coordinator':
|
|
74
|
+
case 'coordenador':
|
|
75
|
+
return 'coordinator';
|
|
76
|
+
case 'manager':
|
|
77
|
+
case 'gerente':
|
|
78
|
+
return 'manager';
|
|
79
|
+
default:
|
|
80
|
+
return '';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function getPersonAvatarUrl(avatarId) {
|
|
84
|
+
return typeof avatarId === 'number' && avatarId > 0
|
|
85
|
+
? `${process.env.NEXT_PUBLIC_API_BASE_URL}/person/avatar/${avatarId}`
|
|
86
|
+
: '/placeholder.png';
|
|
87
|
+
}
|
|
88
|
+
function getInitials(value) {
|
|
89
|
+
const parts = String(value !== null && value !== void 0 ? value : '')
|
|
90
|
+
.trim()
|
|
91
|
+
.split(/\s+/)
|
|
92
|
+
.filter(Boolean)
|
|
93
|
+
.slice(0, 2);
|
|
94
|
+
if (!parts.length) {
|
|
95
|
+
return '??';
|
|
96
|
+
}
|
|
97
|
+
return parts.map((part) => { var _a, _b; return (_b = (_a = part[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== null && _b !== void 0 ? _b : ''; }).join('');
|
|
98
|
+
}
|
|
99
|
+
function normalizeTimeValue(value, fallback = '') {
|
|
100
|
+
if (!value) {
|
|
101
|
+
return fallback;
|
|
102
|
+
}
|
|
103
|
+
const directMatch = String(value).match(/(\d{2}:\d{2})(?::\d{2})?/);
|
|
104
|
+
if (directMatch === null || directMatch === void 0 ? void 0 : directMatch[1]) {
|
|
105
|
+
return directMatch[1];
|
|
106
|
+
}
|
|
107
|
+
const parsedDate = new Date(value);
|
|
108
|
+
if (!Number.isNaN(parsedDate.getTime())) {
|
|
109
|
+
return parsedDate.toISOString().slice(11, 16);
|
|
110
|
+
}
|
|
111
|
+
return fallback || String(value);
|
|
112
|
+
}
|
|
113
|
+
function normalizeDateInputValue(value) {
|
|
114
|
+
if (!value) {
|
|
115
|
+
return '';
|
|
116
|
+
}
|
|
117
|
+
const normalizedValue = String(value).trim();
|
|
118
|
+
if (!normalizedValue) {
|
|
119
|
+
return '';
|
|
120
|
+
}
|
|
121
|
+
const directMatch = normalizedValue.match(/^\d{4}-\d{2}-\d{2}/);
|
|
122
|
+
if (directMatch === null || directMatch === void 0 ? void 0 : directMatch[0]) {
|
|
123
|
+
return directMatch[0];
|
|
124
|
+
}
|
|
125
|
+
const parsedDate = new Date(normalizedValue);
|
|
126
|
+
if (Number.isNaN(parsedDate.getTime())) {
|
|
127
|
+
return normalizedValue;
|
|
128
|
+
}
|
|
129
|
+
return parsedDate.toISOString().slice(0, 10);
|
|
130
|
+
}
|
|
131
|
+
const EQUITY_ENABLED_TYPE_SLUGS = new Set([
|
|
132
|
+
'socio',
|
|
133
|
+
'acionista',
|
|
134
|
+
'administrador',
|
|
135
|
+
'diretor',
|
|
136
|
+
'conselheiro',
|
|
137
|
+
'parceiro',
|
|
138
|
+
]);
|
|
139
|
+
function defaultSchedule() {
|
|
140
|
+
return weekdays.map((weekday) => ({
|
|
141
|
+
weekday,
|
|
142
|
+
isWorkingDay: !['saturday', 'sunday'].includes(weekday),
|
|
143
|
+
startTime: '09:00',
|
|
144
|
+
endTime: '18:00',
|
|
145
|
+
breakMinutes: '60',
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
function buildEmptyForm() {
|
|
149
|
+
return {
|
|
150
|
+
userId: '',
|
|
151
|
+
personId: '',
|
|
152
|
+
displayName: '',
|
|
153
|
+
collaboratorTypeId: '',
|
|
154
|
+
departmentId: '',
|
|
155
|
+
jobTitleId: '',
|
|
156
|
+
title: '',
|
|
157
|
+
levelLabel: '',
|
|
158
|
+
weeklyCapacityHours: '40',
|
|
159
|
+
status: 'active',
|
|
160
|
+
joinedAt: '',
|
|
161
|
+
leftAt: '',
|
|
162
|
+
supervisorCollaboratorId: 'none',
|
|
163
|
+
compensationAmount: '',
|
|
164
|
+
contractId: '',
|
|
165
|
+
notes: '',
|
|
166
|
+
equityParticipation: {
|
|
167
|
+
participationType: 'partner_quota_holder',
|
|
168
|
+
percentage: '',
|
|
169
|
+
votingPower: '',
|
|
170
|
+
startDate: '',
|
|
171
|
+
endDate: '',
|
|
172
|
+
notes: '',
|
|
173
|
+
},
|
|
174
|
+
weeklySchedule: defaultSchedule(),
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function normalizeSchedule(weeklySchedule) {
|
|
178
|
+
const byWeekday = new Map((weeklySchedule !== null && weeklySchedule !== void 0 ? weeklySchedule : []).map((item) => [item.weekday, item]));
|
|
179
|
+
return weekdays.map((weekday) => {
|
|
180
|
+
var _a;
|
|
181
|
+
const item = byWeekday.get(weekday);
|
|
182
|
+
return {
|
|
183
|
+
weekday,
|
|
184
|
+
isWorkingDay: (_a = item === null || item === void 0 ? void 0 : item.isWorkingDay) !== null && _a !== void 0 ? _a : !['saturday', 'sunday'].includes(weekday),
|
|
185
|
+
startTime: normalizeTimeValue(item === null || item === void 0 ? void 0 : item.startTime, '09:00'),
|
|
186
|
+
endTime: normalizeTimeValue(item === null || item === void 0 ? void 0 : item.endTime, '18:00'),
|
|
187
|
+
breakMinutes: (item === null || item === void 0 ? void 0 : item.breakMinutes) !== null && (item === null || item === void 0 ? void 0 : item.breakMinutes) !== undefined
|
|
188
|
+
? String(item.breakMinutes)
|
|
189
|
+
: '60',
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
function toFormState(collaborator) {
|
|
194
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
195
|
+
return {
|
|
196
|
+
userId: collaborator.userId ? String(collaborator.userId) : '',
|
|
197
|
+
personId: collaborator.personId ? String(collaborator.personId) : '',
|
|
198
|
+
displayName: (_a = collaborator.displayName) !== null && _a !== void 0 ? _a : '',
|
|
199
|
+
collaboratorTypeId: collaborator.collaboratorTypeId
|
|
200
|
+
? String(collaborator.collaboratorTypeId)
|
|
201
|
+
: '',
|
|
202
|
+
departmentId: collaborator.departmentId
|
|
203
|
+
? String(collaborator.departmentId)
|
|
204
|
+
: '',
|
|
205
|
+
jobTitleId: collaborator.jobTitleId ? String(collaborator.jobTitleId) : '',
|
|
206
|
+
title: (_b = collaborator.title) !== null && _b !== void 0 ? _b : '',
|
|
207
|
+
levelLabel: normalizeCollaboratorLevel(collaborator.levelLabel),
|
|
208
|
+
weeklyCapacityHours: collaborator.weeklyCapacityHours !== null &&
|
|
209
|
+
collaborator.weeklyCapacityHours !== undefined
|
|
210
|
+
? String(collaborator.weeklyCapacityHours)
|
|
211
|
+
: '',
|
|
212
|
+
status: (_c = collaborator.status) !== null && _c !== void 0 ? _c : 'active',
|
|
213
|
+
joinedAt: normalizeDateInputValue(collaborator.joinedAt),
|
|
214
|
+
leftAt: normalizeDateInputValue(collaborator.leftAt),
|
|
215
|
+
supervisorCollaboratorId: collaborator.supervisorId
|
|
216
|
+
? String(collaborator.supervisorId)
|
|
217
|
+
: 'none',
|
|
218
|
+
compensationAmount: collaborator.compensationAmount !== null &&
|
|
219
|
+
collaborator.compensationAmount !== undefined
|
|
220
|
+
? String(collaborator.compensationAmount)
|
|
221
|
+
: ((_e = (_d = collaborator.relatedContracts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.budgetAmount) !== null &&
|
|
222
|
+
((_g = (_f = collaborator.relatedContracts) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.budgetAmount) !== undefined
|
|
223
|
+
? String(collaborator.relatedContracts[0].budgetAmount)
|
|
224
|
+
: '',
|
|
225
|
+
contractId: ((_j = (_h = collaborator.relatedContracts) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.id)
|
|
226
|
+
? String(collaborator.relatedContracts[0].id)
|
|
227
|
+
: '',
|
|
228
|
+
notes: (_k = collaborator.notes) !== null && _k !== void 0 ? _k : '',
|
|
229
|
+
equityParticipation: {
|
|
230
|
+
participationType: (_m = (_l = collaborator.equityParticipation) === null || _l === void 0 ? void 0 : _l.participationType) !== null && _m !== void 0 ? _m : 'partner_quota_holder',
|
|
231
|
+
percentage: ((_o = collaborator.equityParticipation) === null || _o === void 0 ? void 0 : _o.percentage) !== null &&
|
|
232
|
+
((_p = collaborator.equityParticipation) === null || _p === void 0 ? void 0 : _p.percentage) !== undefined
|
|
233
|
+
? String(collaborator.equityParticipation.percentage)
|
|
234
|
+
: '',
|
|
235
|
+
votingPower: ((_q = collaborator.equityParticipation) === null || _q === void 0 ? void 0 : _q.votingPower) !== null &&
|
|
236
|
+
((_r = collaborator.equityParticipation) === null || _r === void 0 ? void 0 : _r.votingPower) !== undefined
|
|
237
|
+
? String(collaborator.equityParticipation.votingPower)
|
|
238
|
+
: '',
|
|
239
|
+
startDate: normalizeDateInputValue((_s = collaborator.equityParticipation) === null || _s === void 0 ? void 0 : _s.startDate),
|
|
240
|
+
endDate: normalizeDateInputValue((_t = collaborator.equityParticipation) === null || _t === void 0 ? void 0 : _t.endDate),
|
|
241
|
+
notes: (_v = (_u = collaborator.equityParticipation) === null || _u === void 0 ? void 0 : _u.notes) !== null && _v !== void 0 ? _v : '',
|
|
242
|
+
},
|
|
243
|
+
weeklySchedule: normalizeSchedule(collaborator.weeklySchedule),
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
function SupervisorAutocomplete({ label, value, options, placeholder, emptyLabel, onChange, }) {
|
|
247
|
+
var _a;
|
|
248
|
+
const commonT = (0, next_intl_1.useTranslations)('operations.Common');
|
|
249
|
+
const [open, setOpen] = (0, react_1.useState)(false);
|
|
250
|
+
const [search, setSearch] = (0, react_1.useState)('');
|
|
251
|
+
const [visibleCount, setVisibleCount] = (0, react_1.useState)(SUPERVISOR_PAGE_SIZE);
|
|
252
|
+
const filteredOptions = (0, react_1.useMemo)(() => {
|
|
253
|
+
const normalizedSearch = search.trim().toLowerCase();
|
|
254
|
+
if (!normalizedSearch) {
|
|
255
|
+
return options;
|
|
256
|
+
}
|
|
257
|
+
return options.filter((option) => [option.displayName, option.code, option.department, option.title]
|
|
258
|
+
.filter(Boolean)
|
|
259
|
+
.some((field) => String(field).toLowerCase().includes(normalizedSearch)));
|
|
260
|
+
}, [options, search]);
|
|
261
|
+
const selectedOption = options.find((option) => String(option.id) === value);
|
|
262
|
+
const visibleOptions = filteredOptions.slice(0, visibleCount);
|
|
263
|
+
return (<div className="grid gap-2">
|
|
264
|
+
<label_1.Label>{label}</label_1.Label>
|
|
265
|
+
|
|
266
|
+
<popover_1.Popover open={open} onOpenChange={(nextOpen) => {
|
|
267
|
+
setOpen(nextOpen);
|
|
268
|
+
setVisibleCount(SUPERVISOR_PAGE_SIZE);
|
|
269
|
+
if (!nextOpen) {
|
|
270
|
+
setSearch('');
|
|
271
|
+
}
|
|
272
|
+
}}>
|
|
273
|
+
<popover_1.PopoverTrigger asChild>
|
|
274
|
+
<button_1.Button type="button" variant="outline" role="combobox" className="w-full justify-between overflow-hidden">
|
|
275
|
+
<span className="truncate text-left">
|
|
276
|
+
{(_a = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.displayName) !== null && _a !== void 0 ? _a : emptyLabel}
|
|
277
|
+
</span>
|
|
278
|
+
<lucide_react_1.ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50"/>
|
|
279
|
+
</button_1.Button>
|
|
280
|
+
</popover_1.PopoverTrigger>
|
|
281
|
+
<popover_1.PopoverContent className="p-0" style={{ width: 'var(--radix-popover-trigger-width)' }}>
|
|
282
|
+
<command_1.Command shouldFilter={false}>
|
|
283
|
+
<command_1.CommandInput placeholder={placeholder} value={search} onValueChange={(value) => {
|
|
284
|
+
setSearch(value);
|
|
285
|
+
setVisibleCount(SUPERVISOR_PAGE_SIZE);
|
|
286
|
+
}}/>
|
|
287
|
+
<command_1.CommandList>
|
|
288
|
+
<command_1.CommandEmpty>
|
|
289
|
+
<div className="p-2 text-sm text-muted-foreground">
|
|
290
|
+
{commonT('states.emptyDescription')}
|
|
291
|
+
</div>
|
|
292
|
+
</command_1.CommandEmpty>
|
|
293
|
+
|
|
294
|
+
<command_1.CommandGroup>
|
|
295
|
+
<command_1.CommandItem value="none" onSelect={() => {
|
|
296
|
+
onChange('none');
|
|
297
|
+
setOpen(false);
|
|
298
|
+
}}>
|
|
299
|
+
{value === 'none' ? (<lucide_react_1.Check className="mr-2 h-4 w-4"/>) : (<span className="mr-2 h-4 w-4"/>)}
|
|
300
|
+
{emptyLabel}
|
|
301
|
+
</command_1.CommandItem>
|
|
302
|
+
|
|
303
|
+
{visibleOptions.map((option) => {
|
|
304
|
+
var _a, _b, _c;
|
|
305
|
+
return (<command_1.CommandItem key={option.id} value={`${option.displayName} ${(_a = option.code) !== null && _a !== void 0 ? _a : ''} ${(_b = option.department) !== null && _b !== void 0 ? _b : ''} ${(_c = option.title) !== null && _c !== void 0 ? _c : ''}`} onSelect={() => {
|
|
306
|
+
onChange(String(option.id));
|
|
307
|
+
setOpen(false);
|
|
308
|
+
}}>
|
|
309
|
+
{String(option.id) === value ? (<lucide_react_1.Check className="mr-2 h-4 w-4"/>) : (<span className="mr-2 h-4 w-4"/>)}
|
|
310
|
+
<div className="min-w-0">
|
|
311
|
+
<div className="truncate">{option.displayName}</div>
|
|
312
|
+
<div className="truncate text-xs text-muted-foreground">
|
|
313
|
+
{[option.code, option.department, option.title]
|
|
314
|
+
.filter(Boolean)
|
|
315
|
+
.join(' • ') || commonT('labels.notAvailable')}
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
</command_1.CommandItem>);
|
|
319
|
+
})}
|
|
320
|
+
</command_1.CommandGroup>
|
|
321
|
+
|
|
322
|
+
{filteredOptions.length > visibleCount ? (<div className="border-t p-2">
|
|
323
|
+
<button_1.Button type="button" variant="ghost" className="w-full" onClick={() => setVisibleCount((current) => current + SUPERVISOR_PAGE_SIZE)}>
|
|
324
|
+
{commonT('actions.loadMore')}
|
|
325
|
+
</button_1.Button>
|
|
326
|
+
</div>) : null}
|
|
327
|
+
</command_1.CommandList>
|
|
328
|
+
</command_1.Command>
|
|
329
|
+
</popover_1.PopoverContent>
|
|
330
|
+
</popover_1.Popover>
|
|
331
|
+
</div>);
|
|
332
|
+
}
|
|
333
|
+
function CollaboratorFormScreen({ collaboratorId, onSaved, onCancel, }) {
|
|
334
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
335
|
+
const t = (0, next_intl_1.useTranslations)('operations.CollaboratorFormPage');
|
|
336
|
+
const commonT = (0, next_intl_1.useTranslations)('operations.Common');
|
|
337
|
+
const detailsT = (0, next_intl_1.useTranslations)('operations.CollaboratorDetailsPage');
|
|
338
|
+
const { request, showToastHandler, currentLocaleCode } = (0, next_app_provider_1.useApp)();
|
|
339
|
+
const access = (0, use_operations_access_1.useOperationsAccess)();
|
|
340
|
+
const router = (0, navigation_1.useRouter)();
|
|
341
|
+
const [form, setForm] = (0, react_1.useState)(buildEmptyForm());
|
|
342
|
+
const isSheetMode = Boolean(onCancel);
|
|
343
|
+
const isCreateMode = !collaboratorId;
|
|
344
|
+
const getStatusLabel = (value) => {
|
|
345
|
+
switch (value) {
|
|
346
|
+
case 'active':
|
|
347
|
+
return t('options.statuses.active');
|
|
348
|
+
case 'on_leave':
|
|
349
|
+
return t('options.statuses.on_leave');
|
|
350
|
+
case 'inactive':
|
|
351
|
+
return t('options.statuses.inactive');
|
|
352
|
+
case 'draft':
|
|
353
|
+
return t('options.statuses.draft');
|
|
354
|
+
default:
|
|
355
|
+
return (0, format_1.formatEnumLabel)(value);
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
const { data: collaborator, isLoading: isLoadingCollaborator, refetch: refetchCollaborator, } = (0, next_app_provider_1.useQuery)({
|
|
359
|
+
queryKey: [
|
|
360
|
+
'operations-collaborator-form',
|
|
361
|
+
currentLocaleCode,
|
|
362
|
+
collaboratorId,
|
|
363
|
+
],
|
|
364
|
+
enabled: Boolean(collaboratorId),
|
|
365
|
+
staleTime: 0,
|
|
366
|
+
refetchOnMount: 'always',
|
|
367
|
+
queryFn: () => (0, api_1.fetchOperations)(request, `/operations/collaborators/${collaboratorId}`),
|
|
368
|
+
});
|
|
369
|
+
const { data: systemUsers = [], refetch: refetchSystemUsers } = (0, next_app_provider_1.useQuery)({
|
|
370
|
+
queryKey: ['operations-collaborator-form-system-users', currentLocaleCode],
|
|
371
|
+
enabled: access.isDirector,
|
|
372
|
+
staleTime: 0,
|
|
373
|
+
refetchOnMount: 'always',
|
|
374
|
+
queryFn: async () => {
|
|
375
|
+
var _a, _b, _c;
|
|
376
|
+
const response = await request({
|
|
377
|
+
url: '/user?pageSize=100',
|
|
378
|
+
method: 'GET',
|
|
379
|
+
});
|
|
380
|
+
const raw = (_c = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.paginate) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : [];
|
|
381
|
+
const options = raw.map((u) => {
|
|
382
|
+
var _a;
|
|
383
|
+
return ({
|
|
384
|
+
id: u.id,
|
|
385
|
+
name: u.name || `#${u.id}`,
|
|
386
|
+
photoId: (_a = u.photo_id) !== null && _a !== void 0 ? _a : null,
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
return options.sort((left, right) => left.name.localeCompare(right.name));
|
|
390
|
+
},
|
|
391
|
+
});
|
|
392
|
+
const { data: collaboratorTypes = [], refetch: refetchCollaboratorTypes, isLoading: isLoadingCollaboratorTypes, } = (0, next_app_provider_1.useQuery)({
|
|
393
|
+
queryKey: ['operations-collaborator-types', currentLocaleCode],
|
|
394
|
+
enabled: access.isDirector,
|
|
395
|
+
staleTime: 0,
|
|
396
|
+
refetchOnMount: 'always',
|
|
397
|
+
queryFn: () => (0, api_1.fetchOperations)(request, '/operations/collaborator-types?active=true'),
|
|
398
|
+
});
|
|
399
|
+
const { data: collaborators = [], refetch: refetchCollaborators } = (0, next_app_provider_1.useQuery)({
|
|
400
|
+
queryKey: ['operations-collaborator-form-supervisors', currentLocaleCode],
|
|
401
|
+
enabled: access.isDirector,
|
|
402
|
+
staleTime: 0,
|
|
403
|
+
refetchOnMount: 'always',
|
|
404
|
+
queryFn: () => (0, api_1.fetchOperations)(request, '/operations/collaborators'),
|
|
405
|
+
});
|
|
406
|
+
const { data: departments = [], refetch: refetchDepartments } = (0, next_app_provider_1.useQuery)({
|
|
407
|
+
queryKey: ['operations-collaborator-form-departments', currentLocaleCode],
|
|
408
|
+
enabled: access.isDirector,
|
|
409
|
+
staleTime: 0,
|
|
410
|
+
refetchOnMount: 'always',
|
|
411
|
+
queryFn: () => (0, api_1.fetchOperations)(request, '/operations/departments'),
|
|
412
|
+
});
|
|
413
|
+
const { data: jobTitles = [], refetch: refetchJobTitles } = (0, next_app_provider_1.useQuery)({
|
|
414
|
+
queryKey: ['operations-collaborator-form-job-titles', currentLocaleCode],
|
|
415
|
+
enabled: access.isDirector,
|
|
416
|
+
staleTime: 0,
|
|
417
|
+
refetchOnMount: 'always',
|
|
418
|
+
queryFn: () => (0, api_1.fetchOperations)(request, '/operations/job-titles'),
|
|
419
|
+
});
|
|
420
|
+
const [personSheetOpen, setPersonSheetOpen] = (0, react_1.useState)(false);
|
|
421
|
+
const [personToEdit, setPersonToEdit] = (0, react_1.useState)(null);
|
|
422
|
+
const { data: contactTypes = [] } = (0, next_app_provider_1.useQuery)({
|
|
423
|
+
queryKey: ['contact-person-contact-types', currentLocaleCode],
|
|
424
|
+
enabled: personSheetOpen,
|
|
425
|
+
queryFn: async () => {
|
|
426
|
+
const response = await request({
|
|
427
|
+
url: '/person-contact-type?pageSize=100',
|
|
428
|
+
method: 'GET',
|
|
429
|
+
});
|
|
430
|
+
return response.data.data || [];
|
|
431
|
+
},
|
|
432
|
+
placeholderData: (previous) => previous !== null && previous !== void 0 ? previous : [],
|
|
433
|
+
});
|
|
434
|
+
const { data: documentTypes = [] } = (0, next_app_provider_1.useQuery)({
|
|
435
|
+
queryKey: ['contact-person-document-types', currentLocaleCode],
|
|
436
|
+
enabled: personSheetOpen,
|
|
437
|
+
queryFn: async () => {
|
|
438
|
+
const response = await request({
|
|
439
|
+
url: '/person-document-type?pageSize=100',
|
|
440
|
+
method: 'GET',
|
|
441
|
+
});
|
|
442
|
+
return response.data.data || [];
|
|
443
|
+
},
|
|
444
|
+
placeholderData: (previous) => previous !== null && previous !== void 0 ? previous : [],
|
|
445
|
+
});
|
|
446
|
+
const handleOpenPersonSheet = async () => {
|
|
447
|
+
if (!(collaborator === null || collaborator === void 0 ? void 0 : collaborator.personId))
|
|
448
|
+
return;
|
|
449
|
+
try {
|
|
450
|
+
const response = await request({
|
|
451
|
+
url: `/person/${collaborator.personId}`,
|
|
452
|
+
method: 'GET',
|
|
453
|
+
});
|
|
454
|
+
setPersonToEdit(response.data);
|
|
455
|
+
setPersonSheetOpen(true);
|
|
456
|
+
}
|
|
457
|
+
catch (_a) {
|
|
458
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('error', t('messages.updateError'));
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
(0, react_1.useEffect)(() => {
|
|
462
|
+
if (collaborator) {
|
|
463
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
464
|
+
setForm(toFormState(collaborator));
|
|
465
|
+
}
|
|
466
|
+
}, [collaborator]);
|
|
467
|
+
(0, react_1.useEffect)(() => {
|
|
468
|
+
var _a;
|
|
469
|
+
if (collaboratorId ||
|
|
470
|
+
form.collaboratorTypeId ||
|
|
471
|
+
!collaboratorTypes.length) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
const defaultType = (_a = collaboratorTypes.find((item) => item.slug === 'clt')) !== null && _a !== void 0 ? _a : collaboratorTypes[0];
|
|
475
|
+
if (!defaultType) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
479
|
+
setForm((current) => (Object.assign(Object.assign({}, current), { collaboratorTypeId: String(defaultType.id) })));
|
|
480
|
+
}, [collaboratorId, collaboratorTypes, form.collaboratorTypeId]);
|
|
481
|
+
const selectedCollaboratorType = (0, react_1.useMemo)(() => {
|
|
482
|
+
var _a, _b;
|
|
483
|
+
const availableTypes = [...collaboratorTypes];
|
|
484
|
+
if ((collaborator === null || collaborator === void 0 ? void 0 : collaborator.collaboratorTypeId) &&
|
|
485
|
+
collaborator.collaboratorType &&
|
|
486
|
+
!availableTypes.some((item) => item.id === collaborator.collaboratorTypeId)) {
|
|
487
|
+
availableTypes.push({
|
|
488
|
+
id: collaborator.collaboratorTypeId,
|
|
489
|
+
slug: (_a = collaborator.collaboratorTypeSlug) !== null && _a !== void 0 ? _a : '',
|
|
490
|
+
name: collaborator.collaboratorType,
|
|
491
|
+
status: 'active',
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
return ((_b = availableTypes.find((item) => String(item.id) === String(form.collaboratorTypeId))) !== null && _b !== void 0 ? _b : null);
|
|
495
|
+
}, [collaborator, collaboratorTypes, form.collaboratorTypeId]);
|
|
496
|
+
const supervisorOptions = (0, react_1.useMemo)(() => {
|
|
497
|
+
const options = new Map();
|
|
498
|
+
for (const item of collaborators) {
|
|
499
|
+
if (item.id !== collaboratorId) {
|
|
500
|
+
options.set(item.id, item);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
if ((collaborator === null || collaborator === void 0 ? void 0 : collaborator.supervisorId) &&
|
|
504
|
+
collaborator.supervisorName &&
|
|
505
|
+
collaborator.supervisorId !== collaboratorId &&
|
|
506
|
+
!options.has(collaborator.supervisorId)) {
|
|
507
|
+
options.set(collaborator.supervisorId, {
|
|
508
|
+
id: collaborator.supervisorId,
|
|
509
|
+
code: '',
|
|
510
|
+
displayName: collaborator.supervisorName,
|
|
511
|
+
department: null,
|
|
512
|
+
title: null,
|
|
513
|
+
status: 'active',
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
return Array.from(options.values()).sort((left, right) => left.displayName.localeCompare(right.displayName));
|
|
517
|
+
}, [collaborator, collaboratorId, collaborators]);
|
|
518
|
+
const shouldShowEquitySection = !isCreateMode &&
|
|
519
|
+
Boolean((selectedCollaboratorType === null || selectedCollaboratorType === void 0 ? void 0 : selectedCollaboratorType.slug) &&
|
|
520
|
+
EQUITY_ENABLED_TYPE_SLUGS.has(selectedCollaboratorType.slug));
|
|
521
|
+
const getCollaboratorTypeLabel = (value, fallbackName) => {
|
|
522
|
+
const normalizedValue = String(value !== null && value !== void 0 ? value : '').trim();
|
|
523
|
+
if (fallbackName) {
|
|
524
|
+
return fallbackName;
|
|
525
|
+
}
|
|
526
|
+
const matchedType = collaboratorTypes.find((item) => item.slug === normalizedValue || String(item.id) === normalizedValue);
|
|
527
|
+
if (matchedType === null || matchedType === void 0 ? void 0 : matchedType.name) {
|
|
528
|
+
return matchedType.name;
|
|
529
|
+
}
|
|
530
|
+
return (0, format_1.formatEnumLabel)(normalizedValue);
|
|
531
|
+
};
|
|
532
|
+
const departmentOptions = (0, react_1.useMemo)(() => {
|
|
533
|
+
return departments
|
|
534
|
+
.filter((item) => item.status === 'active')
|
|
535
|
+
.map((item) => {
|
|
536
|
+
var _a, _b;
|
|
537
|
+
return ({
|
|
538
|
+
id: item.id,
|
|
539
|
+
name: item.name,
|
|
540
|
+
code: (_a = item.code) !== null && _a !== void 0 ? _a : null,
|
|
541
|
+
description: (_b = item.description) !== null && _b !== void 0 ? _b : null,
|
|
542
|
+
});
|
|
543
|
+
})
|
|
544
|
+
.sort((left, right) => left.name.localeCompare(right.name));
|
|
545
|
+
}, [departments]);
|
|
546
|
+
const titleOptions = (0, react_1.useMemo)(() => {
|
|
547
|
+
const selectedTitle = (0, forms_1.trimToNull)(form.title);
|
|
548
|
+
const options = jobTitles
|
|
549
|
+
.filter((item) => item.status === 'active' || item.name === selectedTitle)
|
|
550
|
+
.map((item) => {
|
|
551
|
+
var _a, _b;
|
|
552
|
+
return ({
|
|
553
|
+
id: item.id,
|
|
554
|
+
name: item.name,
|
|
555
|
+
code: (_a = item.code) !== null && _a !== void 0 ? _a : null,
|
|
556
|
+
description: (_b = item.description) !== null && _b !== void 0 ? _b : null,
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
if (selectedTitle) {
|
|
560
|
+
const alreadyIncluded = options.some((item) => item.name === selectedTitle);
|
|
561
|
+
if (!alreadyIncluded) {
|
|
562
|
+
options.push({
|
|
563
|
+
id: form.jobTitleId ? Number(form.jobTitleId) : undefined,
|
|
564
|
+
name: selectedTitle,
|
|
565
|
+
code: null,
|
|
566
|
+
description: null,
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return options.sort((left, right) => left.name.localeCompare(right.name));
|
|
571
|
+
}, [jobTitles, form.title, form.jobTitleId]);
|
|
572
|
+
const createJobTitle = async (jobTitleName) => {
|
|
573
|
+
var _a, _b;
|
|
574
|
+
try {
|
|
575
|
+
const createdJobTitle = await (0, api_1.mutateOperations)(request, '/operations/job-titles', 'POST', {
|
|
576
|
+
name: jobTitleName,
|
|
577
|
+
});
|
|
578
|
+
await refetchJobTitles();
|
|
579
|
+
return {
|
|
580
|
+
id: createdJobTitle.id,
|
|
581
|
+
name: createdJobTitle.name,
|
|
582
|
+
code: (_a = createdJobTitle.code) !== null && _a !== void 0 ? _a : null,
|
|
583
|
+
description: (_b = createdJobTitle.description) !== null && _b !== void 0 ? _b : null,
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
catch (error) {
|
|
587
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('error', (0, api_1.getOperationsErrorMessage)(error, 'Unable to create the job title.'));
|
|
588
|
+
return null;
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
const createSystemUser = async (name, email, password) => {
|
|
592
|
+
try {
|
|
593
|
+
const response = await request({
|
|
594
|
+
url: '/user',
|
|
595
|
+
method: 'POST',
|
|
596
|
+
data: { name, email, password },
|
|
597
|
+
});
|
|
598
|
+
await refetchSystemUsers();
|
|
599
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('success', t('messages.createUserSuccess'));
|
|
600
|
+
return { id: response.data.id, name: response.data.name };
|
|
601
|
+
}
|
|
602
|
+
catch (error) {
|
|
603
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('error', (0, api_1.getOperationsErrorMessage)(error, t('messages.createUserError')));
|
|
604
|
+
return null;
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
const updateScheduleDay = (weekday, patch) => {
|
|
608
|
+
setForm((current) => (Object.assign(Object.assign({}, current), { weeklySchedule: current.weeklySchedule.map((day) => {
|
|
609
|
+
var _a;
|
|
610
|
+
if (day.weekday !== weekday) {
|
|
611
|
+
return day;
|
|
612
|
+
}
|
|
613
|
+
const nextIsWorkingDay = (_a = patch.isWorkingDay) !== null && _a !== void 0 ? _a : day.isWorkingDay;
|
|
614
|
+
return Object.assign(Object.assign(Object.assign({}, day), patch), { startTime: patch.startTime !== undefined
|
|
615
|
+
? normalizeTimeValue(patch.startTime)
|
|
616
|
+
: nextIsWorkingDay
|
|
617
|
+
? normalizeTimeValue(day.startTime, '09:00')
|
|
618
|
+
: normalizeTimeValue(day.startTime), endTime: patch.endTime !== undefined
|
|
619
|
+
? normalizeTimeValue(patch.endTime)
|
|
620
|
+
: nextIsWorkingDay
|
|
621
|
+
? normalizeTimeValue(day.endTime, '18:00')
|
|
622
|
+
: normalizeTimeValue(day.endTime) });
|
|
623
|
+
}) })));
|
|
624
|
+
};
|
|
625
|
+
const onSubmit = async () => {
|
|
626
|
+
const userId = (0, forms_1.parseNumberInput)(form.userId);
|
|
627
|
+
const personId = (0, forms_1.parseNumberInput)(form.personId);
|
|
628
|
+
const compensationAmount = (0, forms_1.parseNumberInput)(form.compensationAmount);
|
|
629
|
+
if (!personId) {
|
|
630
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('error', t('messages.personRequired'));
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
const departmentId = (0, forms_1.parseNumberInput)(form.departmentId);
|
|
634
|
+
const jobTitleId = (0, forms_1.parseNumberInput)(form.jobTitleId);
|
|
635
|
+
const collaboratorTypeId = (0, forms_1.parseNumberInput)(form.collaboratorTypeId);
|
|
636
|
+
if (!collaboratorTypeId) {
|
|
637
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('error', t('messages.collaboratorTypeRequired'));
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
const payload = {
|
|
641
|
+
userId: userId !== null && userId !== void 0 ? userId : undefined,
|
|
642
|
+
personId: personId !== null && personId !== void 0 ? personId : undefined,
|
|
643
|
+
displayName: (0, forms_1.trimToNull)(form.displayName),
|
|
644
|
+
collaboratorTypeId,
|
|
645
|
+
departmentId: departmentId !== null && departmentId !== void 0 ? departmentId : undefined,
|
|
646
|
+
jobTitleId: jobTitleId !== null && jobTitleId !== void 0 ? jobTitleId : undefined,
|
|
647
|
+
title: (0, forms_1.trimToNull)(form.title),
|
|
648
|
+
levelLabel: (0, forms_1.trimToNull)(form.levelLabel),
|
|
649
|
+
weeklyCapacityHours: (0, forms_1.parseNumberInput)(form.weeklyCapacityHours),
|
|
650
|
+
status: form.status,
|
|
651
|
+
joinedAt: (0, forms_1.trimToNull)(form.joinedAt),
|
|
652
|
+
leftAt: (0, forms_1.trimToNull)(form.leftAt),
|
|
653
|
+
supervisorCollaboratorId: form.supervisorCollaboratorId === 'none'
|
|
654
|
+
? null
|
|
655
|
+
: (0, forms_1.parseNumberInput)(form.supervisorCollaboratorId),
|
|
656
|
+
compensationAmount: compensationAmount !== null ? compensationAmount : null,
|
|
657
|
+
contractId: (0, forms_1.parseNumberInput)(form.contractId),
|
|
658
|
+
notes: (0, forms_1.trimToNull)(form.notes),
|
|
659
|
+
equityParticipation: shouldShowEquitySection
|
|
660
|
+
? {
|
|
661
|
+
participationType: form.equityParticipation.participationType,
|
|
662
|
+
percentage: (0, forms_1.parseNumberInput)(form.equityParticipation.percentage),
|
|
663
|
+
votingPower: (0, forms_1.parseNumberInput)(form.equityParticipation.votingPower),
|
|
664
|
+
startDate: (0, forms_1.trimToNull)(form.equityParticipation.startDate),
|
|
665
|
+
endDate: (0, forms_1.trimToNull)(form.equityParticipation.endDate),
|
|
666
|
+
notes: (0, forms_1.trimToNull)(form.equityParticipation.notes),
|
|
667
|
+
}
|
|
668
|
+
: null,
|
|
669
|
+
weeklySchedule: form.weeklySchedule.map((day) => ({
|
|
670
|
+
weekday: day.weekday,
|
|
671
|
+
isWorkingDay: day.isWorkingDay,
|
|
672
|
+
startTime: day.isWorkingDay
|
|
673
|
+
? (0, forms_1.trimToNull)(normalizeTimeValue(day.startTime, '09:00'))
|
|
674
|
+
: null,
|
|
675
|
+
endTime: day.isWorkingDay
|
|
676
|
+
? (0, forms_1.trimToNull)(normalizeTimeValue(day.endTime, '18:00'))
|
|
677
|
+
: null,
|
|
678
|
+
breakMinutes: day.isWorkingDay ? (0, forms_1.parseNumberInput)(day.breakMinutes) : 0,
|
|
679
|
+
})),
|
|
680
|
+
};
|
|
681
|
+
try {
|
|
682
|
+
const response = collaboratorId
|
|
683
|
+
? await (0, api_1.mutateOperations)(request, `/operations/collaborators/${collaboratorId}`, 'PATCH', payload)
|
|
684
|
+
: await (0, api_1.mutateOperations)(request, '/operations/collaborators', 'POST', payload);
|
|
685
|
+
setForm(toFormState(response));
|
|
686
|
+
await Promise.all([
|
|
687
|
+
collaboratorId ? refetchCollaborator() : Promise.resolve(),
|
|
688
|
+
refetchCollaboratorTypes(),
|
|
689
|
+
refetchDepartments(),
|
|
690
|
+
refetchCollaborators(),
|
|
691
|
+
refetchJobTitles(),
|
|
692
|
+
]);
|
|
693
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('success', collaboratorId
|
|
694
|
+
? t('messages.updateSuccess')
|
|
695
|
+
: t('messages.createSuccess'));
|
|
696
|
+
if (onSaved) {
|
|
697
|
+
await onSaved(response);
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
router.push(`/operations/collaborators/${response.id}`);
|
|
701
|
+
}
|
|
702
|
+
catch (error) {
|
|
703
|
+
showToastHandler === null || showToastHandler === void 0 ? void 0 : showToastHandler('error', (0, api_1.getOperationsErrorMessage)(error, collaboratorId ? t('messages.updateError') : t('messages.createError')));
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
const noAccessState = (<entity_list_1.EmptyState icon={<lucide_react_1.UserRound className="size-12"/>} title={commonT('states.noAccessTitle')} description={t('noAccessDescription')} actionLabel={commonT('actions.refresh')} onAction={() => router.refresh()}/>);
|
|
707
|
+
const collaboratorSummary = collaborator && isSheetMode ? (<div className="mx-4 rounded-xl border bg-muted/30 px-4 py-3">
|
|
708
|
+
<div className="flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between">
|
|
709
|
+
<div className="flex min-w-0 items-center gap-3">
|
|
710
|
+
<avatar_1.Avatar className="h-12 w-12 border border-border/60 bg-background">
|
|
711
|
+
<avatar_1.AvatarImage src={getPersonAvatarUrl(collaborator.personAvatarId)} alt={collaborator.displayName}/>
|
|
712
|
+
<avatar_1.AvatarFallback className="bg-muted text-sm font-semibold text-foreground">
|
|
713
|
+
{getInitials(collaborator.displayName)}
|
|
714
|
+
</avatar_1.AvatarFallback>
|
|
715
|
+
</avatar_1.Avatar>
|
|
716
|
+
<div className="min-w-0">
|
|
717
|
+
<div className="truncate text-base font-semibold">
|
|
718
|
+
{collaborator.displayName}
|
|
719
|
+
</div>
|
|
720
|
+
<div className="truncate text-xs text-muted-foreground">
|
|
721
|
+
{[
|
|
722
|
+
collaborator.code,
|
|
723
|
+
collaborator.department,
|
|
724
|
+
collaborator.title,
|
|
725
|
+
]
|
|
726
|
+
.filter(Boolean)
|
|
727
|
+
.join(' • ') || commonT('labels.notAvailable')}
|
|
728
|
+
</div>
|
|
729
|
+
</div>
|
|
730
|
+
</div>
|
|
731
|
+
|
|
732
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
733
|
+
<status_badge_1.StatusBadge label={getStatusLabel(collaborator.status)} className={(0, format_1.getStatusBadgeClass)(collaborator.status)}/>
|
|
734
|
+
<span className="inline-flex items-center rounded-full bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary">
|
|
735
|
+
{getCollaboratorTypeLabel((_a = collaborator.collaboratorTypeSlug) !== null && _a !== void 0 ? _a : collaborator.collaboratorType, collaborator.collaboratorTypeName)}
|
|
736
|
+
</span>
|
|
737
|
+
{collaborator.personId ? (<tooltip_1.Tooltip>
|
|
738
|
+
<tooltip_1.TooltipTrigger asChild>
|
|
739
|
+
<button_1.Button variant="outline" size="icon" className="h-7 w-7" onClick={() => void handleOpenPersonSheet()}>
|
|
740
|
+
<lucide_react_1.Pencil className="size-3.5"/>
|
|
741
|
+
</button_1.Button>
|
|
742
|
+
</tooltip_1.TooltipTrigger>
|
|
743
|
+
<tooltip_1.TooltipContent side="bottom">
|
|
744
|
+
{t('actions.editPersonCrm')}
|
|
745
|
+
</tooltip_1.TooltipContent>
|
|
746
|
+
</tooltip_1.Tooltip>) : null}
|
|
747
|
+
</div>
|
|
748
|
+
</div>
|
|
749
|
+
|
|
750
|
+
<div className="mt-3 grid gap-2 text-sm md:grid-cols-2 xl:grid-cols-4">
|
|
751
|
+
<div>
|
|
752
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
753
|
+
{commonT('labels.supervisor')}
|
|
754
|
+
</div>
|
|
755
|
+
<div className="font-medium">
|
|
756
|
+
{collaborator.supervisorName || commonT('labels.notAssigned')}
|
|
757
|
+
</div>
|
|
758
|
+
</div>
|
|
759
|
+
<div>
|
|
760
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
761
|
+
{commonT('labels.weeklyCapacity')}
|
|
762
|
+
</div>
|
|
763
|
+
<div className="font-medium">
|
|
764
|
+
{(0, format_1.formatHours)(collaborator.weeklyCapacityHours)}
|
|
765
|
+
</div>
|
|
766
|
+
</div>
|
|
767
|
+
<div>
|
|
768
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
769
|
+
{commonT('labels.startDate')}
|
|
770
|
+
</div>
|
|
771
|
+
<div className="font-medium">
|
|
772
|
+
{(0, format_1.formatDate)(collaborator.joinedAt)}
|
|
773
|
+
</div>
|
|
774
|
+
</div>
|
|
775
|
+
<div>
|
|
776
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
777
|
+
{commonT('labels.projectCount')}
|
|
778
|
+
</div>
|
|
779
|
+
<div className="font-medium">
|
|
780
|
+
{collaborator.assignedProjects.length}
|
|
781
|
+
</div>
|
|
782
|
+
</div>
|
|
783
|
+
</div>
|
|
784
|
+
</div>) : null;
|
|
785
|
+
if (!access.isDirector && !access.isLoading) {
|
|
786
|
+
if (isSheetMode) {
|
|
787
|
+
return <div className="pt-4">{noAccessState}</div>;
|
|
788
|
+
}
|
|
789
|
+
return (<entity_list_1.Page>
|
|
790
|
+
<operations_header_1.OperationsHeader title={t(collaboratorId ? 'editTitle' : 'newTitle')} description={t('description')} current={t('breadcrumb')}/>
|
|
791
|
+
{noAccessState}
|
|
792
|
+
</entity_list_1.Page>);
|
|
793
|
+
}
|
|
794
|
+
const basicInfoSection = (<div className="space-y-2">
|
|
795
|
+
<div className="space-y-0.5">
|
|
796
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
797
|
+
{t('sections.basicInfo')}
|
|
798
|
+
</h3>
|
|
799
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
800
|
+
{t('sections.basicInfoDescription')}
|
|
801
|
+
</p>
|
|
802
|
+
</div>
|
|
803
|
+
<div className="grid gap-3 md:grid-cols-2 xl:grid-cols-4">
|
|
804
|
+
<div className="space-y-2 md:col-span-2">
|
|
805
|
+
<person_select_with_create_1.PersonSelectWithCreate label={t('fields.person')} entityLabel={t('fields.personEntityLabel')} value={form.personId ? Number(form.personId) : null} initialSelectedLabel={(_b = collaborator === null || collaborator === void 0 ? void 0 : collaborator.personName) !== null && _b !== void 0 ? _b : form.displayName} selectPlaceholder={t('placeholders.person')} onChange={(personId, personName) => setForm((current) => (Object.assign(Object.assign({}, current), { personId: personId ? String(personId) : '', displayName: personName })))}/>
|
|
806
|
+
</div>
|
|
807
|
+
<div className="space-y-2 md:col-span-2 xl:col-span-2">
|
|
808
|
+
<system_user_select_with_create_1.SystemUserSelectWithCreate label={t('fields.userIdOptional')} value={form.userId} options={systemUsers} placeholder={t('placeholders.userIdOptional')} emptyLabel={commonT('labels.notAssigned')} onChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { userId: value })))} onCreate={createSystemUser}/>
|
|
809
|
+
<p className="text-xs text-muted-foreground">
|
|
810
|
+
{t('fields.userIdDescription')}
|
|
811
|
+
</p>
|
|
812
|
+
</div>
|
|
813
|
+
|
|
814
|
+
{!isCreateMode ? (<div className="space-y-2">
|
|
815
|
+
<label_1.Label>{t('fields.levelLabel')}</label_1.Label>
|
|
816
|
+
<select_1.Select value={form.levelLabel} onValueChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { levelLabel: value })))}>
|
|
817
|
+
<select_1.SelectTrigger className="w-full">
|
|
818
|
+
<select_1.SelectValue placeholder={t('placeholders.levelLabel')}/>
|
|
819
|
+
</select_1.SelectTrigger>
|
|
820
|
+
<select_1.SelectContent>
|
|
821
|
+
{COLLABORATOR_LEVEL_OPTIONS.map((level) => (<select_1.SelectItem key={level} value={level}>
|
|
822
|
+
{t(`options.levels.${level}`)}
|
|
823
|
+
</select_1.SelectItem>))}
|
|
824
|
+
</select_1.SelectContent>
|
|
825
|
+
</select_1.Select>
|
|
826
|
+
</div>) : null}
|
|
827
|
+
<div className="space-y-2 xl:col-span-1">
|
|
828
|
+
<department_select_with_create_1.DepartmentSelectWithCreate label={t('fields.department')} value={(_d = (_c = departmentOptions.find((d) => String(d.id) === form.departmentId)) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : ''} options={departmentOptions} selectPlaceholder={t('placeholders.department')} createDescription={t('fields.departmentDescription')} createPlaceholder={t('placeholders.departmentCreate')} onChange={(department) => setForm((current) => (Object.assign(Object.assign({}, current), { departmentId: department.id ? String(department.id) : '' })))}/>
|
|
829
|
+
</div>
|
|
830
|
+
<div className="space-y-2 xl:col-span-1">
|
|
831
|
+
<department_select_with_create_1.DepartmentSelectWithCreate label={t('fields.title')} value={form.title} options={titleOptions} onCreate={createJobTitle} selectPlaceholder={t('placeholders.title')} createDescription={t('fields.titleDescription')} createPlaceholder={t('placeholders.titleCreate')} onChange={(titleOption) => setForm((current) => (Object.assign(Object.assign({}, current), { jobTitleId: titleOption.id ? String(titleOption.id) : '', title: titleOption.name })))}/>
|
|
832
|
+
</div>
|
|
833
|
+
<div className="space-y-2 xl:col-span-1">
|
|
834
|
+
<label className="text-sm font-medium">{t('fields.contract')}</label>
|
|
835
|
+
<entity_picker_1.EntityPicker value={form.contractId ? Number(form.contractId) : null} onChange={(v) => setForm((current) => (Object.assign(Object.assign({}, current), { contractId: v ? String(v) : '' })))} placeholder={t('fields.contractPlaceholder')} emptyLabel={t('fields.contractEmpty')} initialSelectedLabel={form.contractId
|
|
836
|
+
? ((_h = (_f = (_e = collaborator === null || collaborator === void 0 ? void 0 : collaborator.relatedContracts.find((c) => String(c.id) === form.contractId)) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : (_g = collaborator === null || collaborator === void 0 ? void 0 : collaborator.relatedContracts.find((c) => String(c.id) === form.contractId)) === null || _g === void 0 ? void 0 : _g.code) !== null && _h !== void 0 ? _h : undefined)
|
|
837
|
+
: undefined} clearable showCreateButton createTitle={t('fields.contractCreateTitle')} createDescription={t('fields.contractCreateDescription')} createFields={[
|
|
838
|
+
{
|
|
839
|
+
name: 'name',
|
|
840
|
+
label: t('fields.contractNameField'),
|
|
841
|
+
placeholder: t('fields.contractNameField'),
|
|
842
|
+
required: true,
|
|
843
|
+
},
|
|
844
|
+
]} loadOptions={async ({ page, pageSize, search }) => {
|
|
845
|
+
var _a;
|
|
846
|
+
const params = new URLSearchParams({
|
|
847
|
+
page: String(page),
|
|
848
|
+
pageSize: String(pageSize),
|
|
849
|
+
});
|
|
850
|
+
if (search.trim())
|
|
851
|
+
params.set('search', search.trim());
|
|
852
|
+
const res = await (0, api_1.fetchOperations)(request, `/operations/contracts?${params.toString()}`);
|
|
853
|
+
return {
|
|
854
|
+
items: (_a = res.data) !== null && _a !== void 0 ? _a : [],
|
|
855
|
+
hasMore: res.page < res.lastPage,
|
|
856
|
+
};
|
|
857
|
+
}} getOptionValue={(c) => c.id} getOptionLabel={(c) => (c.name || c.code)} getOptionDescription={(c) => [c.code, c.status].filter(Boolean).join(' • ') || undefined} onCreate={async (values) => {
|
|
858
|
+
return (0, api_1.mutateOperations)(request, '/operations/contracts', 'POST', {
|
|
859
|
+
name: values.name,
|
|
860
|
+
billingModel: 'time_and_material',
|
|
861
|
+
});
|
|
862
|
+
}}/>
|
|
863
|
+
</div>
|
|
864
|
+
</div>
|
|
865
|
+
</div>);
|
|
866
|
+
const employmentInfoSection = (<div className="space-y-2">
|
|
867
|
+
<div className="space-y-0.5">
|
|
868
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
869
|
+
{t('sections.employmentInfo')}
|
|
870
|
+
</h3>
|
|
871
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
872
|
+
{isCreateMode
|
|
873
|
+
? t('sections.employmentInfoCreateDescription')
|
|
874
|
+
: t('sections.employmentInfoDescription')}
|
|
875
|
+
</p>
|
|
876
|
+
</div>
|
|
877
|
+
<div className="grid gap-3 md:grid-cols-2 xl:grid-cols-4">
|
|
878
|
+
<div className="space-y-2 xl:col-span-1">
|
|
879
|
+
<label className="text-sm font-medium">
|
|
880
|
+
{t('fields.collaboratorType')}
|
|
881
|
+
</label>
|
|
882
|
+
|
|
883
|
+
<select_1.Select value={form.collaboratorTypeId} onValueChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { collaboratorTypeId: value })))}>
|
|
884
|
+
<select_1.SelectTrigger className="w-full">
|
|
885
|
+
<select_1.SelectValue placeholder={isLoadingCollaboratorTypes
|
|
886
|
+
? t('states.loadingCollaboratorTypes')
|
|
887
|
+
: t('placeholders.collaboratorType')}/>
|
|
888
|
+
</select_1.SelectTrigger>
|
|
889
|
+
<select_1.SelectContent>
|
|
890
|
+
{collaboratorTypes.map((collaboratorType) => (<select_1.SelectItem key={collaboratorType.id} value={String(collaboratorType.id)}>
|
|
891
|
+
{collaboratorType.name}
|
|
892
|
+
</select_1.SelectItem>))}
|
|
893
|
+
</select_1.SelectContent>
|
|
894
|
+
</select_1.Select>
|
|
895
|
+
</div>
|
|
896
|
+
<div className="space-y-2">
|
|
897
|
+
<label className="text-sm font-medium">
|
|
898
|
+
{commonT('labels.status')}
|
|
899
|
+
</label>
|
|
900
|
+
<select_1.Select value={form.status} onValueChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { status: value })))}>
|
|
901
|
+
<select_1.SelectTrigger className="w-full">
|
|
902
|
+
<select_1.SelectValue />
|
|
903
|
+
</select_1.SelectTrigger>
|
|
904
|
+
<select_1.SelectContent>
|
|
905
|
+
<select_1.SelectItem value="active">
|
|
906
|
+
{t('options.statuses.active')}
|
|
907
|
+
</select_1.SelectItem>
|
|
908
|
+
<select_1.SelectItem value="on_leave">
|
|
909
|
+
{t('options.statuses.on_leave')}
|
|
910
|
+
</select_1.SelectItem>
|
|
911
|
+
<select_1.SelectItem value="inactive">
|
|
912
|
+
{t('options.statuses.inactive')}
|
|
913
|
+
</select_1.SelectItem>
|
|
914
|
+
<select_1.SelectItem value="draft">
|
|
915
|
+
{t('options.statuses.draft')}
|
|
916
|
+
</select_1.SelectItem>
|
|
917
|
+
</select_1.SelectContent>
|
|
918
|
+
</select_1.Select>
|
|
919
|
+
</div>
|
|
920
|
+
<div className="space-y-2">
|
|
921
|
+
<label className="text-sm font-medium">
|
|
922
|
+
{commonT('labels.startDate')}
|
|
923
|
+
</label>
|
|
924
|
+
<input_1.Input type="date" value={form.joinedAt} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { joinedAt: event.target.value })))}/>
|
|
925
|
+
</div>
|
|
926
|
+
<div className="space-y-2">
|
|
927
|
+
<label className="text-sm font-medium">
|
|
928
|
+
{commonT('labels.endDate')}
|
|
929
|
+
</label>
|
|
930
|
+
<input_1.Input type="date" value={form.leftAt} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { leftAt: event.target.value })))}/>
|
|
931
|
+
</div>
|
|
932
|
+
{isCreateMode ? (<>
|
|
933
|
+
<div className="space-y-2">
|
|
934
|
+
<label className="text-sm font-medium">
|
|
935
|
+
{t('fields.weeklyCapacityHours')}
|
|
936
|
+
</label>
|
|
937
|
+
<input_1.Input type="number" step="0.5" value={form.weeklyCapacityHours} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { weeklyCapacityHours: event.target.value })))}/>
|
|
938
|
+
</div>
|
|
939
|
+
<div className="space-y-2">
|
|
940
|
+
<label className="text-sm font-medium">
|
|
941
|
+
{t('fields.compensationAmount')}
|
|
942
|
+
</label>
|
|
943
|
+
<input_money_1.InputMoney step="0.01" value={form.compensationAmount === ''
|
|
944
|
+
? ''
|
|
945
|
+
: Number(form.compensationAmount)} onValueChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { compensationAmount: value !== null ? String(value) : '' })))}/>
|
|
946
|
+
</div>
|
|
947
|
+
</>) : null}
|
|
948
|
+
</div>
|
|
949
|
+
</div>);
|
|
950
|
+
const equitySection = shouldShowEquitySection ? (<div className="space-y-2">
|
|
951
|
+
<div className="space-y-0.5">
|
|
952
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
953
|
+
{t('sections.equity')}
|
|
954
|
+
</h3>
|
|
955
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
956
|
+
{t('sections.equityDescription')}
|
|
957
|
+
</p>
|
|
958
|
+
</div>
|
|
959
|
+
<div className="grid gap-3 md:grid-cols-2 xl:grid-cols-4">
|
|
960
|
+
<div className="space-y-2 xl:col-span-2">
|
|
961
|
+
<label className="text-sm font-medium">
|
|
962
|
+
{t('fields.equityParticipationType')}
|
|
963
|
+
</label>
|
|
964
|
+
<select_1.Select value={form.equityParticipation.participationType} onValueChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { equityParticipation: Object.assign(Object.assign({}, current.equityParticipation), { participationType: value }) })))}>
|
|
965
|
+
<select_1.SelectTrigger className="w-full">
|
|
966
|
+
<select_1.SelectValue />
|
|
967
|
+
</select_1.SelectTrigger>
|
|
968
|
+
<select_1.SelectContent>
|
|
969
|
+
<select_1.SelectItem value="partner_quota_holder">
|
|
970
|
+
{t('options.equityParticipationTypes.partner_quota_holder')}
|
|
971
|
+
</select_1.SelectItem>
|
|
972
|
+
<select_1.SelectItem value="common_shareholder">
|
|
973
|
+
{t('options.equityParticipationTypes.common_shareholder')}
|
|
974
|
+
</select_1.SelectItem>
|
|
975
|
+
<select_1.SelectItem value="preferred_shareholder">
|
|
976
|
+
{t('options.equityParticipationTypes.preferred_shareholder')}
|
|
977
|
+
</select_1.SelectItem>
|
|
978
|
+
<select_1.SelectItem value="administrator">
|
|
979
|
+
{t('options.equityParticipationTypes.administrator')}
|
|
980
|
+
</select_1.SelectItem>
|
|
981
|
+
<select_1.SelectItem value="other">
|
|
982
|
+
{t('options.equityParticipationTypes.other')}
|
|
983
|
+
</select_1.SelectItem>
|
|
984
|
+
</select_1.SelectContent>
|
|
985
|
+
</select_1.Select>
|
|
986
|
+
</div>
|
|
987
|
+
<div className="space-y-2">
|
|
988
|
+
<label_1.Label>{t('fields.equityPercentage')}</label_1.Label>
|
|
989
|
+
<input_1.Input type="text" inputMode="decimal" placeholder={t('placeholders.equityPercentage')} value={form.equityParticipation.percentage} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { equityParticipation: Object.assign(Object.assign({}, current.equityParticipation), { percentage: (0, forms_1.normalizePercentInput)(event.target.value) }) })))}/>
|
|
990
|
+
</div>
|
|
991
|
+
<div className="space-y-2">
|
|
992
|
+
<label_1.Label>{t('fields.votingPower')}</label_1.Label>
|
|
993
|
+
<input_1.Input type="text" inputMode="decimal" placeholder={t('placeholders.votingPower')} value={form.equityParticipation.votingPower} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { equityParticipation: Object.assign(Object.assign({}, current.equityParticipation), { votingPower: (0, forms_1.normalizePercentInput)(event.target.value) }) })))}/>
|
|
994
|
+
</div>
|
|
995
|
+
<div className="space-y-2">
|
|
996
|
+
<label_1.Label>{commonT('labels.startDate')}</label_1.Label>
|
|
997
|
+
<input_1.Input type="date" value={form.equityParticipation.startDate} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { equityParticipation: Object.assign(Object.assign({}, current.equityParticipation), { startDate: event.target.value }) })))}/>
|
|
998
|
+
</div>
|
|
999
|
+
<div className="space-y-2">
|
|
1000
|
+
<label_1.Label>{commonT('labels.endDate')}</label_1.Label>
|
|
1001
|
+
<input_1.Input type="date" value={form.equityParticipation.endDate} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { equityParticipation: Object.assign(Object.assign({}, current.equityParticipation), { endDate: event.target.value }) })))}/>
|
|
1002
|
+
</div>
|
|
1003
|
+
<div className="space-y-2 md:col-span-2 xl:col-span-4">
|
|
1004
|
+
<label_1.Label>{t('fields.equityNotes')}</label_1.Label>
|
|
1005
|
+
<textarea_1.Textarea rows={4} placeholder={t('placeholders.equityNotes')} value={form.equityParticipation.notes} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { equityParticipation: Object.assign(Object.assign({}, current.equityParticipation), { notes: event.target.value }) })))}/>
|
|
1006
|
+
</div>
|
|
1007
|
+
</div>
|
|
1008
|
+
</div>) : null;
|
|
1009
|
+
const supervisorSection = (<div className="space-y-2">
|
|
1010
|
+
<div className="space-y-0.5">
|
|
1011
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
1012
|
+
{t('sections.supervisor')}
|
|
1013
|
+
</h3>
|
|
1014
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
1015
|
+
{t('sections.supervisorDescription')}
|
|
1016
|
+
</p>
|
|
1017
|
+
</div>
|
|
1018
|
+
<SupervisorAutocomplete label={commonT('labels.supervisor')} value={form.supervisorCollaboratorId} options={supervisorOptions} placeholder={t('placeholders.supervisor')} emptyLabel={commonT('labels.notAssigned')} onChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { supervisorCollaboratorId: value })))}/>
|
|
1019
|
+
</div>);
|
|
1020
|
+
const contractSection = (<div className="space-y-2">
|
|
1021
|
+
<div className="space-y-0.5">
|
|
1022
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
1023
|
+
{t('sections.contract')}
|
|
1024
|
+
</h3>
|
|
1025
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
1026
|
+
{t('sections.contractDescription')}
|
|
1027
|
+
</p>
|
|
1028
|
+
</div>
|
|
1029
|
+
<div className="grid gap-3 md:grid-cols-3">
|
|
1030
|
+
<div className="space-y-2">
|
|
1031
|
+
<label className="text-sm font-medium">
|
|
1032
|
+
{t('fields.weeklyCapacityHours')}
|
|
1033
|
+
</label>
|
|
1034
|
+
<input_1.Input type="number" step="0.5" value={form.weeklyCapacityHours} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { weeklyCapacityHours: event.target.value })))}/>
|
|
1035
|
+
</div>
|
|
1036
|
+
<div className="space-y-2">
|
|
1037
|
+
<label className="text-sm font-medium">
|
|
1038
|
+
{t('fields.compensationAmount')}
|
|
1039
|
+
</label>
|
|
1040
|
+
<input_money_1.InputMoney step="0.01" value={form.compensationAmount === ''
|
|
1041
|
+
? ''
|
|
1042
|
+
: Number(form.compensationAmount)} onValueChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { compensationAmount: value !== null ? String(value) : '' })))}/>
|
|
1043
|
+
</div>
|
|
1044
|
+
<div className="space-y-2">
|
|
1045
|
+
<SupervisorAutocomplete label={commonT('labels.supervisor')} value={form.supervisorCollaboratorId} options={supervisorOptions} placeholder={t('placeholders.supervisor')} emptyLabel={commonT('labels.notAssigned')} onChange={(value) => setForm((current) => (Object.assign(Object.assign({}, current), { supervisorCollaboratorId: value })))}/>
|
|
1046
|
+
</div>
|
|
1047
|
+
</div>
|
|
1048
|
+
</div>);
|
|
1049
|
+
const scheduleSection = (<div className="space-y-2">
|
|
1050
|
+
<div className="space-y-0.5">
|
|
1051
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
1052
|
+
{t('sections.schedule')}
|
|
1053
|
+
</h3>
|
|
1054
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
1055
|
+
{t('sections.scheduleDescription')}
|
|
1056
|
+
</p>
|
|
1057
|
+
</div>
|
|
1058
|
+
<div className="space-y-1.5">
|
|
1059
|
+
{form.weeklySchedule.map((day) => (<div key={day.weekday} className="grid gap-2 rounded-md border px-3 py-2 md:grid-cols-[minmax(108px,0.9fr)_auto_repeat(3,minmax(88px,1fr))] md:items-center">
|
|
1060
|
+
<div className="space-y-0.5 md:pr-1">
|
|
1061
|
+
<div className="text-sm font-medium leading-none">
|
|
1062
|
+
{(0, format_1.formatWeekdayLabel)(day.weekday, currentLocaleCode)}
|
|
1063
|
+
</div>
|
|
1064
|
+
<div className="text-[10px] leading-none text-muted-foreground">
|
|
1065
|
+
{day.isWorkingDay
|
|
1066
|
+
? commonT('labels.workingDay')
|
|
1067
|
+
: commonT('labels.dayOff')}
|
|
1068
|
+
</div>
|
|
1069
|
+
</div>
|
|
1070
|
+
<div className="flex items-center justify-between gap-2 rounded-md bg-muted/30 px-2 py-1.5 md:justify-center md:bg-transparent md:p-0">
|
|
1071
|
+
<span className="text-[10px] font-medium uppercase tracking-wide text-muted-foreground md:hidden">
|
|
1072
|
+
{commonT('labels.workingDay')}
|
|
1073
|
+
</span>
|
|
1074
|
+
<switch_1.Switch checked={day.isWorkingDay} onCheckedChange={(checked) => updateScheduleDay(day.weekday, { isWorkingDay: checked })}/>
|
|
1075
|
+
</div>
|
|
1076
|
+
<div className="space-y-0.5">
|
|
1077
|
+
<div className="text-[10px] uppercase tracking-wide text-muted-foreground">
|
|
1078
|
+
{t('fields.startTime')}
|
|
1079
|
+
</div>
|
|
1080
|
+
<input_1.Input className="h-8" type="time" value={normalizeTimeValue(day.startTime, day.isWorkingDay ? '09:00' : '')} disabled={!day.isWorkingDay} onChange={(event) => updateScheduleDay(day.weekday, {
|
|
1081
|
+
startTime: event.target.value,
|
|
1082
|
+
})}/>
|
|
1083
|
+
</div>
|
|
1084
|
+
<div className="space-y-0.5">
|
|
1085
|
+
<div className="text-[10px] uppercase tracking-wide text-muted-foreground">
|
|
1086
|
+
{t('fields.endTime')}
|
|
1087
|
+
</div>
|
|
1088
|
+
<input_1.Input className="h-8" type="time" value={normalizeTimeValue(day.endTime, day.isWorkingDay ? '18:00' : '')} disabled={!day.isWorkingDay} onChange={(event) => updateScheduleDay(day.weekday, {
|
|
1089
|
+
endTime: event.target.value,
|
|
1090
|
+
})}/>
|
|
1091
|
+
</div>
|
|
1092
|
+
<div className="space-y-0.5">
|
|
1093
|
+
<div className="flex items-center gap-1 text-[10px] uppercase tracking-wide text-muted-foreground">
|
|
1094
|
+
<span>{t('fields.breakMinutes')}</span>
|
|
1095
|
+
<tooltip_1.Tooltip>
|
|
1096
|
+
<tooltip_1.TooltipTrigger asChild>
|
|
1097
|
+
<span className="inline-flex cursor-help">
|
|
1098
|
+
<lucide_react_1.Info className="h-3.5 w-3.5"/>
|
|
1099
|
+
</span>
|
|
1100
|
+
</tooltip_1.TooltipTrigger>
|
|
1101
|
+
<tooltip_1.TooltipContent>
|
|
1102
|
+
<p>{t('fields.breakMinutesDescription')}</p>
|
|
1103
|
+
</tooltip_1.TooltipContent>
|
|
1104
|
+
</tooltip_1.Tooltip>
|
|
1105
|
+
</div>
|
|
1106
|
+
<input_1.Input className="h-8" type="number" min="0" step="5" placeholder="60" title={t('fields.breakMinutesDescription')} aria-label={t('fields.breakMinutes')} value={day.breakMinutes} disabled={!day.isWorkingDay} onChange={(event) => updateScheduleDay(day.weekday, {
|
|
1107
|
+
breakMinutes: event.target.value,
|
|
1108
|
+
})}/>
|
|
1109
|
+
</div>
|
|
1110
|
+
</div>))}
|
|
1111
|
+
</div>
|
|
1112
|
+
|
|
1113
|
+
<div className="space-y-2 pt-1">
|
|
1114
|
+
<label_1.Label>{t('fields.notes')}</label_1.Label>
|
|
1115
|
+
<textarea_1.Textarea rows={4} value={form.notes} onChange={(event) => setForm((current) => (Object.assign(Object.assign({}, current), { notes: event.target.value })))}/>
|
|
1116
|
+
</div>
|
|
1117
|
+
</div>);
|
|
1118
|
+
const activitySection = collaborator ? (<div className="space-y-4">
|
|
1119
|
+
<div className="grid gap-3 sm:grid-cols-2 xl:grid-cols-4">
|
|
1120
|
+
<div className="rounded-xl border bg-muted/20 px-4 py-3">
|
|
1121
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
1122
|
+
{detailsT('cards.timesheets')}
|
|
1123
|
+
</div>
|
|
1124
|
+
<div className="mt-1 text-xl font-semibold">
|
|
1125
|
+
{collaborator.timesheetSummary.totalTimesheets}
|
|
1126
|
+
</div>
|
|
1127
|
+
<p className="text-xs text-muted-foreground">
|
|
1128
|
+
{detailsT('cards.timesheetsDescription', {
|
|
1129
|
+
pending: collaborator.timesheetSummary.pendingTimesheets,
|
|
1130
|
+
})}
|
|
1131
|
+
</p>
|
|
1132
|
+
</div>
|
|
1133
|
+
|
|
1134
|
+
<div className="rounded-xl border bg-muted/20 px-4 py-3">
|
|
1135
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
1136
|
+
{detailsT('cards.loggedHours')}
|
|
1137
|
+
</div>
|
|
1138
|
+
<div className="mt-1 text-xl font-semibold">
|
|
1139
|
+
{(0, format_1.formatHours)(collaborator.timesheetSummary.totalHours)}
|
|
1140
|
+
</div>
|
|
1141
|
+
<p className="text-xs text-muted-foreground">
|
|
1142
|
+
{detailsT('cards.loggedHoursDescription')}
|
|
1143
|
+
</p>
|
|
1144
|
+
</div>
|
|
1145
|
+
|
|
1146
|
+
<div className="rounded-xl border bg-muted/20 px-4 py-3">
|
|
1147
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
1148
|
+
{detailsT('cards.timeOff')}
|
|
1149
|
+
</div>
|
|
1150
|
+
<div className="mt-1 text-xl font-semibold">
|
|
1151
|
+
{collaborator.timeOffSummary.totalRequests}
|
|
1152
|
+
</div>
|
|
1153
|
+
<p className="text-xs text-muted-foreground">
|
|
1154
|
+
{detailsT('cards.timeOffDescription', {
|
|
1155
|
+
pending: collaborator.timeOffSummary.pendingRequests,
|
|
1156
|
+
})}
|
|
1157
|
+
</p>
|
|
1158
|
+
</div>
|
|
1159
|
+
|
|
1160
|
+
<div className="rounded-xl border bg-muted/20 px-4 py-3">
|
|
1161
|
+
<div className="text-[11px] uppercase tracking-wide text-muted-foreground">
|
|
1162
|
+
{detailsT('sections.scheduleAdjustments')}
|
|
1163
|
+
</div>
|
|
1164
|
+
<div className="mt-1 text-xl font-semibold">
|
|
1165
|
+
{collaborator.scheduleAdjustmentRequests.length}
|
|
1166
|
+
</div>
|
|
1167
|
+
<p className="text-xs text-muted-foreground">
|
|
1168
|
+
{detailsT('sections.scheduleAdjustmentsDescription')}
|
|
1169
|
+
</p>
|
|
1170
|
+
</div>
|
|
1171
|
+
</div>
|
|
1172
|
+
|
|
1173
|
+
<div className="grid gap-4 xl:grid-cols-2">
|
|
1174
|
+
<div className="rounded-xl border px-4 py-3">
|
|
1175
|
+
<div className="mb-3 space-y-0.5">
|
|
1176
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
1177
|
+
{detailsT('sections.projects')}
|
|
1178
|
+
</h3>
|
|
1179
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
1180
|
+
{detailsT('sections.projectsDescription')}
|
|
1181
|
+
</p>
|
|
1182
|
+
</div>
|
|
1183
|
+
|
|
1184
|
+
{collaborator.assignedProjects.length > 0 ? (<div className="space-y-2">
|
|
1185
|
+
{collaborator.assignedProjects.slice(0, 6).map((project) => (<div key={project.id} className="flex flex-col gap-2 rounded-lg border px-3 py-2.5">
|
|
1186
|
+
<div className="flex items-start justify-between gap-3">
|
|
1187
|
+
<div className="min-w-0">
|
|
1188
|
+
<div className="truncate font-medium">{project.name}</div>
|
|
1189
|
+
<div className="truncate text-xs text-muted-foreground">
|
|
1190
|
+
{[
|
|
1191
|
+
project.code,
|
|
1192
|
+
project.roleLabel || commonT('labels.notAssigned'),
|
|
1193
|
+
project.weeklyHours !== null &&
|
|
1194
|
+
project.weeklyHours !== undefined
|
|
1195
|
+
? (0, format_1.formatHours)(project.weeklyHours)
|
|
1196
|
+
: null,
|
|
1197
|
+
project.allocationPercent !== null &&
|
|
1198
|
+
project.allocationPercent !== undefined
|
|
1199
|
+
? `${project.allocationPercent}%`
|
|
1200
|
+
: null,
|
|
1201
|
+
]
|
|
1202
|
+
.filter(Boolean)
|
|
1203
|
+
.join(' • ')}
|
|
1204
|
+
</div>
|
|
1205
|
+
</div>
|
|
1206
|
+
<status_badge_1.StatusBadge label={(0, format_1.formatEnumLabel)(project.status)} className={(0, format_1.getStatusBadgeClass)(project.status)}/>
|
|
1207
|
+
</div>
|
|
1208
|
+
<div className="text-xs text-muted-foreground">
|
|
1209
|
+
{(0, format_1.formatDateRange)(project.startDate, project.endDate)}
|
|
1210
|
+
</div>
|
|
1211
|
+
</div>))}
|
|
1212
|
+
</div>) : (<p className="text-sm text-muted-foreground">
|
|
1213
|
+
{detailsT('noProjects')}
|
|
1214
|
+
</p>)}
|
|
1215
|
+
</div>
|
|
1216
|
+
|
|
1217
|
+
<div className="space-y-4">
|
|
1218
|
+
<div className="rounded-xl border px-4 py-3">
|
|
1219
|
+
<div className="mb-3 space-y-0.5">
|
|
1220
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
1221
|
+
{detailsT('sections.primaryContract')}
|
|
1222
|
+
</h3>
|
|
1223
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
1224
|
+
{t('sections.contractDescription')}
|
|
1225
|
+
</p>
|
|
1226
|
+
</div>
|
|
1227
|
+
|
|
1228
|
+
{collaborator.relatedContracts.length > 0 ? (<div className="space-y-2">
|
|
1229
|
+
{collaborator.relatedContracts.slice(0, 3).map((contract) => (<link_1.default key={contract.id} href={`/operations/contracts?edit=${contract.id}`} className="flex cursor-pointer items-center justify-between gap-3 rounded-lg border px-3 py-2.5 transition-colors hover:bg-muted/20">
|
|
1230
|
+
<div className="min-w-0">
|
|
1231
|
+
<div className="truncate font-medium">
|
|
1232
|
+
{contract.name || contract.code}
|
|
1233
|
+
</div>
|
|
1234
|
+
<div className="truncate text-xs text-muted-foreground">
|
|
1235
|
+
{[
|
|
1236
|
+
contract.code,
|
|
1237
|
+
(0, format_1.formatEnumLabel)(contract.contractCategory),
|
|
1238
|
+
]
|
|
1239
|
+
.filter(Boolean)
|
|
1240
|
+
.join(' • ')}
|
|
1241
|
+
</div>
|
|
1242
|
+
</div>
|
|
1243
|
+
<status_badge_1.StatusBadge label={(0, format_1.formatEnumLabel)(contract.status)} className={(0, format_1.getStatusBadgeClass)(contract.status)}/>
|
|
1244
|
+
</link_1.default>))}
|
|
1245
|
+
</div>) : (<p className="text-sm text-muted-foreground">
|
|
1246
|
+
{detailsT('noContracts')}
|
|
1247
|
+
</p>)}
|
|
1248
|
+
</div>
|
|
1249
|
+
|
|
1250
|
+
<div className="rounded-xl border px-4 py-3">
|
|
1251
|
+
<div className="mb-3 space-y-0.5">
|
|
1252
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
|
|
1253
|
+
{detailsT('sections.scheduleAdjustments')}
|
|
1254
|
+
</h3>
|
|
1255
|
+
<p className="text-[11px] text-muted-foreground/80">
|
|
1256
|
+
{detailsT('sections.scheduleAdjustmentsDescription')}
|
|
1257
|
+
</p>
|
|
1258
|
+
</div>
|
|
1259
|
+
|
|
1260
|
+
{collaborator.scheduleAdjustmentRequests.length > 0 ? (<div className="space-y-2">
|
|
1261
|
+
{collaborator.scheduleAdjustmentRequests
|
|
1262
|
+
.slice(0, 4)
|
|
1263
|
+
.map((request) => (<div key={request.id} className="flex items-center justify-between gap-3 rounded-lg border px-3 py-2.5">
|
|
1264
|
+
<div className="min-w-0">
|
|
1265
|
+
<div className="font-medium">
|
|
1266
|
+
{(0, format_1.formatEnumLabel)(request.requestScope)}
|
|
1267
|
+
</div>
|
|
1268
|
+
<div className="truncate text-xs text-muted-foreground">
|
|
1269
|
+
{(0, format_1.formatDateRange)(request.effectiveStartDate, request.effectiveEndDate)}
|
|
1270
|
+
</div>
|
|
1271
|
+
</div>
|
|
1272
|
+
<status_badge_1.StatusBadge label={(0, format_1.formatEnumLabel)(request.status)} className={(0, format_1.getStatusBadgeClass)(request.status)}/>
|
|
1273
|
+
</div>))}
|
|
1274
|
+
</div>) : (<p className="text-sm text-muted-foreground">
|
|
1275
|
+
{detailsT('noScheduleAdjustments')}
|
|
1276
|
+
</p>)}
|
|
1277
|
+
</div>
|
|
1278
|
+
</div>
|
|
1279
|
+
</div>
|
|
1280
|
+
</div>) : null;
|
|
1281
|
+
const profileContent = (<div className="space-y-4">
|
|
1282
|
+
{basicInfoSection}
|
|
1283
|
+
{employmentInfoSection}
|
|
1284
|
+
{!isCreateMode ? equitySection : null}
|
|
1285
|
+
</div>);
|
|
1286
|
+
const costsSection = (<accordion_1.Accordion type="single" collapsible defaultValue={isCreateMode ? undefined : 'costs'}>
|
|
1287
|
+
<accordion_1.AccordionItem value="costs" className="rounded-xl border px-4">
|
|
1288
|
+
<accordion_1.AccordionTrigger className="py-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground hover:no-underline">
|
|
1289
|
+
{t('sections.costs')}
|
|
1290
|
+
</accordion_1.AccordionTrigger>
|
|
1291
|
+
<accordion_1.AccordionContent className="pb-4">
|
|
1292
|
+
{isCreateMode || !collaborator ? (<p className="text-sm text-muted-foreground">
|
|
1293
|
+
{t('sections.costsSaveBefore')}
|
|
1294
|
+
</p>) : (<collaborator_costs_section_1.CollaboratorCostsSection collaboratorId={collaborator.id} disabled={!access.isDirector} weeklyCapacity={(_j = collaborator.weeklyCapacityHours) !== null && _j !== void 0 ? _j : undefined} remunerationValue={collaborator.compensationAmount != null
|
|
1295
|
+
? Number(collaborator.compensationAmount)
|
|
1296
|
+
: undefined}/>)}
|
|
1297
|
+
</accordion_1.AccordionContent>
|
|
1298
|
+
</accordion_1.AccordionItem>
|
|
1299
|
+
</accordion_1.Accordion>);
|
|
1300
|
+
const formContent = isSheetMode ? (<div className="space-y-4 px-4">
|
|
1301
|
+
{profileContent}
|
|
1302
|
+
{contractSection}
|
|
1303
|
+
{!isCreateMode ? costsSection : null}
|
|
1304
|
+
{!isCreateMode ? scheduleSection : null}
|
|
1305
|
+
{activitySection}
|
|
1306
|
+
</div>) : (<div className="space-y-4 px-4">
|
|
1307
|
+
{profileContent}
|
|
1308
|
+
{contractSection}
|
|
1309
|
+
{!isCreateMode ? costsSection : null}
|
|
1310
|
+
{!isCreateMode ? scheduleSection : null}
|
|
1311
|
+
</div>);
|
|
1312
|
+
const loadingState = collaboratorId && isLoadingCollaborator ? (<div className="text-sm text-muted-foreground">{t('loading')}</div>) : null;
|
|
1313
|
+
if (isSheetMode) {
|
|
1314
|
+
return (<div className="mt-6 space-y-4 pb-6">
|
|
1315
|
+
{collaboratorSummary}
|
|
1316
|
+
{formContent}
|
|
1317
|
+
{loadingState}
|
|
1318
|
+
|
|
1319
|
+
<form_actions_1.FormActions sheet cancelLabel={commonT('actions.cancel')} onCancel={onCancel} onSubmit={() => void onSubmit()} submitIcon={<lucide_react_1.Save className="size-4"/>} submitLabel={commonT('actions.save')} submitSize="lg"/>
|
|
1320
|
+
|
|
1321
|
+
<person_form_sheet_1.PersonFormSheet open={personSheetOpen} person={personToEdit} contactTypes={contactTypes} documentTypes={documentTypes} onOpenChange={(nextOpen) => {
|
|
1322
|
+
setPersonSheetOpen(nextOpen);
|
|
1323
|
+
if (!nextOpen)
|
|
1324
|
+
setPersonToEdit(null);
|
|
1325
|
+
}} onSuccess={() => void refetchCollaborator()}/>
|
|
1326
|
+
</div>);
|
|
1327
|
+
}
|
|
1328
|
+
return (<entity_list_1.Page>
|
|
1329
|
+
<operations_header_1.OperationsHeader title={t(collaboratorId ? 'editTitle' : 'newTitle')} description={isCreateMode ? t('descriptionCreate') : t('description')} current={t('breadcrumb')} actions={<div className="flex gap-2">
|
|
1330
|
+
<button_1.Button variant="outline" size="sm" asChild>
|
|
1331
|
+
<link_1.default href={collaboratorId
|
|
1332
|
+
? `/operations/collaborators/${collaboratorId}`
|
|
1333
|
+
: '/operations/collaborators'}>
|
|
1334
|
+
<lucide_react_1.ArrowLeft className="size-4"/>
|
|
1335
|
+
{commonT('actions.back')}
|
|
1336
|
+
</link_1.default>
|
|
1337
|
+
</button_1.Button>
|
|
1338
|
+
<button_1.Button size="sm" onClick={() => void onSubmit()}>
|
|
1339
|
+
<lucide_react_1.Save className="size-4"/>
|
|
1340
|
+
{commonT('actions.save')}
|
|
1341
|
+
</button_1.Button>
|
|
1342
|
+
</div>}/>
|
|
1343
|
+
|
|
1344
|
+
{formContent}
|
|
1345
|
+
{loadingState}
|
|
1346
|
+
</entity_list_1.Page>);
|
|
1347
|
+
}
|
|
1348
|
+
//# sourceMappingURL=collaborator-form-screen.js.map
|