@hed-hog/operations 0.0.322 → 0.0.326

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