@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.
Files changed (281) hide show
  1. package/README.md +5 -5
  2. package/dist/controllers/operations-collaborators.controller.d.ts +7 -216
  3. package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
  4. package/dist/controllers/operations-contracts.controller.d.ts +6 -6
  5. package/dist/controllers/operations-projects.controller.d.ts +25 -0
  6. package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
  7. package/dist/controllers/operations-projects.controller.js +48 -0
  8. package/dist/controllers/operations-projects.controller.js.map +1 -1
  9. package/dist/controllers/operations-reports.controller.d.ts +1 -1
  10. package/dist/controllers/operations-tasks.controller.d.ts +34 -9
  11. package/dist/controllers/operations-tasks.controller.d.ts.map +1 -1
  12. package/dist/controllers/operations-tasks.controller.js +43 -32
  13. package/dist/controllers/operations-tasks.controller.js.map +1 -1
  14. package/dist/controllers/operations-timesheets.controller.d.ts +9 -9
  15. package/dist/dashboard/components/DashboardLayout.d.ts +30 -0
  16. package/dist/dashboard/components/DashboardLayout.d.ts.map +1 -0
  17. package/dist/dashboard/components/DashboardLayout.js +87 -0
  18. package/dist/dashboard/components/DashboardLayout.js.map +1 -0
  19. package/dist/dashboard/components/widget-registry.d.ts +23 -0
  20. package/dist/dashboard/components/widget-registry.d.ts.map +1 -0
  21. package/dist/dashboard/components/widget-registry.js +245 -0
  22. package/dist/dashboard/components/widget-registry.js.map +1 -0
  23. package/dist/dashboard/hooks/useDashboardData.d.ts +20 -0
  24. package/dist/dashboard/hooks/useDashboardData.d.ts.map +1 -0
  25. package/dist/dashboard/hooks/useDashboardData.js +24 -0
  26. package/dist/dashboard/hooks/useDashboardData.js.map +1 -0
  27. package/dist/dashboard/types/widgets.types.d.ts +233 -0
  28. package/dist/dashboard/types/widgets.types.d.ts.map +1 -0
  29. package/dist/dashboard/types/widgets.types.js +6 -0
  30. package/dist/dashboard/types/widgets.types.js.map +1 -0
  31. package/dist/dashboard/widgets/CapacityDistribution.d.ts +23 -0
  32. package/dist/dashboard/widgets/CapacityDistribution.d.ts.map +1 -0
  33. package/dist/dashboard/widgets/CapacityDistribution.js +11 -0
  34. package/dist/dashboard/widgets/CapacityDistribution.js.map +1 -0
  35. package/dist/dashboard/widgets/EffortByProject.d.ts +22 -0
  36. package/dist/dashboard/widgets/EffortByProject.d.ts.map +1 -0
  37. package/dist/dashboard/widgets/EffortByProject.js +11 -0
  38. package/dist/dashboard/widgets/EffortByProject.js.map +1 -0
  39. package/dist/dashboard/widgets/HeadcountByArea.d.ts +24 -0
  40. package/dist/dashboard/widgets/HeadcountByArea.d.ts.map +1 -0
  41. package/dist/dashboard/widgets/HeadcountByArea.js +11 -0
  42. package/dist/dashboard/widgets/HeadcountByArea.js.map +1 -0
  43. package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts +18 -0
  44. package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts.map +1 -0
  45. package/dist/dashboard/widgets/ManagedProjectsStatus.js +12 -0
  46. package/dist/dashboard/widgets/ManagedProjectsStatus.js.map +1 -0
  47. package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts +22 -0
  48. package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts.map +1 -0
  49. package/dist/dashboard/widgets/MyHoursPeriodKpi.js +12 -0
  50. package/dist/dashboard/widgets/MyHoursPeriodKpi.js.map +1 -0
  51. package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts +19 -0
  52. package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts.map +1 -0
  53. package/dist/dashboard/widgets/MyOpenRequestsKpi.js +17 -0
  54. package/dist/dashboard/widgets/MyOpenRequestsKpi.js.map +1 -0
  55. package/dist/dashboard/widgets/MyPendingRequestsList.d.ts +23 -0
  56. package/dist/dashboard/widgets/MyPendingRequestsList.d.ts.map +1 -0
  57. package/dist/dashboard/widgets/MyPendingRequestsList.js +14 -0
  58. package/dist/dashboard/widgets/MyPendingRequestsList.js.map +1 -0
  59. package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts +22 -0
  60. package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts.map +1 -0
  61. package/dist/dashboard/widgets/MyProjectAllocationsKpi.js +11 -0
  62. package/dist/dashboard/widgets/MyProjectAllocationsKpi.js.map +1 -0
  63. package/dist/dashboard/widgets/MyQuickActions.d.ts +23 -0
  64. package/dist/dashboard/widgets/MyQuickActions.d.ts.map +1 -0
  65. package/dist/dashboard/widgets/MyQuickActions.js +18 -0
  66. package/dist/dashboard/widgets/MyQuickActions.js.map +1 -0
  67. package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts +23 -0
  68. package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts.map +1 -0
  69. package/dist/dashboard/widgets/MyRelevantDeadlines.js +22 -0
  70. package/dist/dashboard/widgets/MyRelevantDeadlines.js.map +1 -0
  71. package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts +17 -0
  72. package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts.map +1 -0
  73. package/dist/dashboard/widgets/MyTimesheetStatusKpi.js +11 -0
  74. package/dist/dashboard/widgets/MyTimesheetStatusKpi.js.map +1 -0
  75. package/dist/dashboard/widgets/MyWeeklyJourney.d.ts +21 -0
  76. package/dist/dashboard/widgets/MyWeeklyJourney.d.ts.map +1 -0
  77. package/dist/dashboard/widgets/MyWeeklyJourney.js +19 -0
  78. package/dist/dashboard/widgets/MyWeeklyJourney.js.map +1 -0
  79. package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts +19 -0
  80. package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts.map +1 -0
  81. package/dist/dashboard/widgets/PortfolioCostsKpi.js +12 -0
  82. package/dist/dashboard/widgets/PortfolioCostsKpi.js.map +1 -0
  83. package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts +18 -0
  84. package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts.map +1 -0
  85. package/dist/dashboard/widgets/PortfolioEffortKpi.js +8 -0
  86. package/dist/dashboard/widgets/PortfolioEffortKpi.js.map +1 -0
  87. package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts +22 -0
  88. package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts.map +1 -0
  89. package/dist/dashboard/widgets/PortfolioProjectsKpi.js +56 -0
  90. package/dist/dashboard/widgets/PortfolioProjectsKpi.js.map +1 -0
  91. package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts +19 -0
  92. package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts.map +1 -0
  93. package/dist/dashboard/widgets/PortfolioRiskKpi.js +11 -0
  94. package/dist/dashboard/widgets/PortfolioRiskKpi.js.map +1 -0
  95. package/dist/dashboard/widgets/ProjectStatusOverview.d.ts +19 -0
  96. package/dist/dashboard/widgets/ProjectStatusOverview.d.ts.map +1 -0
  97. package/dist/dashboard/widgets/ProjectStatusOverview.js +18 -0
  98. package/dist/dashboard/widgets/ProjectStatusOverview.js.map +1 -0
  99. package/dist/dashboard/widgets/StrategicDeadlines.d.ts +24 -0
  100. package/dist/dashboard/widgets/StrategicDeadlines.d.ts.map +1 -0
  101. package/dist/dashboard/widgets/StrategicDeadlines.js +22 -0
  102. package/dist/dashboard/widgets/StrategicDeadlines.js.map +1 -0
  103. package/dist/dashboard/widgets/TeamApprovalQueue.d.ts +24 -0
  104. package/dist/dashboard/widgets/TeamApprovalQueue.d.ts.map +1 -0
  105. package/dist/dashboard/widgets/TeamApprovalQueue.js +12 -0
  106. package/dist/dashboard/widgets/TeamApprovalQueue.js.map +1 -0
  107. package/dist/dashboard/widgets/TeamCapacityKpi.d.ts +18 -0
  108. package/dist/dashboard/widgets/TeamCapacityKpi.d.ts.map +1 -0
  109. package/dist/dashboard/widgets/TeamCapacityKpi.js +19 -0
  110. package/dist/dashboard/widgets/TeamCapacityKpi.js.map +1 -0
  111. package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts +22 -0
  112. package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts.map +1 -0
  113. package/dist/dashboard/widgets/TeamHeadcountKpi.js +56 -0
  114. package/dist/dashboard/widgets/TeamHeadcountKpi.js.map +1 -0
  115. package/dist/dashboard/widgets/TeamHoursKpi.d.ts +19 -0
  116. package/dist/dashboard/widgets/TeamHoursKpi.d.ts.map +1 -0
  117. package/dist/dashboard/widgets/TeamHoursKpi.js +13 -0
  118. package/dist/dashboard/widgets/TeamHoursKpi.js.map +1 -0
  119. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts +20 -0
  120. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts.map +1 -0
  121. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js +11 -0
  122. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js.map +1 -0
  123. package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts +18 -0
  124. package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts.map +1 -0
  125. package/dist/dashboard/widgets/TeamUtilizationOverview.js +17 -0
  126. package/dist/dashboard/widgets/TeamUtilizationOverview.js.map +1 -0
  127. package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts +24 -0
  128. package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts.map +1 -0
  129. package/dist/dashboard/widgets/TeamWorkloadAlerts.js +19 -0
  130. package/dist/dashboard/widgets/TeamWorkloadAlerts.js.map +1 -0
  131. package/dist/dashboard/widgets/index.d.ts +24 -0
  132. package/dist/dashboard/widgets/index.d.ts.map +1 -0
  133. package/dist/dashboard/widgets/index.js +54 -0
  134. package/dist/dashboard/widgets/index.js.map +1 -0
  135. package/dist/dto/create-collaborator.dto.d.ts +0 -1
  136. package/dist/dto/create-collaborator.dto.d.ts.map +1 -1
  137. package/dist/dto/create-collaborator.dto.js +0 -6
  138. package/dist/dto/create-collaborator.dto.js.map +1 -1
  139. package/dist/index.d.ts +2 -0
  140. package/dist/index.d.ts.map +1 -1
  141. package/dist/index.js +2 -0
  142. package/dist/index.js.map +1 -1
  143. package/dist/operations.controller.d.ts +42 -0
  144. package/dist/operations.controller.d.ts.map +1 -1
  145. package/dist/operations.service.d.ts +182 -268
  146. package/dist/operations.service.d.ts.map +1 -1
  147. package/dist/operations.service.js +2147 -1337
  148. package/dist/operations.service.js.map +1 -1
  149. package/dist/operations.service.spec.js +345 -174
  150. package/dist/operations.service.spec.js.map +1 -1
  151. package/hedhog/data/dashboard_component.yaml +66 -0
  152. package/hedhog/data/dashboard_item.yaml +25 -25
  153. package/hedhog/data/route.yaml +61 -0
  154. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +39 -99
  155. package/hedhog/frontend/app/_components/collaborator-picker.tsx.ejs +158 -0
  156. package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +314 -116
  157. package/hedhog/frontend/app/_components/project-assignments-tab.tsx.ejs +434 -449
  158. package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +289 -412
  159. package/hedhog/frontend/app/_components/project-file-attachments.tsx.ejs +371 -0
  160. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +426 -374
  161. package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +803 -581
  162. package/hedhog/frontend/app/_components/task-file-attachments.tsx.ejs +4 -1
  163. package/hedhog/frontend/app/_components/task-form-fields.tsx.ejs +406 -0
  164. package/hedhog/frontend/app/_components/task-form-sheet.tsx.ejs +629 -784
  165. package/hedhog/frontend/app/_components/task-info-display.tsx.ejs +137 -0
  166. package/hedhog/frontend/app/_components/timesheet-entry-create-sheet.tsx.ejs +306 -0
  167. package/hedhog/frontend/app/_lib/api.ts.ejs +480 -476
  168. package/hedhog/frontend/app/_lib/types.ts.ejs +66 -5
  169. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +0 -2
  170. package/hedhog/frontend/app/_lib/utils/task-ui.ts.ejs +43 -0
  171. package/hedhog/frontend/app/approvals/page.tsx.ejs +6 -1
  172. package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +6 -1
  173. package/hedhog/frontend/app/collaborators/page.tsx.ejs +59 -8
  174. package/hedhog/frontend/app/contracts/page.tsx.ejs +29 -8
  175. package/hedhog/frontend/app/dashboard/widgets/CapacityDistribution.tsx.ejs +84 -0
  176. package/hedhog/frontend/app/dashboard/widgets/EffortByProject.tsx.ejs +85 -0
  177. package/hedhog/frontend/app/dashboard/widgets/HeadcountByArea.tsx.ejs +101 -0
  178. package/hedhog/frontend/app/dashboard/widgets/ManagedProjectsStatus.tsx.ejs +113 -0
  179. package/hedhog/frontend/app/dashboard/widgets/MyHoursPeriodKpi.tsx.ejs +87 -0
  180. package/hedhog/frontend/app/dashboard/widgets/MyOpenRequestsKpi.tsx.ejs +97 -0
  181. package/hedhog/frontend/app/dashboard/widgets/MyPendingRequestsList.tsx.ejs +99 -0
  182. package/hedhog/frontend/app/dashboard/widgets/MyProjectAllocationsKpi.tsx.ejs +78 -0
  183. package/hedhog/frontend/app/dashboard/widgets/MyQuickActions.tsx.ejs +130 -0
  184. package/hedhog/frontend/app/dashboard/widgets/MyRelevantDeadlines.tsx.ejs +144 -0
  185. package/hedhog/frontend/app/dashboard/widgets/MyTimesheetStatusKpi.tsx.ejs +78 -0
  186. package/hedhog/frontend/app/dashboard/widgets/MyWeeklyJourney.tsx.ejs +99 -0
  187. package/hedhog/frontend/app/dashboard/widgets/PortfolioCostsKpi.tsx.ejs +112 -0
  188. package/hedhog/frontend/app/dashboard/widgets/PortfolioEffortKpi.tsx.ejs +93 -0
  189. package/hedhog/frontend/app/dashboard/widgets/PortfolioProjectsKpi.tsx.ejs +96 -0
  190. package/hedhog/frontend/app/dashboard/widgets/PortfolioRiskKpi.tsx.ejs +115 -0
  191. package/hedhog/frontend/app/dashboard/widgets/ProjectStatusOverview.tsx.ejs +120 -0
  192. package/hedhog/frontend/app/dashboard/widgets/StrategicDeadlines.tsx.ejs +146 -0
  193. package/hedhog/frontend/app/dashboard/widgets/TeamApprovalQueue.tsx.ejs +108 -0
  194. package/hedhog/frontend/app/dashboard/widgets/TeamCapacityKpi.tsx.ejs +97 -0
  195. package/hedhog/frontend/app/dashboard/widgets/TeamHeadcountKpi.tsx.ejs +100 -0
  196. package/hedhog/frontend/app/dashboard/widgets/TeamHoursKpi.tsx.ejs +104 -0
  197. package/hedhog/frontend/app/dashboard/widgets/TeamPendingApprovalsKpi.tsx.ejs +110 -0
  198. package/hedhog/frontend/app/dashboard/widgets/TeamUtilizationOverview.tsx.ejs +115 -0
  199. package/hedhog/frontend/app/dashboard/widgets/TeamWorkloadAlerts.tsx.ejs +117 -0
  200. package/hedhog/frontend/app/dashboard/widgets/index.ts.ejs +26 -0
  201. package/hedhog/frontend/app/departments/page.tsx.ejs +6 -1
  202. package/hedhog/frontend/app/my-projects/page.tsx.ejs +14 -10
  203. package/hedhog/frontend/app/my-tasks/page.tsx.ejs +328 -105
  204. package/hedhog/frontend/app/project-cost-categories/page.tsx.ejs +58 -52
  205. package/hedhog/frontend/app/project-cost-types/page.tsx.ejs +58 -51
  206. package/hedhog/frontend/app/projects/page.tsx.ejs +376 -30
  207. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +6 -1
  208. package/hedhog/frontend/app/time-off/page.tsx.ejs +6 -1
  209. package/hedhog/frontend/app/timesheets/page.tsx.ejs +10 -4
  210. package/hedhog/frontend/messages/en.json +238 -46
  211. package/hedhog/frontend/messages/operations/en.json +61 -52
  212. package/hedhog/frontend/messages/operations/pt.json +59 -43
  213. package/hedhog/frontend/messages/pt.json +238 -46
  214. package/hedhog/frontend/widgets/capacity-distribution.tsx.ejs +17 -0
  215. package/hedhog/frontend/widgets/effort-by-project.tsx.ejs +17 -0
  216. package/hedhog/frontend/widgets/headcount-by-area.tsx.ejs +17 -0
  217. package/hedhog/frontend/widgets/index.ts.ejs +25 -0
  218. package/hedhog/frontend/widgets/managed-projects-status.tsx.ejs +17 -0
  219. package/hedhog/frontend/widgets/my-hours-period-kpi.tsx.ejs +17 -0
  220. package/hedhog/frontend/widgets/my-open-requests-kpi.tsx.ejs +17 -0
  221. package/hedhog/frontend/widgets/my-pending-requests-list.tsx.ejs +17 -0
  222. package/hedhog/frontend/widgets/my-project-allocations-kpi.tsx.ejs +17 -0
  223. package/hedhog/frontend/widgets/my-quick-actions.tsx.ejs +17 -0
  224. package/hedhog/frontend/widgets/my-relevant-deadlines.tsx.ejs +17 -0
  225. package/hedhog/frontend/widgets/my-timesheet-status-kpi.tsx.ejs +17 -0
  226. package/hedhog/frontend/widgets/my-weekly-journey.tsx.ejs +17 -0
  227. package/hedhog/frontend/widgets/portfolio-costs-kpi.tsx.ejs +17 -0
  228. package/hedhog/frontend/widgets/portfolio-effort-kpi.tsx.ejs +17 -0
  229. package/hedhog/frontend/widgets/portfolio-projects-kpi.tsx.ejs +17 -0
  230. package/hedhog/frontend/widgets/portfolio-risk-kpi.tsx.ejs +17 -0
  231. package/hedhog/frontend/widgets/project-status-overview.tsx.ejs +17 -0
  232. package/hedhog/frontend/widgets/shared-operations-widget.tsx.ejs +170 -0
  233. package/hedhog/frontend/widgets/strategic-deadlines.tsx.ejs +17 -0
  234. package/hedhog/frontend/widgets/team-approval-queue.tsx.ejs +17 -0
  235. package/hedhog/frontend/widgets/team-capacity-kpi.tsx.ejs +17 -0
  236. package/hedhog/frontend/widgets/team-headcount-kpi.tsx.ejs +17 -0
  237. package/hedhog/frontend/widgets/team-hours-kpi.tsx.ejs +17 -0
  238. package/hedhog/frontend/widgets/team-pending-approvals-kpi.tsx.ejs +17 -0
  239. package/hedhog/frontend/widgets/team-utilization-overview.tsx.ejs +17 -0
  240. package/hedhog/frontend/widgets/team-workload-alerts.tsx.ejs +17 -0
  241. package/hedhog/table/operations_collaborator.yaml +8 -13
  242. package/hedhog/table/operations_project.yaml +1 -1
  243. package/hedhog/table/operations_project_file.yaml +23 -0
  244. package/hedhog/table/operations_task.yaml +76 -69
  245. package/hedhog/table/operations_task_activity.yaml +51 -0
  246. package/package.json +6 -5
  247. package/src/controllers/operations-projects.controller.ts +41 -8
  248. package/src/controllers/operations-tasks.controller.ts +156 -166
  249. package/src/dashboard/README.md +214 -0
  250. package/src/dashboard/components/DashboardLayout.tsx +131 -0
  251. package/src/dashboard/components/widget-registry.ts +255 -0
  252. package/src/dashboard/hooks/useDashboardData.ts +29 -0
  253. package/src/dashboard/types/widgets.types.ts +237 -0
  254. package/src/dashboard/widgets/CapacityDistribution.tsx +56 -0
  255. package/src/dashboard/widgets/EffortByProject.tsx +51 -0
  256. package/src/dashboard/widgets/HeadcountByArea.tsx +57 -0
  257. package/src/dashboard/widgets/ManagedProjectsStatus.tsx +53 -0
  258. package/src/dashboard/widgets/MyHoursPeriodKpi.tsx +87 -0
  259. package/src/dashboard/widgets/MyOpenRequestsKpi.tsx +51 -0
  260. package/src/dashboard/widgets/MyPendingRequestsList.tsx +63 -0
  261. package/src/dashboard/widgets/MyProjectAllocationsKpi.tsx +57 -0
  262. package/src/dashboard/widgets/MyQuickActions.tsx +62 -0
  263. package/src/dashboard/widgets/MyRelevantDeadlines.tsx +84 -0
  264. package/src/dashboard/widgets/MyTimesheetStatusKpi.tsx +65 -0
  265. package/src/dashboard/widgets/MyWeeklyJourney.tsx +57 -0
  266. package/src/dashboard/widgets/PortfolioCostsKpi.tsx +48 -0
  267. package/src/dashboard/widgets/PortfolioEffortKpi.tsx +41 -0
  268. package/src/dashboard/widgets/PortfolioRiskKpi.tsx +50 -0
  269. package/src/dashboard/widgets/ProjectStatusOverview.tsx +52 -0
  270. package/src/dashboard/widgets/StrategicDeadlines.tsx +93 -0
  271. package/src/dashboard/widgets/TeamApprovalQueue.tsx +70 -0
  272. package/src/dashboard/widgets/TeamCapacityKpi.tsx +50 -0
  273. package/src/dashboard/widgets/TeamHoursKpi.tsx +51 -0
  274. package/src/dashboard/widgets/TeamPendingApprovalsKpi.tsx +53 -0
  275. package/src/dashboard/widgets/TeamUtilizationOverview.tsx +62 -0
  276. package/src/dashboard/widgets/TeamWorkloadAlerts.tsx +81 -0
  277. package/src/dashboard/widgets/index.ts +26 -0
  278. package/src/dto/create-collaborator.dto.ts +4 -11
  279. package/src/index.ts +3 -0
  280. package/src/operations.service.spec.ts +988 -764
  281. package/src/operations.service.ts +4277 -2535
