@hed-hog/operations 0.0.330 → 0.0.332
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/controllers/operations-collaborators.controller.d.ts +58 -213
- package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
- package/dist/controllers/operations-collaborators.controller.js +100 -0
- package/dist/controllers/operations-collaborators.controller.js.map +1 -1
- package/dist/controllers/operations-contracts.controller.d.ts +6 -6
- package/dist/controllers/operations-projects.controller.d.ts +25 -0
- package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
- package/dist/controllers/operations-projects.controller.js +48 -0
- package/dist/controllers/operations-projects.controller.js.map +1 -1
- package/dist/controllers/operations-reports.controller.d.ts +1 -1
- package/dist/controllers/operations-tasks.controller.d.ts +34 -9
- package/dist/controllers/operations-tasks.controller.d.ts.map +1 -1
- package/dist/controllers/operations-tasks.controller.js +43 -32
- package/dist/controllers/operations-tasks.controller.js.map +1 -1
- package/dist/controllers/operations-timesheets.controller.d.ts +9 -9
- package/dist/dashboard/components/DashboardLayout.d.ts +30 -0
- package/dist/dashboard/components/DashboardLayout.d.ts.map +1 -0
- package/dist/dashboard/components/DashboardLayout.js +87 -0
- package/dist/dashboard/components/DashboardLayout.js.map +1 -0
- package/dist/dashboard/components/widget-registry.d.ts +23 -0
- package/dist/dashboard/components/widget-registry.d.ts.map +1 -0
- package/dist/dashboard/components/widget-registry.js +245 -0
- package/dist/dashboard/components/widget-registry.js.map +1 -0
- package/dist/dashboard/hooks/useDashboardData.d.ts +20 -0
- package/dist/dashboard/hooks/useDashboardData.d.ts.map +1 -0
- package/dist/dashboard/hooks/useDashboardData.js +24 -0
- package/dist/dashboard/hooks/useDashboardData.js.map +1 -0
- package/dist/dashboard/types/widgets.types.d.ts +233 -0
- package/dist/dashboard/types/widgets.types.d.ts.map +1 -0
- package/dist/dashboard/types/widgets.types.js +6 -0
- package/dist/dashboard/types/widgets.types.js.map +1 -0
- package/dist/dashboard/widgets/CapacityDistribution.d.ts +23 -0
- package/dist/dashboard/widgets/CapacityDistribution.d.ts.map +1 -0
- package/dist/dashboard/widgets/CapacityDistribution.js +11 -0
- package/dist/dashboard/widgets/CapacityDistribution.js.map +1 -0
- package/dist/dashboard/widgets/EffortByProject.d.ts +22 -0
- package/dist/dashboard/widgets/EffortByProject.d.ts.map +1 -0
- package/dist/dashboard/widgets/EffortByProject.js +11 -0
- package/dist/dashboard/widgets/EffortByProject.js.map +1 -0
- package/dist/dashboard/widgets/HeadcountByArea.d.ts +24 -0
- package/dist/dashboard/widgets/HeadcountByArea.d.ts.map +1 -0
- package/dist/dashboard/widgets/HeadcountByArea.js +11 -0
- package/dist/dashboard/widgets/HeadcountByArea.js.map +1 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts +18 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts.map +1 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.js +12 -0
- package/dist/dashboard/widgets/ManagedProjectsStatus.js.map +1 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts +22 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.js +12 -0
- package/dist/dashboard/widgets/MyHoursPeriodKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts +19 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.js +17 -0
- package/dist/dashboard/widgets/MyOpenRequestsKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.d.ts +23 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.js +14 -0
- package/dist/dashboard/widgets/MyPendingRequestsList.js.map +1 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts +22 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.js +11 -0
- package/dist/dashboard/widgets/MyProjectAllocationsKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyQuickActions.d.ts +23 -0
- package/dist/dashboard/widgets/MyQuickActions.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyQuickActions.js +18 -0
- package/dist/dashboard/widgets/MyQuickActions.js.map +1 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts +23 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.js +22 -0
- package/dist/dashboard/widgets/MyRelevantDeadlines.js.map +1 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts +17 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.js +11 -0
- package/dist/dashboard/widgets/MyTimesheetStatusKpi.js.map +1 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.d.ts +21 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.d.ts.map +1 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.js +19 -0
- package/dist/dashboard/widgets/MyWeeklyJourney.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts +19 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.js +12 -0
- package/dist/dashboard/widgets/PortfolioCostsKpi.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts +18 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.js +8 -0
- package/dist/dashboard/widgets/PortfolioEffortKpi.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts +22 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.js +56 -0
- package/dist/dashboard/widgets/PortfolioProjectsKpi.js.map +1 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts +19 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.js +11 -0
- package/dist/dashboard/widgets/PortfolioRiskKpi.js.map +1 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.d.ts +19 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.d.ts.map +1 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.js +18 -0
- package/dist/dashboard/widgets/ProjectStatusOverview.js.map +1 -0
- package/dist/dashboard/widgets/StrategicDeadlines.d.ts +24 -0
- package/dist/dashboard/widgets/StrategicDeadlines.d.ts.map +1 -0
- package/dist/dashboard/widgets/StrategicDeadlines.js +22 -0
- package/dist/dashboard/widgets/StrategicDeadlines.js.map +1 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.d.ts +24 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.js +12 -0
- package/dist/dashboard/widgets/TeamApprovalQueue.js.map +1 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.d.ts +18 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.js +19 -0
- package/dist/dashboard/widgets/TeamCapacityKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts +22 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.js +56 -0
- package/dist/dashboard/widgets/TeamHeadcountKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamHoursKpi.d.ts +19 -0
- package/dist/dashboard/widgets/TeamHoursKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamHoursKpi.js +13 -0
- package/dist/dashboard/widgets/TeamHoursKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts +20 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js +11 -0
- package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js.map +1 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts +18 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.js +17 -0
- package/dist/dashboard/widgets/TeamUtilizationOverview.js.map +1 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts +24 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts.map +1 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.js +19 -0
- package/dist/dashboard/widgets/TeamWorkloadAlerts.js.map +1 -0
- package/dist/dashboard/widgets/index.d.ts +24 -0
- package/dist/dashboard/widgets/index.d.ts.map +1 -0
- package/dist/dashboard/widgets/index.js +54 -0
- package/dist/dashboard/widgets/index.js.map +1 -0
- package/dist/dto/create-collaborator-invoice.dto.d.ts +11 -0
- package/dist/dto/create-collaborator-invoice.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator-invoice.dto.js +55 -0
- package/dist/dto/create-collaborator-invoice.dto.js.map +1 -0
- package/dist/dto/create-collaborator-payment.dto.d.ts +10 -0
- package/dist/dto/create-collaborator-payment.dto.d.ts.map +1 -0
- package/dist/dto/create-collaborator-payment.dto.js +50 -0
- package/dist/dto/create-collaborator-payment.dto.js.map +1 -0
- package/dist/dto/create-collaborator.dto.d.ts +0 -1
- package/dist/dto/create-collaborator.dto.d.ts.map +1 -1
- package/dist/dto/create-collaborator.dto.js +0 -6
- package/dist/dto/create-collaborator.dto.js.map +1 -1
- package/dist/dto/list-collaborator-invoice.dto.d.ts +4 -0
- package/dist/dto/list-collaborator-invoice.dto.d.ts.map +1 -0
- package/dist/dto/list-collaborator-invoice.dto.js +8 -0
- package/dist/dto/list-collaborator-invoice.dto.js.map +1 -0
- package/dist/dto/list-collaborator-payment.dto.d.ts +4 -0
- package/dist/dto/list-collaborator-payment.dto.d.ts.map +1 -0
- package/dist/dto/list-collaborator-payment.dto.js +8 -0
- package/dist/dto/list-collaborator-payment.dto.js.map +1 -0
- package/dist/dto/update-collaborator-invoice.dto.d.ts +6 -0
- package/dist/dto/update-collaborator-invoice.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator-invoice.dto.js +9 -0
- package/dist/dto/update-collaborator-invoice.dto.js.map +1 -0
- package/dist/dto/update-collaborator-payment.dto.d.ts +6 -0
- package/dist/dto/update-collaborator-payment.dto.d.ts.map +1 -0
- package/dist/dto/update-collaborator-payment.dto.js +9 -0
- package/dist/dto/update-collaborator-payment.dto.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/operations.controller.d.ts +42 -0
- package/dist/operations.controller.d.ts.map +1 -1
- package/dist/operations.service.d.ts +258 -268
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +2381 -1341
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +345 -174
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/dashboard_component.yaml +66 -0
- package/hedhog/data/dashboard_item.yaml +25 -25
- package/hedhog/data/menu.yaml +27 -8
- package/hedhog/data/route.yaml +133 -0
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +78 -102
- package/hedhog/frontend/app/_components/collaborator-invoices-tab.tsx.ejs +443 -0
- package/hedhog/frontend/app/_components/collaborator-payment-history-tab.tsx.ejs +429 -0
- package/hedhog/frontend/app/_components/collaborator-picker.tsx.ejs +158 -0
- package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +247 -50
- package/hedhog/frontend/app/_components/project-assignments-tab.tsx.ejs +643 -450
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +992 -431
- package/hedhog/frontend/app/_components/project-file-attachments.tsx.ejs +371 -0
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +558 -386
- package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +383 -157
- package/hedhog/frontend/app/_components/task-file-attachments.tsx.ejs +4 -1
- package/hedhog/frontend/app/_components/task-form-fields.tsx.ejs +406 -0
- package/hedhog/frontend/app/_components/task-form-sheet.tsx.ejs +629 -784
- package/hedhog/frontend/app/_components/task-info-display.tsx.ejs +137 -0
- package/hedhog/frontend/app/_components/timesheet-entry-create-sheet.tsx.ejs +306 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +155 -0
- package/hedhog/frontend/app/_lib/types.ts.ejs +62 -0
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +0 -2
- package/hedhog/frontend/app/_lib/utils/task-ui.ts.ejs +61 -0
- package/hedhog/frontend/app/approvals/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +59 -8
- package/hedhog/frontend/app/contracts/page.tsx.ejs +29 -8
- package/hedhog/frontend/app/dashboard/widgets/CapacityDistribution.tsx.ejs +84 -0
- package/hedhog/frontend/app/dashboard/widgets/EffortByProject.tsx.ejs +85 -0
- package/hedhog/frontend/app/dashboard/widgets/HeadcountByArea.tsx.ejs +101 -0
- package/hedhog/frontend/app/dashboard/widgets/ManagedProjectsStatus.tsx.ejs +113 -0
- package/hedhog/frontend/app/dashboard/widgets/MyHoursPeriodKpi.tsx.ejs +87 -0
- package/hedhog/frontend/app/dashboard/widgets/MyOpenRequestsKpi.tsx.ejs +97 -0
- package/hedhog/frontend/app/dashboard/widgets/MyPendingRequestsList.tsx.ejs +99 -0
- package/hedhog/frontend/app/dashboard/widgets/MyProjectAllocationsKpi.tsx.ejs +78 -0
- package/hedhog/frontend/app/dashboard/widgets/MyQuickActions.tsx.ejs +130 -0
- package/hedhog/frontend/app/dashboard/widgets/MyRelevantDeadlines.tsx.ejs +144 -0
- package/hedhog/frontend/app/dashboard/widgets/MyTimesheetStatusKpi.tsx.ejs +78 -0
- package/hedhog/frontend/app/dashboard/widgets/MyWeeklyJourney.tsx.ejs +99 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioCostsKpi.tsx.ejs +112 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioEffortKpi.tsx.ejs +93 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioProjectsKpi.tsx.ejs +96 -0
- package/hedhog/frontend/app/dashboard/widgets/PortfolioRiskKpi.tsx.ejs +115 -0
- package/hedhog/frontend/app/dashboard/widgets/ProjectStatusOverview.tsx.ejs +120 -0
- package/hedhog/frontend/app/dashboard/widgets/StrategicDeadlines.tsx.ejs +146 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamApprovalQueue.tsx.ejs +108 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamCapacityKpi.tsx.ejs +97 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamHeadcountKpi.tsx.ejs +100 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamHoursKpi.tsx.ejs +104 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamPendingApprovalsKpi.tsx.ejs +110 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamUtilizationOverview.tsx.ejs +115 -0
- package/hedhog/frontend/app/dashboard/widgets/TeamWorkloadAlerts.tsx.ejs +117 -0
- package/hedhog/frontend/app/dashboard/widgets/index.ts.ejs +26 -0
- package/hedhog/frontend/app/departments/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/my-projects/page.tsx.ejs +30 -12
- package/hedhog/frontend/app/my-tasks/page.tsx.ejs +286 -125
- package/hedhog/frontend/app/project-cost-categories/page.tsx.ejs +58 -52
- package/hedhog/frontend/app/project-cost-types/page.tsx.ejs +58 -51
- package/hedhog/frontend/app/projects/page.tsx.ejs +415 -33
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/tasks-gantt/page.tsx.ejs +953 -0
- package/hedhog/frontend/app/time-off/page.tsx.ejs +6 -1
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +10 -4
- package/hedhog/frontend/messages/en.json +332 -46
- package/hedhog/frontend/messages/operations/en.json +61 -52
- package/hedhog/frontend/messages/operations/pt.json +59 -43
- package/hedhog/frontend/messages/pt.json +332 -46
- package/hedhog/frontend/widgets/capacity-distribution.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/effort-by-project.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/headcount-by-area.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/index.ts.ejs +25 -0
- package/hedhog/frontend/widgets/managed-projects-status.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-hours-period-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-open-requests-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-pending-requests-list.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-project-allocations-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-quick-actions.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-relevant-deadlines.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-timesheet-status-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/my-weekly-journey.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-costs-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-effort-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-projects-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/portfolio-risk-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/project-status-overview.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/shared-operations-widget.tsx.ejs +170 -0
- package/hedhog/frontend/widgets/strategic-deadlines.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-approval-queue.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-capacity-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-headcount-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-hours-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-pending-approvals-kpi.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-utilization-overview.tsx.ejs +17 -0
- package/hedhog/frontend/widgets/team-workload-alerts.tsx.ejs +17 -0
- package/hedhog/table/operations_collaborator.yaml +8 -13
- package/hedhog/table/operations_collaborator_invoice.yaml +35 -0
- package/hedhog/table/operations_collaborator_payment.yaml +32 -0
- package/hedhog/table/operations_project.yaml +1 -1
- package/hedhog/table/operations_project_file.yaml +23 -0
- package/hedhog/table/operations_task.yaml +76 -69
- package/hedhog/table/operations_task_activity.yaml +51 -0
- package/package.json +6 -5
- package/src/controllers/operations-collaborators.controller.ts +117 -8
- package/src/controllers/operations-projects.controller.ts +41 -8
- package/src/controllers/operations-tasks.controller.ts +156 -166
- package/src/dashboard/README.md +214 -0
- package/src/dashboard/components/DashboardLayout.tsx +131 -0
- package/src/dashboard/components/widget-registry.ts +255 -0
- package/src/dashboard/hooks/useDashboardData.ts +29 -0
- package/src/dashboard/types/widgets.types.ts +237 -0
- package/src/dashboard/widgets/CapacityDistribution.tsx +56 -0
- package/src/dashboard/widgets/EffortByProject.tsx +51 -0
- package/src/dashboard/widgets/HeadcountByArea.tsx +57 -0
- package/src/dashboard/widgets/ManagedProjectsStatus.tsx +53 -0
- package/src/dashboard/widgets/MyHoursPeriodKpi.tsx +87 -0
- package/src/dashboard/widgets/MyOpenRequestsKpi.tsx +51 -0
- package/src/dashboard/widgets/MyPendingRequestsList.tsx +63 -0
- package/src/dashboard/widgets/MyProjectAllocationsKpi.tsx +57 -0
- package/src/dashboard/widgets/MyQuickActions.tsx +62 -0
- package/src/dashboard/widgets/MyRelevantDeadlines.tsx +84 -0
- package/src/dashboard/widgets/MyTimesheetStatusKpi.tsx +65 -0
- package/src/dashboard/widgets/MyWeeklyJourney.tsx +57 -0
- package/src/dashboard/widgets/PortfolioCostsKpi.tsx +48 -0
- package/src/dashboard/widgets/PortfolioEffortKpi.tsx +41 -0
- package/src/dashboard/widgets/PortfolioRiskKpi.tsx +50 -0
- package/src/dashboard/widgets/ProjectStatusOverview.tsx +52 -0
- package/src/dashboard/widgets/StrategicDeadlines.tsx +93 -0
- package/src/dashboard/widgets/TeamApprovalQueue.tsx +70 -0
- package/src/dashboard/widgets/TeamCapacityKpi.tsx +50 -0
- package/src/dashboard/widgets/TeamHoursKpi.tsx +51 -0
- package/src/dashboard/widgets/TeamPendingApprovalsKpi.tsx +53 -0
- package/src/dashboard/widgets/TeamUtilizationOverview.tsx +62 -0
- package/src/dashboard/widgets/TeamWorkloadAlerts.tsx +81 -0
- package/src/dashboard/widgets/index.ts +26 -0
- package/src/dto/create-collaborator-invoice.dto.ts +39 -0
- package/src/dto/create-collaborator-payment.dto.ts +35 -0
- package/src/dto/create-collaborator.dto.ts +4 -11
- package/src/dto/list-collaborator-invoice.dto.ts +3 -0
- package/src/dto/list-collaborator-payment.dto.ts +3 -0
- package/src/dto/update-collaborator-invoice.dto.ts +6 -0
- package/src/dto/update-collaborator-payment.dto.ts +6 -0
- package/src/index.ts +3 -0
- package/src/operations.service.spec.ts +988 -764
- package/src/operations.service.ts +4689 -2624
|
@@ -69,14 +69,14 @@ import {
|
|
|
69
69
|
import { useTranslations } from 'next-intl';
|
|
70
70
|
import Link from 'next/link';
|
|
71
71
|
import { useRouter } from 'next/navigation';
|
|
72
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
72
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
73
73
|
import {
|
|
74
74
|
CartesianGrid,
|
|
75
75
|
Legend,
|
|
76
76
|
Line,
|
|
77
77
|
LineChart,
|
|
78
|
-
ResponsiveContainer,
|
|
79
78
|
Tooltip as RechartsTooltip,
|
|
79
|
+
ResponsiveContainer,
|
|
80
80
|
XAxis,
|
|
81
81
|
YAxis,
|
|
82
82
|
} from 'recharts';
|
|
@@ -111,16 +111,14 @@ import {
|
|
|
111
111
|
trimToNull,
|
|
112
112
|
} from '../_lib/utils/forms';
|
|
113
113
|
import { CollaboratorCostsSection } from './collaborator-costs-section';
|
|
114
|
+
import { CollaboratorInvoicesTab } from './collaborator-invoices-tab';
|
|
115
|
+
import { CollaboratorPaymentHistoryTab } from './collaborator-payment-history-tab';
|
|
114
116
|
import { CollaboratorTasksTab } from './collaborator-tasks-tab';
|
|
115
117
|
import { CollaboratorTimesheetsTab } from './collaborator-timesheets-tab';
|
|
116
118
|
import { DepartmentPicker } from './department-picker';
|
|
117
119
|
import { OperationsHeader } from './operations-header';
|
|
118
120
|
import { ProjectAssignmentsTab } from './project-assignments-tab';
|
|
119
121
|
import { StatusBadge } from './status-badge';
|
|
120
|
-
import {
|
|
121
|
-
SystemUserPicker,
|
|
122
|
-
type SystemUserPickerOption as SystemUserOption,
|
|
123
|
-
} from './system-user-picker';
|
|
124
122
|
|
|
125
123
|
const weekdays = [
|
|
126
124
|
'monday',
|
|
@@ -251,7 +249,6 @@ const EQUITY_ENABLED_TYPE_SLUGS = new Set([
|
|
|
251
249
|
const HOURLY_RATE_SLUGS = new Set(['pj', 'freelancer']);
|
|
252
250
|
|
|
253
251
|
type CollaboratorFormState = {
|
|
254
|
-
userId: string;
|
|
255
252
|
personId: string;
|
|
256
253
|
displayName: string;
|
|
257
254
|
collaboratorTypeId: string;
|
|
@@ -299,7 +296,6 @@ function defaultSchedule(): CollaboratorFormState['weeklySchedule'] {
|
|
|
299
296
|
|
|
300
297
|
function buildEmptyForm(): CollaboratorFormState {
|
|
301
298
|
return {
|
|
302
|
-
userId: '',
|
|
303
299
|
personId: '',
|
|
304
300
|
displayName: '',
|
|
305
301
|
collaboratorTypeId: '',
|
|
@@ -358,7 +354,6 @@ function toFormState(
|
|
|
358
354
|
collaborator: OperationsCollaboratorDetails
|
|
359
355
|
): CollaboratorFormState {
|
|
360
356
|
return {
|
|
361
|
-
userId: collaborator.userId ? String(collaborator.userId) : '',
|
|
362
357
|
personId: collaborator.personId ? String(collaborator.personId) : '',
|
|
363
358
|
displayName: collaborator.displayName ?? '',
|
|
364
359
|
collaboratorTypeId: collaborator.collaboratorTypeId
|
|
@@ -637,38 +632,6 @@ export function CollaboratorFormScreen({
|
|
|
637
632
|
),
|
|
638
633
|
});
|
|
639
634
|
|
|
640
|
-
const { data: systemUsers = [], refetch: refetchSystemUsers } = useQuery<
|
|
641
|
-
SystemUserOption[]
|
|
642
|
-
>({
|
|
643
|
-
queryKey: ['operations-collaborator-form-system-users', currentLocaleCode],
|
|
644
|
-
enabled: access.isDirector,
|
|
645
|
-
staleTime: 0,
|
|
646
|
-
refetchOnMount: 'always',
|
|
647
|
-
queryFn: async () => {
|
|
648
|
-
const response = await request<{
|
|
649
|
-
paginate: {
|
|
650
|
-
data: Array<{
|
|
651
|
-
id: number;
|
|
652
|
-
name: string | null;
|
|
653
|
-
photo_id?: number | null;
|
|
654
|
-
}>;
|
|
655
|
-
};
|
|
656
|
-
}>({
|
|
657
|
-
url: '/user?pageSize=100',
|
|
658
|
-
method: 'GET',
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
const raw = response.data?.paginate?.data ?? [];
|
|
662
|
-
const options: SystemUserOption[] = raw.map((u) => ({
|
|
663
|
-
id: u.id,
|
|
664
|
-
name: u.name || `#${u.id}`,
|
|
665
|
-
photoId: u.photo_id ?? null,
|
|
666
|
-
}));
|
|
667
|
-
|
|
668
|
-
return options.sort((left, right) => left.name.localeCompare(right.name));
|
|
669
|
-
},
|
|
670
|
-
});
|
|
671
|
-
|
|
672
635
|
const {
|
|
673
636
|
data: collaboratorTypes = [],
|
|
674
637
|
refetch: refetchCollaboratorTypes,
|
|
@@ -726,6 +689,7 @@ export function CollaboratorFormScreen({
|
|
|
726
689
|
|
|
727
690
|
const [personSheetOpen, setPersonSheetOpen] = useState(false);
|
|
728
691
|
const [personToEdit, setPersonToEdit] = useState<Person | null>(null);
|
|
692
|
+
const personSheetModeRef = useRef<'edit' | 'create'>('edit');
|
|
729
693
|
|
|
730
694
|
const { data: contactTypes = [] } = useQuery<ContactTypeOption[]>({
|
|
731
695
|
queryKey: ['contact-person-contact-types', currentLocaleCode],
|
|
@@ -781,13 +745,22 @@ export function CollaboratorFormScreen({
|
|
|
781
745
|
placeholderData: (previous) => previous ?? [],
|
|
782
746
|
});
|
|
783
747
|
|
|
784
|
-
const handleOpenPersonSheet = async () => {
|
|
785
|
-
|
|
748
|
+
const handleOpenPersonSheet = async (personId?: number | null) => {
|
|
749
|
+
const targetPersonId =
|
|
750
|
+
personId && personId > 0
|
|
751
|
+
? personId
|
|
752
|
+
: (parseNumberInput(form.personId) ?? collaborator?.personId ?? null);
|
|
753
|
+
|
|
754
|
+
if (!targetPersonId) {
|
|
755
|
+
return;
|
|
756
|
+
}
|
|
757
|
+
|
|
786
758
|
try {
|
|
787
759
|
const response = await request<Person>({
|
|
788
|
-
url: `/person/${
|
|
760
|
+
url: `/person/${targetPersonId}`,
|
|
789
761
|
method: 'GET',
|
|
790
762
|
});
|
|
763
|
+
personSheetModeRef.current = 'edit';
|
|
791
764
|
setPersonToEdit(response.data);
|
|
792
765
|
setPersonSheetOpen(true);
|
|
793
766
|
} catch {
|
|
@@ -795,6 +768,12 @@ export function CollaboratorFormScreen({
|
|
|
795
768
|
}
|
|
796
769
|
};
|
|
797
770
|
|
|
771
|
+
const handleOpenPersonCreateSheet = () => {
|
|
772
|
+
personSheetModeRef.current = 'create';
|
|
773
|
+
setPersonToEdit(null);
|
|
774
|
+
setPersonSheetOpen(true);
|
|
775
|
+
};
|
|
776
|
+
|
|
798
777
|
useEffect(() => {
|
|
799
778
|
if (collaborator) {
|
|
800
779
|
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
@@ -1016,37 +995,6 @@ export function CollaboratorFormScreen({
|
|
|
1016
995
|
}
|
|
1017
996
|
};
|
|
1018
997
|
|
|
1019
|
-
const createSystemUser = async (
|
|
1020
|
-
name: string,
|
|
1021
|
-
email: string,
|
|
1022
|
-
password: string
|
|
1023
|
-
): Promise<SystemUserOption | null> => {
|
|
1024
|
-
try {
|
|
1025
|
-
const response = await request<{
|
|
1026
|
-
user: { id: number; name: string | null; photo_id?: number | null };
|
|
1027
|
-
challenge: unknown;
|
|
1028
|
-
}>({
|
|
1029
|
-
url: '/user',
|
|
1030
|
-
method: 'POST',
|
|
1031
|
-
data: { name, email, password },
|
|
1032
|
-
});
|
|
1033
|
-
await refetchSystemUsers();
|
|
1034
|
-
showToastHandler?.('success', t('messages.createUserSuccess'));
|
|
1035
|
-
const user = response.data.user;
|
|
1036
|
-
return {
|
|
1037
|
-
id: user.id,
|
|
1038
|
-
name: user.name || `#${user.id}`,
|
|
1039
|
-
photoId: user.photo_id ?? null,
|
|
1040
|
-
};
|
|
1041
|
-
} catch (error) {
|
|
1042
|
-
showToastHandler?.(
|
|
1043
|
-
'error',
|
|
1044
|
-
getOperationsErrorMessage(error, t('messages.createUserError'))
|
|
1045
|
-
);
|
|
1046
|
-
return null;
|
|
1047
|
-
}
|
|
1048
|
-
};
|
|
1049
|
-
|
|
1050
998
|
const updateScheduleDay = (
|
|
1051
999
|
weekday: string,
|
|
1052
1000
|
patch: Partial<CollaboratorFormState['weeklySchedule'][number]>
|
|
@@ -1081,7 +1029,6 @@ export function CollaboratorFormScreen({
|
|
|
1081
1029
|
};
|
|
1082
1030
|
|
|
1083
1031
|
const onSubmit = async () => {
|
|
1084
|
-
const userId = parseNumberInput(form.userId);
|
|
1085
1032
|
const personId = parseNumberInput(form.personId);
|
|
1086
1033
|
const compensationAmount = isHourlyType
|
|
1087
1034
|
? null
|
|
@@ -1103,7 +1050,6 @@ export function CollaboratorFormScreen({
|
|
|
1103
1050
|
}
|
|
1104
1051
|
|
|
1105
1052
|
const payload = {
|
|
1106
|
-
userId: userId ?? undefined,
|
|
1107
1053
|
personId: personId ?? undefined,
|
|
1108
1054
|
displayName: trimToNull(form.displayName),
|
|
1109
1055
|
collaboratorTypeId,
|
|
@@ -1380,6 +1326,10 @@ export function CollaboratorFormScreen({
|
|
|
1380
1326
|
value={form.personId ? Number(form.personId) : null}
|
|
1381
1327
|
initialSelectedLabel={collaborator?.personName ?? form.displayName}
|
|
1382
1328
|
selectPlaceholder={t('placeholders.person')}
|
|
1329
|
+
showEditButton
|
|
1330
|
+
editAriaLabel={t('actions.editPersonCrm')}
|
|
1331
|
+
onEditSelection={(personId) => void handleOpenPersonSheet(personId)}
|
|
1332
|
+
onCreateNew={() => handleOpenPersonCreateSheet()}
|
|
1383
1333
|
onChange={(personId, personName) =>
|
|
1384
1334
|
setForm((current) => ({
|
|
1385
1335
|
...current,
|
|
@@ -1389,25 +1339,6 @@ export function CollaboratorFormScreen({
|
|
|
1389
1339
|
}
|
|
1390
1340
|
/>
|
|
1391
1341
|
</div>
|
|
1392
|
-
<div className="space-y-2 md:col-span-2 xl:col-span-2">
|
|
1393
|
-
<SystemUserPicker
|
|
1394
|
-
label={t('fields.userIdOptional')}
|
|
1395
|
-
value={form.userId}
|
|
1396
|
-
options={systemUsers}
|
|
1397
|
-
placeholder={t('placeholders.userIdOptional')}
|
|
1398
|
-
emptyLabel={commonT('labels.notAssigned')}
|
|
1399
|
-
onChange={(value) =>
|
|
1400
|
-
setForm((current) => ({
|
|
1401
|
-
...current,
|
|
1402
|
-
userId: value,
|
|
1403
|
-
}))
|
|
1404
|
-
}
|
|
1405
|
-
onCreate={createSystemUser}
|
|
1406
|
-
/>
|
|
1407
|
-
<p className="text-xs text-muted-foreground">
|
|
1408
|
-
{t('fields.userIdDescription')}
|
|
1409
|
-
</p>
|
|
1410
|
-
</div>
|
|
1411
1342
|
|
|
1412
1343
|
{!isCreateMode ? (
|
|
1413
1344
|
<div className="space-y-2">
|
|
@@ -2128,7 +2059,7 @@ export function CollaboratorFormScreen({
|
|
|
2128
2059
|
</div>
|
|
2129
2060
|
);
|
|
2130
2061
|
|
|
2131
|
-
const salaryChartData =
|
|
2062
|
+
const salaryChartData = (() => {
|
|
2132
2063
|
if (!compensationHistory.length) return [];
|
|
2133
2064
|
|
|
2134
2065
|
const sorted = [...compensationHistory].sort(
|
|
@@ -2178,7 +2109,7 @@ export function CollaboratorFormScreen({
|
|
|
2178
2109
|
},
|
|
2179
2110
|
...projectionPoints,
|
|
2180
2111
|
];
|
|
2181
|
-
}
|
|
2112
|
+
})();
|
|
2182
2113
|
|
|
2183
2114
|
const costsSection = (
|
|
2184
2115
|
<Accordion
|
|
@@ -2214,9 +2145,7 @@ export function CollaboratorFormScreen({
|
|
|
2214
2145
|
|
|
2215
2146
|
const formContent = isSheetMode ? (
|
|
2216
2147
|
<Tabs defaultValue="details" className="w-full">
|
|
2217
|
-
<TabsList
|
|
2218
|
-
className={`mx-4 mb-2 grid w-[calc(100%-2rem)] ${!isCreateMode && !isHourlyType ? 'grid-cols-7' : isCreateMode && isHourlyType ? 'grid-cols-5' : 'grid-cols-6'}`}
|
|
2219
|
-
>
|
|
2148
|
+
<TabsList className="mx-4 mb-2 flex w-[calc(100%-2rem)] flex-wrap gap-0.5 h-auto">
|
|
2220
2149
|
<TabsTrigger value="details">{t('tabs.details')}</TabsTrigger>
|
|
2221
2150
|
<TabsTrigger value="costs">{t('tabs.costs')}</TabsTrigger>
|
|
2222
2151
|
{!isHourlyType ? (
|
|
@@ -2230,6 +2159,14 @@ export function CollaboratorFormScreen({
|
|
|
2230
2159
|
{!isCreateMode ? (
|
|
2231
2160
|
<TabsTrigger value="salary">{t('tabs.salary')}</TabsTrigger>
|
|
2232
2161
|
) : null}
|
|
2162
|
+
{!isCreateMode ? (
|
|
2163
|
+
<TabsTrigger value="paymentHistory">
|
|
2164
|
+
{t('tabs.paymentHistory')}
|
|
2165
|
+
</TabsTrigger>
|
|
2166
|
+
) : null}
|
|
2167
|
+
{!isCreateMode ? (
|
|
2168
|
+
<TabsTrigger value="invoices">{t('tabs.invoices')}</TabsTrigger>
|
|
2169
|
+
) : null}
|
|
2233
2170
|
</TabsList>
|
|
2234
2171
|
<TabsContent value="details" className="mt-0 space-y-4 px-4 pt-2">
|
|
2235
2172
|
{profileContent}
|
|
@@ -2447,6 +2384,34 @@ export function CollaboratorFormScreen({
|
|
|
2447
2384
|
)}
|
|
2448
2385
|
</TabsContent>
|
|
2449
2386
|
) : null}
|
|
2387
|
+
{!isCreateMode ? (
|
|
2388
|
+
<TabsContent value="paymentHistory" className="mt-0 px-4 pt-2">
|
|
2389
|
+
{collaborator ? (
|
|
2390
|
+
<CollaboratorPaymentHistoryTab
|
|
2391
|
+
collaboratorId={collaborator.id}
|
|
2392
|
+
disabled={!access.isDirector}
|
|
2393
|
+
/>
|
|
2394
|
+
) : (
|
|
2395
|
+
<p className="text-sm text-muted-foreground">
|
|
2396
|
+
{t('sections.costsSaveBefore')}
|
|
2397
|
+
</p>
|
|
2398
|
+
)}
|
|
2399
|
+
</TabsContent>
|
|
2400
|
+
) : null}
|
|
2401
|
+
{!isCreateMode ? (
|
|
2402
|
+
<TabsContent value="invoices" className="mt-0 px-4 pt-2">
|
|
2403
|
+
{collaborator ? (
|
|
2404
|
+
<CollaboratorInvoicesTab
|
|
2405
|
+
collaboratorId={collaborator.id}
|
|
2406
|
+
disabled={!access.isDirector}
|
|
2407
|
+
/>
|
|
2408
|
+
) : (
|
|
2409
|
+
<p className="text-sm text-muted-foreground">
|
|
2410
|
+
{t('sections.costsSaveBefore')}
|
|
2411
|
+
</p>
|
|
2412
|
+
)}
|
|
2413
|
+
</TabsContent>
|
|
2414
|
+
) : null}
|
|
2450
2415
|
</Tabs>
|
|
2451
2416
|
) : (
|
|
2452
2417
|
<div className="space-y-4 px-4">
|
|
@@ -2488,7 +2453,18 @@ export function CollaboratorFormScreen({
|
|
|
2488
2453
|
setPersonSheetOpen(nextOpen);
|
|
2489
2454
|
if (!nextOpen) setPersonToEdit(null);
|
|
2490
2455
|
}}
|
|
2491
|
-
onSuccess={() =>
|
|
2456
|
+
onSuccess={(person) => {
|
|
2457
|
+
if (personSheetModeRef.current === 'create' && person) {
|
|
2458
|
+
setForm((current) => ({
|
|
2459
|
+
...current,
|
|
2460
|
+
personId: String(person.id),
|
|
2461
|
+
displayName: person.name,
|
|
2462
|
+
}));
|
|
2463
|
+
} else {
|
|
2464
|
+
void refetchCollaborator();
|
|
2465
|
+
}
|
|
2466
|
+
personSheetModeRef.current = 'edit';
|
|
2467
|
+
}}
|
|
2492
2468
|
/>
|
|
2493
2469
|
</div>
|
|
2494
2470
|
);
|