@hed-hog/operations 0.0.328 → 0.0.329
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-tasks.controller.d.ts +3 -3
- package/dist/operations.service.d.ts +3 -3
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +7 -7
- package/hedhog/frontend/app/_components/department-picker.tsx.ejs +125 -0
- package/hedhog/frontend/app/_components/department-select-with-create.tsx.ejs +64 -325
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +16 -16
- package/hedhog/frontend/app/_components/system-user-picker.tsx.ejs +198 -0
- package/hedhog/frontend/app/_components/system-user-select-with-create.tsx.ejs +107 -569
- package/hedhog/frontend/messages/en.json +79 -10
- package/hedhog/frontend/messages/operations/en.json +67 -3
- package/hedhog/frontend/messages/operations/pt.json +67 -3
- package/hedhog/frontend/messages/pt.json +77 -8
- package/package.json +6 -6
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +0 -476
- package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +0 -261
- package/hedhog/frontend/app/_components/contract-content-editor.tsx.ejs +0 -258
- package/hedhog/frontend/app/_components/person-select-with-create.tsx.ejs +0 -1
- package/hedhog/frontend/messages/en.json.ejs +0 -2060
- package/hedhog/frontend/messages/operations/operations/en.json +0 -2102
- package/hedhog/frontend/messages/operations/operations/pt.json +0 -2111
- package/hedhog/frontend/messages/pt.json.ejs +0 -2067
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.d.ts +0 -29
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.js +0 -95
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.tsx +0 -233
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.d.ts +0 -10
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.js +0 -577
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.tsx +0 -868
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.js +0 -337
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.tsx +0 -476
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.d.ts +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.js +0 -1348
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.tsx +0 -2233
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.d.ts +0 -12
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.js +0 -162
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.tsx +0 -261
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.d.ts +0 -18
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.js +0 -145
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.tsx +0 -258
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.js +0 -223
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.tsx +0 -342
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.d.ts +0 -58
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.js +0 -438
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.tsx +0 -698
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.d.ts +0 -20
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.js +0 -233
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.tsx +0 -392
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.js +0 -814
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.tsx +0 -1288
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.d.ts +0 -21
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.js +0 -174
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.tsx +0 -306
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.d.ts +0 -10
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.js +0 -12
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.tsx +0 -29
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.d.ts +0 -15
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.js +0 -501
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.tsx +0 -853
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.js +0 -847
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.tsx +0 -1340
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.js +0 -2930
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.tsx +0 -4378
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.d.ts +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.js +0 -1013
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.tsx +0 -1745
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.d.ts +0 -13
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.js +0 -38
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.tsx +0 -74
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.d.ts +0 -7
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.js +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.tsx +0 -15
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.d.ts +0 -18
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.js +0 -406
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.tsx +0 -660
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.d.ts +0 -26
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.js +0 -332
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.tsx +0 -518
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js +0 -255
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.tsx +0 -388
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.d.ts +0 -10
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.js +0 -131
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.tsx +0 -214
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.d.ts +0 -108
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.js +0 -162
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.ts +0 -428
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.d.ts +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.js +0 -36
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.ts +0 -44
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.d.ts +0 -837
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.js +0 -3
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.ts +0 -861
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.d.ts +0 -16
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.js +0 -182
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.ts +0 -250
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.js +0 -51
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.ts +0 -61
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.js +0 -954
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.tsx +0 -1277
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.js +0 -488
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.tsx +0 -805
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.js +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.tsx +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.js +0 -612
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.tsx +0 -939
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.tsx +0 -17
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.js +0 -348
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.tsx +0 -536
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.js +0 -401
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.tsx +0 -607
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.d.ts +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.js +0 -7
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.tsx +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.js +0 -321
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.tsx +0 -440
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.js +0 -939
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.tsx +0 -1499
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.d.ts +0 -29
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.js +0 -95
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.tsx +0 -233
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.d.ts +0 -10
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.js +0 -577
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.tsx +0 -868
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.js +0 -337
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.tsx +0 -476
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.d.ts +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.js +0 -1348
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.tsx +0 -2233
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.d.ts +0 -12
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.js +0 -162
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.tsx +0 -261
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.d.ts +0 -18
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.js +0 -145
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.tsx +0 -258
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.js +0 -223
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.tsx +0 -342
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.d.ts +0 -58
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.js +0 -438
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.tsx +0 -698
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.d.ts +0 -20
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.js +0 -233
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.tsx +0 -392
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.js +0 -814
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.tsx +0 -1288
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.d.ts +0 -21
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.js +0 -174
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.tsx +0 -306
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.d.ts +0 -10
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.js +0 -12
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.tsx +0 -29
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.d.ts +0 -15
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.js +0 -501
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.tsx +0 -853
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.js +0 -459
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.tsx +0 -598
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.js +0 -876
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.tsx +0 -1368
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.js +0 -2930
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.tsx +0 -4378
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.d.ts +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.js +0 -1013
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.tsx +0 -1745
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.d.ts +0 -13
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.js +0 -38
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.tsx +0 -74
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.d.ts +0 -7
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.js +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.tsx +0 -15
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.d.ts +0 -18
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.js +0 -406
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.tsx +0 -660
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.d.ts +0 -26
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.js +0 -332
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.tsx +0 -518
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.js +0 -255
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.tsx +0 -388
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.d.ts +0 -10
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.js +0 -131
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.tsx +0 -214
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.d.ts +0 -108
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.js +0 -162
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.ts +0 -428
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.d.ts +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.js +0 -36
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.ts +0 -44
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.d.ts +0 -837
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.js +0 -3
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.ts +0 -861
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.d.ts +0 -16
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.js +0 -182
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.ts +0 -250
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.d.ts +0 -4
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.js +0 -51
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.ts +0 -61
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.js +0 -954
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.tsx +0 -1277
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.js +0 -488
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.tsx +0 -805
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.js +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.tsx +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.js +0 -612
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.tsx +0 -939
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.tsx +0 -17
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.js +0 -348
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.tsx +0 -536
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.js +0 -401
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.tsx +0 -607
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.d.ts +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.js +0 -7
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.tsx +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.js +0 -321
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.tsx +0 -440
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.js +0 -939
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.tsx +0 -1499
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.js +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.tsx +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.js +0 -436
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.tsx +0 -675
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.js +0 -563
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.tsx +0 -846
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.tsx +0 -10
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.js +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.tsx +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.js +0 -492
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.tsx +0 -757
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.js +0 -342
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.tsx +0 -430
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.js +0 -338
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.tsx +0 -428
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.js +0 -660
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.tsx +0 -992
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.js +0 -515
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.tsx +0 -707
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.js +0 -1141
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.tsx +0 -1705
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.js +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.tsx +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.js +0 -436
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.tsx +0 -675
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.js +0 -563
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.tsx +0 -846
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.d.ts +0 -6
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.js +0 -9
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.tsx +0 -11
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.js +0 -8
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.tsx +0 -5
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.js +0 -492
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.tsx +0 -757
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.js +0 -342
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.tsx +0 -430
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.js +0 -338
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.tsx +0 -428
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.js +0 -660
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.tsx +0 -992
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.js +0 -515
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.tsx +0 -707
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.d.ts +0 -2
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.d.ts.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.js +0 -1141
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.js.map +0 -1
- package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.tsx +0 -1705
package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;IACf,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACtC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,GAAG,UAAU,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,SAAS,WAAW,CAAC,QAAgB,EAAE,QAAgB;;IACrD,MAAM,GAAG,GAAG,MAAA,MAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,0CAAE,WAAW,EAAE,mCAAI,EAAE,CAAC;IAE3D,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,wBAAS,CAAC;IACpD,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC;Q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raries)/operations/_components/task-file-attachments.tsx
DELETED
|
@@ -1,388 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|