@@ -1,5 +1,5 @@
1
- import { LocaleService } from '@hed-hog/api-locale';
2
- import { PrismaService } from '@hed-hog/api-prisma';
1
+ import { LocaleService } from "@hed-hog/api-locale";
2
+ import { PrismaService } from "@hed-hog/api-prisma";
3
3
  import { AiService, FileService, IntegrationDeveloperApiService, SettingService } from '@hed-hog/core';
4
4
  import { OperationsAccessService } from './services/shared/operations-access.service';
5
5
  declare const CONTRACT_CATEGORY_VALUES: readonly ["employee", "contractor", "client", "supplier", "vendor", "partner", "internal", "other"];
@@ -12,8 +12,9 @@ declare const ORIGIN_TYPE_VALUES: readonly ["manual", "employee_hiring", "client
12
12
  declare const CONTRACT_DOCUMENT_TYPE_VALUES: readonly ["source_upload", "generated_pdf", "attachment", "other"];
13
13
  declare const CONTRACT_DOCUMENT_EXTRACTION_STATUS_VALUES: readonly ["pending", "processing", "completed", "failed", "skipped"];
14
14
  declare const TASK_STATUS_VALUES: readonly ["todo", "doing", "review", "done"];
15
+ declare const TASK_ACTIVITY_ACTION_VALUES: readonly ["status_changed", "task_created", "task_deleted", "task_restored", "assignee_changed", "priority_changed", "due_date_changed", "name_changed", "description_changed", "comment_added", "comment_updated", "comment_removed", "file_added", "file_removed"];
16
+ type TaskActivityAction = (typeof TASK_ACTIVITY_ACTION_VALUES)[number];
15
17
  type CollaboratorPayload = {
16
- userId?: number | null;
17
18
  personId?: number | null;
18
19
  code?: string | null;
19
20
  displayName?: string | null;
@@ -26,7 +27,7 @@ type CollaboratorPayload = {
26
27
  levelLabel?: string | null;
27
28
  supervisorCollaboratorId?: number | null;
28
29
  weeklyCapacityHours?: number | null;
29
- status?: 'draft' | 'active' | 'on_leave' | 'inactive';
30
+ status?: "draft" | "active" | "on_leave" | "inactive";
30
31
  joinedAt?: string | null;
31
32
  leftAt?: string | null;
32
33
  compensationAmount?: number | null;
@@ -36,14 +37,14 @@ type CollaboratorPayload = {
36
37
  contractDescription?: string | null;
37
38
  autoGenerateContractDraft?: boolean;
38
39
  weeklySchedule?: Array<{
39
- weekday: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
40
+ weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
40
41
  isWorkingDay?: boolean;
41
42
  startTime?: string | null;
42
43
  endTime?: string | null;
43
44
  breakMinutes?: number | null;
44
45
  }>;
45
46
  equityParticipation?: {
46
- participationType?: 'partner_quota_holder' | 'common_shareholder' | 'preferred_shareholder' | 'administrator' | 'other';
47
+ participationType?: "partner_quota_holder" | "common_shareholder" | "preferred_shareholder" | "administrator" | "other";
47
48
  percentage?: number | null;
48
49
  votingPower?: number | null;
49
50
  startDate?: string | null;
@@ -56,7 +57,7 @@ type DepartmentPayload = {
56
57
  code?: string | null;
57
58
  name?: string | null;
58
59
  description?: string | null;
59
- status?: 'active' | 'inactive';
60
+ status?: "active" | "inactive";
60
61
  };
61
62
  type JobTitlePayload = DepartmentPayload;
62
63
  type CollaboratorTypePayload = {
@@ -66,7 +67,7 @@ type CollaboratorTypePayload = {
66
67
  category?: string | null;
67
68
  isActive?: boolean;
68
69
  sortOrder?: number | null;
69
- status?: 'active' | 'inactive';
70
+ status?: "active" | "inactive";
70
71
  };
71
72
  type ProjectRolePayload = {
72
73
  code?: string | null;
@@ -79,14 +80,14 @@ type ContractPayload = {
79
80
  code?: string | null;
80
81
  name?: string | null;
81
82
  clientName?: string | null;
82
- contractCategory?: 'employee' | 'contractor' | 'client' | 'supplier' | 'vendor' | 'partner' | 'internal' | 'other';
83
- contractType?: 'clt' | 'pj' | 'freelancer_agreement' | 'service_agreement' | 'fixed_term' | 'recurring_service' | 'nda' | 'amendment' | 'addendum' | 'other';
84
- billingModel?: 'time_and_material' | 'monthly_retainer' | 'fixed_price';
85
- signatureStatus?: 'not_started' | 'pending' | 'partially_signed' | 'signed' | 'expired';
83
+ contractCategory?: "employee" | "contractor" | "client" | "supplier" | "vendor" | "partner" | "internal" | "other";
84
+ contractType?: "clt" | "pj" | "freelancer_agreement" | "service_agreement" | "fixed_term" | "recurring_service" | "nda" | "amendment" | "addendum" | "other";
85
+ billingModel?: "time_and_material" | "monthly_retainer" | "fixed_price";
86
+ signatureStatus?: "not_started" | "pending" | "partially_signed" | "signed" | "expired";
86
87
  isActive?: boolean;
87
88
  accountManagerCollaboratorId?: number | null;
88
89
  relatedCollaboratorId?: number | null;
89
- originType?: 'manual' | 'employee_hiring' | 'client_project' | 'crm_proposal';
90
+ originType?: "manual" | "employee_hiring" | "client_project" | "crm_proposal";
90
91
  originId?: number | null;
91
92
  startDate?: string | null;
92
93
  endDate?: string | null;
@@ -94,14 +95,14 @@ type ContractPayload = {
94
95
  effectiveDate?: string | null;
95
96
  budgetAmount?: number | null;
96
97
  monthlyHourCap?: number | null;
97
- status?: 'draft' | 'under_review' | 'active' | 'renewal' | 'expired' | 'closed' | 'archived';
98
- creationMode?: 'blank' | 'template' | 'upload' | 'duplicate';
98
+ status?: "draft" | "under_review" | "active" | "renewal" | "expired" | "closed" | "archived";
99
+ creationMode?: "blank" | "template" | "upload" | "duplicate";
99
100
  wizardStep?: number | null;
100
101
  description?: string | null;
101
102
  contentHtml?: string | null;
102
103
  parties?: Array<{
103
- partyRole?: 'employee' | 'employer' | 'client' | 'supplier' | 'vendor' | 'partner' | 'witness' | 'internal_owner' | 'other';
104
- partyType?: 'individual' | 'company' | 'internal_team' | 'other';
104
+ partyRole?: "employee" | "employer" | "client" | "supplier" | "vendor" | "partner" | "witness" | "internal_owner" | "other";
105
+ partyType?: "individual" | "company" | "internal_team" | "other";
105
106
  displayName: string;
106
107
  documentNumber?: string | null;
107
108
  email?: string | null;
@@ -114,7 +115,7 @@ type ContractPayload = {
114
115
  mimeType: string;
115
116
  fileContentBase64?: string | null;
116
117
  notes?: string | null;
117
- extractionStatus?: 'pending' | 'processing' | 'completed' | 'failed' | 'skipped';
118
+ extractionStatus?: "pending" | "processing" | "completed" | "failed" | "skipped";
118
119
  extractionSummary?: string | null;
119
120
  } | null;
120
121
  additionalUploadedDocuments?: Array<{
@@ -123,7 +124,7 @@ type ContractPayload = {
123
124
  mimeType: string;
124
125
  fileContentBase64?: string | null;
125
126
  notes?: string | null;
126
- extractionStatus?: 'pending' | 'processing' | 'completed' | 'failed' | 'skipped';
127
+ extractionStatus?: "pending" | "processing" | "completed" | "failed" | "skipped";
127
128
  extractionSummary?: string | null;
128
129
  }> | null;
129
130
  deletedDocumentIds?: number[] | null;
@@ -150,9 +151,9 @@ type ProposalApprovedEventPayload = {
150
151
  validFrom?: string | null;
151
152
  validUntil?: string | null;
152
153
  commercialTerms?: {
153
- contractCategory?: ContractPayload['contractCategory'];
154
- contractType?: ContractPayload['contractType'];
155
- billingModel?: ContractPayload['billingModel'];
154
+ contractCategory?: ContractPayload["contractCategory"];
155
+ contractType?: ContractPayload["contractType"];
156
+ billingModel?: ContractPayload["billingModel"];
156
157
  validFrom?: string | null;
157
158
  validUntil?: string | null;
158
159
  notes?: string | null;
@@ -160,9 +161,9 @@ type ProposalApprovedEventPayload = {
160
161
  proposal?: {
161
162
  code?: string | null;
162
163
  title?: string | null;
163
- contractCategory?: ContractPayload['contractCategory'];
164
- contractType?: ContractPayload['contractType'];
165
- billingModel?: ContractPayload['billingModel'];
164
+ contractCategory?: ContractPayload["contractCategory"];
165
+ contractType?: ContractPayload["contractType"];
166
+ billingModel?: ContractPayload["billingModel"];
166
167
  validFrom?: string | null;
167
168
  validUntil?: string | null;
168
169
  totalAmount?: number | null;
@@ -187,8 +188,8 @@ type ProposalApprovedEventPayload = {
187
188
  items?: Array<{
188
189
  name?: string | null;
189
190
  description?: string | null;
190
- termType?: 'value' | 'payment' | 'revenue' | 'fine' | 'other';
191
- recurrence?: 'one_time' | 'monthly' | 'quarterly' | 'yearly' | 'other';
191
+ termType?: "value" | "payment" | "revenue" | "fine" | "other";
192
+ recurrence?: "one_time" | "monthly" | "quarterly" | "yearly" | "other";
192
193
  dueDay?: number | null;
193
194
  amount?: number | null;
194
195
  totalAmountCents?: number | null;
@@ -260,7 +261,7 @@ type ContractDetailsRecord = ContractDetailRecord & {
260
261
  mainRelatedPartyName: string | null;
261
262
  projects: ContractProjectSummary[];
262
263
  scheduleSummary: ContractScheduleDay[];
263
- parties: NonNullable<ContractPayload['parties']>;
264
+ parties: NonNullable<ContractPayload["parties"]>;
264
265
  documents: ContractDocumentRecord[];
265
266
  history: ContractHistoryRecord[];
266
267
  };
@@ -272,13 +273,13 @@ type ProjectPayload = {
272
273
  name: string;
273
274
  clientName?: string | null;
274
275
  summary?: string | null;
275
- status?: 'planning' | 'active' | 'at_risk' | 'paused' | 'completed' | 'archived';
276
+ status?: "planning" | "active" | "paused" | "completed" | "archived";
276
277
  progressPercent?: number | null;
277
- deliveryModel?: 'dedicated_team' | 'shared_team' | 'project_delivery' | 'support';
278
+ deliveryModel?: "dedicated_team" | "shared_team" | "project_delivery" | "support";
278
279
  budgetAmount?: number | null;
279
280
  startDate?: string | null;
280
281
  endDate?: string | null;
281
- billingModel?: 'time_and_material' | 'monthly_retainer' | 'fixed_price';
282
+ billingModel?: "time_and_material" | "monthly_retainer" | "fixed_price";
282
283
  monthlyHourCap?: number | null;
283
284
  contractCode?: string | null;
284
285
  contractName?: string | null;
@@ -292,7 +293,7 @@ type ProjectPayload = {
292
293
  isBillable?: boolean;
293
294
  startDate?: string | null;
294
295
  endDate?: string | null;
295
- status?: 'planned' | 'active' | 'completed' | 'cancelled';
296
+ status?: "planned" | "active" | "completed" | "cancelled";
296
297
  }>;
297
298
  };
298
299
  type TimesheetEntryPayload = {
@@ -304,7 +305,7 @@ type TimesheetEntryPayload = {
304
305
  hours?: number | null;
305
306
  duration?: number | null;
306
307
  durationMinutes?: number | null;
307
- unit?: 'hours' | 'minutes';
308
+ unit?: "hours" | "minutes";
308
309
  description?: string | null;
309
310
  };
310
311
  type TaskPayload = {
@@ -313,7 +314,7 @@ type TaskPayload = {
313
314
  assigneeCollaboratorId?: number | null;
314
315
  name?: string | null;
315
316
  description?: string | null;
316
- priority?: 'low' | 'medium' | 'high';
317
+ priority?: "low" | "medium" | "high";
317
318
  status?: (typeof TASK_STATUS_VALUES)[number];
318
319
  dueDate?: string | null;
319
320
  estimateHours?: number | null;
@@ -332,6 +333,18 @@ type TaskCommentRecord = {
332
333
  createdAt: string;
333
334
  updatedAt: string | null;
334
335
  };
336
+ type TaskActivityRecord = {
337
+ id: number;
338
+ taskId: number;
339
+ actorCollaboratorId: number | null;
340
+ actorName: string | null;
341
+ actorUserPhotoId: number | null;
342
+ actorPersonAvatarId: number | null;
343
+ action: TaskActivityAction;
344
+ fromStatus: (typeof TASK_STATUS_VALUES)[number] | null;
345
+ toStatus: (typeof TASK_STATUS_VALUES)[number] | null;
346
+ createdAt: string;
347
+ };
335
348
  type QuickTimesheetEntryPayload = {
336
349
  projectId?: number | null;
337
350
  projectAssignmentId?: number | null;
@@ -340,7 +353,7 @@ type QuickTimesheetEntryPayload = {
340
353
  activityLabel?: string | null;
341
354
  workDate: string;
342
355
  duration: number;
343
- unit?: 'hours' | 'minutes';
356
+ unit?: "hours" | "minutes";
344
357
  description?: string | null;
345
358
  };
346
359
  type TimesheetPayload = {
@@ -352,14 +365,14 @@ type TimesheetPayload = {
352
365
  };
353
366
  type TimeOffPayload = {
354
367
  collaboratorId?: number | null;
355
- requestType?: 'vacation' | 'personal_time' | 'sick_leave' | 'unpaid_leave' | 'other';
368
+ requestType?: "vacation" | "personal_time" | "sick_leave" | "unpaid_leave" | "other";
356
369
  startDate: string;
357
370
  endDate: string;
358
371
  totalDays?: number | null;
359
372
  reason?: string | null;
360
373
  };
361
374
  type ScheduleAdjustmentDayPayload = {
362
- weekday: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
375
+ weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
363
376
  isWorkingDay?: boolean;
364
377
  startTime?: string | null;
365
378
  endTime?: string | null;
@@ -367,7 +380,7 @@ type ScheduleAdjustmentDayPayload = {
367
380
  };
368
381
  type ScheduleAdjustmentPayload = {
369
382
  collaboratorId?: number | null;
370
- requestScope?: 'temporary' | 'permanent';
383
+ requestScope?: "temporary" | "permanent";
371
384
  effectiveStartDate: string;
372
385
  effectiveEndDate?: string | null;
373
386
  reason?: string | null;
@@ -542,6 +555,48 @@ export declare class OperationsService {
542
555
  scheduleAdjustmentRequests: number;
543
556
  pendingApprovals: number;
544
557
  };
558
+ windowDays: number;
559
+ taskSummary: {
560
+ total: number;
561
+ backlog: number;
562
+ inProgress: number;
563
+ completed: number;
564
+ };
565
+ avgTaskCompletionHours: number;
566
+ completedTasksInWindow: number;
567
+ hoursInExecution: number;
568
+ timesheetHeatmap: {
569
+ workDate: string;
570
+ weekday: number;
571
+ hours: number;
572
+ }[];
573
+ activeProjects: {
574
+ id: number;
575
+ name: string;
576
+ code: string;
577
+ taskBacklog: number;
578
+ taskInProgress: number;
579
+ taskCompleted: number;
580
+ }[];
581
+ recentTaskActivities: {
582
+ taskId: number;
583
+ taskName: string;
584
+ taskStatus: string;
585
+ taskPriority: string | null;
586
+ taskDueDate: string | null;
587
+ taskEstimateHours: number | null;
588
+ taskTags: string | null;
589
+ taskAssigneeCollaboratorId: number | null;
590
+ taskAssigneeName: string | null;
591
+ projectId: number;
592
+ projectName: string;
593
+ projectCode: string | null;
594
+ projectAssignmentId: number | null;
595
+ action: string | null;
596
+ fromStatus: string;
597
+ toStatus: string;
598
+ createdAt: string;
599
+ }[];
545
600
  recentTimesheets: {
546
601
  id: number;
547
602
  collaboratorName: string;
@@ -562,14 +617,14 @@ export declare class OperationsService {
562
617
  collaboratorTypeId?: number;
563
618
  departmentId?: number;
564
619
  jobTitleId?: number;
565
- }): Promise<Record<string, unknown>[] | {
620
+ }): Promise<any[] | {
566
621
  total: number;
567
622
  lastPage: number;
568
623
  page: number;
569
624
  pageSize: number;
570
625
  prev: number;
571
626
  next: number;
572
- data: Record<string, unknown>[];
627
+ data: any[];
573
628
  }>;
574
629
  getCollaboratorStats(userId: number, filters?: {
575
630
  search?: string;
@@ -578,118 +633,9 @@ export declare class OperationsService {
578
633
  collaboratorTypeId?: number;
579
634
  departmentId?: number;
580
635
  jobTitleId?: number;
581
- }): Promise<{
582
- total: number;
583
- active: number;
584
- onLeave: number;
585
- withContracts: number;
586
- totalSalary: number;
587
- totalCosts: number;
588
- avgSalaryPlusCosts: number;
589
- avgSalaryPlusCostsPerCollaborator: number;
590
- }>;
591
- getMyCollaborator(userId: number): Promise<{
592
- assignedProjects: Record<string, unknown>[];
593
- relatedContracts: Record<string, unknown>[];
594
- weeklySchedule: Record<string, unknown>[];
595
- equityParticipation: {
596
- participationType: string;
597
- percentage: number | null;
598
- votingPower: number | null;
599
- startDate: string | null;
600
- endDate: string | null;
601
- notes: string | null;
602
- };
603
- timesheetSummary: {
604
- totalTimesheets: number;
605
- pendingTimesheets: number;
606
- totalHours: number;
607
- };
608
- timeOffSummary: {
609
- totalRequests: number;
610
- pendingRequests: number;
611
- approvedRequests: number;
612
- };
613
- scheduleAdjustmentRequests: Record<string, unknown>[];
614
- id: number;
615
- userId: number | null;
616
- personId: number | null;
617
- personName: string | null;
618
- personAvatarId: number | null;
619
- code: string;
620
- collaboratorTypeId: number | null;
621
- collaboratorTypeSlug: string | null;
622
- collaboratorType: string | null;
623
- displayName: string;
624
- departmentId: number | null;
625
- department: string | null;
626
- jobTitleId: number | null;
627
- title: string | null;
628
- levelLabel: string | null;
629
- weeklyCapacityHours: number | null;
630
- hourlyRate: number | null;
631
- status: string;
632
- joinedAt: string | null;
633
- leftAt: string | null;
634
- notes: string | null;
635
- supervisorId: number | null;
636
- supervisorName: string | null;
637
- contractId: number | null;
638
- contractStatus: string | null;
639
- compensationAmount: number | null;
640
- activeAssignments: number;
641
- }>;
642
- getCollaboratorByIdForUser(userId: number, collaboratorId: number): Promise<{
643
- assignedProjects: Record<string, unknown>[];
644
- relatedContracts: Record<string, unknown>[];
645
- weeklySchedule: Record<string, unknown>[];
646
- equityParticipation: {
647
- participationType: string;
648
- percentage: number | null;
649
- votingPower: number | null;
650
- startDate: string | null;
651
- endDate: string | null;
652
- notes: string | null;
653
- };
654
- timesheetSummary: {
655
- totalTimesheets: number;
656
- pendingTimesheets: number;
657
- totalHours: number;
658
- };
659
- timeOffSummary: {
660
- totalRequests: number;
661
- pendingRequests: number;
662
- approvedRequests: number;
663
- };
664
- scheduleAdjustmentRequests: Record<string, unknown>[];
665
- id: number;
666
- userId: number | null;
667
- personId: number | null;
668
- personName: string | null;
669
- personAvatarId: number | null;
670
- code: string;
671
- collaboratorTypeId: number | null;
672
- collaboratorTypeSlug: string | null;
673
- collaboratorType: string | null;
674
- displayName: string;
675
- departmentId: number | null;
676
- department: string | null;
677
- jobTitleId: number | null;
678
- title: string | null;
679
- levelLabel: string | null;
680
- weeklyCapacityHours: number | null;
681
- hourlyRate: number | null;
682
- status: string;
683
- joinedAt: string | null;
684
- leftAt: string | null;
685
- notes: string | null;
686
- supervisorId: number | null;
687
- supervisorName: string | null;
688
- contractId: number | null;
689
- contractStatus: string | null;
690
- compensationAmount: number | null;
691
- activeAssignments: number;
692
- }>;
636
+ }): Promise<any>;
637
+ getMyCollaborator(userId: number): Promise<any>;
638
+ getCollaboratorByIdForUser(userId: number, collaboratorId: number): Promise<any>;
693
639
  getTeam(userId: number): Promise<{
694
640
  teamMembers: Record<string, unknown>[];
695
641
  projectCount: number;
@@ -704,108 +650,8 @@ export declare class OperationsService {
704
650
  pendingTimeOffRequests: Record<string, unknown>[];
705
651
  pendingScheduleAdjustmentRequests: Record<string, unknown>[];
706
652
  }>;
707
- createCollaborator(userId: number, data: CollaboratorPayload): Promise<{
708
- assignedProjects: Record<string, unknown>[];
709
- relatedContracts: Record<string, unknown>[];
710
- weeklySchedule: Record<string, unknown>[];
711
- equityParticipation: {
712
- participationType: string;
713
- percentage: number | null;
714
- votingPower: number | null;
715
- startDate: string | null;
716
- endDate: string | null;
717
- notes: string | null;
718
- };
719
- timesheetSummary: {
720
- totalTimesheets: number;
721
- pendingTimesheets: number;
722
- totalHours: number;
723
- };
724
- timeOffSummary: {
725
- totalRequests: number;
726
- pendingRequests: number;
727
- approvedRequests: number;
728
- };
729
- scheduleAdjustmentRequests: Record<string, unknown>[];
730
- id: number;
731
- userId: number | null;
732
- personId: number | null;
733
- personName: string | null;
734
- personAvatarId: number | null;
735
- code: string;
736
- collaboratorTypeId: number | null;
737
- collaboratorTypeSlug: string | null;
738
- collaboratorType: string | null;
739
- displayName: string;
740
- departmentId: number | null;
741
- department: string | null;
742
- jobTitleId: number | null;
743
- title: string | null;
744
- levelLabel: string | null;
745
- weeklyCapacityHours: number | null;
746
- hourlyRate: number | null;
747
- status: string;
748
- joinedAt: string | null;
749
- leftAt: string | null;
750
- notes: string | null;
751
- supervisorId: number | null;
752
- supervisorName: string | null;
753
- contractId: number | null;
754
- contractStatus: string | null;
755
- compensationAmount: number | null;
756
- activeAssignments: number;
757
- }>;
758
- updateCollaborator(userId: number, collaboratorId: number, data: Partial<CollaboratorPayload>): Promise<{
759
- assignedProjects: Record<string, unknown>[];
760
- relatedContracts: Record<string, unknown>[];
761
- weeklySchedule: Record<string, unknown>[];
762
- equityParticipation: {
763
- participationType: string;
764
- percentage: number | null;
765
- votingPower: number | null;
766
- startDate: string | null;
767
- endDate: string | null;
768
- notes: string | null;
769
- };
770
- timesheetSummary: {
771
- totalTimesheets: number;
772
- pendingTimesheets: number;
773
- totalHours: number;
774
- };
775
- timeOffSummary: {
776
- totalRequests: number;
777
- pendingRequests: number;
778
- approvedRequests: number;
779
- };
780
- scheduleAdjustmentRequests: Record<string, unknown>[];
781
- id: number;
782
- userId: number | null;
783
- personId: number | null;
784
- personName: string | null;
785
- personAvatarId: number | null;
786
- code: string;
787
- collaboratorTypeId: number | null;
788
- collaboratorTypeSlug: string | null;
789
- collaboratorType: string | null;
790
- displayName: string;
791
- departmentId: number | null;
792
- department: string | null;
793
- jobTitleId: number | null;
794
- title: string | null;
795
- levelLabel: string | null;
796
- weeklyCapacityHours: number | null;
797
- hourlyRate: number | null;
798
- status: string;
799
- joinedAt: string | null;
800
- leftAt: string | null;
801
- notes: string | null;
802
- supervisorId: number | null;
803
- supervisorName: string | null;
804
- contractId: number | null;
805
- contractStatus: string | null;
806
- compensationAmount: number | null;
807
- activeAssignments: number;
808
- }>;
653
+ createCollaborator(userId: number, data: CollaboratorPayload): Promise<any>;
654
+ updateCollaborator(userId: number, collaboratorId: number, data: Partial<CollaboratorPayload>): Promise<any>;
809
655
  updateCollaboratorProjectAssignment(collaboratorId: number, projectId: number, data: {
810
656
  projectRoleId?: number | null;
811
657
  roleLabel?: string | null;
@@ -966,6 +812,8 @@ export declare class OperationsService {
966
812
  assigneePersonAvatarId: number | null;
967
813
  commentCount: number;
968
814
  fileCount: number;
815
+ doingStartedAt: string | null;
816
+ totalDoingMinutes: number;
969
817
  createdAt: string;
970
818
  deletedAt: string | null;
971
819
  }[];
@@ -987,6 +835,9 @@ export declare class OperationsService {
987
835
  projectAssignmentId: number | null;
988
836
  projectId: number | null;
989
837
  commentCount: number;
838
+ fileCount: number;
839
+ doingStartedAt: string | null;
840
+ totalDoingMinutes: number;
990
841
  createdAt: string;
991
842
  deletedAt: string | null;
992
843
  }>;
@@ -1007,6 +858,9 @@ export declare class OperationsService {
1007
858
  projectAssignmentId: number | null;
1008
859
  projectId: number | null;
1009
860
  commentCount: number;
861
+ fileCount: number;
862
+ doingStartedAt: string | null;
863
+ totalDoingMinutes: number;
1010
864
  createdAt: string;
1011
865
  deletedAt: string | null;
1012
866
  }>;
@@ -1022,13 +876,13 @@ export declare class OperationsService {
1022
876
  created_at: Date;
1023
877
  }[]>;
1024
878
  addTaskFile(userId: number, taskId: number, file: MulterFile): Promise<{
1025
- created_at: Date;
1026
- id: number;
1027
- updated_at: Date;
1028
879
  filename: string;
1029
- path: string;
1030
880
  location: string;
881
+ id: number;
882
+ path: string;
1031
883
  size: number;
884
+ created_at: Date;
885
+ updated_at: Date;
1032
886
  provider_id: number;
1033
887
  mimetype_id: number;
1034
888
  }>;
@@ -1036,6 +890,7 @@ export declare class OperationsService {
1036
890
  success: boolean;
1037
891
  }>;
1038
892
  listTaskComments(userId: number, taskId: number): Promise<TaskCommentRecord[]>;
893
+ listTaskActivities(userId: number, taskId: number): Promise<TaskActivityRecord[]>;
1039
894
  addTaskComment(userId: number, taskId: number, content: string): Promise<TaskCommentRecord>;
1040
895
  updateTaskComment(userId: number, taskId: number, commentId: number, content: string): Promise<TaskCommentRecord>;
1041
896
  removeTaskComment(userId: number, taskId: number, commentId: number): Promise<{
@@ -1179,6 +1034,31 @@ export declare class OperationsService {
1179
1034
  myRoleLabel: string | null;
1180
1035
  teamSize: number;
1181
1036
  }>;
1037
+ deleteProject(userId: number, projectId: number): Promise<{
1038
+ success: boolean;
1039
+ }>;
1040
+ listProjectFiles(userId: number, projectId: number): Promise<{
1041
+ id: number;
1042
+ file_id: number;
1043
+ filename: string;
1044
+ size: number;
1045
+ mimetype: string;
1046
+ created_at: Date;
1047
+ }[]>;
1048
+ addProjectFile(userId: number, projectId: number, file: MulterFile): Promise<{
1049
+ filename: string;
1050
+ location: string;
1051
+ id: number;
1052
+ path: string;
1053
+ size: number;
1054
+ created_at: Date;
1055
+ updated_at: Date;
1056
+ provider_id: number;
1057
+ mimetype_id: number;
1058
+ }>;
1059
+ removeProjectFile(userId: number, projectId: number, fileRelationId: number): Promise<{
1060
+ success: boolean;
1061
+ }>;
1182
1062
  createProject(userId: number, data: ProjectPayload): Promise<{
1183
1063
  assignments: {
1184
1064
  id: number;
@@ -1331,6 +1211,14 @@ export declare class OperationsService {
1331
1211
  dateTo?: string;
1332
1212
  collaboratorId?: number;
1333
1213
  }): Promise<{
1214
+ total: number;
1215
+ lastPage: number;
1216
+ page: number;
1217
+ pageSize: number;
1218
+ prev: number;
1219
+ next: number;
1220
+ data: any[];
1221
+ } | {
1334
1222
  id: number;
1335
1223
  collaboratorId: number;
1336
1224
  collaboratorName: string;
@@ -1345,15 +1233,7 @@ export declare class OperationsService {
1345
1233
  notes: string | null;
1346
1234
  decisionNote: string | null;
1347
1235
  approvalId: number | null;
1348
- }[] | {
1349
- total: number;
1350
- lastPage: number;
1351
- page: number;
1352
- pageSize: number;
1353
- prev: number;
1354
- next: number;
1355
- data: any[];
1356
- }>;
1236
+ }[]>;
1357
1237
  createTimesheet(userId: number, data: TimesheetPayload): Promise<any>;
1358
1238
  updateTimesheet(userId: number, timesheetId: number, data: Partial<TimesheetPayload>): Promise<any>;
1359
1239
  submitTimesheet(userId: number, timesheetId: number): Promise<any>;
@@ -1587,6 +1467,7 @@ export declare class OperationsService {
1587
1467
  private resolveProjectAssignmentForActor;
1588
1468
  private getOwnedTaskRecord;
1589
1469
  private getTaskRecordForActor;
1470
+ private logTaskActivity;
1590
1471
  listProjectBoardTasks(userId: number, projectId: number): Promise<{
1591
1472
  id: number;
1592
1473
  name: string;
@@ -1603,6 +1484,9 @@ export declare class OperationsService {
1603
1484
  assigneePersonAvatarId: number | null;
1604
1485
  projectAssignmentId: number | null;
1605
1486
  commentCount: number;
1487
+ fileCount: number;
1488
+ doingStartedAt: string | null;
1489
+ totalDoingMinutes: number;
1606
1490
  createdAt: string;
1607
1491
  }[]>;
1608
1492
  private getProjectBoardTask;
@@ -1616,6 +1500,34 @@ export declare class OperationsService {
1616
1500
  private upsertApproval;
1617
1501
  private applyApprovedScheduleAdjustmentIfNeeded;
1618
1502
  private insertApprovalHistory;
1503
+ /**
1504
+ * Determines if monetary fields should be hidden from a collaborator.
1505
+ * Rules:
1506
+ * - Director/Supervisor: Always see monetary fields
1507
+ * - Collaborator: Only see their own monetary fields, not others'
1508
+ *
1509
+ * @param actor The current user's access context
1510
+ * @param targetCollaboratorId The collaborator whose data is being viewed
1511
+ * @returns true if monetary fields should be hidden
1512
+ */
1513
+ private shouldHideMonetaryFieldsForCollaborator;
1514
+ /**
1515
+ * Sanitizes a single collaborator list row by hiding monetary fields when appropriate.
1516
+ * Removes: compensationAmount if user shouldn't see it
1517
+ */
1518
+ private sanitizeCollaboratorListRow;
1519
+ /**
1520
+ * Sanitizes collaborator statistics by hiding aggregate monetary fields when appropriate.
1521
+ * Removes: totalSalary, totalCosts, avgSalaryPlusCosts, avgSalaryPlusCostsPerCollaborator
1522
+ * if user is a regular collaborator (not director/supervisor)
1523
+ */
1524
+ private sanitizeCollaboratorStats;
1525
+ /**
1526
+ * Sanitizes detailed collaborator data by hiding monetary fields when appropriate.
1527
+ * Removes: compensationAmount from main object and budgetAmount from relatedContracts
1528
+ * if user is a regular collaborator (not director/supervisor) viewing another collaborator
1529
+ */
1530
+ private sanitizeCollaboratorDetails;
1619
1531
  private assertProjectAccess;
1620
1532
  private ensureCollaboratorAccess;
1621
1533
  private listSingleTimesheet;
@@ -1756,6 +1668,8 @@ export declare class OperationsService {
1756
1668
  assigneeUserPhotoId: number | null;
1757
1669
  assigneePersonAvatarId: number | null;
1758
1670
  commentCount: number;
1671
+ doingStartedAt: string | null;
1672
+ totalDoingMinutes: number;
1759
1673
  createdAt: string;
1760
1674
  deletedAt: string | null;
1761
1675
  }[];
@@ -1937,7 +1851,7 @@ export declare class OperationsService {
1937
1851
  consumedHoursCost: number;
1938
1852
  idlenessRate: number;
1939
1853
  idlenessCost: number;
1940
- risk: string;
1854
+ risk: "alto" | "médio" | "baixo";
1941
1855
  recommendation: string;
1942
1856
  }[];
1943
1857
  }>;