@hed-hog/operations 0.0.322 → 0.0.325

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