@hed-hog/operations 0.0.330 → 0.0.332

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/README.md +5 -5
  2. package/dist/controllers/operations-collaborators.controller.d.ts +58 -213
  3. package/dist/controllers/operations-collaborators.controller.d.ts.map +1 -1
  4. package/dist/controllers/operations-collaborators.controller.js +100 -0
  5. package/dist/controllers/operations-collaborators.controller.js.map +1 -1
  6. package/dist/controllers/operations-contracts.controller.d.ts +6 -6
  7. package/dist/controllers/operations-projects.controller.d.ts +25 -0
  8. package/dist/controllers/operations-projects.controller.d.ts.map +1 -1
  9. package/dist/controllers/operations-projects.controller.js +48 -0
  10. package/dist/controllers/operations-projects.controller.js.map +1 -1
  11. package/dist/controllers/operations-reports.controller.d.ts +1 -1
  12. package/dist/controllers/operations-tasks.controller.d.ts +34 -9
  13. package/dist/controllers/operations-tasks.controller.d.ts.map +1 -1
  14. package/dist/controllers/operations-tasks.controller.js +43 -32
  15. package/dist/controllers/operations-tasks.controller.js.map +1 -1
  16. package/dist/controllers/operations-timesheets.controller.d.ts +9 -9
  17. package/dist/dashboard/components/DashboardLayout.d.ts +30 -0
  18. package/dist/dashboard/components/DashboardLayout.d.ts.map +1 -0
  19. package/dist/dashboard/components/DashboardLayout.js +87 -0
  20. package/dist/dashboard/components/DashboardLayout.js.map +1 -0
  21. package/dist/dashboard/components/widget-registry.d.ts +23 -0
  22. package/dist/dashboard/components/widget-registry.d.ts.map +1 -0
  23. package/dist/dashboard/components/widget-registry.js +245 -0
  24. package/dist/dashboard/components/widget-registry.js.map +1 -0
  25. package/dist/dashboard/hooks/useDashboardData.d.ts +20 -0
  26. package/dist/dashboard/hooks/useDashboardData.d.ts.map +1 -0
  27. package/dist/dashboard/hooks/useDashboardData.js +24 -0
  28. package/dist/dashboard/hooks/useDashboardData.js.map +1 -0
  29. package/dist/dashboard/types/widgets.types.d.ts +233 -0
  30. package/dist/dashboard/types/widgets.types.d.ts.map +1 -0
  31. package/dist/dashboard/types/widgets.types.js +6 -0
  32. package/dist/dashboard/types/widgets.types.js.map +1 -0
  33. package/dist/dashboard/widgets/CapacityDistribution.d.ts +23 -0
  34. package/dist/dashboard/widgets/CapacityDistribution.d.ts.map +1 -0
  35. package/dist/dashboard/widgets/CapacityDistribution.js +11 -0
  36. package/dist/dashboard/widgets/CapacityDistribution.js.map +1 -0
  37. package/dist/dashboard/widgets/EffortByProject.d.ts +22 -0
  38. package/dist/dashboard/widgets/EffortByProject.d.ts.map +1 -0
  39. package/dist/dashboard/widgets/EffortByProject.js +11 -0
  40. package/dist/dashboard/widgets/EffortByProject.js.map +1 -0
  41. package/dist/dashboard/widgets/HeadcountByArea.d.ts +24 -0
  42. package/dist/dashboard/widgets/HeadcountByArea.d.ts.map +1 -0
  43. package/dist/dashboard/widgets/HeadcountByArea.js +11 -0
  44. package/dist/dashboard/widgets/HeadcountByArea.js.map +1 -0
  45. package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts +18 -0
  46. package/dist/dashboard/widgets/ManagedProjectsStatus.d.ts.map +1 -0
  47. package/dist/dashboard/widgets/ManagedProjectsStatus.js +12 -0
  48. package/dist/dashboard/widgets/ManagedProjectsStatus.js.map +1 -0
  49. package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts +22 -0
  50. package/dist/dashboard/widgets/MyHoursPeriodKpi.d.ts.map +1 -0
  51. package/dist/dashboard/widgets/MyHoursPeriodKpi.js +12 -0
  52. package/dist/dashboard/widgets/MyHoursPeriodKpi.js.map +1 -0
  53. package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts +19 -0
  54. package/dist/dashboard/widgets/MyOpenRequestsKpi.d.ts.map +1 -0
  55. package/dist/dashboard/widgets/MyOpenRequestsKpi.js +17 -0
  56. package/dist/dashboard/widgets/MyOpenRequestsKpi.js.map +1 -0
  57. package/dist/dashboard/widgets/MyPendingRequestsList.d.ts +23 -0
  58. package/dist/dashboard/widgets/MyPendingRequestsList.d.ts.map +1 -0
  59. package/dist/dashboard/widgets/MyPendingRequestsList.js +14 -0
  60. package/dist/dashboard/widgets/MyPendingRequestsList.js.map +1 -0
  61. package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts +22 -0
  62. package/dist/dashboard/widgets/MyProjectAllocationsKpi.d.ts.map +1 -0
  63. package/dist/dashboard/widgets/MyProjectAllocationsKpi.js +11 -0
  64. package/dist/dashboard/widgets/MyProjectAllocationsKpi.js.map +1 -0
  65. package/dist/dashboard/widgets/MyQuickActions.d.ts +23 -0
  66. package/dist/dashboard/widgets/MyQuickActions.d.ts.map +1 -0
  67. package/dist/dashboard/widgets/MyQuickActions.js +18 -0
  68. package/dist/dashboard/widgets/MyQuickActions.js.map +1 -0
  69. package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts +23 -0
  70. package/dist/dashboard/widgets/MyRelevantDeadlines.d.ts.map +1 -0
  71. package/dist/dashboard/widgets/MyRelevantDeadlines.js +22 -0
  72. package/dist/dashboard/widgets/MyRelevantDeadlines.js.map +1 -0
  73. package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts +17 -0
  74. package/dist/dashboard/widgets/MyTimesheetStatusKpi.d.ts.map +1 -0
  75. package/dist/dashboard/widgets/MyTimesheetStatusKpi.js +11 -0
  76. package/dist/dashboard/widgets/MyTimesheetStatusKpi.js.map +1 -0
  77. package/dist/dashboard/widgets/MyWeeklyJourney.d.ts +21 -0
  78. package/dist/dashboard/widgets/MyWeeklyJourney.d.ts.map +1 -0
  79. package/dist/dashboard/widgets/MyWeeklyJourney.js +19 -0
  80. package/dist/dashboard/widgets/MyWeeklyJourney.js.map +1 -0
  81. package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts +19 -0
  82. package/dist/dashboard/widgets/PortfolioCostsKpi.d.ts.map +1 -0
  83. package/dist/dashboard/widgets/PortfolioCostsKpi.js +12 -0
  84. package/dist/dashboard/widgets/PortfolioCostsKpi.js.map +1 -0
  85. package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts +18 -0
  86. package/dist/dashboard/widgets/PortfolioEffortKpi.d.ts.map +1 -0
  87. package/dist/dashboard/widgets/PortfolioEffortKpi.js +8 -0
  88. package/dist/dashboard/widgets/PortfolioEffortKpi.js.map +1 -0
  89. package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts +22 -0
  90. package/dist/dashboard/widgets/PortfolioProjectsKpi.d.ts.map +1 -0
  91. package/dist/dashboard/widgets/PortfolioProjectsKpi.js +56 -0
  92. package/dist/dashboard/widgets/PortfolioProjectsKpi.js.map +1 -0
  93. package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts +19 -0
  94. package/dist/dashboard/widgets/PortfolioRiskKpi.d.ts.map +1 -0
  95. package/dist/dashboard/widgets/PortfolioRiskKpi.js +11 -0
  96. package/dist/dashboard/widgets/PortfolioRiskKpi.js.map +1 -0
  97. package/dist/dashboard/widgets/ProjectStatusOverview.d.ts +19 -0
  98. package/dist/dashboard/widgets/ProjectStatusOverview.d.ts.map +1 -0
  99. package/dist/dashboard/widgets/ProjectStatusOverview.js +18 -0
  100. package/dist/dashboard/widgets/ProjectStatusOverview.js.map +1 -0
  101. package/dist/dashboard/widgets/StrategicDeadlines.d.ts +24 -0
  102. package/dist/dashboard/widgets/StrategicDeadlines.d.ts.map +1 -0
  103. package/dist/dashboard/widgets/StrategicDeadlines.js +22 -0
  104. package/dist/dashboard/widgets/StrategicDeadlines.js.map +1 -0
  105. package/dist/dashboard/widgets/TeamApprovalQueue.d.ts +24 -0
  106. package/dist/dashboard/widgets/TeamApprovalQueue.d.ts.map +1 -0
  107. package/dist/dashboard/widgets/TeamApprovalQueue.js +12 -0
  108. package/dist/dashboard/widgets/TeamApprovalQueue.js.map +1 -0
  109. package/dist/dashboard/widgets/TeamCapacityKpi.d.ts +18 -0
  110. package/dist/dashboard/widgets/TeamCapacityKpi.d.ts.map +1 -0
  111. package/dist/dashboard/widgets/TeamCapacityKpi.js +19 -0
  112. package/dist/dashboard/widgets/TeamCapacityKpi.js.map +1 -0
  113. package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts +22 -0
  114. package/dist/dashboard/widgets/TeamHeadcountKpi.d.ts.map +1 -0
  115. package/dist/dashboard/widgets/TeamHeadcountKpi.js +56 -0
  116. package/dist/dashboard/widgets/TeamHeadcountKpi.js.map +1 -0
  117. package/dist/dashboard/widgets/TeamHoursKpi.d.ts +19 -0
  118. package/dist/dashboard/widgets/TeamHoursKpi.d.ts.map +1 -0
  119. package/dist/dashboard/widgets/TeamHoursKpi.js +13 -0
  120. package/dist/dashboard/widgets/TeamHoursKpi.js.map +1 -0
  121. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts +20 -0
  122. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.d.ts.map +1 -0
  123. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js +11 -0
  124. package/dist/dashboard/widgets/TeamPendingApprovalsKpi.js.map +1 -0
  125. package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts +18 -0
  126. package/dist/dashboard/widgets/TeamUtilizationOverview.d.ts.map +1 -0
  127. package/dist/dashboard/widgets/TeamUtilizationOverview.js +17 -0
  128. package/dist/dashboard/widgets/TeamUtilizationOverview.js.map +1 -0
  129. package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts +24 -0
  130. package/dist/dashboard/widgets/TeamWorkloadAlerts.d.ts.map +1 -0
  131. package/dist/dashboard/widgets/TeamWorkloadAlerts.js +19 -0
  132. package/dist/dashboard/widgets/TeamWorkloadAlerts.js.map +1 -0
  133. package/dist/dashboard/widgets/index.d.ts +24 -0
  134. package/dist/dashboard/widgets/index.d.ts.map +1 -0
  135. package/dist/dashboard/widgets/index.js +54 -0
  136. package/dist/dashboard/widgets/index.js.map +1 -0
  137. package/dist/dto/create-collaborator-invoice.dto.d.ts +11 -0
  138. package/dist/dto/create-collaborator-invoice.dto.d.ts.map +1 -0
  139. package/dist/dto/create-collaborator-invoice.dto.js +55 -0
  140. package/dist/dto/create-collaborator-invoice.dto.js.map +1 -0
  141. package/dist/dto/create-collaborator-payment.dto.d.ts +10 -0
  142. package/dist/dto/create-collaborator-payment.dto.d.ts.map +1 -0
  143. package/dist/dto/create-collaborator-payment.dto.js +50 -0
  144. package/dist/dto/create-collaborator-payment.dto.js.map +1 -0
  145. package/dist/dto/create-collaborator.dto.d.ts +0 -1
  146. package/dist/dto/create-collaborator.dto.d.ts.map +1 -1
  147. package/dist/dto/create-collaborator.dto.js +0 -6
  148. package/dist/dto/create-collaborator.dto.js.map +1 -1
  149. package/dist/dto/list-collaborator-invoice.dto.d.ts +4 -0
  150. package/dist/dto/list-collaborator-invoice.dto.d.ts.map +1 -0
  151. package/dist/dto/list-collaborator-invoice.dto.js +8 -0
  152. package/dist/dto/list-collaborator-invoice.dto.js.map +1 -0
  153. package/dist/dto/list-collaborator-payment.dto.d.ts +4 -0
  154. package/dist/dto/list-collaborator-payment.dto.d.ts.map +1 -0
  155. package/dist/dto/list-collaborator-payment.dto.js +8 -0
  156. package/dist/dto/list-collaborator-payment.dto.js.map +1 -0
  157. package/dist/dto/update-collaborator-invoice.dto.d.ts +6 -0
  158. package/dist/dto/update-collaborator-invoice.dto.d.ts.map +1 -0
  159. package/dist/dto/update-collaborator-invoice.dto.js +9 -0
  160. package/dist/dto/update-collaborator-invoice.dto.js.map +1 -0
  161. package/dist/dto/update-collaborator-payment.dto.d.ts +6 -0
  162. package/dist/dto/update-collaborator-payment.dto.d.ts.map +1 -0
  163. package/dist/dto/update-collaborator-payment.dto.js +9 -0
  164. package/dist/dto/update-collaborator-payment.dto.js.map +1 -0
  165. package/dist/index.d.ts +2 -0
  166. package/dist/index.d.ts.map +1 -1
  167. package/dist/index.js +2 -0
  168. package/dist/index.js.map +1 -1
  169. package/dist/operations.controller.d.ts +42 -0
  170. package/dist/operations.controller.d.ts.map +1 -1
  171. package/dist/operations.service.d.ts +258 -268
  172. package/dist/operations.service.d.ts.map +1 -1
  173. package/dist/operations.service.js +2381 -1341
  174. package/dist/operations.service.js.map +1 -1
  175. package/dist/operations.service.spec.js +345 -174
  176. package/dist/operations.service.spec.js.map +1 -1
  177. package/hedhog/data/dashboard_component.yaml +66 -0
  178. package/hedhog/data/dashboard_item.yaml +25 -25
  179. package/hedhog/data/menu.yaml +27 -8
  180. package/hedhog/data/route.yaml +133 -0
  181. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +78 -102
  182. package/hedhog/frontend/app/_components/collaborator-invoices-tab.tsx.ejs +443 -0
  183. package/hedhog/frontend/app/_components/collaborator-payment-history-tab.tsx.ejs +429 -0
  184. package/hedhog/frontend/app/_components/collaborator-picker.tsx.ejs +158 -0
  185. package/hedhog/frontend/app/_components/my-project-summary-screen.tsx.ejs +247 -50
  186. package/hedhog/frontend/app/_components/project-assignments-tab.tsx.ejs +643 -450
  187. package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +992 -431
  188. package/hedhog/frontend/app/_components/project-file-attachments.tsx.ejs +371 -0
  189. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +558 -386
  190. package/hedhog/frontend/app/_components/task-detail-sheet.tsx.ejs +383 -157
  191. package/hedhog/frontend/app/_components/task-file-attachments.tsx.ejs +4 -1
  192. package/hedhog/frontend/app/_components/task-form-fields.tsx.ejs +406 -0
  193. package/hedhog/frontend/app/_components/task-form-sheet.tsx.ejs +629 -784
  194. package/hedhog/frontend/app/_components/task-info-display.tsx.ejs +137 -0
  195. package/hedhog/frontend/app/_components/timesheet-entry-create-sheet.tsx.ejs +306 -0
  196. package/hedhog/frontend/app/_lib/api.ts.ejs +155 -0
  197. package/hedhog/frontend/app/_lib/types.ts.ejs +62 -0
  198. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +0 -2
  199. package/hedhog/frontend/app/_lib/utils/task-ui.ts.ejs +61 -0
  200. package/hedhog/frontend/app/approvals/page.tsx.ejs +6 -1
  201. package/hedhog/frontend/app/collaborator-types/page.tsx.ejs +6 -1
  202. package/hedhog/frontend/app/collaborators/page.tsx.ejs +59 -8
  203. package/hedhog/frontend/app/contracts/page.tsx.ejs +29 -8
  204. package/hedhog/frontend/app/dashboard/widgets/CapacityDistribution.tsx.ejs +84 -0
  205. package/hedhog/frontend/app/dashboard/widgets/EffortByProject.tsx.ejs +85 -0
  206. package/hedhog/frontend/app/dashboard/widgets/HeadcountByArea.tsx.ejs +101 -0
  207. package/hedhog/frontend/app/dashboard/widgets/ManagedProjectsStatus.tsx.ejs +113 -0
  208. package/hedhog/frontend/app/dashboard/widgets/MyHoursPeriodKpi.tsx.ejs +87 -0
  209. package/hedhog/frontend/app/dashboard/widgets/MyOpenRequestsKpi.tsx.ejs +97 -0
  210. package/hedhog/frontend/app/dashboard/widgets/MyPendingRequestsList.tsx.ejs +99 -0
  211. package/hedhog/frontend/app/dashboard/widgets/MyProjectAllocationsKpi.tsx.ejs +78 -0
  212. package/hedhog/frontend/app/dashboard/widgets/MyQuickActions.tsx.ejs +130 -0
  213. package/hedhog/frontend/app/dashboard/widgets/MyRelevantDeadlines.tsx.ejs +144 -0
  214. package/hedhog/frontend/app/dashboard/widgets/MyTimesheetStatusKpi.tsx.ejs +78 -0
  215. package/hedhog/frontend/app/dashboard/widgets/MyWeeklyJourney.tsx.ejs +99 -0
  216. package/hedhog/frontend/app/dashboard/widgets/PortfolioCostsKpi.tsx.ejs +112 -0
  217. package/hedhog/frontend/app/dashboard/widgets/PortfolioEffortKpi.tsx.ejs +93 -0
  218. package/hedhog/frontend/app/dashboard/widgets/PortfolioProjectsKpi.tsx.ejs +96 -0
  219. package/hedhog/frontend/app/dashboard/widgets/PortfolioRiskKpi.tsx.ejs +115 -0
  220. package/hedhog/frontend/app/dashboard/widgets/ProjectStatusOverview.tsx.ejs +120 -0
  221. package/hedhog/frontend/app/dashboard/widgets/StrategicDeadlines.tsx.ejs +146 -0
  222. package/hedhog/frontend/app/dashboard/widgets/TeamApprovalQueue.tsx.ejs +108 -0
  223. package/hedhog/frontend/app/dashboard/widgets/TeamCapacityKpi.tsx.ejs +97 -0
  224. package/hedhog/frontend/app/dashboard/widgets/TeamHeadcountKpi.tsx.ejs +100 -0
  225. package/hedhog/frontend/app/dashboard/widgets/TeamHoursKpi.tsx.ejs +104 -0
  226. package/hedhog/frontend/app/dashboard/widgets/TeamPendingApprovalsKpi.tsx.ejs +110 -0
  227. package/hedhog/frontend/app/dashboard/widgets/TeamUtilizationOverview.tsx.ejs +115 -0
  228. package/hedhog/frontend/app/dashboard/widgets/TeamWorkloadAlerts.tsx.ejs +117 -0
  229. package/hedhog/frontend/app/dashboard/widgets/index.ts.ejs +26 -0
  230. package/hedhog/frontend/app/departments/page.tsx.ejs +6 -1
  231. package/hedhog/frontend/app/my-projects/page.tsx.ejs +30 -12
  232. package/hedhog/frontend/app/my-tasks/page.tsx.ejs +286 -125
  233. package/hedhog/frontend/app/project-cost-categories/page.tsx.ejs +58 -52
  234. package/hedhog/frontend/app/project-cost-types/page.tsx.ejs +58 -51
  235. package/hedhog/frontend/app/projects/page.tsx.ejs +415 -33
  236. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +6 -1
  237. package/hedhog/frontend/app/tasks-gantt/page.tsx.ejs +953 -0
  238. package/hedhog/frontend/app/time-off/page.tsx.ejs +6 -1
  239. package/hedhog/frontend/app/timesheets/page.tsx.ejs +10 -4
  240. package/hedhog/frontend/messages/en.json +332 -46
  241. package/hedhog/frontend/messages/operations/en.json +61 -52
  242. package/hedhog/frontend/messages/operations/pt.json +59 -43
  243. package/hedhog/frontend/messages/pt.json +332 -46
  244. package/hedhog/frontend/widgets/capacity-distribution.tsx.ejs +17 -0
  245. package/hedhog/frontend/widgets/effort-by-project.tsx.ejs +17 -0
  246. package/hedhog/frontend/widgets/headcount-by-area.tsx.ejs +17 -0
  247. package/hedhog/frontend/widgets/index.ts.ejs +25 -0
  248. package/hedhog/frontend/widgets/managed-projects-status.tsx.ejs +17 -0
  249. package/hedhog/frontend/widgets/my-hours-period-kpi.tsx.ejs +17 -0
  250. package/hedhog/frontend/widgets/my-open-requests-kpi.tsx.ejs +17 -0
  251. package/hedhog/frontend/widgets/my-pending-requests-list.tsx.ejs +17 -0
  252. package/hedhog/frontend/widgets/my-project-allocations-kpi.tsx.ejs +17 -0
  253. package/hedhog/frontend/widgets/my-quick-actions.tsx.ejs +17 -0
  254. package/hedhog/frontend/widgets/my-relevant-deadlines.tsx.ejs +17 -0
  255. package/hedhog/frontend/widgets/my-timesheet-status-kpi.tsx.ejs +17 -0
  256. package/hedhog/frontend/widgets/my-weekly-journey.tsx.ejs +17 -0
  257. package/hedhog/frontend/widgets/portfolio-costs-kpi.tsx.ejs +17 -0
  258. package/hedhog/frontend/widgets/portfolio-effort-kpi.tsx.ejs +17 -0
  259. package/hedhog/frontend/widgets/portfolio-projects-kpi.tsx.ejs +17 -0
  260. package/hedhog/frontend/widgets/portfolio-risk-kpi.tsx.ejs +17 -0
  261. package/hedhog/frontend/widgets/project-status-overview.tsx.ejs +17 -0
  262. package/hedhog/frontend/widgets/shared-operations-widget.tsx.ejs +170 -0
  263. package/hedhog/frontend/widgets/strategic-deadlines.tsx.ejs +17 -0
  264. package/hedhog/frontend/widgets/team-approval-queue.tsx.ejs +17 -0
  265. package/hedhog/frontend/widgets/team-capacity-kpi.tsx.ejs +17 -0
  266. package/hedhog/frontend/widgets/team-headcount-kpi.tsx.ejs +17 -0
  267. package/hedhog/frontend/widgets/team-hours-kpi.tsx.ejs +17 -0
  268. package/hedhog/frontend/widgets/team-pending-approvals-kpi.tsx.ejs +17 -0
  269. package/hedhog/frontend/widgets/team-utilization-overview.tsx.ejs +17 -0
  270. package/hedhog/frontend/widgets/team-workload-alerts.tsx.ejs +17 -0
  271. package/hedhog/table/operations_collaborator.yaml +8 -13
  272. package/hedhog/table/operations_collaborator_invoice.yaml +35 -0
  273. package/hedhog/table/operations_collaborator_payment.yaml +32 -0
  274. package/hedhog/table/operations_project.yaml +1 -1
  275. package/hedhog/table/operations_project_file.yaml +23 -0
  276. package/hedhog/table/operations_task.yaml +76 -69
  277. package/hedhog/table/operations_task_activity.yaml +51 -0
  278. package/package.json +6 -5
  279. package/src/controllers/operations-collaborators.controller.ts +117 -8
  280. package/src/controllers/operations-projects.controller.ts +41 -8
  281. package/src/controllers/operations-tasks.controller.ts +156 -166
  282. package/src/dashboard/README.md +214 -0
  283. package/src/dashboard/components/DashboardLayout.tsx +131 -0
  284. package/src/dashboard/components/widget-registry.ts +255 -0
  285. package/src/dashboard/hooks/useDashboardData.ts +29 -0
  286. package/src/dashboard/types/widgets.types.ts +237 -0
  287. package/src/dashboard/widgets/CapacityDistribution.tsx +56 -0
  288. package/src/dashboard/widgets/EffortByProject.tsx +51 -0
  289. package/src/dashboard/widgets/HeadcountByArea.tsx +57 -0
  290. package/src/dashboard/widgets/ManagedProjectsStatus.tsx +53 -0
  291. package/src/dashboard/widgets/MyHoursPeriodKpi.tsx +87 -0
  292. package/src/dashboard/widgets/MyOpenRequestsKpi.tsx +51 -0
  293. package/src/dashboard/widgets/MyPendingRequestsList.tsx +63 -0
  294. package/src/dashboard/widgets/MyProjectAllocationsKpi.tsx +57 -0
  295. package/src/dashboard/widgets/MyQuickActions.tsx +62 -0
  296. package/src/dashboard/widgets/MyRelevantDeadlines.tsx +84 -0
  297. package/src/dashboard/widgets/MyTimesheetStatusKpi.tsx +65 -0
  298. package/src/dashboard/widgets/MyWeeklyJourney.tsx +57 -0
  299. package/src/dashboard/widgets/PortfolioCostsKpi.tsx +48 -0
  300. package/src/dashboard/widgets/PortfolioEffortKpi.tsx +41 -0
  301. package/src/dashboard/widgets/PortfolioRiskKpi.tsx +50 -0
  302. package/src/dashboard/widgets/ProjectStatusOverview.tsx +52 -0
  303. package/src/dashboard/widgets/StrategicDeadlines.tsx +93 -0
  304. package/src/dashboard/widgets/TeamApprovalQueue.tsx +70 -0
  305. package/src/dashboard/widgets/TeamCapacityKpi.tsx +50 -0
  306. package/src/dashboard/widgets/TeamHoursKpi.tsx +51 -0
  307. package/src/dashboard/widgets/TeamPendingApprovalsKpi.tsx +53 -0
  308. package/src/dashboard/widgets/TeamUtilizationOverview.tsx +62 -0
  309. package/src/dashboard/widgets/TeamWorkloadAlerts.tsx +81 -0
  310. package/src/dashboard/widgets/index.ts +26 -0
  311. package/src/dto/create-collaborator-invoice.dto.ts +39 -0
  312. package/src/dto/create-collaborator-payment.dto.ts +35 -0
  313. package/src/dto/create-collaborator.dto.ts +4 -11
  314. package/src/dto/list-collaborator-invoice.dto.ts +3 -0
  315. package/src/dto/list-collaborator-payment.dto.ts +3 -0
  316. package/src/dto/update-collaborator-invoice.dto.ts +6 -0
  317. package/src/dto/update-collaborator-payment.dto.ts +6 -0
  318. package/src/index.ts +3 -0
  319. package/src/operations.service.spec.ts +988 -764
  320. package/src/operations.service.ts +4689 -2624
