@hed-hog/operations 0.0.327 → 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 +5 -5
- 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
|
@@ -1,1368 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
AlertDialog,
|
|
5
|
-
AlertDialogAction,
|
|
6
|
-
AlertDialogCancel,
|
|
7
|
-
AlertDialogContent,
|
|
8
|
-
AlertDialogDescription,
|
|
9
|
-
AlertDialogFooter,
|
|
10
|
-
AlertDialogHeader,
|
|
11
|
-
AlertDialogTitle,
|
|
12
|
-
} from '@/components/ui/alert-dialog';
|
|
13
|
-
import { Badge } from '@/components/ui/badge';
|
|
14
|
-
import { Button } from '@/components/ui/button';
|
|
15
|
-
import {
|
|
16
|
-
ChartContainer,
|
|
17
|
-
ChartTooltip,
|
|
18
|
-
ChartTooltipContent,
|
|
19
|
-
type ChartConfig,
|
|
20
|
-
} from '@/components/ui/chart';
|
|
21
|
-
import { Input } from '@/components/ui/input';
|
|
22
|
-
import { Label } from '@/components/ui/label';
|
|
23
|
-
import {
|
|
24
|
-
Select,
|
|
25
|
-
SelectContent,
|
|
26
|
-
SelectGroup,
|
|
27
|
-
SelectItem,
|
|
28
|
-
SelectLabel,
|
|
29
|
-
SelectTrigger,
|
|
30
|
-
SelectValue,
|
|
31
|
-
} from '@/components/ui/select';
|
|
32
|
-
import {
|
|
33
|
-
Sheet,
|
|
34
|
-
SheetContent,
|
|
35
|
-
SheetDescription,
|
|
36
|
-
SheetHeader,
|
|
37
|
-
SheetTitle,
|
|
38
|
-
} from '@/components/ui/sheet';
|
|
39
|
-
import { Skeleton } from '@/components/ui/skeleton';
|
|
40
|
-
import {
|
|
41
|
-
Table,
|
|
42
|
-
TableBody,
|
|
43
|
-
TableCell,
|
|
44
|
-
TableHead,
|
|
45
|
-
TableHeader,
|
|
46
|
-
TableRow,
|
|
47
|
-
} from '@/components/ui/table';
|
|
48
|
-
import { Textarea } from '@/components/ui/textarea';
|
|
49
|
-
import { cn } from '@/lib/utils';
|
|
50
|
-
import { useApp, useQuery } from '@hed-hog/next-app-provider';
|
|
51
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
52
|
-
import {
|
|
53
|
-
CheckCircle2,
|
|
54
|
-
DollarSign,
|
|
55
|
-
Pencil,
|
|
56
|
-
Percent,
|
|
57
|
-
PiggyBank,
|
|
58
|
-
Plus,
|
|
59
|
-
Receipt,
|
|
60
|
-
Trash2,
|
|
61
|
-
TrendingUp,
|
|
62
|
-
Wallet,
|
|
63
|
-
} from 'lucide-react';
|
|
64
|
-
import { useTranslations } from 'next-intl';
|
|
65
|
-
import Link from 'next/link';
|
|
66
|
-
import { useMemo, useState } from 'react';
|
|
67
|
-
import {
|
|
68
|
-
Area,
|
|
69
|
-
AreaChart,
|
|
70
|
-
Bar,
|
|
71
|
-
BarChart,
|
|
72
|
-
CartesianGrid,
|
|
73
|
-
Cell,
|
|
74
|
-
Pie,
|
|
75
|
-
PieChart,
|
|
76
|
-
XAxis,
|
|
77
|
-
YAxis,
|
|
78
|
-
} from 'recharts';
|
|
79
|
-
import {
|
|
80
|
-
createProjectCost,
|
|
81
|
-
deleteProjectCost,
|
|
82
|
-
getFullProjectCostSummary,
|
|
83
|
-
getProjectCostsSummary,
|
|
84
|
-
listProjectCostTypes,
|
|
85
|
-
updateProjectCost,
|
|
86
|
-
} from '../_lib/api';
|
|
87
|
-
import type {
|
|
88
|
-
FullCostSummary,
|
|
89
|
-
PaginatedResponse,
|
|
90
|
-
ProjectCost,
|
|
91
|
-
ProjectCostCategory,
|
|
92
|
-
ProjectCostSummary,
|
|
93
|
-
ProjectCostType,
|
|
94
|
-
} from '../_lib/types';
|
|
95
|
-
import { formatCurrency, formatDate } from '../_lib/utils/format';
|
|
96
|
-
|
|
97
|
-
const CALCULATION_TYPE_OPTIONS = [
|
|
98
|
-
'fixed',
|
|
99
|
-
'unit',
|
|
100
|
-
'hourly',
|
|
101
|
-
'monthly',
|
|
102
|
-
'percentage',
|
|
103
|
-
] as const;
|
|
104
|
-
|
|
105
|
-
const RECURRENCE_TYPE_OPTIONS = [
|
|
106
|
-
'none',
|
|
107
|
-
'daily',
|
|
108
|
-
'weekly',
|
|
109
|
-
'monthly',
|
|
110
|
-
'yearly',
|
|
111
|
-
] as const;
|
|
112
|
-
|
|
113
|
-
const STATUS_OPTIONS = [
|
|
114
|
-
'planned',
|
|
115
|
-
'approved',
|
|
116
|
-
'realized',
|
|
117
|
-
'cancelled',
|
|
118
|
-
] as const;
|
|
119
|
-
|
|
120
|
-
type CostFormState = {
|
|
121
|
-
cost_type_id: string;
|
|
122
|
-
category_id: string;
|
|
123
|
-
description: string;
|
|
124
|
-
amount: string;
|
|
125
|
-
currency: string;
|
|
126
|
-
quantity: string;
|
|
127
|
-
unit_amount: string;
|
|
128
|
-
cost_date: string;
|
|
129
|
-
period_start: string;
|
|
130
|
-
period_end: string;
|
|
131
|
-
calculation_type: string;
|
|
132
|
-
recurrence_type: string;
|
|
133
|
-
is_billable: boolean;
|
|
134
|
-
is_reimbursable: boolean;
|
|
135
|
-
notes: string;
|
|
136
|
-
status: string;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
function emptyCostForm(): CostFormState {
|
|
140
|
-
return {
|
|
141
|
-
cost_type_id: 'none',
|
|
142
|
-
category_id: 'none',
|
|
143
|
-
description: '',
|
|
144
|
-
amount: '',
|
|
145
|
-
currency: 'BRL',
|
|
146
|
-
quantity: '1',
|
|
147
|
-
unit_amount: '',
|
|
148
|
-
cost_date: '',
|
|
149
|
-
period_start: '',
|
|
150
|
-
period_end: '',
|
|
151
|
-
calculation_type: 'fixed',
|
|
152
|
-
recurrence_type: 'none',
|
|
153
|
-
is_billable: false,
|
|
154
|
-
is_reimbursable: false,
|
|
155
|
-
notes: '',
|
|
156
|
-
status: 'planned',
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function costToForm(cost: ProjectCost): CostFormState {
|
|
161
|
-
return {
|
|
162
|
-
cost_type_id: cost.cost_type_id ? String(cost.cost_type_id) : 'none',
|
|
163
|
-
category_id: cost.category_id ? String(cost.category_id) : 'none',
|
|
164
|
-
description: cost.description ?? '',
|
|
165
|
-
amount: String(cost.amount ?? ''),
|
|
166
|
-
currency: cost.currency ?? 'BRL',
|
|
167
|
-
quantity: String(cost.quantity ?? 1),
|
|
168
|
-
unit_amount: cost.unit_amount != null ? String(cost.unit_amount) : '',
|
|
169
|
-
cost_date: cost.cost_date ?? '',
|
|
170
|
-
period_start: cost.period_start ?? '',
|
|
171
|
-
period_end: cost.period_end ?? '',
|
|
172
|
-
calculation_type: cost.calculation_type ?? 'fixed',
|
|
173
|
-
recurrence_type: cost.recurrence_type ?? 'none',
|
|
174
|
-
is_billable: cost.is_billable ?? false,
|
|
175
|
-
is_reimbursable: cost.is_reimbursable ?? false,
|
|
176
|
-
notes: cost.notes ?? '',
|
|
177
|
-
status: cost.status ?? 'planned',
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
type Props = {
|
|
182
|
-
projectId: number;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
export function ProjectCostsSection({ projectId }: Props) {
|
|
186
|
-
const t = useTranslations('operations.ProjectCostsSection');
|
|
187
|
-
const commonT = useTranslations('operations.Common');
|
|
188
|
-
const { request, showToastHandler, getSettingValue, currentLocaleCode } =
|
|
189
|
-
useApp();
|
|
190
|
-
|
|
191
|
-
const queryClient = useQueryClient();
|
|
192
|
-
const [isSheetOpen, setIsSheetOpen] = useState(false);
|
|
193
|
-
const [editingCost, setEditingCost] = useState<ProjectCost | null>(null);
|
|
194
|
-
const [form, setForm] = useState<CostFormState>(emptyCostForm());
|
|
195
|
-
const [isSaving, setIsSaving] = useState(false);
|
|
196
|
-
const [deleteTarget, setDeleteTarget] = useState<ProjectCost | null>(null);
|
|
197
|
-
const [isDeleting, setIsDeleting] = useState(false);
|
|
198
|
-
|
|
199
|
-
const {
|
|
200
|
-
data: summaryRaw,
|
|
201
|
-
isLoading,
|
|
202
|
-
refetch,
|
|
203
|
-
} = useQuery<ProjectCostSummary>({
|
|
204
|
-
queryKey: ['operations-project-costs-summary', projectId],
|
|
205
|
-
queryFn: () =>
|
|
206
|
-
getProjectCostsSummary(request, projectId) as Promise<ProjectCostSummary>,
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
const summary: ProjectCostSummary | null = summaryRaw ?? null;
|
|
210
|
-
|
|
211
|
-
const { data: fullSummary, isLoading: summaryLoading } = useQuery({
|
|
212
|
-
queryKey: ['operations-project-cost-summary', projectId],
|
|
213
|
-
queryFn: () =>
|
|
214
|
-
getFullProjectCostSummary(request, projectId) as Promise<FullCostSummary>,
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
const { data: costTypesRaw } = useQuery<ProjectCostType[]>({
|
|
218
|
-
queryKey: ['operations-project-cost-types-all'],
|
|
219
|
-
queryFn: () =>
|
|
220
|
-
listProjectCostTypes(request, { pageSize: '500' }) as Promise<
|
|
221
|
-
ProjectCostType[]
|
|
222
|
-
>,
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
// May come back as paginated or flat array.
|
|
226
|
-
const costTypes: ProjectCostType[] = Array.isArray(costTypesRaw)
|
|
227
|
-
? costTypesRaw
|
|
228
|
-
: ((costTypesRaw as PaginatedResponse<ProjectCostType> | undefined)?.data ??
|
|
229
|
-
[]);
|
|
230
|
-
|
|
231
|
-
// Group cost types by category for the Select.
|
|
232
|
-
const costTypesByCategory = useMemo(() => {
|
|
233
|
-
const map = new Map<
|
|
234
|
-
number | null,
|
|
235
|
-
{ category: ProjectCostCategory | null; types: ProjectCostType[] }
|
|
236
|
-
>();
|
|
237
|
-
for (const ct of costTypes) {
|
|
238
|
-
const key = ct.category_id ?? null;
|
|
239
|
-
if (!map.has(key)) {
|
|
240
|
-
map.set(key, { category: ct.category ?? null, types: [] });
|
|
241
|
-
}
|
|
242
|
-
map.get(key)!.types.push(ct);
|
|
243
|
-
}
|
|
244
|
-
return Array.from(map.values());
|
|
245
|
-
}, [costTypes]);
|
|
246
|
-
|
|
247
|
-
// Auto-calculate amount when calculation_type is unit/hourly/monthly
|
|
248
|
-
const isCalculatedType = (calcType: string) =>
|
|
249
|
-
['unit', 'hourly', 'monthly'].includes(calcType);
|
|
250
|
-
|
|
251
|
-
const updateForm = <K extends keyof CostFormState>(
|
|
252
|
-
field: K,
|
|
253
|
-
value: CostFormState[K]
|
|
254
|
-
) => {
|
|
255
|
-
setForm((current) => {
|
|
256
|
-
const next = { ...current, [field]: value };
|
|
257
|
-
// Auto-calculate amount
|
|
258
|
-
if (
|
|
259
|
-
(field === 'quantity' ||
|
|
260
|
-
field === 'unit_amount' ||
|
|
261
|
-
field === 'calculation_type') &&
|
|
262
|
-
isCalculatedType(next.calculation_type)
|
|
263
|
-
) {
|
|
264
|
-
const qty = parseFloat(next.quantity) || 0;
|
|
265
|
-
const ua = parseFloat(next.unit_amount) || 0;
|
|
266
|
-
if (qty > 0 && ua > 0) {
|
|
267
|
-
next.amount = (qty * ua).toFixed(2);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return next;
|
|
271
|
-
});
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
// When cost_type changes: auto-fill category and default_calculation_type
|
|
275
|
-
const handleCostTypeChange = (typeId: string) => {
|
|
276
|
-
const ct = costTypes.find((t) => String(t.id) === typeId);
|
|
277
|
-
setForm((current) => {
|
|
278
|
-
const next: CostFormState = {
|
|
279
|
-
...current,
|
|
280
|
-
cost_type_id: typeId,
|
|
281
|
-
};
|
|
282
|
-
if (ct) {
|
|
283
|
-
if (ct.category_id) next.category_id = String(ct.category_id);
|
|
284
|
-
if (ct.default_calculation_type) {
|
|
285
|
-
next.calculation_type = ct.default_calculation_type;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
return next;
|
|
289
|
-
});
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
const openCreateSheet = () => {
|
|
293
|
-
setEditingCost(null);
|
|
294
|
-
setForm(emptyCostForm());
|
|
295
|
-
setIsSheetOpen(true);
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
const openEditSheet = (cost: ProjectCost) => {
|
|
299
|
-
setEditingCost(cost);
|
|
300
|
-
setForm(costToForm(cost));
|
|
301
|
-
setIsSheetOpen(true);
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
const saveCost = async () => {
|
|
305
|
-
const amountNum = parseFloat(
|
|
306
|
-
String(form.amount).replace(/\./g, '').replace(',', '.')
|
|
307
|
-
);
|
|
308
|
-
if (!form.amount || isNaN(amountNum) || amountNum <= 0) {
|
|
309
|
-
showToastHandler?.('error', t('validation.amountRequired'));
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
setIsSaving(true);
|
|
314
|
-
try {
|
|
315
|
-
const payload = {
|
|
316
|
-
cost_type_id:
|
|
317
|
-
form.cost_type_id !== 'none' ? Number(form.cost_type_id) : null,
|
|
318
|
-
category_id:
|
|
319
|
-
form.category_id !== 'none' ? Number(form.category_id) : null,
|
|
320
|
-
description: form.description.trim() || null,
|
|
321
|
-
amount: amountNum,
|
|
322
|
-
currency: form.currency.trim() || 'BRL',
|
|
323
|
-
quantity: parseFloat(form.quantity) || 1,
|
|
324
|
-
unit_amount: form.unit_amount ? parseFloat(form.unit_amount) : null,
|
|
325
|
-
cost_date: form.cost_date || null,
|
|
326
|
-
period_start: form.period_start || null,
|
|
327
|
-
period_end: form.period_end || null,
|
|
328
|
-
calculation_type: form.calculation_type,
|
|
329
|
-
recurrence_type: form.recurrence_type,
|
|
330
|
-
is_billable: form.is_billable,
|
|
331
|
-
is_reimbursable: form.is_reimbursable,
|
|
332
|
-
notes: form.notes.trim() || null,
|
|
333
|
-
status: form.status,
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
if (editingCost) {
|
|
337
|
-
await updateProjectCost(request, projectId, editingCost.id, payload);
|
|
338
|
-
showToastHandler?.('success', t('messages.updateSuccess'));
|
|
339
|
-
} else {
|
|
340
|
-
await createProjectCost(request, projectId, payload);
|
|
341
|
-
showToastHandler?.('success', t('messages.createSuccess'));
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
setIsSheetOpen(false);
|
|
345
|
-
setEditingCost(null);
|
|
346
|
-
setForm(emptyCostForm());
|
|
347
|
-
await refetch();
|
|
348
|
-
await queryClient.invalidateQueries({
|
|
349
|
-
queryKey: ['operations-project-cost-summary', projectId],
|
|
350
|
-
});
|
|
351
|
-
} catch {
|
|
352
|
-
showToastHandler?.('error', t('messages.saveError'));
|
|
353
|
-
} finally {
|
|
354
|
-
setIsSaving(false);
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
const confirmDelete = async () => {
|
|
359
|
-
if (!deleteTarget) return;
|
|
360
|
-
setIsDeleting(true);
|
|
361
|
-
try {
|
|
362
|
-
await deleteProjectCost(request, projectId, deleteTarget.id);
|
|
363
|
-
showToastHandler?.('success', t('messages.deleteSuccess'));
|
|
364
|
-
setDeleteTarget(null);
|
|
365
|
-
await refetch();
|
|
366
|
-
} catch {
|
|
367
|
-
showToastHandler?.('error', t('messages.deleteError'));
|
|
368
|
-
} finally {
|
|
369
|
-
setIsDeleting(false);
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
const recurrenceTypeLabel = (value: string) => {
|
|
374
|
-
const map: Record<string, string> = {
|
|
375
|
-
none: t('recurrenceType.none'),
|
|
376
|
-
daily: t('recurrenceType.daily'),
|
|
377
|
-
weekly: t('recurrenceType.weekly'),
|
|
378
|
-
monthly: t('recurrenceType.monthly'),
|
|
379
|
-
yearly: t('recurrenceType.yearly'),
|
|
380
|
-
};
|
|
381
|
-
return map[value] ?? value;
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
const calculationTypeLabel = (value: string) => {
|
|
385
|
-
const map: Record<string, string> = {
|
|
386
|
-
fixed: t('calculationType.fixed'),
|
|
387
|
-
unit: t('calculationType.unit'),
|
|
388
|
-
hourly: t('calculationType.hourly'),
|
|
389
|
-
monthly: t('calculationType.monthly'),
|
|
390
|
-
percentage: t('calculationType.percentage'),
|
|
391
|
-
};
|
|
392
|
-
return map[value] ?? value;
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
const statusLabel = (value: string) => {
|
|
396
|
-
const map: Record<string, string> = {
|
|
397
|
-
planned: t('status.planned'),
|
|
398
|
-
approved: t('status.approved'),
|
|
399
|
-
realized: t('status.realized'),
|
|
400
|
-
cancelled: t('status.cancelled'),
|
|
401
|
-
};
|
|
402
|
-
return map[value] ?? value;
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
const statusBadgeClass = (value: string) => {
|
|
406
|
-
const map: Record<string, string> = {
|
|
407
|
-
approved: 'bg-emerald-500/15 text-emerald-700',
|
|
408
|
-
realized: 'bg-blue-500/15 text-blue-700',
|
|
409
|
-
cancelled: 'bg-red-500/15 text-red-700',
|
|
410
|
-
planned: 'bg-amber-500/15 text-amber-700',
|
|
411
|
-
};
|
|
412
|
-
return map[value] ?? '';
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
const costChartConfig: ChartConfig = {
|
|
416
|
-
total: { label: 'Total', color: 'hsl(201 96% 32%)' },
|
|
417
|
-
value: { label: 'Valor', color: 'hsl(201 96% 32%)' },
|
|
418
|
-
planned: { label: t('status.planned'), color: 'hsl(215 16% 47%)' },
|
|
419
|
-
approved: { label: t('status.approved'), color: 'hsl(166 72% 28%)' },
|
|
420
|
-
realized: { label: t('status.realized'), color: 'hsl(201 96% 32%)' },
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
const grandTotal = summary?.grand_total ?? 0;
|
|
424
|
-
|
|
425
|
-
return (
|
|
426
|
-
<div className="space-y-4">
|
|
427
|
-
{/* Header */}
|
|
428
|
-
<div className="flex items-center justify-between gap-3">
|
|
429
|
-
<div className="flex items-center gap-2">
|
|
430
|
-
<div className="flex size-8 items-center justify-center rounded-xl bg-primary/10 text-primary">
|
|
431
|
-
<DollarSign className="size-4" />
|
|
432
|
-
</div>
|
|
433
|
-
<div>
|
|
434
|
-
<h3 className="text-sm font-semibold">{t('title')}</h3>
|
|
435
|
-
{grandTotal > 0 ? (
|
|
436
|
-
<p className="text-xs text-muted-foreground">
|
|
437
|
-
{t('grandTotal')}:{' '}
|
|
438
|
-
<span className="font-medium text-foreground">
|
|
439
|
-
{formatCurrency(
|
|
440
|
-
grandTotal,
|
|
441
|
-
getSettingValue,
|
|
442
|
-
currentLocaleCode
|
|
443
|
-
)}
|
|
444
|
-
</span>
|
|
445
|
-
</p>
|
|
446
|
-
) : null}
|
|
447
|
-
</div>
|
|
448
|
-
</div>
|
|
449
|
-
<div className="flex items-center gap-2">
|
|
450
|
-
<Link href={`/operations/projects/${projectId}/costs-report`}>
|
|
451
|
-
<Button variant="outline" size="sm" className="gap-1.5">
|
|
452
|
-
{t('actions.viewReport')}
|
|
453
|
-
</Button>
|
|
454
|
-
</Link>
|
|
455
|
-
<Button size="sm" onClick={openCreateSheet} className="gap-1.5">
|
|
456
|
-
<Plus className="size-3.5" />
|
|
457
|
-
{t('actions.add')}
|
|
458
|
-
</Button>
|
|
459
|
-
</div>
|
|
460
|
-
</div>
|
|
461
|
-
|
|
462
|
-
{/* Financial Summary Cards & Charts */}
|
|
463
|
-
{summaryLoading ? (
|
|
464
|
-
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3">
|
|
465
|
-
{Array.from({ length: 6 }).map((_, i) => (
|
|
466
|
-
<div key={i} className="animate-pulse bg-muted rounded-lg h-24" />
|
|
467
|
-
))}
|
|
468
|
-
</div>
|
|
469
|
-
) : fullSummary ? (
|
|
470
|
-
<div className="space-y-4">
|
|
471
|
-
{/* Summary Cards */}
|
|
472
|
-
<div className="grid grid-cols-2 gap-3 sm:grid-cols-3">
|
|
473
|
-
<div className="rounded-xl border bg-card p-3">
|
|
474
|
-
<div className="mb-1 flex items-center gap-2">
|
|
475
|
-
<Wallet className="size-4 text-muted-foreground" />
|
|
476
|
-
<span className="text-xs text-muted-foreground">
|
|
477
|
-
{t('summary.budgetAmount')}
|
|
478
|
-
</span>
|
|
479
|
-
</div>
|
|
480
|
-
<p className="text-sm font-semibold tabular-nums">
|
|
481
|
-
{formatCurrency(
|
|
482
|
-
fullSummary.budget_amount,
|
|
483
|
-
getSettingValue,
|
|
484
|
-
currentLocaleCode
|
|
485
|
-
)}
|
|
486
|
-
</p>
|
|
487
|
-
</div>
|
|
488
|
-
<div className="rounded-xl border bg-card p-3">
|
|
489
|
-
<div className="mb-1 flex items-center gap-2">
|
|
490
|
-
<Receipt className="size-4 text-muted-foreground" />
|
|
491
|
-
<span className="text-xs text-muted-foreground">
|
|
492
|
-
{t('summary.extraCostTotal')}
|
|
493
|
-
</span>
|
|
494
|
-
</div>
|
|
495
|
-
<p className="text-sm font-semibold tabular-nums">
|
|
496
|
-
{formatCurrency(
|
|
497
|
-
fullSummary.extra_cost_total,
|
|
498
|
-
getSettingValue,
|
|
499
|
-
currentLocaleCode
|
|
500
|
-
)}
|
|
501
|
-
</p>
|
|
502
|
-
</div>
|
|
503
|
-
<div className="rounded-xl border bg-card p-3">
|
|
504
|
-
<div className="mb-1 flex items-center gap-2">
|
|
505
|
-
<TrendingUp className="size-4 text-muted-foreground" />
|
|
506
|
-
<span className="text-xs text-muted-foreground">
|
|
507
|
-
{t('summary.totalProjectCost')}
|
|
508
|
-
</span>
|
|
509
|
-
</div>
|
|
510
|
-
<p className="text-sm font-semibold tabular-nums">
|
|
511
|
-
{formatCurrency(
|
|
512
|
-
fullSummary.total_project_cost,
|
|
513
|
-
getSettingValue,
|
|
514
|
-
currentLocaleCode
|
|
515
|
-
)}
|
|
516
|
-
</p>
|
|
517
|
-
</div>
|
|
518
|
-
<div className="rounded-xl border bg-card p-3">
|
|
519
|
-
<div className="mb-1 flex items-center gap-2">
|
|
520
|
-
<PiggyBank
|
|
521
|
-
className={cn(
|
|
522
|
-
'size-4',
|
|
523
|
-
fullSummary.remaining_budget < 0
|
|
524
|
-
? 'text-destructive'
|
|
525
|
-
: 'text-muted-foreground'
|
|
526
|
-
)}
|
|
527
|
-
/>
|
|
528
|
-
<span className="text-xs text-muted-foreground">
|
|
529
|
-
{t('summary.remainingBudget')}
|
|
530
|
-
</span>
|
|
531
|
-
</div>
|
|
532
|
-
<p
|
|
533
|
-
className={cn(
|
|
534
|
-
'text-sm font-semibold tabular-nums',
|
|
535
|
-
fullSummary.remaining_budget < 0 ? 'text-destructive' : ''
|
|
536
|
-
)}
|
|
537
|
-
>
|
|
538
|
-
{formatCurrency(
|
|
539
|
-
fullSummary.remaining_budget,
|
|
540
|
-
getSettingValue,
|
|
541
|
-
currentLocaleCode
|
|
542
|
-
)}
|
|
543
|
-
</p>
|
|
544
|
-
</div>
|
|
545
|
-
<div className="rounded-xl border bg-card p-3">
|
|
546
|
-
<div className="mb-1 flex items-center gap-2">
|
|
547
|
-
<Percent
|
|
548
|
-
className={cn(
|
|
549
|
-
'size-4',
|
|
550
|
-
fullSummary.budget_usage_percent > 80
|
|
551
|
-
? 'text-amber-500'
|
|
552
|
-
: 'text-muted-foreground'
|
|
553
|
-
)}
|
|
554
|
-
/>
|
|
555
|
-
<span className="text-xs text-muted-foreground">
|
|
556
|
-
{t('summary.budgetUsagePercent')}
|
|
557
|
-
</span>
|
|
558
|
-
</div>
|
|
559
|
-
<p
|
|
560
|
-
className={cn(
|
|
561
|
-
'text-sm font-semibold tabular-nums',
|
|
562
|
-
fullSummary.budget_usage_percent > 80 ? 'text-amber-600' : ''
|
|
563
|
-
)}
|
|
564
|
-
>
|
|
565
|
-
{fullSummary.budget_usage_percent.toFixed(2)}%
|
|
566
|
-
</p>
|
|
567
|
-
</div>
|
|
568
|
-
<div className="rounded-xl border bg-card p-3">
|
|
569
|
-
<div className="mb-1 flex items-center gap-2">
|
|
570
|
-
<CheckCircle2 className="size-4 text-muted-foreground" />
|
|
571
|
-
<span className="text-xs text-muted-foreground">
|
|
572
|
-
{t('summary.realizedTotal')}
|
|
573
|
-
</span>
|
|
574
|
-
</div>
|
|
575
|
-
<p className="text-sm font-semibold tabular-nums">
|
|
576
|
-
{formatCurrency(
|
|
577
|
-
fullSummary.realized_total,
|
|
578
|
-
getSettingValue,
|
|
579
|
-
currentLocaleCode
|
|
580
|
-
)}
|
|
581
|
-
</p>
|
|
582
|
-
</div>
|
|
583
|
-
</div>
|
|
584
|
-
|
|
585
|
-
{/* Charts Grid */}
|
|
586
|
-
<div className="grid grid-cols-1 gap-4 md:grid-cols-2">
|
|
587
|
-
{/* Chart 1: Custo por Categoria (PieChart) */}
|
|
588
|
-
<div className="rounded-xl border bg-card p-4">
|
|
589
|
-
<h4 className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
590
|
-
{t('summary.costByCategory')}
|
|
591
|
-
</h4>
|
|
592
|
-
{fullSummary.cost_by_category.length === 0 ? (
|
|
593
|
-
<div className="flex h-40 items-center justify-center text-sm text-muted-foreground">
|
|
594
|
-
{t('summary.noData')}
|
|
595
|
-
</div>
|
|
596
|
-
) : (
|
|
597
|
-
<div className="flex items-start gap-4">
|
|
598
|
-
<ChartContainer
|
|
599
|
-
className="h-40 w-40 shrink-0"
|
|
600
|
-
config={costChartConfig}
|
|
601
|
-
>
|
|
602
|
-
<PieChart>
|
|
603
|
-
<ChartTooltip content={<ChartTooltipContent />} />
|
|
604
|
-
<Pie
|
|
605
|
-
data={fullSummary.cost_by_category}
|
|
606
|
-
dataKey="total"
|
|
607
|
-
nameKey="category_name"
|
|
608
|
-
cx="50%"
|
|
609
|
-
cy="50%"
|
|
610
|
-
outerRadius={68}
|
|
611
|
-
innerRadius={32}
|
|
612
|
-
>
|
|
613
|
-
{fullSummary.cost_by_category.map((entry, i) => (
|
|
614
|
-
<Cell
|
|
615
|
-
key={`cell-cat-${i}`}
|
|
616
|
-
fill={
|
|
617
|
-
entry.category_color ||
|
|
618
|
-
`hsl(${(i * 47) % 360} 70% 50%)`
|
|
619
|
-
}
|
|
620
|
-
/>
|
|
621
|
-
))}
|
|
622
|
-
</Pie>
|
|
623
|
-
</PieChart>
|
|
624
|
-
</ChartContainer>
|
|
625
|
-
<div className="flex-1 space-y-1.5 overflow-hidden">
|
|
626
|
-
{fullSummary.cost_by_category.map((entry, i) => (
|
|
627
|
-
<div key={i} className="flex min-w-0 items-center gap-2">
|
|
628
|
-
<span
|
|
629
|
-
className="inline-block size-2.5 shrink-0 rounded-full"
|
|
630
|
-
style={{
|
|
631
|
-
backgroundColor:
|
|
632
|
-
entry.category_color ||
|
|
633
|
-
`hsl(${(i * 47) % 360} 70% 50%)`,
|
|
634
|
-
}}
|
|
635
|
-
/>
|
|
636
|
-
<span className="truncate text-xs text-muted-foreground">
|
|
637
|
-
{entry.category_name}
|
|
638
|
-
</span>
|
|
639
|
-
<span className="ml-auto shrink-0 text-xs font-medium tabular-nums">
|
|
640
|
-
{formatCurrency(
|
|
641
|
-
entry.total,
|
|
642
|
-
getSettingValue,
|
|
643
|
-
currentLocaleCode
|
|
644
|
-
)}
|
|
645
|
-
</span>
|
|
646
|
-
</div>
|
|
647
|
-
))}
|
|
648
|
-
</div>
|
|
649
|
-
</div>
|
|
650
|
-
)}
|
|
651
|
-
</div>
|
|
652
|
-
|
|
653
|
-
{/* Chart 2: Custo por Tipo (BarChart horizontal) */}
|
|
654
|
-
<div className="rounded-xl border bg-card p-4">
|
|
655
|
-
<h4 className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
656
|
-
{t('summary.costByType')}
|
|
657
|
-
</h4>
|
|
658
|
-
{fullSummary.cost_by_type.length === 0 ? (
|
|
659
|
-
<div className="flex h-40 items-center justify-center text-sm text-muted-foreground">
|
|
660
|
-
{t('summary.noData')}
|
|
661
|
-
</div>
|
|
662
|
-
) : (
|
|
663
|
-
<ChartContainer
|
|
664
|
-
className="h-40 w-full"
|
|
665
|
-
config={costChartConfig}
|
|
666
|
-
>
|
|
667
|
-
<BarChart
|
|
668
|
-
layout="vertical"
|
|
669
|
-
data={fullSummary.cost_by_type.slice(0, 5).map((ct) => ({
|
|
670
|
-
name: ct.cost_type_name,
|
|
671
|
-
total: ct.total,
|
|
672
|
-
}))}
|
|
673
|
-
margin={{ left: 8, right: 8, top: 0, bottom: 0 }}
|
|
674
|
-
>
|
|
675
|
-
<CartesianGrid horizontal={false} strokeDasharray="3 3" />
|
|
676
|
-
<YAxis
|
|
677
|
-
type="category"
|
|
678
|
-
dataKey="name"
|
|
679
|
-
tickLine={false}
|
|
680
|
-
axisLine={false}
|
|
681
|
-
width={80}
|
|
682
|
-
tick={{ fontSize: 11 }}
|
|
683
|
-
/>
|
|
684
|
-
<XAxis
|
|
685
|
-
type="number"
|
|
686
|
-
tickLine={false}
|
|
687
|
-
axisLine={false}
|
|
688
|
-
tickFormatter={(v) =>
|
|
689
|
-
Intl.NumberFormat('pt-BR', {
|
|
690
|
-
notation: 'compact',
|
|
691
|
-
maximumFractionDigits: 1,
|
|
692
|
-
}).format(Number(v))
|
|
693
|
-
}
|
|
694
|
-
/>
|
|
695
|
-
<ChartTooltip content={<ChartTooltipContent />} />
|
|
696
|
-
<Bar dataKey="total" fill="hsl(201 96% 32%)" radius={4} />
|
|
697
|
-
</BarChart>
|
|
698
|
-
</ChartContainer>
|
|
699
|
-
)}
|
|
700
|
-
</div>
|
|
701
|
-
|
|
702
|
-
{/* Chart 3: Evolução Mensal (AreaChart) */}
|
|
703
|
-
<div className="rounded-xl border bg-card p-4">
|
|
704
|
-
<h4 className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
705
|
-
{t('summary.costByMonth')}
|
|
706
|
-
</h4>
|
|
707
|
-
{fullSummary.cost_by_month.length === 0 ? (
|
|
708
|
-
<div className="flex h-40 items-center justify-center text-sm text-muted-foreground">
|
|
709
|
-
{t('summary.noData')}
|
|
710
|
-
</div>
|
|
711
|
-
) : (
|
|
712
|
-
<ChartContainer
|
|
713
|
-
className="h-40 w-full"
|
|
714
|
-
config={costChartConfig}
|
|
715
|
-
>
|
|
716
|
-
<AreaChart
|
|
717
|
-
data={fullSummary.cost_by_month}
|
|
718
|
-
margin={{ left: 8, right: 8, top: 0, bottom: 0 }}
|
|
719
|
-
>
|
|
720
|
-
<defs>
|
|
721
|
-
<linearGradient
|
|
722
|
-
id="costMonthGradient"
|
|
723
|
-
x1="0"
|
|
724
|
-
y1="0"
|
|
725
|
-
x2="0"
|
|
726
|
-
y2="1"
|
|
727
|
-
>
|
|
728
|
-
<stop
|
|
729
|
-
offset="5%"
|
|
730
|
-
stopColor="hsl(201 96% 32%)"
|
|
731
|
-
stopOpacity={0.3}
|
|
732
|
-
/>
|
|
733
|
-
<stop
|
|
734
|
-
offset="95%"
|
|
735
|
-
stopColor="hsl(201 96% 32%)"
|
|
736
|
-
stopOpacity={0}
|
|
737
|
-
/>
|
|
738
|
-
</linearGradient>
|
|
739
|
-
</defs>
|
|
740
|
-
<CartesianGrid vertical={false} strokeDasharray="3 3" />
|
|
741
|
-
<XAxis
|
|
742
|
-
dataKey="month"
|
|
743
|
-
tickLine={false}
|
|
744
|
-
axisLine={false}
|
|
745
|
-
tick={{ fontSize: 11 }}
|
|
746
|
-
/>
|
|
747
|
-
<YAxis
|
|
748
|
-
tickLine={false}
|
|
749
|
-
axisLine={false}
|
|
750
|
-
width={40}
|
|
751
|
-
tickFormatter={(v) =>
|
|
752
|
-
Intl.NumberFormat('pt-BR', {
|
|
753
|
-
notation: 'compact',
|
|
754
|
-
maximumFractionDigits: 1,
|
|
755
|
-
}).format(Number(v))
|
|
756
|
-
}
|
|
757
|
-
/>
|
|
758
|
-
<ChartTooltip content={<ChartTooltipContent />} />
|
|
759
|
-
<Area
|
|
760
|
-
type="monotone"
|
|
761
|
-
dataKey="total"
|
|
762
|
-
stroke="hsl(201 96% 32%)"
|
|
763
|
-
strokeWidth={2}
|
|
764
|
-
fill="url(#costMonthGradient)"
|
|
765
|
-
/>
|
|
766
|
-
</AreaChart>
|
|
767
|
-
</ChartContainer>
|
|
768
|
-
)}
|
|
769
|
-
</div>
|
|
770
|
-
|
|
771
|
-
{/* Chart 4: Planejado × Aprovado × Realizado */}
|
|
772
|
-
<div className="rounded-xl border bg-card p-4">
|
|
773
|
-
<h4 className="mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
774
|
-
{t('summary.statusBreakdown')}
|
|
775
|
-
</h4>
|
|
776
|
-
<ChartContainer className="h-40 w-full" config={costChartConfig}>
|
|
777
|
-
<BarChart
|
|
778
|
-
data={[
|
|
779
|
-
{
|
|
780
|
-
name: t('status.planned'),
|
|
781
|
-
value: fullSummary.planned_total,
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
name: t('status.approved'),
|
|
785
|
-
value: fullSummary.approved_total,
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
name: t('status.realized'),
|
|
789
|
-
value: fullSummary.realized_total,
|
|
790
|
-
},
|
|
791
|
-
]}
|
|
792
|
-
margin={{ left: 8, right: 8, top: 0, bottom: 0 }}
|
|
793
|
-
>
|
|
794
|
-
<CartesianGrid vertical={false} strokeDasharray="3 3" />
|
|
795
|
-
<XAxis
|
|
796
|
-
dataKey="name"
|
|
797
|
-
tickLine={false}
|
|
798
|
-
axisLine={false}
|
|
799
|
-
tick={{ fontSize: 11 }}
|
|
800
|
-
/>
|
|
801
|
-
<YAxis
|
|
802
|
-
tickLine={false}
|
|
803
|
-
axisLine={false}
|
|
804
|
-
width={40}
|
|
805
|
-
tickFormatter={(v) =>
|
|
806
|
-
Intl.NumberFormat('pt-BR', {
|
|
807
|
-
notation: 'compact',
|
|
808
|
-
maximumFractionDigits: 1,
|
|
809
|
-
}).format(Number(v))
|
|
810
|
-
}
|
|
811
|
-
/>
|
|
812
|
-
<ChartTooltip content={<ChartTooltipContent />} />
|
|
813
|
-
<Bar dataKey="value" radius={4}>
|
|
814
|
-
{[
|
|
815
|
-
'hsl(215 16% 47%)',
|
|
816
|
-
'hsl(166 72% 28%)',
|
|
817
|
-
'hsl(201 96% 32%)',
|
|
818
|
-
].map((color, i) => (
|
|
819
|
-
<Cell key={`cell-status-${i}`} fill={color} />
|
|
820
|
-
))}
|
|
821
|
-
</Bar>
|
|
822
|
-
</BarChart>
|
|
823
|
-
</ChartContainer>
|
|
824
|
-
</div>
|
|
825
|
-
</div>
|
|
826
|
-
</div>
|
|
827
|
-
) : null}
|
|
828
|
-
|
|
829
|
-
{/* Content */}
|
|
830
|
-
{isLoading ? (
|
|
831
|
-
<div className="space-y-2">
|
|
832
|
-
<Skeleton className="h-8 w-full" />
|
|
833
|
-
<Skeleton className="h-8 w-full" />
|
|
834
|
-
<Skeleton className="h-8 w-3/4" />
|
|
835
|
-
</div>
|
|
836
|
-
) : !summary || summary.categories.length === 0 ? (
|
|
837
|
-
<div className="flex min-h-40 flex-col items-center justify-center rounded-2xl border border-dashed bg-background p-6 text-center">
|
|
838
|
-
<div className="flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground">
|
|
839
|
-
<DollarSign className="size-5" />
|
|
840
|
-
</div>
|
|
841
|
-
<p className="mt-2 text-sm font-medium">{t('empty')}</p>
|
|
842
|
-
<p className="mt-1 text-xs text-muted-foreground">
|
|
843
|
-
{t('emptyDescription')}
|
|
844
|
-
</p>
|
|
845
|
-
</div>
|
|
846
|
-
) : (
|
|
847
|
-
<div className="space-y-4">
|
|
848
|
-
{summary.categories.map((group, index) => (
|
|
849
|
-
<div
|
|
850
|
-
key={group.category?.id ?? `uncategorized-${index}`}
|
|
851
|
-
className="overflow-hidden rounded-xl border bg-card"
|
|
852
|
-
>
|
|
853
|
-
{/* Category subheader */}
|
|
854
|
-
<div className="flex items-center justify-between gap-2 border-b bg-muted/30 px-4 py-2">
|
|
855
|
-
<div className="flex items-center gap-2">
|
|
856
|
-
{group.category?.color ? (
|
|
857
|
-
<span
|
|
858
|
-
className="inline-block size-2.5 rounded-full"
|
|
859
|
-
style={{ backgroundColor: group.category.color }}
|
|
860
|
-
/>
|
|
861
|
-
) : null}
|
|
862
|
-
<span className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
863
|
-
{group.category?.name ?? t('uncategorized')}
|
|
864
|
-
</span>
|
|
865
|
-
<Badge variant="secondary" className="text-[10px]">
|
|
866
|
-
{group.count}
|
|
867
|
-
</Badge>
|
|
868
|
-
</div>
|
|
869
|
-
<span className="text-xs font-medium text-muted-foreground">
|
|
870
|
-
{formatCurrency(
|
|
871
|
-
group.total_amount,
|
|
872
|
-
getSettingValue,
|
|
873
|
-
currentLocaleCode
|
|
874
|
-
)}
|
|
875
|
-
</span>
|
|
876
|
-
</div>
|
|
877
|
-
|
|
878
|
-
{/* Costs table */}
|
|
879
|
-
<Table>
|
|
880
|
-
<TableHeader>
|
|
881
|
-
<TableRow>
|
|
882
|
-
<TableHead>{t('columns.description')}</TableHead>
|
|
883
|
-
<TableHead className="hidden sm:table-cell">
|
|
884
|
-
{t('columns.type')}
|
|
885
|
-
</TableHead>
|
|
886
|
-
<TableHead className="hidden md:table-cell">
|
|
887
|
-
{t('columns.calculationType')}
|
|
888
|
-
</TableHead>
|
|
889
|
-
<TableHead className="text-right">
|
|
890
|
-
{t('columns.quantityAmount')}
|
|
891
|
-
</TableHead>
|
|
892
|
-
<TableHead className="text-right hidden sm:table-cell">
|
|
893
|
-
{t('columns.total')}
|
|
894
|
-
</TableHead>
|
|
895
|
-
<TableHead>{t('columns.status')}</TableHead>
|
|
896
|
-
<TableHead className="text-right">
|
|
897
|
-
{commonT('labels.actions')}
|
|
898
|
-
</TableHead>
|
|
899
|
-
</TableRow>
|
|
900
|
-
</TableHeader>
|
|
901
|
-
<TableBody>
|
|
902
|
-
{group.items.map((cost) => {
|
|
903
|
-
const total =
|
|
904
|
-
Number(cost.amount) * Number(cost.quantity ?? 1);
|
|
905
|
-
return (
|
|
906
|
-
<TableRow
|
|
907
|
-
key={cost.id}
|
|
908
|
-
className="cursor-pointer"
|
|
909
|
-
onClick={() => openEditSheet(cost)}
|
|
910
|
-
>
|
|
911
|
-
<TableCell>
|
|
912
|
-
<div>
|
|
913
|
-
<span className="font-medium">
|
|
914
|
-
{cost.description || cost.cost_type?.name || '-'}
|
|
915
|
-
</span>
|
|
916
|
-
{cost.cost_date ? (
|
|
917
|
-
<p className="mt-0.5 text-xs text-muted-foreground">
|
|
918
|
-
{formatDate(
|
|
919
|
-
cost.cost_date,
|
|
920
|
-
getSettingValue,
|
|
921
|
-
currentLocaleCode
|
|
922
|
-
)}
|
|
923
|
-
</p>
|
|
924
|
-
) : null}
|
|
925
|
-
</div>
|
|
926
|
-
</TableCell>
|
|
927
|
-
<TableCell className="hidden sm:table-cell">
|
|
928
|
-
{cost.cost_type ? (
|
|
929
|
-
<Badge variant="outline" className="text-[10px]">
|
|
930
|
-
{cost.cost_type.name}
|
|
931
|
-
</Badge>
|
|
932
|
-
) : (
|
|
933
|
-
<span className="text-muted-foreground">-</span>
|
|
934
|
-
)}
|
|
935
|
-
</TableCell>
|
|
936
|
-
<TableCell className="hidden md:table-cell">
|
|
937
|
-
<Badge variant="secondary" className="text-[10px]">
|
|
938
|
-
{calculationTypeLabel(cost.calculation_type)}
|
|
939
|
-
</Badge>
|
|
940
|
-
</TableCell>
|
|
941
|
-
<TableCell className="text-right tabular-nums">
|
|
942
|
-
<span className="text-xs text-muted-foreground">
|
|
943
|
-
{Number(cost.quantity ?? 1)} ×{' '}
|
|
944
|
-
{formatCurrency(
|
|
945
|
-
Number(cost.amount),
|
|
946
|
-
getSettingValue,
|
|
947
|
-
currentLocaleCode
|
|
948
|
-
)}
|
|
949
|
-
</span>
|
|
950
|
-
</TableCell>
|
|
951
|
-
<TableCell className="hidden text-right tabular-nums sm:table-cell">
|
|
952
|
-
<span className="font-medium">
|
|
953
|
-
{formatCurrency(
|
|
954
|
-
total,
|
|
955
|
-
getSettingValue,
|
|
956
|
-
currentLocaleCode
|
|
957
|
-
)}
|
|
958
|
-
</span>
|
|
959
|
-
</TableCell>
|
|
960
|
-
<TableCell>
|
|
961
|
-
<Badge
|
|
962
|
-
variant="secondary"
|
|
963
|
-
className={statusBadgeClass(cost.status)}
|
|
964
|
-
>
|
|
965
|
-
{statusLabel(cost.status)}
|
|
966
|
-
</Badge>
|
|
967
|
-
</TableCell>
|
|
968
|
-
<TableCell
|
|
969
|
-
className="text-right"
|
|
970
|
-
onClick={(e) => e.stopPropagation()}
|
|
971
|
-
>
|
|
972
|
-
<div className="flex justify-end gap-1">
|
|
973
|
-
<Button
|
|
974
|
-
variant="ghost"
|
|
975
|
-
size="icon"
|
|
976
|
-
className="size-7"
|
|
977
|
-
onClick={() => openEditSheet(cost)}
|
|
978
|
-
>
|
|
979
|
-
<Pencil className="size-3" />
|
|
980
|
-
</Button>
|
|
981
|
-
<Button
|
|
982
|
-
variant="ghost"
|
|
983
|
-
size="icon"
|
|
984
|
-
className="size-7 text-destructive hover:text-destructive"
|
|
985
|
-
onClick={() => setDeleteTarget(cost)}
|
|
986
|
-
>
|
|
987
|
-
<Trash2 className="size-3" />
|
|
988
|
-
</Button>
|
|
989
|
-
</div>
|
|
990
|
-
</TableCell>
|
|
991
|
-
</TableRow>
|
|
992
|
-
);
|
|
993
|
-
})}
|
|
994
|
-
</TableBody>
|
|
995
|
-
</Table>
|
|
996
|
-
</div>
|
|
997
|
-
))}
|
|
998
|
-
</div>
|
|
999
|
-
)}
|
|
1000
|
-
|
|
1001
|
-
{/* Create / Edit Sheet */}
|
|
1002
|
-
<Sheet open={isSheetOpen} onOpenChange={setIsSheetOpen}>
|
|
1003
|
-
<SheetContent className="flex w-full flex-col overflow-hidden sm:max-w-lg">
|
|
1004
|
-
<SheetHeader>
|
|
1005
|
-
<SheetTitle>
|
|
1006
|
-
{editingCost ? t('sheet.editTitle') : t('sheet.createTitle')}
|
|
1007
|
-
</SheetTitle>
|
|
1008
|
-
<SheetDescription>{t('sheet.description')}</SheetDescription>
|
|
1009
|
-
</SheetHeader>
|
|
1010
|
-
|
|
1011
|
-
<div className="flex-1 space-y-4 overflow-y-auto px-4 py-4">
|
|
1012
|
-
{/* Cost type */}
|
|
1013
|
-
<div className="space-y-1.5">
|
|
1014
|
-
<Label htmlFor="pc-type">{t('fields.costType')}</Label>
|
|
1015
|
-
<Select
|
|
1016
|
-
value={form.cost_type_id}
|
|
1017
|
-
onValueChange={handleCostTypeChange}
|
|
1018
|
-
>
|
|
1019
|
-
<SelectTrigger id="pc-type" className="w-full">
|
|
1020
|
-
<SelectValue placeholder={t('fields.costTypePlaceholder')} />
|
|
1021
|
-
</SelectTrigger>
|
|
1022
|
-
<SelectContent>
|
|
1023
|
-
<SelectItem value="none">
|
|
1024
|
-
{t('fields.costTypeNone')}
|
|
1025
|
-
</SelectItem>
|
|
1026
|
-
{costTypesByCategory.map((group, gIndex) => (
|
|
1027
|
-
<SelectGroup key={group.category?.id ?? `g-${gIndex}`}>
|
|
1028
|
-
{group.category ? (
|
|
1029
|
-
<SelectLabel>{group.category.name}</SelectLabel>
|
|
1030
|
-
) : null}
|
|
1031
|
-
{group.types.map((ct) => (
|
|
1032
|
-
<SelectItem key={ct.id} value={String(ct.id)}>
|
|
1033
|
-
{ct.name}
|
|
1034
|
-
</SelectItem>
|
|
1035
|
-
))}
|
|
1036
|
-
</SelectGroup>
|
|
1037
|
-
))}
|
|
1038
|
-
</SelectContent>
|
|
1039
|
-
</Select>
|
|
1040
|
-
</div>
|
|
1041
|
-
|
|
1042
|
-
{/* Category (auto-filled from type, or manual) */}
|
|
1043
|
-
<div className="space-y-1.5">
|
|
1044
|
-
<Label htmlFor="pc-category">
|
|
1045
|
-
{t('fields.category') ?? 'Categoria'}
|
|
1046
|
-
</Label>
|
|
1047
|
-
<Select
|
|
1048
|
-
value={form.category_id}
|
|
1049
|
-
onValueChange={(v) => updateForm('category_id', v)}
|
|
1050
|
-
>
|
|
1051
|
-
<SelectTrigger id="pc-category" className="w-full">
|
|
1052
|
-
<SelectValue
|
|
1053
|
-
placeholder={
|
|
1054
|
-
t('fields.categoryPlaceholder') ??
|
|
1055
|
-
'Selecione uma categoria (opcional)'
|
|
1056
|
-
}
|
|
1057
|
-
/>
|
|
1058
|
-
</SelectTrigger>
|
|
1059
|
-
<SelectContent>
|
|
1060
|
-
<SelectItem value="none">
|
|
1061
|
-
{t('fields.costTypeNone')}
|
|
1062
|
-
</SelectItem>
|
|
1063
|
-
{costTypesByCategory
|
|
1064
|
-
.filter((g) => g.category !== null)
|
|
1065
|
-
.map((g) => (
|
|
1066
|
-
<SelectItem
|
|
1067
|
-
key={g.category!.id}
|
|
1068
|
-
value={String(g.category!.id)}
|
|
1069
|
-
>
|
|
1070
|
-
<div className="flex items-center gap-2">
|
|
1071
|
-
{g.category!.color ? (
|
|
1072
|
-
<span
|
|
1073
|
-
className="inline-block size-2.5 rounded-full shrink-0"
|
|
1074
|
-
style={{ backgroundColor: g.category!.color }}
|
|
1075
|
-
/>
|
|
1076
|
-
) : null}
|
|
1077
|
-
{g.category!.name}
|
|
1078
|
-
</div>
|
|
1079
|
-
</SelectItem>
|
|
1080
|
-
))}
|
|
1081
|
-
</SelectContent>
|
|
1082
|
-
</Select>
|
|
1083
|
-
{form.cost_type_id !== 'none' && form.category_id !== 'none' && (
|
|
1084
|
-
<p className="text-xs text-muted-foreground">
|
|
1085
|
-
{t('fields.categoryAutoFilled') ??
|
|
1086
|
-
'Preenchido automaticamente pelo tipo selecionado'}
|
|
1087
|
-
</p>
|
|
1088
|
-
)}
|
|
1089
|
-
</div>
|
|
1090
|
-
|
|
1091
|
-
{/* Description */}
|
|
1092
|
-
<div className="space-y-1.5">
|
|
1093
|
-
<Label htmlFor="pc-description">{t('fields.description')}</Label>
|
|
1094
|
-
<Input
|
|
1095
|
-
id="pc-description"
|
|
1096
|
-
value={form.description}
|
|
1097
|
-
onChange={(e) => updateForm('description', e.target.value)}
|
|
1098
|
-
placeholder={t('fields.descriptionPlaceholder')}
|
|
1099
|
-
/>
|
|
1100
|
-
</div>
|
|
1101
|
-
|
|
1102
|
-
{/* Calculation type */}
|
|
1103
|
-
<div className="space-y-1.5">
|
|
1104
|
-
<Label htmlFor="pc-calc-type-top">
|
|
1105
|
-
{t('fields.calculationType')}
|
|
1106
|
-
</Label>
|
|
1107
|
-
<Select
|
|
1108
|
-
value={form.calculation_type}
|
|
1109
|
-
onValueChange={(v) => updateForm('calculation_type', v)}
|
|
1110
|
-
>
|
|
1111
|
-
<SelectTrigger id="pc-calc-type-top" className="w-full">
|
|
1112
|
-
<SelectValue />
|
|
1113
|
-
</SelectTrigger>
|
|
1114
|
-
<SelectContent>
|
|
1115
|
-
{CALCULATION_TYPE_OPTIONS.map((ct) => (
|
|
1116
|
-
<SelectItem key={ct} value={ct}>
|
|
1117
|
-
{calculationTypeLabel(ct)}
|
|
1118
|
-
</SelectItem>
|
|
1119
|
-
))}
|
|
1120
|
-
</SelectContent>
|
|
1121
|
-
</Select>
|
|
1122
|
-
</div>
|
|
1123
|
-
|
|
1124
|
-
{/* Quantity + Unit Amount (only when calculated type) */}
|
|
1125
|
-
{isCalculatedType(form.calculation_type) && (
|
|
1126
|
-
<div className="grid grid-cols-2 gap-3">
|
|
1127
|
-
<div className="space-y-1.5">
|
|
1128
|
-
<Label htmlFor="pc-quantity">{t('fields.quantity')}</Label>
|
|
1129
|
-
<Input
|
|
1130
|
-
id="pc-quantity"
|
|
1131
|
-
type="number"
|
|
1132
|
-
min="0.0001"
|
|
1133
|
-
step="0.0001"
|
|
1134
|
-
value={form.quantity}
|
|
1135
|
-
onChange={(e) => updateForm('quantity', e.target.value)}
|
|
1136
|
-
/>
|
|
1137
|
-
</div>
|
|
1138
|
-
<div className="space-y-1.5">
|
|
1139
|
-
<Label htmlFor="pc-unit-amount">
|
|
1140
|
-
{t('fields.unitAmount')}
|
|
1141
|
-
</Label>
|
|
1142
|
-
<Input
|
|
1143
|
-
id="pc-unit-amount"
|
|
1144
|
-
type="number"
|
|
1145
|
-
min="0"
|
|
1146
|
-
step="0.01"
|
|
1147
|
-
value={form.unit_amount}
|
|
1148
|
-
onChange={(e) => updateForm('unit_amount', e.target.value)}
|
|
1149
|
-
placeholder="0,00"
|
|
1150
|
-
/>
|
|
1151
|
-
</div>
|
|
1152
|
-
</div>
|
|
1153
|
-
)}
|
|
1154
|
-
|
|
1155
|
-
{/* Amount + Currency */}
|
|
1156
|
-
<div className="grid grid-cols-3 gap-3">
|
|
1157
|
-
<div className="col-span-2 space-y-1.5">
|
|
1158
|
-
<Label htmlFor="pc-amount">
|
|
1159
|
-
{t('fields.amount')}{' '}
|
|
1160
|
-
<span className="text-destructive">*</span>
|
|
1161
|
-
</Label>
|
|
1162
|
-
<Input
|
|
1163
|
-
id="pc-amount"
|
|
1164
|
-
type="number"
|
|
1165
|
-
min="0"
|
|
1166
|
-
step="0.01"
|
|
1167
|
-
value={form.amount}
|
|
1168
|
-
onChange={(e) => updateForm('amount', e.target.value)}
|
|
1169
|
-
placeholder="0,00"
|
|
1170
|
-
readOnly={
|
|
1171
|
-
isCalculatedType(form.calculation_type) &&
|
|
1172
|
-
!!form.unit_amount &&
|
|
1173
|
-
!!form.quantity
|
|
1174
|
-
}
|
|
1175
|
-
className={
|
|
1176
|
-
isCalculatedType(form.calculation_type) &&
|
|
1177
|
-
!!form.unit_amount &&
|
|
1178
|
-
!!form.quantity
|
|
1179
|
-
? 'bg-muted text-muted-foreground'
|
|
1180
|
-
: ''
|
|
1181
|
-
}
|
|
1182
|
-
/>
|
|
1183
|
-
{isCalculatedType(form.calculation_type) && (
|
|
1184
|
-
<p className="text-xs text-muted-foreground">
|
|
1185
|
-
{t('fields.amountCalculated') ??
|
|
1186
|
-
'Calculado automaticamente: quantidade × valor unitário'}
|
|
1187
|
-
</p>
|
|
1188
|
-
)}
|
|
1189
|
-
</div>
|
|
1190
|
-
<div className="space-y-1.5">
|
|
1191
|
-
<Label htmlFor="pc-currency">{t('fields.currency')}</Label>
|
|
1192
|
-
<Input
|
|
1193
|
-
id="pc-currency"
|
|
1194
|
-
value={form.currency}
|
|
1195
|
-
maxLength={3}
|
|
1196
|
-
onChange={(e) =>
|
|
1197
|
-
updateForm('currency', e.target.value.toUpperCase())
|
|
1198
|
-
}
|
|
1199
|
-
/>
|
|
1200
|
-
</div>
|
|
1201
|
-
</div>
|
|
1202
|
-
|
|
1203
|
-
{/* Recurrence Type */}
|
|
1204
|
-
<div className="space-y-1.5">
|
|
1205
|
-
<Label htmlFor="pc-recurrence-type">
|
|
1206
|
-
{t('fields.recurrenceType')}
|
|
1207
|
-
</Label>
|
|
1208
|
-
<Select
|
|
1209
|
-
value={form.recurrence_type}
|
|
1210
|
-
onValueChange={(v) => updateForm('recurrence_type', v)}
|
|
1211
|
-
>
|
|
1212
|
-
<SelectTrigger id="pc-recurrence-type" className="w-full">
|
|
1213
|
-
<SelectValue />
|
|
1214
|
-
</SelectTrigger>
|
|
1215
|
-
<SelectContent>
|
|
1216
|
-
{RECURRENCE_TYPE_OPTIONS.map((r) => (
|
|
1217
|
-
<SelectItem key={r} value={r}>
|
|
1218
|
-
{recurrenceTypeLabel(r)}
|
|
1219
|
-
</SelectItem>
|
|
1220
|
-
))}
|
|
1221
|
-
</SelectContent>
|
|
1222
|
-
</Select>
|
|
1223
|
-
</div>
|
|
1224
|
-
|
|
1225
|
-
{/* Status */}
|
|
1226
|
-
<div className="space-y-1.5">
|
|
1227
|
-
<Label htmlFor="pc-status">{t('fields.status')}</Label>
|
|
1228
|
-
<Select
|
|
1229
|
-
value={form.status}
|
|
1230
|
-
onValueChange={(v) => updateForm('status', v)}
|
|
1231
|
-
>
|
|
1232
|
-
<SelectTrigger id="pc-status" className="w-full">
|
|
1233
|
-
<SelectValue />
|
|
1234
|
-
</SelectTrigger>
|
|
1235
|
-
<SelectContent>
|
|
1236
|
-
{STATUS_OPTIONS.map((s) => (
|
|
1237
|
-
<SelectItem key={s} value={s}>
|
|
1238
|
-
{statusLabel(s)}
|
|
1239
|
-
</SelectItem>
|
|
1240
|
-
))}
|
|
1241
|
-
</SelectContent>
|
|
1242
|
-
</Select>
|
|
1243
|
-
</div>
|
|
1244
|
-
|
|
1245
|
-
{/* Dates */}
|
|
1246
|
-
<div className="grid grid-cols-2 gap-3">
|
|
1247
|
-
<div className="space-y-1.5">
|
|
1248
|
-
<Label htmlFor="pc-cost-date">{t('fields.costDate')}</Label>
|
|
1249
|
-
<Input
|
|
1250
|
-
id="pc-cost-date"
|
|
1251
|
-
type="date"
|
|
1252
|
-
value={form.cost_date}
|
|
1253
|
-
onChange={(e) => updateForm('cost_date', e.target.value)}
|
|
1254
|
-
/>
|
|
1255
|
-
</div>
|
|
1256
|
-
<div />
|
|
1257
|
-
</div>
|
|
1258
|
-
|
|
1259
|
-
<div className="grid grid-cols-2 gap-3">
|
|
1260
|
-
<div className="space-y-1.5">
|
|
1261
|
-
<Label htmlFor="pc-period-start">
|
|
1262
|
-
{t('fields.periodStart')}
|
|
1263
|
-
</Label>
|
|
1264
|
-
<Input
|
|
1265
|
-
id="pc-period-start"
|
|
1266
|
-
type="date"
|
|
1267
|
-
value={form.period_start}
|
|
1268
|
-
onChange={(e) => updateForm('period_start', e.target.value)}
|
|
1269
|
-
/>
|
|
1270
|
-
</div>
|
|
1271
|
-
<div className="space-y-1.5">
|
|
1272
|
-
<Label htmlFor="pc-period-end">{t('fields.periodEnd')}</Label>
|
|
1273
|
-
<Input
|
|
1274
|
-
id="pc-period-end"
|
|
1275
|
-
type="date"
|
|
1276
|
-
value={form.period_end}
|
|
1277
|
-
onChange={(e) => updateForm('period_end', e.target.value)}
|
|
1278
|
-
/>
|
|
1279
|
-
</div>
|
|
1280
|
-
</div>
|
|
1281
|
-
|
|
1282
|
-
{/* Flags */}
|
|
1283
|
-
<div className="flex gap-6">
|
|
1284
|
-
<div className="flex items-center gap-2">
|
|
1285
|
-
<input
|
|
1286
|
-
id="pc-is-billable"
|
|
1287
|
-
type="checkbox"
|
|
1288
|
-
checked={form.is_billable}
|
|
1289
|
-
onChange={(e) => updateForm('is_billable', e.target.checked)}
|
|
1290
|
-
className="size-4"
|
|
1291
|
-
/>
|
|
1292
|
-
<Label htmlFor="pc-is-billable">{t('fields.isBillable')}</Label>
|
|
1293
|
-
</div>
|
|
1294
|
-
<div className="flex items-center gap-2">
|
|
1295
|
-
<input
|
|
1296
|
-
id="pc-is-reimbursable"
|
|
1297
|
-
type="checkbox"
|
|
1298
|
-
checked={form.is_reimbursable}
|
|
1299
|
-
onChange={(e) =>
|
|
1300
|
-
updateForm('is_reimbursable', e.target.checked)
|
|
1301
|
-
}
|
|
1302
|
-
className="size-4"
|
|
1303
|
-
/>
|
|
1304
|
-
<Label htmlFor="pc-is-reimbursable">
|
|
1305
|
-
{t('fields.isReimbursable')}
|
|
1306
|
-
</Label>
|
|
1307
|
-
</div>
|
|
1308
|
-
</div>
|
|
1309
|
-
|
|
1310
|
-
{/* Notes */}
|
|
1311
|
-
<div className="space-y-1.5">
|
|
1312
|
-
<Label htmlFor="pc-notes">{t('fields.notes')}</Label>
|
|
1313
|
-
<Textarea
|
|
1314
|
-
id="pc-notes"
|
|
1315
|
-
value={form.notes}
|
|
1316
|
-
onChange={(e) => updateForm('notes', e.target.value)}
|
|
1317
|
-
placeholder={t('fields.notesPlaceholder')}
|
|
1318
|
-
rows={3}
|
|
1319
|
-
/>
|
|
1320
|
-
</div>
|
|
1321
|
-
</div>
|
|
1322
|
-
|
|
1323
|
-
<div className="flex justify-end gap-2 border-t p-4">
|
|
1324
|
-
<Button
|
|
1325
|
-
variant="outline"
|
|
1326
|
-
onClick={() => setIsSheetOpen(false)}
|
|
1327
|
-
disabled={isSaving}
|
|
1328
|
-
>
|
|
1329
|
-
{commonT('actions.cancel')}
|
|
1330
|
-
</Button>
|
|
1331
|
-
<Button onClick={saveCost} disabled={isSaving}>
|
|
1332
|
-
{isSaving ? t('messages.saving') : commonT('actions.save')}
|
|
1333
|
-
</Button>
|
|
1334
|
-
</div>
|
|
1335
|
-
</SheetContent>
|
|
1336
|
-
</Sheet>
|
|
1337
|
-
|
|
1338
|
-
{/* Delete Confirmation */}
|
|
1339
|
-
<AlertDialog
|
|
1340
|
-
open={deleteTarget !== null}
|
|
1341
|
-
onOpenChange={(open) => {
|
|
1342
|
-
if (!open) setDeleteTarget(null);
|
|
1343
|
-
}}
|
|
1344
|
-
>
|
|
1345
|
-
<AlertDialogContent>
|
|
1346
|
-
<AlertDialogHeader>
|
|
1347
|
-
<AlertDialogTitle>{t('deleteDialog.title')}</AlertDialogTitle>
|
|
1348
|
-
<AlertDialogDescription>
|
|
1349
|
-
{t('deleteDialog.description')}
|
|
1350
|
-
</AlertDialogDescription>
|
|
1351
|
-
</AlertDialogHeader>
|
|
1352
|
-
<AlertDialogFooter>
|
|
1353
|
-
<AlertDialogCancel disabled={isDeleting}>
|
|
1354
|
-
{commonT('actions.cancel')}
|
|
1355
|
-
</AlertDialogCancel>
|
|
1356
|
-
<AlertDialogAction
|
|
1357
|
-
onClick={confirmDelete}
|
|
1358
|
-
disabled={isDeleting}
|
|
1359
|
-
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
1360
|
-
>
|
|
1361
|
-
{isDeleting ? t('messages.deleting') : commonT('actions.delete')}
|
|
1362
|
-
</AlertDialogAction>
|
|
1363
|
-
</AlertDialogFooter>
|
|
1364
|
-
</AlertDialogContent>
|
|
1365
|
-
</AlertDialog>
|
|
1366
|
-
</div>
|
|
1367
|
-
);
|
|
1368
|
-
}
|