@hed-hog/operations 0.0.322 → 0.0.326
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 +14 -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 +571 -1
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +1793 -69
- package/dist/operations.service.js.map +1 -1
- package/hedhog/data/integration_event_catalog.yaml +313 -0
- 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/data/setting_group.yaml +21 -0
- package/hedhog/frontend/app/_components/collaborator-costs-section.tsx.ejs +2 -18
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +593 -297
- 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 +533 -296
- 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 +2248 -2063
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +56 -11
- package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +454 -96
- package/hedhog/frontend/app/_components/task-form-sheet.tsx.ejs +784 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +256 -0
- package/hedhog/frontend/app/_lib/hooks/use-mention-items.ts.ejs +28 -0
- package/hedhog/frontend/app/_lib/types.ts.ejs +190 -0
- 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 +536 -328
- 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 +217 -485
- package/hedhog/frontend/messages/en.json +257 -5
- package/hedhog/frontend/messages/en.json.ejs +2060 -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 +256 -4
- package/hedhog/frontend/messages/pt.json.ejs +2067 -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 +837 -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 +861 -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 +837 -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 +861 -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_collaborator.yaml +5 -0
- package/hedhog/table/operations_collaborator_compensation_history.yaml +4 -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 +2472 -61
package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TaskFileAttachments = TaskFileAttachments;
|
|
5
|
+
const button_1 = require("@/components/ui/button");
|
|
6
|
+
const next_app_provider_1 = require("@hed-hog/next-app-provider");
|
|
7
|
+
const lucide_react_1 = require("lucide-react");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
10
|
+
function formatBytes(bytes) {
|
|
11
|
+
if (bytes === 0)
|
|
12
|
+
return '0 B';
|
|
13
|
+
const k = 1024;
|
|
14
|
+
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
15
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
16
|
+
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${sizes[i]}`;
|
|
17
|
+
}
|
|
18
|
+
function getFileIcon(mimetype, filename) {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
const ext = (_b = (_a = filename.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';
|
|
21
|
+
if (mimetype.startsWith('image/'))
|
|
22
|
+
return lucide_react_1.FileImage;
|
|
23
|
+
if (mimetype.startsWith('video/'))
|
|
24
|
+
return lucide_react_1.FileVideo;
|
|
25
|
+
if (mimetype.startsWith('audio/'))
|
|
26
|
+
return lucide_react_1.FileAudio;
|
|
27
|
+
if (mimetype === 'application/pdf' ||
|
|
28
|
+
mimetype.includes('word') ||
|
|
29
|
+
mimetype.includes('document'))
|
|
30
|
+
return lucide_react_1.FileText;
|
|
31
|
+
if (mimetype.includes('spreadsheet') ||
|
|
32
|
+
mimetype.includes('excel') ||
|
|
33
|
+
ext === 'xlsx' ||
|
|
34
|
+
ext === 'xls')
|
|
35
|
+
return lucide_react_1.FileSpreadsheet;
|
|
36
|
+
if (ext === 'csv')
|
|
37
|
+
return lucide_react_1.FileSpreadsheet;
|
|
38
|
+
if (mimetype.includes('zip') ||
|
|
39
|
+
mimetype.includes('compressed') ||
|
|
40
|
+
mimetype.includes('archive') ||
|
|
41
|
+
['zip', 'rar', '7z', 'tar', 'gz'].includes(ext))
|
|
42
|
+
return lucide_react_1.Archive;
|
|
43
|
+
if ([
|
|
44
|
+
'js',
|
|
45
|
+
'ts',
|
|
46
|
+
'tsx',
|
|
47
|
+
'jsx',
|
|
48
|
+
'py',
|
|
49
|
+
'java',
|
|
50
|
+
'cs',
|
|
51
|
+
'cpp',
|
|
52
|
+
'c',
|
|
53
|
+
'go',
|
|
54
|
+
'rs',
|
|
55
|
+
'json',
|
|
56
|
+
'xml',
|
|
57
|
+
'html',
|
|
58
|
+
'css',
|
|
59
|
+
].includes(ext) ||
|
|
60
|
+
mimetype.includes('javascript') ||
|
|
61
|
+
mimetype.includes('json') ||
|
|
62
|
+
mimetype.includes('xml') ||
|
|
63
|
+
mimetype.includes('html'))
|
|
64
|
+
return lucide_react_1.FileCode;
|
|
65
|
+
return lucide_react_1.File;
|
|
66
|
+
}
|
|
67
|
+
function getFileOpenUrl(fileId) {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
const base = typeof process !== 'undefined'
|
|
70
|
+
? ((_b = (_a = process.env.NEXT_PUBLIC_API_BASE_URL) === null || _a === void 0 ? void 0 : _a.trim().replace(/\/$/, '')) !== null && _b !== void 0 ? _b : '')
|
|
71
|
+
: '';
|
|
72
|
+
return `${base}/file/open/${fileId}`;
|
|
73
|
+
}
|
|
74
|
+
function TaskFileAttachments({ taskId }) {
|
|
75
|
+
const { request } = (0, next_app_provider_1.useApp)();
|
|
76
|
+
const [files, setFiles] = (0, react_1.useState)([]);
|
|
77
|
+
const [uploading, setUploading] = (0, react_1.useState)([]);
|
|
78
|
+
const [loadingFiles, setLoadingFiles] = (0, react_1.useState)(false);
|
|
79
|
+
const [deletingId, setDeletingId] = (0, react_1.useState)(null);
|
|
80
|
+
const [isDraggingOver, setIsDraggingOver] = (0, react_1.useState)(false);
|
|
81
|
+
const inputRef = (0, react_1.useRef)(null);
|
|
82
|
+
// ── Fetch existing files ──────────────────────────────────────────────────
|
|
83
|
+
const fetchFiles = (0, react_1.useCallback)(async () => {
|
|
84
|
+
var _a;
|
|
85
|
+
if (!taskId)
|
|
86
|
+
return;
|
|
87
|
+
setLoadingFiles(true);
|
|
88
|
+
try {
|
|
89
|
+
const res = await request({
|
|
90
|
+
url: `/operations/tasks/${taskId}/files`,
|
|
91
|
+
method: 'GET',
|
|
92
|
+
});
|
|
93
|
+
setFiles((_a = res.data) !== null && _a !== void 0 ? _a : []);
|
|
94
|
+
}
|
|
95
|
+
catch (_b) {
|
|
96
|
+
// ignore
|
|
97
|
+
}
|
|
98
|
+
finally {
|
|
99
|
+
setLoadingFiles(false);
|
|
100
|
+
}
|
|
101
|
+
}, [taskId, request]);
|
|
102
|
+
(0, react_1.useEffect)(() => {
|
|
103
|
+
void fetchFiles();
|
|
104
|
+
}, [fetchFiles]);
|
|
105
|
+
// ── Upload handler ────────────────────────────────────────────────────────
|
|
106
|
+
const uploadFile = (0, react_1.useCallback)(async (file) => {
|
|
107
|
+
if (!taskId)
|
|
108
|
+
return;
|
|
109
|
+
const key = `${file.name}-${Date.now()}`;
|
|
110
|
+
setUploading((prev) => [
|
|
111
|
+
...prev,
|
|
112
|
+
{ key, filename: file.name, progress: 0 },
|
|
113
|
+
]);
|
|
114
|
+
try {
|
|
115
|
+
const formData = new FormData();
|
|
116
|
+
formData.append('file', file);
|
|
117
|
+
const res = await request({
|
|
118
|
+
url: `/operations/tasks/${taskId}/files`,
|
|
119
|
+
method: 'POST',
|
|
120
|
+
data: formData,
|
|
121
|
+
headers: { 'Content-Type': 'multipart/form-data' },
|
|
122
|
+
onUploadProgress: (e) => {
|
|
123
|
+
if (!e.total)
|
|
124
|
+
return;
|
|
125
|
+
const pct = Math.round((e.loaded * 100) / e.total);
|
|
126
|
+
setUploading((prev) => prev.map((u) => (u.key === key ? Object.assign(Object.assign({}, u), { progress: pct }) : u)));
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
if (res === null || res === void 0 ? void 0 : res.data) {
|
|
130
|
+
await fetchFiles();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (_a) {
|
|
134
|
+
setUploading((prev) => prev.map((u) => u.key === key ? Object.assign(Object.assign({}, u), { error: 'Erro no upload' }) : u));
|
|
135
|
+
setTimeout(() => {
|
|
136
|
+
setUploading((prev) => prev.filter((u) => u.key !== key));
|
|
137
|
+
}, 3000);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
setUploading((prev) => prev.filter((u) => u.key !== key));
|
|
141
|
+
}, [taskId, request, fetchFiles]);
|
|
142
|
+
const handleFiles = (0, react_1.useCallback)((fileList) => {
|
|
143
|
+
if (!fileList)
|
|
144
|
+
return;
|
|
145
|
+
Array.from(fileList).forEach((f) => void uploadFile(f));
|
|
146
|
+
if (inputRef.current)
|
|
147
|
+
inputRef.current.value = '';
|
|
148
|
+
}, [uploadFile]);
|
|
149
|
+
// ── Delete handler ────────────────────────────────────────────────────────
|
|
150
|
+
const handleDelete = (0, react_1.useCallback)(async (relationId) => {
|
|
151
|
+
if (!taskId)
|
|
152
|
+
return;
|
|
153
|
+
setDeletingId(relationId);
|
|
154
|
+
try {
|
|
155
|
+
await request({
|
|
156
|
+
url: `/operations/tasks/${taskId}/files/${relationId}`,
|
|
157
|
+
method: 'DELETE',
|
|
158
|
+
});
|
|
159
|
+
setFiles((prev) => prev.filter((f) => f.id !== relationId));
|
|
160
|
+
}
|
|
161
|
+
catch (_a) {
|
|
162
|
+
// ignore
|
|
163
|
+
}
|
|
164
|
+
finally {
|
|
165
|
+
setDeletingId(null);
|
|
166
|
+
}
|
|
167
|
+
}, [taskId, request]);
|
|
168
|
+
// ── Drag and drop ─────────────────────────────────────────────────────────
|
|
169
|
+
const handleDragOver = (e) => {
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
setIsDraggingOver(true);
|
|
172
|
+
};
|
|
173
|
+
const handleDragLeave = () => setIsDraggingOver(false);
|
|
174
|
+
const handleDrop = (e) => {
|
|
175
|
+
e.preventDefault();
|
|
176
|
+
setIsDraggingOver(false);
|
|
177
|
+
handleFiles(e.dataTransfer.files);
|
|
178
|
+
};
|
|
179
|
+
// ── Render ────────────────────────────────────────────────────────────────
|
|
180
|
+
const isEmpty = files.length === 0 && uploading.length === 0;
|
|
181
|
+
return (<div className="space-y-3">
|
|
182
|
+
{/* Drop zone */}
|
|
183
|
+
<div role="button" tabIndex={0} aria-label="Clique ou solte arquivos para anexar" className={[
|
|
184
|
+
'flex cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed px-4 py-5 text-sm transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50',
|
|
185
|
+
isDraggingOver
|
|
186
|
+
? 'border-primary bg-primary/5 text-primary'
|
|
187
|
+
: 'border-border bg-muted/30 text-muted-foreground hover:border-primary/50 hover:bg-muted/50',
|
|
188
|
+
].join(' ')} onClick={() => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }} onKeyDown={(e) => {
|
|
189
|
+
var _a;
|
|
190
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
193
|
+
}
|
|
194
|
+
}} onDragOver={handleDragOver} onDragLeave={handleDragLeave} onDrop={handleDrop}>
|
|
195
|
+
<lucide_react_1.UploadCloud className="size-6 shrink-0 opacity-60"/>
|
|
196
|
+
<span className="text-center text-xs leading-relaxed">
|
|
197
|
+
{isDraggingOver
|
|
198
|
+
? 'Solte os arquivos aqui'
|
|
199
|
+
: 'Clique ou arraste arquivos para anexar'}
|
|
200
|
+
</span>
|
|
201
|
+
<input ref={inputRef} type="file" multiple className="hidden" onChange={(e) => handleFiles(e.target.files)}/>
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
{/* Upload progress items */}
|
|
205
|
+
{uploading.map((u) => (<div key={u.key} className="flex items-center gap-3 rounded-xl border bg-muted/30 px-3 py-2">
|
|
206
|
+
<lucide_react_1.Loader2 className="size-4 shrink-0 animate-spin text-primary"/>
|
|
207
|
+
<div className="min-w-0 flex-1">
|
|
208
|
+
<p className="truncate text-xs font-medium">{u.filename}</p>
|
|
209
|
+
{u.error ? (<p className="text-[10px] text-destructive">{u.error}</p>) : (<div className="mt-1 h-1 w-full overflow-hidden rounded-full bg-muted">
|
|
210
|
+
<div className="h-full rounded-full bg-primary transition-all duration-200" style={{ width: `${u.progress}%` }}/>
|
|
211
|
+
</div>)}
|
|
212
|
+
</div>
|
|
213
|
+
<span className="shrink-0 text-[10px] tabular-nums text-muted-foreground">
|
|
214
|
+
{u.error ? 'Erro' : `${u.progress}%`}
|
|
215
|
+
</span>
|
|
216
|
+
</div>))}
|
|
217
|
+
|
|
218
|
+
{/* Loading skeleton */}
|
|
219
|
+
{loadingFiles && files.length === 0 && uploading.length === 0 ? (<div className="space-y-2">
|
|
220
|
+
{[1, 2].map((i) => (<div key={i} className="h-12 animate-pulse rounded-xl border bg-muted/30"/>))}
|
|
221
|
+
</div>) : null}
|
|
222
|
+
|
|
223
|
+
{/* Empty state */}
|
|
224
|
+
{!loadingFiles && isEmpty ? (<div className="flex items-center gap-2 rounded-xl border border-dashed bg-muted/10 px-3 py-3 text-xs text-muted-foreground">
|
|
225
|
+
<lucide_react_1.Paperclip className="size-3.5 shrink-0"/>
|
|
226
|
+
Nenhum arquivo anexado
|
|
227
|
+
</div>) : null}
|
|
228
|
+
|
|
229
|
+
{/* File list */}
|
|
230
|
+
{files.map((file) => {
|
|
231
|
+
const Icon = getFileIcon(file.mimetype, file.filename);
|
|
232
|
+
const isDeleting = deletingId === file.id;
|
|
233
|
+
return (<div key={file.id} className="group flex items-center gap-3 rounded-xl border bg-card px-3 py-2 transition hover:border-primary/30 hover:bg-muted/30">
|
|
234
|
+
<Icon className="size-5 shrink-0 text-muted-foreground"/>
|
|
235
|
+
<div className="min-w-0 flex-1">
|
|
236
|
+
<p className="truncate text-xs font-medium leading-tight">
|
|
237
|
+
{file.filename}
|
|
238
|
+
</p>
|
|
239
|
+
<p className="text-[10px] text-muted-foreground">
|
|
240
|
+
{formatBytes(file.size)}
|
|
241
|
+
</p>
|
|
242
|
+
</div>
|
|
243
|
+
<div className="flex shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100">
|
|
244
|
+
<button_1.Button type="button" variant="ghost" size="icon" className="size-7 rounded-lg" title="Abrir em nova aba" onClick={() => window.open(getFileOpenUrl(file.file_id), '_blank')}>
|
|
245
|
+
<lucide_react_1.ExternalLink className="size-3.5"/>
|
|
246
|
+
</button_1.Button>
|
|
247
|
+
<button_1.Button type="button" variant="ghost" size="icon" className="size-7 rounded-lg text-destructive hover:bg-destructive/10 hover:text-destructive" title="Remover arquivo" disabled={isDeleting} onClick={() => void handleDelete(file.id)}>
|
|
248
|
+
{isDeleting ? (<lucide_react_1.Loader2 className="size-3.5 animate-spin"/>) : (<lucide_react_1.Trash2 className="size-3.5"/>)}
|
|
249
|
+
</button_1.Button>
|
|
250
|
+
</div>
|
|
251
|
+
</div>);
|
|
252
|
+
})}
|
|
253
|
+
</div>);
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=task-file-attachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-file-attachments.js","sourceRoot":"","sources":["task-file-attachments.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAsHb,kDA6QC;AAjYD,mDAAgD;AAChD,kEAAoD;AACpD,+CAcsB;AACtB,iCAAiE;AAoBjE,iFAAiF;AAEjF,SAAS,WAAW,CAAC,KAAa;IAChC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9B,MAAM,CAAC,GAAG,IAAI,CAAC;I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D,CAAC,CAED;gBAAA,CAAC,2BAAY,CAAC,SAAS,CAAC,UAAU,EACpC;cAAA,EAAE,eAAM,CACR;cAAA,CAAC,eAAM,CACL,IAAI,CAAC,QAAQ,CACb,OAAO,CAAC,OAAO,CACf,IAAI,CAAC,MAAM,CACX,SAAS,CAAC,mFAAmF,CAC7F,KAAK,CAAC,iBAAiB,CACvB,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAE1C;gBAAA,CAAC,UAAU,CAAC,CAAC,CAAC,CACZ,CAAC,sBAAO,CAAC,SAAS,CAAC,uBAAuB,EAAG,CAC9C,CAAC,CAAC,CAAC,CACF,CAAC,qBAAM,CAAC,SAAS,CAAC,UAAU,EAAG,CAChC,CACH;cAAA,EAAE,eAAM,CACV;YAAA,EAAE,GAAG,CACP;UAAA,EAAE,GAAG,CAAC,CACP,CAAC;QACJ,CAAC,CAAC,CACJ;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
|
package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.tsx
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Button } from '@/components/ui/button';
|
|
4
|
+
import { useApp } from '@hed-hog/next-app-provider';
|
|
5
|
+
import {
|
|
6
|
+
Archive,
|
|
7
|
+
ExternalLink,
|
|
8
|
+
File,
|
|
9
|
+
FileAudio,
|
|
10
|
+
FileCode,
|
|
11
|
+
FileImage,
|
|
12
|
+
FileSpreadsheet,
|
|
13
|
+
FileText,
|
|
14
|
+
FileVideo,
|
|
15
|
+
Loader2,
|
|
16
|
+
Paperclip,
|
|
17
|
+
Trash2,
|
|
18
|
+
UploadCloud,
|
|
19
|
+
} from 'lucide-react';
|
|
20
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
21
|
+
|
|
22
|
+
// ─── Types ────────────────────────────────────────────────────────────────────
|
|
23
|
+
|
|
24
|
+
type TaskFile = {
|
|
25
|
+
id: number;
|
|
26
|
+
file_id: number;
|
|
27
|
+
filename: string;
|
|
28
|
+
size: number;
|
|
29
|
+
mimetype: string;
|
|
30
|
+
created_at: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type UploadingFile = {
|
|
34
|
+
key: string;
|
|
35
|
+
filename: string;
|
|
36
|
+
progress: number;
|
|
37
|
+
error?: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
function formatBytes(bytes: number) {
|
|
43
|
+
if (bytes === 0) return '0 B';
|
|
44
|
+
const k = 1024;
|
|
45
|
+
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
46
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
47
|
+
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${sizes[i]}`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function getFileIcon(mimetype: string, filename: string) {
|
|
51
|
+
const ext = filename.split('.').pop()?.toLowerCase() ?? '';
|
|
52
|
+
|
|
53
|
+
if (mimetype.startsWith('image/')) return FileImage;
|
|
54
|
+
if (mimetype.startsWith('video/')) return FileVideo;
|
|
55
|
+
if (mimetype.startsWith('audio/')) return FileAudio;
|
|
56
|
+
if (
|
|
57
|
+
mimetype === 'application/pdf' ||
|
|
58
|
+
mimetype.includes('word') ||
|
|
59
|
+
mimetype.includes('document')
|
|
60
|
+
)
|
|
61
|
+
return FileText;
|
|
62
|
+
if (
|
|
63
|
+
mimetype.includes('spreadsheet') ||
|
|
64
|
+
mimetype.includes('excel') ||
|
|
65
|
+
ext === 'xlsx' ||
|
|
66
|
+
ext === 'xls'
|
|
67
|
+
)
|
|
68
|
+
return FileSpreadsheet;
|
|
69
|
+
if (ext === 'csv') return FileSpreadsheet;
|
|
70
|
+
if (
|
|
71
|
+
mimetype.includes('zip') ||
|
|
72
|
+
mimetype.includes('compressed') ||
|
|
73
|
+
mimetype.includes('archive') ||
|
|
74
|
+
['zip', 'rar', '7z', 'tar', 'gz'].includes(ext)
|
|
75
|
+
)
|
|
76
|
+
return Archive;
|
|
77
|
+
if (
|
|
78
|
+
[
|
|
79
|
+
'js',
|
|
80
|
+
'ts',
|
|
81
|
+
'tsx',
|
|
82
|
+
'jsx',
|
|
83
|
+
'py',
|
|
84
|
+
'java',
|
|
85
|
+
'cs',
|
|
86
|
+
'cpp',
|
|
87
|
+
'c',
|
|
88
|
+
'go',
|
|
89
|
+
'rs',
|
|
90
|
+
'json',
|
|
91
|
+
'xml',
|
|
92
|
+
'html',
|
|
93
|
+
'css',
|
|
94
|
+
].includes(ext) ||
|
|
95
|
+
mimetype.includes('javascript') ||
|
|
96
|
+
mimetype.includes('json') ||
|
|
97
|
+
mimetype.includes('xml') ||
|
|
98
|
+
mimetype.includes('html')
|
|
99
|
+
)
|
|
100
|
+
return FileCode;
|
|
101
|
+
|
|
102
|
+
return File;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function getFileOpenUrl(fileId: number) {
|
|
106
|
+
const base =
|
|
107
|
+
typeof process !== 'undefined'
|
|
108
|
+
? (process.env.NEXT_PUBLIC_API_BASE_URL?.trim().replace(/\/$/, '') ?? '')
|
|
109
|
+
: '';
|
|
110
|
+
return `${base}/file/open/${fileId}`;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// ─── Component ────────────────────────────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
type Props = {
|
|
116
|
+
taskId: number | null;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export function TaskFileAttachments({ taskId }: Props) {
|
|
120
|
+
const { request } = useApp();
|
|
121
|
+
|
|
122
|
+
const [files, setFiles] = useState<TaskFile[]>([]);
|
|
123
|
+
const [uploading, setUploading] = useState<UploadingFile[]>([]);
|
|
124
|
+
const [loadingFiles, setLoadingFiles] = useState(false);
|
|
125
|
+
const [deletingId, setDeletingId] = useState<number | null>(null);
|
|
126
|
+
const [isDraggingOver, setIsDraggingOver] = useState(false);
|
|
127
|
+
|
|
128
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
129
|
+
|
|
130
|
+
// ── Fetch existing files ──────────────────────────────────────────────────
|
|
131
|
+
|
|
132
|
+
const fetchFiles = useCallback(async () => {
|
|
133
|
+
if (!taskId) return;
|
|
134
|
+
setLoadingFiles(true);
|
|
135
|
+
try {
|
|
136
|
+
const res = await request<TaskFile[]>({
|
|
137
|
+
url: `/operations/tasks/${taskId}/files`,
|
|
138
|
+
method: 'GET',
|
|
139
|
+
});
|
|
140
|
+
setFiles((res.data as TaskFile[]) ?? []);
|
|
141
|
+
} catch {
|
|
142
|
+
// ignore
|
|
143
|
+
} finally {
|
|
144
|
+
setLoadingFiles(false);
|
|
145
|
+
}
|
|
146
|
+
}, [taskId, request]);
|
|
147
|
+
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
void fetchFiles();
|
|
150
|
+
}, [fetchFiles]);
|
|
151
|
+
|
|
152
|
+
// ── Upload handler ────────────────────────────────────────────────────────
|
|
153
|
+
|
|
154
|
+
const uploadFile = useCallback(
|
|
155
|
+
async (file: File) => {
|
|
156
|
+
if (!taskId) return;
|
|
157
|
+
|
|
158
|
+
const key = `${file.name}-${Date.now()}`;
|
|
159
|
+
setUploading((prev) => [
|
|
160
|
+
...prev,
|
|
161
|
+
{ key, filename: file.name, progress: 0 },
|
|
162
|
+
]);
|
|
163
|
+
|
|
164
|
+
try {
|
|
165
|
+
const formData = new FormData();
|
|
166
|
+
formData.append('file', file);
|
|
167
|
+
|
|
168
|
+
const res = await (request as any)({
|
|
169
|
+
url: `/operations/tasks/${taskId}/files`,
|
|
170
|
+
method: 'POST',
|
|
171
|
+
data: formData,
|
|
172
|
+
headers: { 'Content-Type': 'multipart/form-data' },
|
|
173
|
+
onUploadProgress: (e: { loaded: number; total?: number }) => {
|
|
174
|
+
if (!e.total) return;
|
|
175
|
+
const pct = Math.round((e.loaded * 100) / e.total);
|
|
176
|
+
setUploading((prev) =>
|
|
177
|
+
prev.map((u) => (u.key === key ? { ...u, progress: pct } : u))
|
|
178
|
+
);
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
if (res?.data) {
|
|
183
|
+
await fetchFiles();
|
|
184
|
+
}
|
|
185
|
+
} catch {
|
|
186
|
+
setUploading((prev) =>
|
|
187
|
+
prev.map((u) =>
|
|
188
|
+
u.key === key ? { ...u, error: 'Erro no upload' } : u
|
|
189
|
+
)
|
|
190
|
+
);
|
|
191
|
+
setTimeout(() => {
|
|
192
|
+
setUploading((prev) => prev.filter((u) => u.key !== key));
|
|
193
|
+
}, 3000);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
setUploading((prev) => prev.filter((u) => u.key !== key));
|
|
198
|
+
},
|
|
199
|
+
[taskId, request, fetchFiles]
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
const handleFiles = useCallback(
|
|
203
|
+
(fileList: FileList | null) => {
|
|
204
|
+
if (!fileList) return;
|
|
205
|
+
Array.from(fileList).forEach((f) => void uploadFile(f));
|
|
206
|
+
if (inputRef.current) inputRef.current.value = '';
|
|
207
|
+
},
|
|
208
|
+
[uploadFile]
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
// ── Delete handler ────────────────────────────────────────────────────────
|
|
212
|
+
|
|
213
|
+
const handleDelete = useCallback(
|
|
214
|
+
async (relationId: number) => {
|
|
215
|
+
if (!taskId) return;
|
|
216
|
+
setDeletingId(relationId);
|
|
217
|
+
try {
|
|
218
|
+
await request({
|
|
219
|
+
url: `/operations/tasks/${taskId}/files/${relationId}`,
|
|
220
|
+
method: 'DELETE',
|
|
221
|
+
});
|
|
222
|
+
setFiles((prev) => prev.filter((f) => f.id !== relationId));
|
|
223
|
+
} catch {
|
|
224
|
+
// ignore
|
|
225
|
+
} finally {
|
|
226
|
+
setDeletingId(null);
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
[taskId, request]
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
// ── Drag and drop ─────────────────────────────────────────────────────────
|
|
233
|
+
|
|
234
|
+
const handleDragOver = (e: React.DragEvent) => {
|
|
235
|
+
e.preventDefault();
|
|
236
|
+
setIsDraggingOver(true);
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
const handleDragLeave = () => setIsDraggingOver(false);
|
|
240
|
+
|
|
241
|
+
const handleDrop = (e: React.DragEvent) => {
|
|
242
|
+
e.preventDefault();
|
|
243
|
+
setIsDraggingOver(false);
|
|
244
|
+
handleFiles(e.dataTransfer.files);
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
// ── Render ────────────────────────────────────────────────────────────────
|
|
248
|
+
|
|
249
|
+
const isEmpty = files.length === 0 && uploading.length === 0;
|
|
250
|
+
|
|
251
|
+
return (
|
|
252
|
+
<div className="space-y-3">
|
|
253
|
+
{/* Drop zone */}
|
|
254
|
+
<div
|
|
255
|
+
role="button"
|
|
256
|
+
tabIndex={0}
|
|
257
|
+
aria-label="Clique ou solte arquivos para anexar"
|
|
258
|
+
className={[
|
|
259
|
+
'flex cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed px-4 py-5 text-sm transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50',
|
|
260
|
+
isDraggingOver
|
|
261
|
+
? 'border-primary bg-primary/5 text-primary'
|
|
262
|
+
: 'border-border bg-muted/30 text-muted-foreground hover:border-primary/50 hover:bg-muted/50',
|
|
263
|
+
].join(' ')}
|
|
264
|
+
onClick={() => inputRef.current?.click()}
|
|
265
|
+
onKeyDown={(e) => {
|
|
266
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
267
|
+
e.preventDefault();
|
|
268
|
+
inputRef.current?.click();
|
|
269
|
+
}
|
|
270
|
+
}}
|
|
271
|
+
onDragOver={handleDragOver}
|
|
272
|
+
onDragLeave={handleDragLeave}
|
|
273
|
+
onDrop={handleDrop}
|
|
274
|
+
>
|
|
275
|
+
<UploadCloud className="size-6 shrink-0 opacity-60" />
|
|
276
|
+
<span className="text-center text-xs leading-relaxed">
|
|
277
|
+
{isDraggingOver
|
|
278
|
+
? 'Solte os arquivos aqui'
|
|
279
|
+
: 'Clique ou arraste arquivos para anexar'}
|
|
280
|
+
</span>
|
|
281
|
+
<input
|
|
282
|
+
ref={inputRef}
|
|
283
|
+
type="file"
|
|
284
|
+
multiple
|
|
285
|
+
className="hidden"
|
|
286
|
+
onChange={(e) => handleFiles(e.target.files)}
|
|
287
|
+
/>
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
{/* Upload progress items */}
|
|
291
|
+
{uploading.map((u) => (
|
|
292
|
+
<div
|
|
293
|
+
key={u.key}
|
|
294
|
+
className="flex items-center gap-3 rounded-xl border bg-muted/30 px-3 py-2"
|
|
295
|
+
>
|
|
296
|
+
<Loader2 className="size-4 shrink-0 animate-spin text-primary" />
|
|
297
|
+
<div className="min-w-0 flex-1">
|
|
298
|
+
<p className="truncate text-xs font-medium">{u.filename}</p>
|
|
299
|
+
{u.error ? (
|
|
300
|
+
<p className="text-[10px] text-destructive">{u.error}</p>
|
|
301
|
+
) : (
|
|
302
|
+
<div className="mt-1 h-1 w-full overflow-hidden rounded-full bg-muted">
|
|
303
|
+
<div
|
|
304
|
+
className="h-full rounded-full bg-primary transition-all duration-200"
|
|
305
|
+
style={{ width: `${u.progress}%` }}
|
|
306
|
+
/>
|
|
307
|
+
</div>
|
|
308
|
+
)}
|
|
309
|
+
</div>
|
|
310
|
+
<span className="shrink-0 text-[10px] tabular-nums text-muted-foreground">
|
|
311
|
+
{u.error ? 'Erro' : `${u.progress}%`}
|
|
312
|
+
</span>
|
|
313
|
+
</div>
|
|
314
|
+
))}
|
|
315
|
+
|
|
316
|
+
{/* Loading skeleton */}
|
|
317
|
+
{loadingFiles && files.length === 0 && uploading.length === 0 ? (
|
|
318
|
+
<div className="space-y-2">
|
|
319
|
+
{[1, 2].map((i) => (
|
|
320
|
+
<div
|
|
321
|
+
key={i}
|
|
322
|
+
className="h-12 animate-pulse rounded-xl border bg-muted/30"
|
|
323
|
+
/>
|
|
324
|
+
))}
|
|
325
|
+
</div>
|
|
326
|
+
) : null}
|
|
327
|
+
|
|
328
|
+
{/* Empty state */}
|
|
329
|
+
{!loadingFiles && isEmpty ? (
|
|
330
|
+
<div className="flex items-center gap-2 rounded-xl border border-dashed bg-muted/10 px-3 py-3 text-xs text-muted-foreground">
|
|
331
|
+
<Paperclip className="size-3.5 shrink-0" />
|
|
332
|
+
Nenhum arquivo anexado
|
|
333
|
+
</div>
|
|
334
|
+
) : null}
|
|
335
|
+
|
|
336
|
+
{/* File list */}
|
|
337
|
+
{files.map((file) => {
|
|
338
|
+
const Icon = getFileIcon(file.mimetype, file.filename);
|
|
339
|
+
const isDeleting = deletingId === file.id;
|
|
340
|
+
return (
|
|
341
|
+
<div
|
|
342
|
+
key={file.id}
|
|
343
|
+
className="group flex items-center gap-3 rounded-xl border bg-card px-3 py-2 transition hover:border-primary/30 hover:bg-muted/30"
|
|
344
|
+
>
|
|
345
|
+
<Icon className="size-5 shrink-0 text-muted-foreground" />
|
|
346
|
+
<div className="min-w-0 flex-1">
|
|
347
|
+
<p className="truncate text-xs font-medium leading-tight">
|
|
348
|
+
{file.filename}
|
|
349
|
+
</p>
|
|
350
|
+
<p className="text-[10px] text-muted-foreground">
|
|
351
|
+
{formatBytes(file.size)}
|
|
352
|
+
</p>
|
|
353
|
+
</div>
|
|
354
|
+
<div className="flex shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100">
|
|
355
|
+
<Button
|
|
356
|
+
type="button"
|
|
357
|
+
variant="ghost"
|
|
358
|
+
size="icon"
|
|
359
|
+
className="size-7 rounded-lg"
|
|
360
|
+
title="Abrir em nova aba"
|
|
361
|
+
onClick={() =>
|
|
362
|
+
window.open(getFileOpenUrl(file.file_id), '_blank')
|
|
363
|
+
}
|
|
364
|
+
>
|
|
365
|
+
<ExternalLink className="size-3.5" />
|
|
366
|
+
</Button>
|
|
367
|
+
<Button
|
|
368
|
+
type="button"
|
|
369
|
+
variant="ghost"
|
|
370
|
+
size="icon"
|
|
371
|
+
className="size-7 rounded-lg text-destructive hover:bg-destructive/10 hover:text-destructive"
|
|
372
|
+
title="Remover arquivo"
|
|
373
|
+
disabled={isDeleting}
|
|
374
|
+
onClick={() => void handleDelete(file.id)}
|
|
375
|
+
>
|
|
376
|
+
{isDeleting ? (
|
|
377
|
+
<Loader2 className="size-3.5 animate-spin" />
|
|
378
|
+
) : (
|
|
379
|
+
<Trash2 className="size-3.5" />
|
|
380
|
+
)}
|
|
381
|
+
</Button>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
);
|
|
385
|
+
})}
|
|
386
|
+
</div>
|
|
387
|
+
);
|
|
388
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OperationsProjectOption, OperationsTaskOption } from '../_lib/types';
|
|
2
|
+
type TimesheetTaskCreateSheetProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
project: OperationsProjectOption | null;
|
|
6
|
+
onCreated: (task: OperationsTaskOption) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function TimesheetTaskCreateSheet({ open, onOpenChange, project, onCreated, }: TimesheetTaskCreateSheetProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=timesheet-task-create-sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timesheet-task-create-sheet.d.ts","sourceRoot":"","sources":["timesheet-task-create-sheet.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAGvB,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACxC,SAAS,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACjD,CAAC;AAOF,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,GACV,EAAE,6BAA6B,+BAiK/B"}
|