@@ -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;
@@ -835,6 +681,82 @@ export declare class OperationsService {
835
681
  amountType: string;
836
682
  createdAt: string;
837
683
  }[]>;
684
+ getCollaboratorPaymentHistory(userId: number, collaboratorId: number): Promise<any>;
685
+ getCollaboratorInvoices(userId: number, collaboratorId: number): Promise<any>;
686
+ createCollaboratorPayment(userId: number, collaboratorId: number, data: {
687
+ amount: number;
688
+ paymentDate: string;
689
+ referenceMonth?: string | null;
690
+ paymentMethod?: string;
691
+ notes?: string | null;
692
+ }): Promise<{
693
+ id: any;
694
+ collaboratorId: any;
695
+ amount: any;
696
+ paymentDate: any;
697
+ referenceMonth: any;
698
+ paymentMethod: any;
699
+ notes: any;
700
+ createdAt: any;
701
+ }>;
702
+ updateCollaboratorPayment(userId: number, collaboratorId: number, paymentId: number, data: Partial<{
703
+ amount: number;
704
+ paymentDate: string;
705
+ referenceMonth: string | null;
706
+ paymentMethod: string;
707
+ notes: string | null;
708
+ }>): Promise<{
709
+ id: any;
710
+ collaboratorId: any;
711
+ amount: any;
712
+ paymentDate: any;
713
+ referenceMonth: any;
714
+ paymentMethod: any;
715
+ notes: any;
716
+ createdAt: any;
717
+ }>;
718
+ deleteCollaboratorPayment(userId: number, collaboratorId: number, paymentId: number): Promise<{
719
+ success: boolean;
720
+ }>;
721
+ createCollaboratorInvoice(userId: number, collaboratorId: number, data: {
722
+ invoiceNumber?: string | null;
723
+ amount: number;
724
+ issueDate: string;
725
+ dueDate?: string | null;
726
+ status?: string;
727
+ description?: string | null;
728
+ }): Promise<{
729
+ id: any;
730
+ collaboratorId: any;
731
+ invoiceNumber: any;
732
+ amount: any;
733
+ issueDate: any;
734
+ dueDate: any;
735
+ status: any;
736
+ description: any;
737
+ createdAt: any;
738
+ }>;
739
+ updateCollaboratorInvoice(userId: number, collaboratorId: number, invoiceId: number, data: Partial<{
740
+ invoiceNumber: string | null;
741
+ amount: number;
742
+ issueDate: string;
743
+ dueDate: string | null;
744
+ status: string;
745
+ description: string | null;
746
+ }>): Promise<{
747
+ id: any;
748
+ collaboratorId: any;
749
+ invoiceNumber: any;
750
+ amount: any;
751
+ issueDate: any;
752
+ dueDate: any;
753
+ status: any;
754
+ description: any;
755
+ createdAt: any;
756
+ }>;
757
+ deleteCollaboratorInvoice(userId: number, collaboratorId: number, invoiceId: number): Promise<{
758
+ success: boolean;
759
+ }>;
838
760
  listDepartments(userId: number, filters?: {
839
761
  page?: number;
840
762
  pageSize?: number;
@@ -966,6 +888,8 @@ export declare class OperationsService {
966
888
  assigneePersonAvatarId: number | null;
967
889
  commentCount: number;
968
890
  fileCount: number;
891
+ doingStartedAt: string | null;
892
+ totalDoingMinutes: number;
969
893
  createdAt: string;
970
894
  deletedAt: string | null;
971
895
  }[];
@@ -987,6 +911,9 @@ export declare class OperationsService {
987
911
  projectAssignmentId: number | null;
988
912
  projectId: number | null;
989
913
  commentCount: number;
914
+ fileCount: number;
915
+ doingStartedAt: string | null;
916
+ totalDoingMinutes: number;
990
917
  createdAt: string;
991
918
  deletedAt: string | null;
992
919
  }>;
@@ -1007,6 +934,9 @@ export declare class OperationsService {
1007
934
  projectAssignmentId: number | null;
1008
935
  projectId: number | null;
1009
936
  commentCount: number;
937
+ fileCount: number;
938
+ doingStartedAt: string | null;
939
+ totalDoingMinutes: number;
1010
940
  createdAt: string;
1011
941
  deletedAt: string | null;
1012
942
  }>;
@@ -1022,13 +952,13 @@ export declare class OperationsService {
1022
952
  created_at: Date;
1023
953
  }[]>;
1024
954
  addTaskFile(userId: number, taskId: number, file: MulterFile): Promise<{
1025
- created_at: Date;
1026
- id: number;
1027
- updated_at: Date;
1028
955
  filename: string;
1029
- path: string;
1030
956
  location: string;
957
+ id: number;
958
+ path: string;
1031
959
  size: number;
960
+ created_at: Date;
961
+ updated_at: Date;
1032
962
  provider_id: number;
1033
963
  mimetype_id: number;
1034
964
  }>;
@@ -1036,6 +966,7 @@ export declare class OperationsService {
1036
966
  success: boolean;
1037
967
  }>;
1038
968
  listTaskComments(userId: number, taskId: number): Promise<TaskCommentRecord[]>;
969
+ listTaskActivities(userId: number, taskId: number): Promise<TaskActivityRecord[]>;
1039
970
  addTaskComment(userId: number, taskId: number, content: string): Promise<TaskCommentRecord>;
1040
971
  updateTaskComment(userId: number, taskId: number, commentId: number, content: string): Promise<TaskCommentRecord>;
1041
972
  removeTaskComment(userId: number, taskId: number, commentId: number): Promise<{
@@ -1179,6 +1110,31 @@ export declare class OperationsService {
1179
1110
  myRoleLabel: string | null;
1180
1111
  teamSize: number;
1181
1112
  }>;
1113
+ deleteProject(userId: number, projectId: number): Promise<{
1114
+ success: boolean;
1115
+ }>;
1116
+ listProjectFiles(userId: number, projectId: number): Promise<{
1117
+ id: number;
1118
+ file_id: number;
1119
+ filename: string;
1120
+ size: number;
1121
+ mimetype: string;
1122
+ created_at: Date;
1123
+ }[]>;
1124
+ addProjectFile(userId: number, projectId: number, file: MulterFile): Promise<{
1125
+ filename: string;
1126
+ location: string;
1127
+ id: number;
1128
+ path: string;
1129
+ size: number;
1130
+ created_at: Date;
1131
+ updated_at: Date;
1132
+ provider_id: number;
1133
+ mimetype_id: number;
1134
+ }>;
1135
+ removeProjectFile(userId: number, projectId: number, fileRelationId: number): Promise<{
1136
+ success: boolean;
1137
+ }>;
1182
1138
  createProject(userId: number, data: ProjectPayload): Promise<{
1183
1139
  assignments: {
1184
1140
  id: number;
@@ -1331,6 +1287,14 @@ export declare class OperationsService {
1331
1287
  dateTo?: string;
1332
1288
  collaboratorId?: number;
1333
1289
  }): Promise<{
1290
+ total: number;
1291
+ lastPage: number;
1292
+ page: number;
1293
+ pageSize: number;
1294
+ prev: number;
1295
+ next: number;
1296
+ data: any[];
1297
+ } | {
1334
1298
  id: number;
1335
1299
  collaboratorId: number;
1336
1300
  collaboratorName: string;
@@ -1345,15 +1309,7 @@ export declare class OperationsService {
1345
1309
  notes: string | null;
1346
1310
  decisionNote: string | null;
1347
1311
  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
- }>;
1312
+ }[]>;
1357
1313
  createTimesheet(userId: number, data: TimesheetPayload): Promise<any>;
1358
1314
  updateTimesheet(userId: number, timesheetId: number, data: Partial<TimesheetPayload>): Promise<any>;
1359
1315
  submitTimesheet(userId: number, timesheetId: number): Promise<any>;
@@ -1587,6 +1543,7 @@ export declare class OperationsService {
1587
1543
  private resolveProjectAssignmentForActor;
1588
1544
  private getOwnedTaskRecord;
1589
1545
  private getTaskRecordForActor;
1546
+ private logTaskActivity;
1590
1547
  listProjectBoardTasks(userId: number, projectId: number): Promise<{
1591
1548
  id: number;
1592
1549
  name: string;
@@ -1603,6 +1560,9 @@ export declare class OperationsService {
1603
1560
  assigneePersonAvatarId: number | null;
1604
1561
  projectAssignmentId: number | null;
1605
1562
  commentCount: number;
1563
+ fileCount: number;
1564
+ doingStartedAt: string | null;
1565
+ totalDoingMinutes: number;
1606
1566
  createdAt: string;
1607
1567
  }[]>;
1608
1568
  private getProjectBoardTask;
@@ -1616,6 +1576,34 @@ export declare class OperationsService {
1616
1576
  private upsertApproval;
1617
1577
  private applyApprovedScheduleAdjustmentIfNeeded;
1618
1578
  private insertApprovalHistory;
1579
+ /**
1580
+ * Determines if monetary fields should be hidden from a collaborator.
1581
+ * Rules:
1582
+ * - Director/Supervisor: Always see monetary fields
1583
+ * - Collaborator: Only see their own monetary fields, not others'
1584
+ *
1585
+ * @param actor The current user's access context
1586
+ * @param targetCollaboratorId The collaborator whose data is being viewed
1587
+ * @returns true if monetary fields should be hidden
1588
+ */
1589
+ private shouldHideMonetaryFieldsForCollaborator;
1590
+ /**
1591
+ * Sanitizes a single collaborator list row by hiding monetary fields when appropriate.
1592
+ * Removes: compensationAmount if user shouldn't see it
1593
+ */
1594
+ private sanitizeCollaboratorListRow;
1595
+ /**
1596
+ * Sanitizes collaborator statistics by hiding aggregate monetary fields when appropriate.
1597
+ * Removes: totalSalary, totalCosts, avgSalaryPlusCosts, avgSalaryPlusCostsPerCollaborator
1598
+ * if user is a regular collaborator (not director/supervisor)
1599
+ */
1600
+ private sanitizeCollaboratorStats;
1601
+ /**
1602
+ * Sanitizes detailed collaborator data by hiding monetary fields when appropriate.
1603
+ * Removes: compensationAmount from main object and budgetAmount from relatedContracts
1604
+ * if user is a regular collaborator (not director/supervisor) viewing another collaborator
1605
+ */
1606
+ private sanitizeCollaboratorDetails;
1619
1607
  private assertProjectAccess;
1620
1608
  private ensureCollaboratorAccess;
1621
1609
  private listSingleTimesheet;
@@ -1756,6 +1744,8 @@ export declare class OperationsService {
1756
1744
  assigneeUserPhotoId: number | null;
1757
1745
  assigneePersonAvatarId: number | null;
1758
1746
  commentCount: number;
1747
+ doingStartedAt: string | null;
1748
+ totalDoingMinutes: number;
1759
1749
  createdAt: string;
1760
1750
  deletedAt: string | null;
1761
1751
  }[];
@@ -1937,7 +1927,7 @@ export declare class OperationsService {
1937
1927
  consumedHoursCost: number;
1938
1928
  idlenessRate: number;
1939
1929
  idlenessCost: number;
1940
- risk: string;
1930
+ risk: "alto" | "médio" | "baixo";
1941
1931
  recommendation: string;
1942
1932
  }[];
1943
1933
  }>;