@hed-hog/operations 0.0.330 → 0.0.331
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 +7 -216
- package/dist/controllers/operations-collaborators.controller.d.ts.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.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/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 +182 -268
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +2147 -1337
- 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/route.yaml +61 -0
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +39 -99
- package/hedhog/frontend/app/_components/collaborator-picker.tsx.ejs +158 -0
- package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +314 -116
- package/hedhog/frontend/app/_components/project-assignments-tab.tsx.ejs +434 -449
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +289 -412
- package/hedhog/frontend/app/_components/project-file-attachments.tsx.ejs +371 -0
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +426 -374
- package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +803 -581
- 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 +480 -476
- package/hedhog/frontend/app/_lib/types.ts.ejs +66 -5
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +0 -2
- package/hedhog/frontend/app/_lib/utils/task-ui.ts.ejs +43 -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 +14 -10
- package/hedhog/frontend/app/my-tasks/page.tsx.ejs +328 -105
- 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 +376 -30
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +6 -1
- 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 +238 -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 +238 -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_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-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.dto.ts +4 -11
- package/src/index.ts +3 -0
- package/src/operations.service.spec.ts +988 -764
- package/src/operations.service.ts +4277 -2535
|
@@ -41,7 +41,7 @@ let OperationsTasksController = class OperationsTasksController {
|
|
|
41
41
|
return this.operationsService.updateTask(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, data);
|
|
42
42
|
}
|
|
43
43
|
removeTask(user, id, permanent) {
|
|
44
|
-
return this.operationsService.removeTask(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, permanent ===
|
|
44
|
+
return this.operationsService.removeTask(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, permanent === "true");
|
|
45
45
|
}
|
|
46
46
|
listTaskFiles(user, id) {
|
|
47
47
|
return this.operationsService.listTaskFiles(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
|
|
@@ -55,6 +55,9 @@ let OperationsTasksController = class OperationsTasksController {
|
|
|
55
55
|
listTaskComments(user, id) {
|
|
56
56
|
return this.operationsService.listTaskComments(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
|
|
57
57
|
}
|
|
58
|
+
listTaskActivities(user, id) {
|
|
59
|
+
return this.operationsService.listTaskActivities(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id);
|
|
60
|
+
}
|
|
58
61
|
addTaskComment(user, id, content) {
|
|
59
62
|
return this.operationsService.addTaskComment(Number((user === null || user === void 0 ? void 0 : user.id) || 0), id, content);
|
|
60
63
|
}
|
|
@@ -67,7 +70,7 @@ let OperationsTasksController = class OperationsTasksController {
|
|
|
67
70
|
};
|
|
68
71
|
exports.OperationsTasksController = OperationsTasksController;
|
|
69
72
|
__decorate([
|
|
70
|
-
(0, common_1.Get)(
|
|
73
|
+
(0, common_1.Get)("tasks"),
|
|
71
74
|
__param(0, (0, api_1.User)()),
|
|
72
75
|
__param(1, (0, common_1.Query)()),
|
|
73
76
|
__metadata("design:type", Function),
|
|
@@ -75,7 +78,7 @@ __decorate([
|
|
|
75
78
|
__metadata("design:returntype", void 0)
|
|
76
79
|
], OperationsTasksController.prototype, "listTasks", null);
|
|
77
80
|
__decorate([
|
|
78
|
-
(0, common_1.Get)(
|
|
81
|
+
(0, common_1.Get)("my-tasks"),
|
|
79
82
|
__param(0, (0, api_1.User)()),
|
|
80
83
|
__param(1, (0, common_1.Query)()),
|
|
81
84
|
__metadata("design:type", Function),
|
|
@@ -83,15 +86,15 @@ __decorate([
|
|
|
83
86
|
__metadata("design:returntype", void 0)
|
|
84
87
|
], OperationsTasksController.prototype, "listMyTasks", null);
|
|
85
88
|
__decorate([
|
|
86
|
-
(0, common_1.Get)(
|
|
89
|
+
(0, common_1.Get)("projects/:id/tasks"),
|
|
87
90
|
__param(0, (0, api_1.User)()),
|
|
88
|
-
__param(1, (0, common_1.Param)(
|
|
91
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
89
92
|
__metadata("design:type", Function),
|
|
90
93
|
__metadata("design:paramtypes", [Object, Number]),
|
|
91
94
|
__metadata("design:returntype", void 0)
|
|
92
95
|
], OperationsTasksController.prototype, "listProjectBoardTasks", null);
|
|
93
96
|
__decorate([
|
|
94
|
-
(0, common_1.Post)(
|
|
97
|
+
(0, common_1.Post)("tasks"),
|
|
95
98
|
__param(0, (0, api_1.User)()),
|
|
96
99
|
__param(1, (0, common_1.Body)()),
|
|
97
100
|
__metadata("design:type", Function),
|
|
@@ -99,89 +102,97 @@ __decorate([
|
|
|
99
102
|
__metadata("design:returntype", void 0)
|
|
100
103
|
], OperationsTasksController.prototype, "createTask", null);
|
|
101
104
|
__decorate([
|
|
102
|
-
(0, common_1.Patch)(
|
|
105
|
+
(0, common_1.Patch)("tasks/:id"),
|
|
103
106
|
__param(0, (0, api_1.User)()),
|
|
104
|
-
__param(1, (0, common_1.Param)(
|
|
107
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
105
108
|
__param(2, (0, common_1.Body)()),
|
|
106
109
|
__metadata("design:type", Function),
|
|
107
110
|
__metadata("design:paramtypes", [Object, Number, update_task_dto_1.UpdateOperationsTaskDto]),
|
|
108
111
|
__metadata("design:returntype", void 0)
|
|
109
112
|
], OperationsTasksController.prototype, "updateTask", null);
|
|
110
113
|
__decorate([
|
|
111
|
-
(0, common_1.Delete)(
|
|
114
|
+
(0, common_1.Delete)("tasks/:id"),
|
|
112
115
|
__param(0, (0, api_1.User)()),
|
|
113
|
-
__param(1, (0, common_1.Param)(
|
|
114
|
-
__param(2, (0, common_1.Query)(
|
|
116
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
117
|
+
__param(2, (0, common_1.Query)("permanent")),
|
|
115
118
|
__metadata("design:type", Function),
|
|
116
119
|
__metadata("design:paramtypes", [Object, Number, String]),
|
|
117
120
|
__metadata("design:returntype", void 0)
|
|
118
121
|
], OperationsTasksController.prototype, "removeTask", null);
|
|
119
122
|
__decorate([
|
|
120
|
-
(0, common_1.Get)(
|
|
123
|
+
(0, common_1.Get)("tasks/:id/files"),
|
|
121
124
|
__param(0, (0, api_1.User)()),
|
|
122
|
-
__param(1, (0, common_1.Param)(
|
|
125
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
123
126
|
__metadata("design:type", Function),
|
|
124
127
|
__metadata("design:paramtypes", [Object, Number]),
|
|
125
128
|
__metadata("design:returntype", void 0)
|
|
126
129
|
], OperationsTasksController.prototype, "listTaskFiles", null);
|
|
127
130
|
__decorate([
|
|
128
|
-
(0, common_1.Post)(
|
|
129
|
-
(0, common_1.UseInterceptors)((0, platform_express_1.FileInterceptor)(
|
|
131
|
+
(0, common_1.Post)("tasks/:id/files"),
|
|
132
|
+
(0, common_1.UseInterceptors)((0, platform_express_1.FileInterceptor)("file")),
|
|
130
133
|
__param(0, (0, api_1.User)()),
|
|
131
|
-
__param(1, (0, common_1.Param)(
|
|
134
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
132
135
|
__param(2, (0, common_1.UploadedFile)()),
|
|
133
136
|
__metadata("design:type", Function),
|
|
134
137
|
__metadata("design:paramtypes", [Object, Number, Object]),
|
|
135
138
|
__metadata("design:returntype", void 0)
|
|
136
139
|
], OperationsTasksController.prototype, "addTaskFile", null);
|
|
137
140
|
__decorate([
|
|
138
|
-
(0, common_1.Delete)(
|
|
141
|
+
(0, common_1.Delete)("tasks/:id/files/:fileRelationId"),
|
|
139
142
|
__param(0, (0, api_1.User)()),
|
|
140
|
-
__param(1, (0, common_1.Param)(
|
|
141
|
-
__param(2, (0, common_1.Param)(
|
|
143
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
144
|
+
__param(2, (0, common_1.Param)("fileRelationId", common_1.ParseIntPipe)),
|
|
142
145
|
__metadata("design:type", Function),
|
|
143
146
|
__metadata("design:paramtypes", [Object, Number, Number]),
|
|
144
147
|
__metadata("design:returntype", void 0)
|
|
145
148
|
], OperationsTasksController.prototype, "removeTaskFile", null);
|
|
146
149
|
__decorate([
|
|
147
|
-
(0, common_1.Get)(
|
|
150
|
+
(0, common_1.Get)("tasks/:id/comments"),
|
|
148
151
|
__param(0, (0, api_1.User)()),
|
|
149
|
-
__param(1, (0, common_1.Param)(
|
|
152
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
150
153
|
__metadata("design:type", Function),
|
|
151
154
|
__metadata("design:paramtypes", [Object, Number]),
|
|
152
155
|
__metadata("design:returntype", void 0)
|
|
153
156
|
], OperationsTasksController.prototype, "listTaskComments", null);
|
|
154
157
|
__decorate([
|
|
155
|
-
(0, common_1.
|
|
158
|
+
(0, common_1.Get)("tasks/:id/activities"),
|
|
159
|
+
__param(0, (0, api_1.User)()),
|
|
160
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
161
|
+
__metadata("design:type", Function),
|
|
162
|
+
__metadata("design:paramtypes", [Object, Number]),
|
|
163
|
+
__metadata("design:returntype", void 0)
|
|
164
|
+
], OperationsTasksController.prototype, "listTaskActivities", null);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, common_1.Post)("tasks/:id/comments"),
|
|
156
167
|
__param(0, (0, api_1.User)()),
|
|
157
|
-
__param(1, (0, common_1.Param)(
|
|
158
|
-
__param(2, (0, common_1.Body)(
|
|
168
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
169
|
+
__param(2, (0, common_1.Body)("content")),
|
|
159
170
|
__metadata("design:type", Function),
|
|
160
171
|
__metadata("design:paramtypes", [Object, Number, String]),
|
|
161
172
|
__metadata("design:returntype", void 0)
|
|
162
173
|
], OperationsTasksController.prototype, "addTaskComment", null);
|
|
163
174
|
__decorate([
|
|
164
|
-
(0, common_1.Patch)(
|
|
175
|
+
(0, common_1.Patch)("tasks/:taskId/comments/:commentId"),
|
|
165
176
|
__param(0, (0, api_1.User)()),
|
|
166
|
-
__param(1, (0, common_1.Param)(
|
|
167
|
-
__param(2, (0, common_1.Param)(
|
|
168
|
-
__param(3, (0, common_1.Body)(
|
|
177
|
+
__param(1, (0, common_1.Param)("taskId", common_1.ParseIntPipe)),
|
|
178
|
+
__param(2, (0, common_1.Param)("commentId", common_1.ParseIntPipe)),
|
|
179
|
+
__param(3, (0, common_1.Body)("content")),
|
|
169
180
|
__metadata("design:type", Function),
|
|
170
181
|
__metadata("design:paramtypes", [Object, Number, Number, String]),
|
|
171
182
|
__metadata("design:returntype", void 0)
|
|
172
183
|
], OperationsTasksController.prototype, "updateTaskComment", null);
|
|
173
184
|
__decorate([
|
|
174
|
-
(0, common_1.Delete)(
|
|
185
|
+
(0, common_1.Delete)("tasks/:taskId/comments/:commentId"),
|
|
175
186
|
__param(0, (0, api_1.User)()),
|
|
176
|
-
__param(1, (0, common_1.Param)(
|
|
177
|
-
__param(2, (0, common_1.Param)(
|
|
187
|
+
__param(1, (0, common_1.Param)("taskId", common_1.ParseIntPipe)),
|
|
188
|
+
__param(2, (0, common_1.Param)("commentId", common_1.ParseIntPipe)),
|
|
178
189
|
__metadata("design:type", Function),
|
|
179
190
|
__metadata("design:paramtypes", [Object, Number, Number]),
|
|
180
191
|
__metadata("design:returntype", void 0)
|
|
181
192
|
], OperationsTasksController.prototype, "removeTaskComment", null);
|
|
182
193
|
exports.OperationsTasksController = OperationsTasksController = __decorate([
|
|
183
194
|
(0, api_1.Role)(),
|
|
184
|
-
(0, common_1.Controller)(
|
|
195
|
+
(0, common_1.Controller)("operations"),
|
|
185
196
|
__metadata("design:paramtypes", [operations_service_1.OperationsService])
|
|
186
197
|
], OperationsTasksController);
|
|
187
198
|
//# sourceMappingURL=operations-tasks.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations-tasks.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-tasks.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CAYwB;AACxB,+DAA2D;AAC3D,4DAAiE;AACjE,gEAA0D;AAC1D,0DAA+D;AAC/D,4DAAiE;AACjE,8DAA0D;AAInD,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACpC,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,SAAS,
|
|
1
|
+
{"version":3,"file":"operations-tasks.controller.js","sourceRoot":"","sources":["../../src/controllers/operations-tasks.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sCAA0C;AAC1C,2CAYwB;AACxB,+DAA2D;AAC3D,4DAAiE;AACjE,gEAA0D;AAC1D,0DAA+D;AAC/D,4DAAiE;AACjE,8DAA0D;AAInD,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACpC,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,SAAS,CAAS,IAAI,EAAW,gBAAwC;QACvE,OAAO,IAAI,CAAC,iBAAiB,CAAC,SAAS,CACrC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAGD,WAAW,CAAS,IAAI,EAAW,gBAAgC;QACjE,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACvC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAGD,qBAAqB,CAAS,IAAI,EAA6B,EAAU;QACvE,OAAO,IAAI,CAAC,iBAAiB,CAAC,qBAAqB,CACjD,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,EACrB,EAAE,CACH,CAAC;IACJ,CAAC;IAGD,UAAU,CAAS,IAAI,EAAU,IAA6B;QAC5D,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,KAAI,CAAC,CAAC,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AFrC,IAAA,UAAI,GAAE;IACN,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAEyB,sCAAiB;GADtD,yBAAyB,CAoIrC"}
|
|
@@ -10,6 +10,14 @@ export declare class OperationsTimesheetsController {
|
|
|
10
10
|
private readonly operationsService;
|
|
11
11
|
constructor(operationsService: OperationsService);
|
|
12
12
|
listTimesheets(user: any, filters: ListTimesheetsDto): Promise<{
|
|
13
|
+
total: number;
|
|
14
|
+
lastPage: number;
|
|
15
|
+
page: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
prev: number;
|
|
18
|
+
next: number;
|
|
19
|
+
data: any[];
|
|
20
|
+
} | {
|
|
13
21
|
id: number;
|
|
14
22
|
collaboratorId: number;
|
|
15
23
|
collaboratorName: string;
|
|
@@ -24,15 +32,7 @@ export declare class OperationsTimesheetsController {
|
|
|
24
32
|
notes: string | null;
|
|
25
33
|
decisionNote: string | null;
|
|
26
34
|
approvalId: number | null;
|
|
27
|
-
}[]
|
|
28
|
-
total: number;
|
|
29
|
-
lastPage: number;
|
|
30
|
-
page: number;
|
|
31
|
-
pageSize: number;
|
|
32
|
-
prev: number;
|
|
33
|
-
next: number;
|
|
34
|
-
data: any[];
|
|
35
|
-
}>;
|
|
35
|
+
}[]>;
|
|
36
36
|
listTimesheetEntries(user: any, paginationParams: ListTimesheetEntriesDto): Promise<{
|
|
37
37
|
total: number;
|
|
38
38
|
lastPage: number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard Principal - Renderiza widgets conforme role do usuário
|
|
3
|
+
*
|
|
4
|
+
* Fluxo:
|
|
5
|
+
* 1. Detecta role do usuário (collaborator/supervisor/director)
|
|
6
|
+
* 2. Busca dados via GET /operations/dashboard
|
|
7
|
+
* 3. Renderiza widgets apropriados para a role
|
|
8
|
+
* 4. Cada widget é um componente reutilizável
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
interface WidgetDefinition {
|
|
12
|
+
slug: string;
|
|
13
|
+
title: string;
|
|
14
|
+
roleSlug: string;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
xAxis: number;
|
|
18
|
+
yAxis: number;
|
|
19
|
+
componentPath: string;
|
|
20
|
+
}
|
|
21
|
+
interface DashboardLayoutProps {
|
|
22
|
+
roleSlugs: string[];
|
|
23
|
+
dashboardSlug: string;
|
|
24
|
+
widgets: WidgetDefinition[];
|
|
25
|
+
data: any;
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const DashboardLayout: React.FC<DashboardLayoutProps>;
|
|
29
|
+
export default DashboardLayout;
|
|
30
|
+
//# sourceMappingURL=DashboardLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../src/dashboard/components/DashboardLayout.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB;AAaD,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,IAAI,EAAE,GAAG,CAAC;IACV,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmF1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.DashboardLayout = void 0;
|
|
38
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
/**
|
|
40
|
+
* Dashboard Principal - Renderiza widgets conforme role do usuário
|
|
41
|
+
*
|
|
42
|
+
* Fluxo:
|
|
43
|
+
* 1. Detecta role do usuário (collaborator/supervisor/director)
|
|
44
|
+
* 2. Busca dados via GET /operations/dashboard
|
|
45
|
+
* 3. Renderiza widgets apropriados para a role
|
|
46
|
+
* 4. Cada widget é um componente reutilizável
|
|
47
|
+
*/
|
|
48
|
+
const react_1 = __importStar(require("react"));
|
|
49
|
+
// Mapear slugs aos componentes - importados dinamicamente do admin app
|
|
50
|
+
// Os widgets estão em: apps/admin/src/app/(app)/(libraries)/operations/dashboard/widgets/
|
|
51
|
+
const WIDGET_REGISTRY = {};
|
|
52
|
+
// Lazy loading de widgets - para evitar imports circulares
|
|
53
|
+
const getWidget = (slug) => {
|
|
54
|
+
// Este mapa será populado em runtime via importação dinâmica
|
|
55
|
+
// Por enquanto, retorna null se widget não estiver pronto
|
|
56
|
+
return WIDGET_REGISTRY[slug] || null;
|
|
57
|
+
};
|
|
58
|
+
const DashboardLayout = ({ roleSlugs, dashboardSlug, widgets, data, isLoading = false, }) => {
|
|
59
|
+
// Filtrar widgets para a role atual
|
|
60
|
+
const visibleWidgets = (0, react_1.useMemo)(() => {
|
|
61
|
+
return widgets.filter(widget => roleSlugs.includes(widget.roleSlug));
|
|
62
|
+
}, [widgets, roleSlugs]);
|
|
63
|
+
if (isLoading) {
|
|
64
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "grid gap-4 w-full h-full", children: Array(4).fill(0).map((_, i) => ((0, jsx_runtime_1.jsx)("div", { className: "bg-gray-200 rounded-lg animate-pulse", style: { minHeight: '200px' } }, i))) }));
|
|
65
|
+
}
|
|
66
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "grid gap-4 w-full auto-rows-max", style: {
|
|
67
|
+
gridTemplateColumns: 'repeat(12, 1fr)',
|
|
68
|
+
}, children: visibleWidgets.map(widget => {
|
|
69
|
+
const Component = WIDGET_REGISTRY[widget.slug];
|
|
70
|
+
if (!Component) {
|
|
71
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
72
|
+
gridColumn: `span ${Math.min(widget.width, 12)}`,
|
|
73
|
+
gridRow: `auto / span ${widget.height}`,
|
|
74
|
+
}, className: "bg-red-50 border-2 border-red-200 rounded-lg p-4", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-red-700 text-sm", children: ["Component not found: ", widget.slug] }) }, widget.slug));
|
|
75
|
+
}
|
|
76
|
+
return ((0, jsx_runtime_1.jsx)(react_1.default.Suspense, { fallback: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
77
|
+
gridColumn: `span ${Math.min(widget.width, 12)}`,
|
|
78
|
+
gridRow: `auto / span ${widget.height}`,
|
|
79
|
+
}, className: "bg-gray-200 rounded-lg animate-pulse" }), children: (0, jsx_runtime_1.jsx)(Component, { slug: widget.slug, title: widget.title, roleSlug: roleSlugs[0], width: widget.width, height: widget.height, data: data === null || data === void 0 ? void 0 : data[widget.slug], style: {
|
|
80
|
+
gridColumn: `span ${Math.min(widget.width, 12)}`,
|
|
81
|
+
gridRow: `auto / span ${widget.height}`,
|
|
82
|
+
} }) }, widget.slug));
|
|
83
|
+
}) }));
|
|
84
|
+
};
|
|
85
|
+
exports.DashboardLayout = DashboardLayout;
|
|
86
|
+
exports.default = exports.DashboardLayout;
|
|
87
|
+
//# sourceMappingURL=DashboardLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardLayout.js","sourceRoot":"","sources":["../../../src/dashboard/components/DashboardLayout.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb;;;;;;;;GAQG;AAEH,+CAAuC;AAcvC,uEAAuE;AACvE,0FAA0F;AAC1F,MAAM,eAAe,GAA6C,EAAE,CAAC;AAErE,2DAA2D;AAC3D,MAAM,SAAS,GAAG,CAAC,IAAY,EAAmC,EAAE;IAClE,6DAA6D;IAC7D,0DAA0D;IA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D,YAE5D,+BAAG,SAAS,EAAC,sBAAsB,sCACX,MAAM,CAAC,IAAI,IAC/B,IATC,MAAM,CAAC,IAAI,CAUZ,CACP,CAAC;YACJ,CAAC;YAED,OAAO,CACL,uBAAC,eAAK,CAAC,QAAQ,IAEb,QAAQ,EACN,gCACE,KAAK,EAAE;wBACL,UAAU,EAAE,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;wBAChD,OAAO,EAAE,eAAe,MAAM,CAAC,MAAM,EAAE;qBACxC,EACD,SAAS,EAAC,sCAAsC,GAChD,YAGJ,uBAAC,SAAS,IACR,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,EACtB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAG,MAAM,CAAC,IAAI,CAAC,EACzB,KAAK,EAAE;wBACL,UAAU,EAAE,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;wBAChD,OAAO,EAAE,eAAe,MAAM,CAAC,MAAM,EAAE;qBACxC,GACD,IAtBG,MAAM,CAAC,IAAI,CAuBD,CAClB,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAnFW,QAAA,eAAe,mBAmF1B;AAEF,kBAAe,uBAAe,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Widget Registry - Mapa de widgets do dashboard
|
|
3
|
+
*
|
|
4
|
+
* Este arquivo centraliza todas as informações de widgets para o dashboard da operations.
|
|
5
|
+
* Os widgets são importados dinamicamente em runtime.
|
|
6
|
+
*/
|
|
7
|
+
export interface WidgetInfo {
|
|
8
|
+
slug: string;
|
|
9
|
+
title: string;
|
|
10
|
+
component: string;
|
|
11
|
+
roleSlug: string;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
category: 'collaborator' | 'supervisor' | 'director';
|
|
15
|
+
}
|
|
16
|
+
export declare const COLLABORATOR_WIDGETS: WidgetInfo[];
|
|
17
|
+
export declare const SUPERVISOR_WIDGETS: WidgetInfo[];
|
|
18
|
+
export declare const DIRECTOR_WIDGETS: WidgetInfo[];
|
|
19
|
+
export declare const ALL_WIDGETS: WidgetInfo[];
|
|
20
|
+
export declare const getWidgetsByRole: (roleSlug: string) => WidgetInfo[];
|
|
21
|
+
export declare const getWidgetBySlug: (slug: string) => WidgetInfo | undefined;
|
|
22
|
+
export declare const getWidgetsByCategory: (category: "collaborator" | "supervisor" | "director") => WidgetInfo[];
|
|
23
|
+
//# sourceMappingURL=widget-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-registry.d.ts","sourceRoot":"","sources":["../../../src/dashboard/components/widget-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,cAAc,GAAG,YAAY,GAAG,UAAU,CAAC;CACtD;AAGD,eAAO,MAAM,oBAAoB,EAAE,UAAU,EAyE5C,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,UAAU,EAgE1C,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAyExC,CAAC;AAGF,eAAO,MAAM,WAAW,cAIvB,CAAC;AAGF,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,UAAU,EAE7D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,UAAU,GAAG,SAE3D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,cAAc,GAAG,YAAY,GAAG,UAAU,KAAG,UAAU,EAErG,CAAC"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Widget Registry - Mapa de widgets do dashboard
|
|
4
|
+
*
|
|
5
|
+
* Este arquivo centraliza todas as informações de widgets para o dashboard da operations.
|
|
6
|
+
* Os widgets são importados dinamicamente em runtime.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getWidgetsByCategory = exports.getWidgetBySlug = exports.getWidgetsByRole = exports.ALL_WIDGETS = exports.DIRECTOR_WIDGETS = exports.SUPERVISOR_WIDGETS = exports.COLLABORATOR_WIDGETS = void 0;
|
|
10
|
+
// Widgets para Colaboradores (7)
|
|
11
|
+
exports.COLLABORATOR_WIDGETS = [
|
|
12
|
+
{
|
|
13
|
+
slug: 'my-hours-period-kpi',
|
|
14
|
+
title: 'Minhas Horas (Período)',
|
|
15
|
+
component: 'MyHoursPeriodKpi',
|
|
16
|
+
roleSlug: 'collaborator',
|
|
17
|
+
width: 6,
|
|
18
|
+
height: 2,
|
|
19
|
+
category: 'collaborator',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
slug: 'my-timesheet-status-kpi',
|
|
23
|
+
title: 'Status do Timesheet',
|
|
24
|
+
component: 'MyTimesheetStatusKpi',
|
|
25
|
+
roleSlug: 'collaborator',
|
|
26
|
+
width: 6,
|
|
27
|
+
height: 2,
|
|
28
|
+
category: 'collaborator',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
slug: 'my-project-allocations-kpi',
|
|
32
|
+
title: 'Minhas Alocações',
|
|
33
|
+
component: 'MyProjectAllocationsKpi',
|
|
34
|
+
roleSlug: 'collaborator',
|
|
35
|
+
width: 6,
|
|
36
|
+
height: 2,
|
|
37
|
+
category: 'collaborator',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
slug: 'my-open-requests-kpi',
|
|
41
|
+
title: 'Requisições Abertas',
|
|
42
|
+
component: 'MyOpenRequestsKpi',
|
|
43
|
+
roleSlug: 'collaborator',
|
|
44
|
+
width: 6,
|
|
45
|
+
height: 2,
|
|
46
|
+
category: 'collaborator',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
slug: 'my-weekly-journey',
|
|
50
|
+
title: 'Jornada Semanal',
|
|
51
|
+
component: 'MyWeeklyJourney',
|
|
52
|
+
roleSlug: 'collaborator',
|
|
53
|
+
width: 12,
|
|
54
|
+
height: 3,
|
|
55
|
+
category: 'collaborator',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
slug: 'my-relevant-deadlines',
|
|
59
|
+
title: 'Prazos Relevantes',
|
|
60
|
+
component: 'MyRelevantDeadlines',
|
|
61
|
+
roleSlug: 'collaborator',
|
|
62
|
+
width: 6,
|
|
63
|
+
height: 3,
|
|
64
|
+
category: 'collaborator',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
slug: 'my-pending-requests-list',
|
|
68
|
+
title: 'Requisições Pendentes',
|
|
69
|
+
component: 'MyPendingRequestsList',
|
|
70
|
+
roleSlug: 'collaborator',
|
|
71
|
+
width: 6,
|
|
72
|
+
height: 3,
|
|
73
|
+
category: 'collaborator',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
slug: 'my-quick-actions',
|
|
77
|
+
title: 'Ações Rápidas',
|
|
78
|
+
component: 'MyQuickActions',
|
|
79
|
+
roleSlug: 'collaborator',
|
|
80
|
+
width: 12,
|
|
81
|
+
height: 2,
|
|
82
|
+
category: 'collaborator',
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
// Widgets para Supervisores (7)
|
|
86
|
+
exports.SUPERVISOR_WIDGETS = [
|
|
87
|
+
{
|
|
88
|
+
slug: 'team-pending-approvals-kpi',
|
|
89
|
+
title: 'Aprovações Pendentes',
|
|
90
|
+
component: 'TeamPendingApprovalsKpi',
|
|
91
|
+
roleSlug: 'supervisor',
|
|
92
|
+
width: 6,
|
|
93
|
+
height: 2,
|
|
94
|
+
category: 'supervisor',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
slug: 'team-hours-kpi',
|
|
98
|
+
title: 'Horas do Time',
|
|
99
|
+
component: 'TeamHoursKpi',
|
|
100
|
+
roleSlug: 'supervisor',
|
|
101
|
+
width: 6,
|
|
102
|
+
height: 2,
|
|
103
|
+
category: 'supervisor',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
slug: 'team-capacity-kpi',
|
|
107
|
+
title: 'Capacidade do Time',
|
|
108
|
+
component: 'TeamCapacityKpi',
|
|
109
|
+
roleSlug: 'supervisor',
|
|
110
|
+
width: 6,
|
|
111
|
+
height: 2,
|
|
112
|
+
category: 'supervisor',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
slug: 'team-utilization-overview',
|
|
116
|
+
title: 'Utilização do Time',
|
|
117
|
+
component: 'TeamUtilizationOverview',
|
|
118
|
+
roleSlug: 'supervisor',
|
|
119
|
+
width: 6,
|
|
120
|
+
height: 2,
|
|
121
|
+
category: 'supervisor',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
slug: 'team-workload-alerts',
|
|
125
|
+
title: 'Alertas de Carga',
|
|
126
|
+
component: 'TeamWorkloadAlerts',
|
|
127
|
+
roleSlug: 'supervisor',
|
|
128
|
+
width: 12,
|
|
129
|
+
height: 3,
|
|
130
|
+
category: 'supervisor',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
slug: 'managed-projects-status',
|
|
134
|
+
title: 'Status dos Projetos',
|
|
135
|
+
component: 'ManagedProjectsStatus',
|
|
136
|
+
roleSlug: 'supervisor',
|
|
137
|
+
width: 6,
|
|
138
|
+
height: 3,
|
|
139
|
+
category: 'supervisor',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
slug: 'team-approval-queue',
|
|
143
|
+
title: 'Fila de Aprovações',
|
|
144
|
+
component: 'TeamApprovalQueue',
|
|
145
|
+
roleSlug: 'supervisor',
|
|
146
|
+
width: 6,
|
|
147
|
+
height: 3,
|
|
148
|
+
category: 'supervisor',
|
|
149
|
+
},
|
|
150
|
+
];
|
|
151
|
+
// Widgets para Diretores (8)
|
|
152
|
+
exports.DIRECTOR_WIDGETS = [
|
|
153
|
+
{
|
|
154
|
+
slug: 'portfolio-costs-kpi',
|
|
155
|
+
title: 'Custos do Portfólio',
|
|
156
|
+
component: 'PortfolioCostsKpi',
|
|
157
|
+
roleSlug: 'director',
|
|
158
|
+
width: 6,
|
|
159
|
+
height: 2,
|
|
160
|
+
category: 'director',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
slug: 'portfolio-effort-kpi',
|
|
164
|
+
title: 'Esforço do Portfólio',
|
|
165
|
+
component: 'PortfolioEffortKpi',
|
|
166
|
+
roleSlug: 'director',
|
|
167
|
+
width: 6,
|
|
168
|
+
height: 2,
|
|
169
|
+
category: 'director',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
slug: 'portfolio-risk-kpi',
|
|
173
|
+
title: 'Risco do Portfólio',
|
|
174
|
+
component: 'PortfolioRiskKpi',
|
|
175
|
+
roleSlug: 'director',
|
|
176
|
+
width: 6,
|
|
177
|
+
height: 2,
|
|
178
|
+
category: 'director',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
slug: 'project-status-overview',
|
|
182
|
+
title: 'Status dos Projetos',
|
|
183
|
+
component: 'ProjectStatusOverview',
|
|
184
|
+
roleSlug: 'director',
|
|
185
|
+
width: 6,
|
|
186
|
+
height: 2,
|
|
187
|
+
category: 'director',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
slug: 'effort-by-project',
|
|
191
|
+
title: 'Esforço por Projeto',
|
|
192
|
+
component: 'EffortByProject',
|
|
193
|
+
roleSlug: 'director',
|
|
194
|
+
width: 12,
|
|
195
|
+
height: 3,
|
|
196
|
+
category: 'director',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
slug: 'capacity-distribution',
|
|
200
|
+
title: 'Distribuição de Capacidade',
|
|
201
|
+
component: 'CapacityDistribution',
|
|
202
|
+
roleSlug: 'director',
|
|
203
|
+
width: 6,
|
|
204
|
+
height: 3,
|
|
205
|
+
category: 'director',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
slug: 'headcount-by-area',
|
|
209
|
+
title: 'Headcount por Área',
|
|
210
|
+
component: 'HeadcountByArea',
|
|
211
|
+
roleSlug: 'director',
|
|
212
|
+
width: 6,
|
|
213
|
+
height: 3,
|
|
214
|
+
category: 'director',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
slug: 'strategic-deadlines',
|
|
218
|
+
title: 'Prazos Estratégicos',
|
|
219
|
+
component: 'StrategicDeadlines',
|
|
220
|
+
roleSlug: 'director',
|
|
221
|
+
width: 12,
|
|
222
|
+
height: 3,
|
|
223
|
+
category: 'director',
|
|
224
|
+
},
|
|
225
|
+
];
|
|
226
|
+
// Registro completo de todos os widgets
|
|
227
|
+
exports.ALL_WIDGETS = [
|
|
228
|
+
...exports.COLLABORATOR_WIDGETS,
|
|
229
|
+
...exports.SUPERVISOR_WIDGETS,
|
|
230
|
+
...exports.DIRECTOR_WIDGETS,
|
|
231
|
+
];
|
|
232
|
+
// Acessores úteis
|
|
233
|
+
const getWidgetsByRole = (roleSlug) => {
|
|
234
|
+
return exports.ALL_WIDGETS.filter(w => w.roleSlug === roleSlug);
|
|
235
|
+
};
|
|
236
|
+
exports.getWidgetsByRole = getWidgetsByRole;
|
|
237
|
+
const getWidgetBySlug = (slug) => {
|
|
238
|
+
return exports.ALL_WIDGETS.find(w => w.slug === slug);
|
|
239
|
+
};
|
|
240
|
+
exports.getWidgetBySlug = getWidgetBySlug;
|
|
241
|
+
const getWidgetsByCategory = (category) => {
|
|
242
|
+
return exports.ALL_WIDGETS.filter(w => w.category === category);
|
|
243
|
+
};
|
|
244
|
+
exports.getWidgetsByCategory = getWidgetsByCategory;
|
|
245
|
+
//# sourceMappingURL=widget-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-registry.js","sourceRoot":"","sources":["../../../src/dashboard/components/widget-registry.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAYH,iCAAiC;AACpB,QAAA,oBAAoB,GAAiB;IAChD;QACE,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,wBAAwB;QAC/B,SAAS,EAAE,kBAAkB;QAC7B,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,cAAc;KACzB;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,KAAK,EAAE,qBAAqB;QAC5B,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,cAAc;KACzB;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,kBAAkB;QACzB,SAAS,EAAE,yBAAyB;QACpC,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,cAAc;KACzB;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,qBAAqB;QAC5B,SAAS,EAAE,mBAAmB;QAC9B,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,cAAc;KACzB;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,iBAAiB;QACxB,SAAS,EAAE,iBAAiB;QAC5B,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,CAAC;QACT,QAAQ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