@hed-hog/operations 0.0.327 → 0.0.329

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 (571) hide show
  1. package/dist/controllers/operations-tasks.controller.d.ts +3 -3
  2. package/dist/operations.service.d.ts +3 -3
  3. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +7 -7
  4. package/hedhog/frontend/app/_components/department-picker.tsx.ejs +125 -0
  5. package/hedhog/frontend/app/_components/department-select-with-create.tsx.ejs +64 -325
  6. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +16 -16
  7. package/hedhog/frontend/app/_components/system-user-picker.tsx.ejs +198 -0
  8. package/hedhog/frontend/app/_components/system-user-select-with-create.tsx.ejs +107 -569
  9. package/hedhog/frontend/messages/en.json +79 -10
  10. package/hedhog/frontend/messages/operations/en.json +67 -3
  11. package/hedhog/frontend/messages/operations/pt.json +67 -3
  12. package/hedhog/frontend/messages/pt.json +77 -8
  13. package/package.json +5 -5
  14. package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +0 -476
  15. package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +0 -261
  16. package/hedhog/frontend/app/_components/contract-content-editor.tsx.ejs +0 -258
  17. package/hedhog/frontend/app/_components/person-select-with-create.tsx.ejs +0 -1
  18. package/hedhog/frontend/messages/en.json.ejs +0 -2060
  19. package/hedhog/frontend/messages/operations/operations/en.json +0 -2102
  20. package/hedhog/frontend/messages/operations/operations/pt.json +0 -2111
  21. package/hedhog/frontend/messages/pt.json.ejs +0 -2067
  22. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.d.ts +0 -29
  23. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.d.ts.map +0 -1
  24. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.js +0 -95
  25. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.js.map +0 -1
  26. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/async-options-combobox.tsx +0 -233
  27. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.d.ts +0 -10
  28. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.d.ts.map +0 -1
  29. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.js +0 -577
  30. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.js.map +0 -1
  31. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-costs-section.tsx +0 -868
  32. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.d.ts +0 -4
  33. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.d.ts.map +0 -1
  34. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.js +0 -337
  35. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.js.map +0 -1
  36. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-details-screen.tsx +0 -476
  37. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.d.ts +0 -9
  38. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.d.ts.map +0 -1
  39. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.js +0 -1348
  40. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.js.map +0 -1
  41. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-form-screen.tsx +0 -2233
  42. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.d.ts +0 -12
  43. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.d.ts.map +0 -1
  44. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.js +0 -162
  45. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.js.map +0 -1
  46. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/collaborator-select-with-create.tsx +0 -261
  47. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.d.ts +0 -18
  48. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.d.ts.map +0 -1
  49. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.js +0 -145
  50. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.js.map +0 -1
  51. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-content-editor.tsx +0 -258
  52. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.d.ts +0 -4
  53. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.d.ts.map +0 -1
  54. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.js +0 -223
  55. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.js.map +0 -1
  56. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-details-screen.tsx +0 -342
  57. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.d.ts +0 -58
  58. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.d.ts.map +0 -1
  59. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.js +0 -438
  60. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.js.map +0 -1
  61. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/contract-form-screen.tsx +0 -698
  62. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.d.ts +0 -20
  63. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.d.ts.map +0 -1
  64. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.js +0 -233
  65. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.js.map +0 -1
  66. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/department-select-with-create.tsx +0 -392
  67. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.d.ts +0 -4
  68. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.d.ts.map +0 -1
  69. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.js +0 -814
  70. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.js.map +0 -1
  71. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/my-project-summary-screen.tsx +0 -1288
  72. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.d.ts +0 -21
  73. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.d.ts.map +0 -1
  74. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.js +0 -174
  75. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.js.map +0 -1
  76. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-calendar-view.tsx +0 -306
  77. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.d.ts +0 -10
  78. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.d.ts.map +0 -1
  79. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.js +0 -12
  80. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.js.map +0 -1
  81. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/operations-header.tsx +0 -29
  82. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.d.ts +0 -15
  83. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.d.ts.map +0 -1
  84. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.js +0 -501
  85. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.js.map +0 -1
  86. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/person-select-with-create.tsx +0 -853
  87. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.d.ts +0 -6
  88. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.d.ts.map +0 -1
  89. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.js +0 -847
  90. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.js.map +0 -1
  91. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-costs-section.tsx +0 -1340
  92. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.d.ts +0 -4
  93. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.d.ts.map +0 -1
  94. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.js +0 -2930
  95. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.js.map +0 -1
  96. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-details-screen.tsx +0 -4378
  97. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.d.ts +0 -9
  98. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.d.ts.map +0 -1
  99. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.js +0 -1013
  100. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.js.map +0 -1
  101. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/project-form-screen.tsx +0 -1745
  102. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.d.ts +0 -13
  103. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.d.ts.map +0 -1
  104. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.js +0 -38
  105. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.js.map +0 -1
  106. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/section-card.tsx +0 -74
  107. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.d.ts +0 -7
  108. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.d.ts.map +0 -1
  109. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.js +0 -11
  110. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.js.map +0 -1
  111. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/status-badge.tsx +0 -15
  112. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.d.ts +0 -18
  113. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.d.ts.map +0 -1
  114. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.js +0 -406
  115. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.js.map +0 -1
  116. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/system-user-select-with-create.tsx +0 -660
  117. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.d.ts +0 -26
  118. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.d.ts.map +0 -1
  119. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.js +0 -332
  120. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.js.map +0 -1
  121. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-detail-sheet.tsx +0 -518
  122. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.d.ts +0 -6
  123. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.d.ts.map +0 -1
  124. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js +0 -255
  125. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.js.map +0 -1
  126. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/task-file-attachments.tsx +0 -388
  127. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.d.ts +0 -10
  128. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.d.ts.map +0 -1
  129. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.js +0 -131
  130. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.js.map +0 -1
  131. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_components/timesheet-task-create-sheet.tsx +0 -214
  132. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.d.ts +0 -108
  133. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.d.ts.map +0 -1
  134. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.js +0 -162
  135. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.js.map +0 -1
  136. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/api.ts +0 -428
  137. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.d.ts +0 -8
  138. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.d.ts.map +0 -1
  139. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.js +0 -36
  140. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.js.map +0 -1
  141. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/hooks/use-operations-access.ts +0 -44
  142. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.d.ts +0 -837
  143. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.d.ts.map +0 -1
  144. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.js +0 -3
  145. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.js.map +0 -1
  146. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/types.ts +0 -861
  147. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.d.ts +0 -16
  148. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.d.ts.map +0 -1
  149. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.js +0 -182
  150. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.js.map +0 -1
  151. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/format.ts +0 -250
  152. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.d.ts +0 -4
  153. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.d.ts.map +0 -1
  154. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.js +0 -51
  155. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.js.map +0 -1
  156. package/hedhog/frontend/src/app/(app)/(libraries)/operations/_lib/utils/forms.ts +0 -61
  157. package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.d.ts +0 -2
  158. package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.d.ts.map +0 -1
  159. package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.js +0 -954
  160. package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.js.map +0 -1
  161. package/hedhog/frontend/src/app/(app)/(libraries)/operations/approvals/page.tsx +0 -1277
  162. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.d.ts +0 -2
  163. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.d.ts.map +0 -1
  164. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.js +0 -488
  165. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.js.map +0 -1
  166. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborator-types/page.tsx +0 -805
  167. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.d.ts +0 -6
  168. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.d.ts.map +0 -1
  169. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.js +0 -9
  170. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.js.map +0 -1
  171. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/edit/page.tsx +0 -11
  172. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.d.ts +0 -6
  173. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.d.ts.map +0 -1
  174. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.js +0 -9
  175. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.js.map +0 -1
  176. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/[id]/page.tsx +0 -11
  177. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.d.ts +0 -2
  178. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.d.ts.map +0 -1
  179. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.js +0 -8
  180. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.js.map +0 -1
  181. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/new/page.tsx +0 -5
  182. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.d.ts +0 -2
  183. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.d.ts.map +0 -1
  184. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.js +0 -612
  185. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.js.map +0 -1
  186. package/hedhog/frontend/src/app/(app)/(libraries)/operations/collaborators/page.tsx +0 -939
  187. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.d.ts +0 -6
  188. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.d.ts.map +0 -1
  189. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.js +0 -9
  190. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.js.map +0 -1
  191. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/edit/page.tsx +0 -11
  192. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.d.ts +0 -6
  193. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.d.ts.map +0 -1
  194. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.js +0 -9
  195. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.js.map +0 -1
  196. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/[id]/page.tsx +0 -11
  197. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.d.ts +0 -6
  198. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.d.ts.map +0 -1
  199. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.js +0 -9
  200. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.js.map +0 -1
  201. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/new/page.tsx +0 -17
  202. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.d.ts +0 -2
  203. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.d.ts.map +0 -1
  204. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.js +0 -348
  205. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.js.map +0 -1
  206. package/hedhog/frontend/src/app/(app)/(libraries)/operations/contracts/page.tsx +0 -536
  207. package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.d.ts +0 -2
  208. package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.d.ts.map +0 -1
  209. package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.js +0 -401
  210. package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.js.map +0 -1
  211. package/hedhog/frontend/src/app/(app)/(libraries)/operations/departments/page.tsx +0 -607
  212. package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.d.ts +0 -5
  213. package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.d.ts.map +0 -1
  214. package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.js +0 -7
  215. package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.js.map +0 -1
  216. package/hedhog/frontend/src/app/(app)/(libraries)/operations/layout.tsx +0 -9
  217. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.d.ts +0 -6
  218. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.d.ts.map +0 -1
  219. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.js +0 -9
  220. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.js.map +0 -1
  221. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/[id]/page.tsx +0 -11
  222. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.d.ts +0 -2
  223. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.d.ts.map +0 -1
  224. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.js +0 -321
  225. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.js.map +0 -1
  226. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-projects/page.tsx +0 -440
  227. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.d.ts +0 -2
  228. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.d.ts.map +0 -1
  229. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.js +0 -939
  230. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.js.map +0 -1
  231. package/hedhog/frontend/src/app/(app)/(libraries)/operations/my-tasks/page.tsx +0 -1499
  232. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.d.ts +0 -29
  233. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.d.ts.map +0 -1
  234. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.js +0 -95
  235. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.js.map +0 -1
  236. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/async-options-combobox.tsx +0 -233
  237. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.d.ts +0 -10
  238. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.d.ts.map +0 -1
  239. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.js +0 -577
  240. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.js.map +0 -1
  241. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-costs-section.tsx +0 -868
  242. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.d.ts +0 -4
  243. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.d.ts.map +0 -1
  244. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.js +0 -337
  245. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.js.map +0 -1
  246. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-details-screen.tsx +0 -476
  247. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.d.ts +0 -9
  248. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.d.ts.map +0 -1
  249. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.js +0 -1348
  250. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.js.map +0 -1
  251. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-form-screen.tsx +0 -2233
  252. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.d.ts +0 -12
  253. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.d.ts.map +0 -1
  254. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.js +0 -162
  255. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.js.map +0 -1
  256. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/collaborator-select-with-create.tsx +0 -261
  257. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.d.ts +0 -18
  258. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.d.ts.map +0 -1
  259. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.js +0 -145
  260. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.js.map +0 -1
  261. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-content-editor.tsx +0 -258
  262. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.d.ts +0 -4
  263. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.d.ts.map +0 -1
  264. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.js +0 -223
  265. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.js.map +0 -1
  266. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-details-screen.tsx +0 -342
  267. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.d.ts +0 -58
  268. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.d.ts.map +0 -1
  269. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.js +0 -438
  270. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.js.map +0 -1
  271. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/contract-form-screen.tsx +0 -698
  272. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.d.ts +0 -20
  273. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.d.ts.map +0 -1
  274. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.js +0 -233
  275. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.js.map +0 -1
  276. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/department-select-with-create.tsx +0 -392
  277. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.d.ts +0 -4
  278. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.d.ts.map +0 -1
  279. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.js +0 -814
  280. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.js.map +0 -1
  281. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/my-project-summary-screen.tsx +0 -1288
  282. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.d.ts +0 -21
  283. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.d.ts.map +0 -1
  284. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.js +0 -174
  285. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.js.map +0 -1
  286. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-calendar-view.tsx +0 -306
  287. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.d.ts +0 -10
  288. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.d.ts.map +0 -1
  289. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.js +0 -12
  290. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.js.map +0 -1
  291. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/operations-header.tsx +0 -29
  292. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.d.ts +0 -15
  293. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.d.ts.map +0 -1
  294. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.js +0 -501
  295. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.js.map +0 -1
  296. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/person-select-with-create.tsx +0 -853
  297. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.d.ts +0 -6
  298. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.d.ts.map +0 -1
  299. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.js +0 -459
  300. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.js.map +0 -1
  301. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-cost-report-screen.tsx +0 -598
  302. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.d.ts +0 -6
  303. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.d.ts.map +0 -1
  304. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.js +0 -876
  305. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.js.map +0 -1
  306. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-costs-section.tsx +0 -1368
  307. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.d.ts +0 -4
  308. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.d.ts.map +0 -1
  309. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.js +0 -2930
  310. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.js.map +0 -1
  311. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-details-screen.tsx +0 -4378
  312. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.d.ts +0 -9
  313. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.d.ts.map +0 -1
  314. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.js +0 -1013
  315. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.js.map +0 -1
  316. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/project-form-screen.tsx +0 -1745
  317. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.d.ts +0 -13
  318. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.d.ts.map +0 -1
  319. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.js +0 -38
  320. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.js.map +0 -1
  321. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/section-card.tsx +0 -74
  322. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.d.ts +0 -7
  323. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.d.ts.map +0 -1
  324. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.js +0 -11
  325. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.js.map +0 -1
  326. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/status-badge.tsx +0 -15
  327. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.d.ts +0 -18
  328. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.d.ts.map +0 -1
  329. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.js +0 -406
  330. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.js.map +0 -1
  331. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/system-user-select-with-create.tsx +0 -660
  332. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.d.ts +0 -26
  333. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.d.ts.map +0 -1
  334. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.js +0 -332
  335. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.js.map +0 -1
  336. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-detail-sheet.tsx +0 -518
  337. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.d.ts +0 -6
  338. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.d.ts.map +0 -1
  339. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.js +0 -255
  340. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.js.map +0 -1
  341. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/task-file-attachments.tsx +0 -388
  342. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.d.ts +0 -10
  343. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.d.ts.map +0 -1
  344. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.js +0 -131
  345. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.js.map +0 -1
  346. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_components/timesheet-task-create-sheet.tsx +0 -214
  347. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.d.ts +0 -108
  348. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.d.ts.map +0 -1
  349. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.js +0 -162
  350. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.js.map +0 -1
  351. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/api.ts +0 -428
  352. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.d.ts +0 -8
  353. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.d.ts.map +0 -1
  354. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.js +0 -36
  355. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.js.map +0 -1
  356. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/hooks/use-operations-access.ts +0 -44
  357. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.d.ts +0 -837
  358. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.d.ts.map +0 -1
  359. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.js +0 -3
  360. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.js.map +0 -1
  361. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/types.ts +0 -861
  362. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.d.ts +0 -16
  363. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.d.ts.map +0 -1
  364. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.js +0 -182
  365. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.js.map +0 -1
  366. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/format.ts +0 -250
  367. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.d.ts +0 -4
  368. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.d.ts.map +0 -1
  369. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.js +0 -51
  370. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.js.map +0 -1
  371. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/_lib/utils/forms.ts +0 -61
  372. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.d.ts +0 -2
  373. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.d.ts.map +0 -1
  374. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.js +0 -954
  375. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.js.map +0 -1
  376. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/approvals/page.tsx +0 -1277
  377. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.d.ts +0 -2
  378. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.d.ts.map +0 -1
  379. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.js +0 -488
  380. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.js.map +0 -1
  381. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborator-types/page.tsx +0 -805
  382. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.d.ts +0 -6
  383. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.d.ts.map +0 -1
  384. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.js +0 -9
  385. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.js.map +0 -1
  386. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/edit/page.tsx +0 -11
  387. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.d.ts +0 -6
  388. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.d.ts.map +0 -1
  389. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.js +0 -9
  390. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.js.map +0 -1
  391. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/[id]/page.tsx +0 -11
  392. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.d.ts +0 -2
  393. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.d.ts.map +0 -1
  394. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.js +0 -8
  395. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.js.map +0 -1
  396. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/new/page.tsx +0 -5
  397. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.d.ts +0 -2
  398. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.d.ts.map +0 -1
  399. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.js +0 -612
  400. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.js.map +0 -1
  401. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/collaborators/page.tsx +0 -939
  402. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.d.ts +0 -6
  403. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.d.ts.map +0 -1
  404. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.js +0 -9
  405. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.js.map +0 -1
  406. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/edit/page.tsx +0 -11
  407. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.d.ts +0 -6
  408. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.d.ts.map +0 -1
  409. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.js +0 -9
  410. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.js.map +0 -1
  411. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/[id]/page.tsx +0 -11
  412. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.d.ts +0 -6
  413. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.d.ts.map +0 -1
  414. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.js +0 -9
  415. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.js.map +0 -1
  416. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/new/page.tsx +0 -17
  417. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.d.ts +0 -2
  418. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.d.ts.map +0 -1
  419. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.js +0 -348
  420. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.js.map +0 -1
  421. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/contracts/page.tsx +0 -536
  422. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.d.ts +0 -2
  423. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.d.ts.map +0 -1
  424. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.js +0 -401
  425. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.js.map +0 -1
  426. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/departments/page.tsx +0 -607
  427. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.d.ts +0 -5
  428. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.d.ts.map +0 -1
  429. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.js +0 -7
  430. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.js.map +0 -1
  431. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/layout.tsx +0 -9
  432. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.d.ts +0 -6
  433. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.d.ts.map +0 -1
  434. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.js +0 -9
  435. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.js.map +0 -1
  436. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/[id]/page.tsx +0 -11
  437. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.d.ts +0 -2
  438. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.d.ts.map +0 -1
  439. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.js +0 -321
  440. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.js.map +0 -1
  441. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-projects/page.tsx +0 -440
  442. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.d.ts +0 -2
  443. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.d.ts.map +0 -1
  444. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.js +0 -939
  445. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.js.map +0 -1
  446. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/my-tasks/page.tsx +0 -1499
  447. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.d.ts +0 -2
  448. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.d.ts.map +0 -1
  449. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.js +0 -8
  450. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.js.map +0 -1
  451. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/page.tsx +0 -5
  452. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.d.ts +0 -2
  453. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.d.ts.map +0 -1
  454. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.js +0 -436
  455. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.js.map +0 -1
  456. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-categories/page.tsx +0 -675
  457. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.d.ts +0 -2
  458. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.d.ts.map +0 -1
  459. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.js +0 -563
  460. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.js.map +0 -1
  461. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/project-cost-types/page.tsx +0 -846
  462. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.d.ts +0 -6
  463. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.d.ts.map +0 -1
  464. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.js +0 -9
  465. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.js.map +0 -1
  466. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/costs-report/page.tsx +0 -10
  467. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.d.ts +0 -6
  468. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.d.ts.map +0 -1
  469. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.js +0 -9
  470. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.js.map +0 -1
  471. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/edit/page.tsx +0 -11
  472. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.d.ts +0 -6
  473. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.d.ts.map +0 -1
  474. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.js +0 -9
  475. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.js.map +0 -1
  476. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/[id]/page.tsx +0 -11
  477. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.d.ts +0 -2
  478. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.d.ts.map +0 -1
  479. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.js +0 -8
  480. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.js.map +0 -1
  481. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/new/page.tsx +0 -5
  482. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.d.ts +0 -2
  483. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.d.ts.map +0 -1
  484. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.js +0 -492
  485. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.js.map +0 -1
  486. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/projects/page.tsx +0 -757
  487. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.d.ts +0 -2
  488. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.d.ts.map +0 -1
  489. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.js +0 -342
  490. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.js.map +0 -1
  491. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/collaborators/page.tsx +0 -430
  492. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.d.ts +0 -2
  493. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.d.ts.map +0 -1
  494. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.js +0 -338
  495. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.js.map +0 -1
  496. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/reports/projects/page.tsx +0 -428
  497. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.d.ts +0 -2
  498. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.d.ts.map +0 -1
  499. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.js +0 -660
  500. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.js.map +0 -1
  501. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/schedule-adjustments/page.tsx +0 -992
  502. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.d.ts +0 -2
  503. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.d.ts.map +0 -1
  504. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.js +0 -515
  505. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.js.map +0 -1
  506. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/time-off/page.tsx +0 -707
  507. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.d.ts +0 -2
  508. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.d.ts.map +0 -1
  509. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.js +0 -1141
  510. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.js.map +0 -1
  511. package/hedhog/frontend/src/app/(app)/(libraries)/operations/operations/timesheets/page.tsx +0 -1705
  512. package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.d.ts +0 -2
  513. package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.d.ts.map +0 -1
  514. package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.js +0 -8
  515. package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.js.map +0 -1
  516. package/hedhog/frontend/src/app/(app)/(libraries)/operations/page.tsx +0 -5
  517. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.d.ts +0 -2
  518. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.d.ts.map +0 -1
  519. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.js +0 -436
  520. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.js.map +0 -1
  521. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-categories/page.tsx +0 -675
  522. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.d.ts +0 -2
  523. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.d.ts.map +0 -1
  524. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.js +0 -563
  525. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.js.map +0 -1
  526. package/hedhog/frontend/src/app/(app)/(libraries)/operations/project-cost-types/page.tsx +0 -846
  527. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.d.ts +0 -6
  528. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.d.ts.map +0 -1
  529. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.js +0 -9
  530. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.js.map +0 -1
  531. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/edit/page.tsx +0 -11
  532. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.d.ts +0 -6
  533. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.d.ts.map +0 -1
  534. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.js +0 -9
  535. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.js.map +0 -1
  536. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/[id]/page.tsx +0 -11
  537. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.d.ts +0 -2
  538. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.d.ts.map +0 -1
  539. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.js +0 -8
  540. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.js.map +0 -1
  541. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/new/page.tsx +0 -5
  542. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.d.ts +0 -2
  543. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.d.ts.map +0 -1
  544. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.js +0 -492
  545. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.js.map +0 -1
  546. package/hedhog/frontend/src/app/(app)/(libraries)/operations/projects/page.tsx +0 -757
  547. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.d.ts +0 -2
  548. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.d.ts.map +0 -1
  549. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.js +0 -342
  550. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.js.map +0 -1
  551. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/collaborators/page.tsx +0 -430
  552. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.d.ts +0 -2
  553. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.d.ts.map +0 -1
  554. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.js +0 -338
  555. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.js.map +0 -1
  556. package/hedhog/frontend/src/app/(app)/(libraries)/operations/reports/projects/page.tsx +0 -428
  557. package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.d.ts +0 -2
  558. package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.d.ts.map +0 -1
  559. package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.js +0 -660
  560. package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.js.map +0 -1
  561. package/hedhog/frontend/src/app/(app)/(libraries)/operations/schedule-adjustments/page.tsx +0 -992
  562. package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.d.ts +0 -2
  563. package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.d.ts.map +0 -1
  564. package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.js +0 -515
  565. package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.js.map +0 -1
  566. package/hedhog/frontend/src/app/(app)/(libraries)/operations/time-off/page.tsx +0 -707
  567. package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.d.ts +0 -2
  568. package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.d.ts.map +0 -1
  569. package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.js +0 -1141
  570. package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.js.map +0 -1
  571. package/hedhog/frontend/src/app/(app)/(libraries)/operations/timesheets/page.tsx +0 -1705
@@ -1,868 +0,0 @@
1
- 'use client';
2
-
3
- import { Badge } from '@/components/ui/badge';
4
- import { Button } from '@/components/ui/button';
5
- import { Card, CardContent } from '@/components/ui/card';
6
- import { EntityPicker } from '@/components/ui/entity-picker';
7
- import { Input } from '@/components/ui/input';
8
- import { InputMoney } from '@/components/ui/input-money';
9
- import { Label } from '@/components/ui/label';
10
- import {
11
- Select,
12
- SelectContent,
13
- SelectItem,
14
- SelectTrigger,
15
- SelectValue,
16
- } from '@/components/ui/select';
17
- import { Skeleton } from '@/components/ui/skeleton';
18
- import { Textarea } from '@/components/ui/textarea';
19
- import { useApp, useQuery } from '@hed-hog/next-app-provider';
20
- import {
21
- AlertCircle,
22
- Check,
23
- DollarSign,
24
- Pencil,
25
- Plus,
26
- Trash2,
27
- X,
28
- } from 'lucide-react';
29
- import { useTranslations } from 'next-intl';
30
- import { useCallback, useMemo, useState } from 'react';
31
- import {
32
- type CollaboratorCost,
33
- type CostType,
34
- createCollaboratorCost,
35
- createCostType,
36
- deleteCollaboratorCost,
37
- fetchCollaboratorCosts,
38
- fetchCostTypes,
39
- getOperationsErrorMessage,
40
- updateCollaboratorCost,
41
- } from '../_lib/api';
42
- import { formatCurrency, formatDate } from '../_lib/utils/format';
43
-
44
- const RECURRENCE_VALUES = ['monthly', 'one_time', 'yearly'] as const;
45
- type Recurrence = (typeof RECURRENCE_VALUES)[number];
46
-
47
- /** Normalize to monthly equivalent for KPI computation. */
48
- function toMonthly(
49
- amount: number,
50
- recurrence: string,
51
- depreciationMonths?: number | null
52
- ): number {
53
- switch (recurrence) {
54
- case 'one_time':
55
- return depreciationMonths && depreciationMonths > 0
56
- ? amount / depreciationMonths
57
- : 0;
58
- case 'monthly':
59
- return amount;
60
- case 'yearly':
61
- return amount / 12;
62
- default:
63
- return amount;
64
- }
65
- }
66
-
67
- type CostFormState = {
68
- costTypeId: number | null;
69
- description: string;
70
- amount: string | number;
71
- recurrence: Recurrence;
72
- startDate: string;
73
- endDate: string;
74
- allocatable: boolean;
75
- depreciationMonths: string;
76
- notes: string;
77
- };
78
-
79
- type FormErrors = Partial<
80
- Record<keyof CostFormState, string> & { submit: string }
81
- >;
82
-
83
- function emptyCostForm(): CostFormState {
84
- return {
85
- costTypeId: null,
86
- description: '',
87
- amount: '',
88
- recurrence: 'monthly',
89
- startDate: '',
90
- endDate: '',
91
- allocatable: true,
92
- depreciationMonths: '',
93
- notes: '',
94
- };
95
- }
96
-
97
- function costToForm(cost: CollaboratorCost): CostFormState {
98
- return {
99
- costTypeId: cost.costTypeId,
100
- description: cost.description ?? '',
101
- amount: Number(cost.amount),
102
- recurrence: cost.recurrence as Recurrence,
103
- startDate: cost.startDate ?? cost.referenceDate ?? '',
104
- endDate: cost.endDate ?? '',
105
- allocatable: cost.allocatable ?? true,
106
- depreciationMonths:
107
- cost.depreciationMonths != null ? String(cost.depreciationMonths) : '',
108
- notes: cost.notes ?? '',
109
- };
110
- }
111
-
112
- function validateForm(
113
- form: CostFormState,
114
- t: (k: string) => string
115
- ): FormErrors {
116
- const errors: FormErrors = {};
117
-
118
- if (!form.costTypeId) {
119
- errors.costTypeId = t('validation.required');
120
- }
121
-
122
- const amt = parseFloat(
123
- String(form.amount).replace(/\./g, '').replace(',', '.')
124
- );
125
- if (!form.amount || isNaN(amt) || amt <= 0) {
126
- errors.amount = t('validation.greaterThanZero');
127
- }
128
-
129
- if (form.startDate && form.endDate && form.endDate <= form.startDate) {
130
- errors.endDate = t('validation.endDateAfterStart');
131
- }
132
-
133
- if (form.recurrence === 'one_time' && form.depreciationMonths) {
134
- const months = parseInt(form.depreciationMonths, 10);
135
- if (isNaN(months) || months < 1) {
136
- errors.depreciationMonths = t('validation.positiveInteger');
137
- }
138
- }
139
-
140
- return errors;
141
- }
142
-
143
- type Props = {
144
- collaboratorId: number;
145
- disabled?: boolean;
146
- remunerationValue?: number;
147
- weeklyCapacity?: number;
148
- onCostsChanged?: () => void;
149
- };
150
-
151
- export function CollaboratorCostsSection({
152
- collaboratorId,
153
- disabled = false,
154
- weeklyCapacity,
155
- onCostsChanged,
156
- }: Props) {
157
- const t = useTranslations('operations.CollaboratorCostsSection');
158
- const commonT = useTranslations('operations.Common');
159
- const { request, showToastHandler, getSettingValue, currentLocaleCode } =
160
- useApp();
161
-
162
- const [isAdding, setIsAdding] = useState(false);
163
- const [editingCostId, setEditingCostId] = useState<number | null>(null);
164
- const [confirmDeleteId, setConfirmDeleteId] = useState<number | null>(null);
165
- const [form, setForm] = useState<CostFormState>(emptyCostForm());
166
- const [formErrors, setFormErrors] = useState<FormErrors>({});
167
- const [saving, setSaving] = useState(false);
168
- const [selectedCostType, setSelectedCostType] = useState<CostType | null>(
169
- null
170
- );
171
-
172
- const {
173
- data: costs = [],
174
- isLoading,
175
- error,
176
- refetch,
177
- } = useQuery<CollaboratorCost[]>({
178
- queryKey: ['operations-collaborator-costs', collaboratorId],
179
- queryFn: () => fetchCollaboratorCosts(request, collaboratorId),
180
- });
181
-
182
- // ─── Computed KPIs ─────────────────────────────────────────────────────────
183
- const kpi = useMemo(() => {
184
- const monthlyTotal = costs.reduce(
185
- (sum, c) =>
186
- sum + toMonthly(Number(c.amount), c.recurrence, c.depreciationMonths),
187
- 0
188
- );
189
- const allocatableTotal = costs.reduce(
190
- (sum, c) =>
191
- (c.allocatable ?? true)
192
- ? sum +
193
- toMonthly(Number(c.amount), c.recurrence, c.depreciationMonths)
194
- : sum,
195
- 0
196
- );
197
- const nonAllocatableTotal = monthlyTotal - allocatableTotal;
198
- const costPerHour =
199
- weeklyCapacity && weeklyCapacity > 0
200
- ? monthlyTotal / (weeklyCapacity * 4.33)
201
- : null;
202
-
203
- return { monthlyTotal, allocatableTotal, nonAllocatableTotal, costPerHour };
204
- }, [costs, weeklyCapacity]);
205
-
206
- const fmt = useCallback(
207
- (value: number) =>
208
- formatCurrency(value, getSettingValue, currentLocaleCode),
209
- [getSettingValue, currentLocaleCode]
210
- );
211
-
212
- // ─── Form helpers ──────────────────────────────────────────────────────────
213
- const setField = useCallback(
214
- <K extends keyof CostFormState>(key: K, value: CostFormState[K]) => {
215
- setForm((prev) => ({ ...prev, [key]: value }));
216
- setFormErrors((prev) => {
217
- if (!prev[key]) return prev;
218
- const next = { ...prev };
219
- delete next[key];
220
- return next;
221
- });
222
- },
223
- []
224
- );
225
-
226
- const openAdd = () => {
227
- setEditingCostId(null);
228
- setForm(emptyCostForm());
229
- setFormErrors({});
230
- setSelectedCostType(null);
231
- setIsAdding(true);
232
- setConfirmDeleteId(null);
233
- };
234
-
235
- const openEdit = (cost: CollaboratorCost) => {
236
- setIsAdding(false);
237
- setConfirmDeleteId(null);
238
- setEditingCostId(cost.id);
239
- setForm(costToForm(cost));
240
- setFormErrors({});
241
- // Reconstruct a minimal CostType so isDepreciable/isAllocatable defaults to unknown (show fields)
242
- setSelectedCostType({
243
- id: cost.costTypeId,
244
- slug: cost.costTypeSlug,
245
- name: cost.costTypeName,
246
- isActive: true,
247
- });
248
- };
249
-
250
- const closeForm = () => {
251
- setIsAdding(false);
252
- setEditingCostId(null);
253
- setForm(emptyCostForm());
254
- setFormErrors({});
255
- setSelectedCostType(null);
256
- };
257
-
258
- // ─── Save / delete ─────────────────────────────────────────────────────────
259
- const handleSave = async () => {
260
- const errors = validateForm(form, (k) => t(k as Parameters<typeof t>[0]));
261
- if (Object.keys(errors).length > 0) {
262
- setFormErrors(errors);
263
- return;
264
- }
265
-
266
- const numericAmount = parseFloat(
267
- String(form.amount).replace(/\./g, '').replace(',', '.')
268
- );
269
-
270
- setSaving(true);
271
- try {
272
- const depMonths =
273
- form.recurrence === 'one_time' && form.depreciationMonths
274
- ? parseInt(form.depreciationMonths, 10)
275
- : null;
276
-
277
- const payload = {
278
- costTypeId: form.costTypeId!,
279
- amount: numericAmount,
280
- recurrence: form.recurrence,
281
- allocatable: form.allocatable,
282
- // map startDate → referenceDate for current backend compat
283
- referenceDate: form.startDate || null,
284
- startDate: form.startDate || null,
285
- endDate: form.endDate || null,
286
- depreciationMonths: depMonths,
287
- description: form.description || null,
288
- notes: form.notes || null,
289
- };
290
-
291
- if (editingCostId !== null) {
292
- await updateCollaboratorCost(
293
- request,
294
- collaboratorId,
295
- editingCostId,
296
- payload
297
- );
298
- showToastHandler?.('success', t('messages.updateSuccess'));
299
- } else {
300
- await createCollaboratorCost(request, collaboratorId, payload);
301
- showToastHandler?.('success', t('messages.createSuccess'));
302
- }
303
-
304
- closeForm();
305
- await refetch();
306
- onCostsChanged?.();
307
- } catch (err) {
308
- showToastHandler?.(
309
- 'error',
310
- getOperationsErrorMessage(err, t('messages.saveError'))
311
- );
312
- } finally {
313
- setSaving(false);
314
- }
315
- };
316
-
317
- const handleDelete = async (costId: number) => {
318
- try {
319
- await deleteCollaboratorCost(request, collaboratorId, costId);
320
- showToastHandler?.('success', t('messages.deleteSuccess'));
321
- setConfirmDeleteId(null);
322
- await refetch();
323
- onCostsChanged?.();
324
- } catch (err) {
325
- showToastHandler?.(
326
- 'error',
327
- getOperationsErrorMessage(err, t('messages.deleteError'))
328
- );
329
- }
330
- };
331
-
332
- const getRecurrenceLabel = (value: string) => {
333
- switch (value) {
334
- case 'one_time':
335
- return t('recurrence.one_time');
336
- case 'monthly':
337
- return t('recurrence.monthly');
338
- case 'yearly':
339
- return t('recurrence.yearly');
340
- default:
341
- return value;
342
- }
343
- };
344
-
345
- const formatValidityRange = (cost: CollaboratorCost) => {
346
- const start = cost.startDate ?? cost.referenceDate;
347
- const end = cost.endDate;
348
- if (start && end) {
349
- return `${formatDate(start, getSettingValue, currentLocaleCode)} – ${formatDate(end, getSettingValue, currentLocaleCode)}`;
350
- }
351
- if (start) {
352
- return formatDate(start, getSettingValue, currentLocaleCode);
353
- }
354
- return '—';
355
- };
356
-
357
- const isFormOpen = isAdding || editingCostId !== null;
358
- const readOnly = disabled;
359
-
360
- // ─── Render ────────────────────────────────────────────────────────────────
361
- return (
362
- <div className="space-y-3">
363
- {/* Header */}
364
- <div className="flex items-center justify-between">
365
- <div className="space-y-0.5">
366
- <h3 className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">
367
- {t('title')}
368
- </h3>
369
- <p className="text-[11px] text-muted-foreground/80">
370
- {t('description')}
371
- </p>
372
- </div>
373
- {!readOnly && !isFormOpen && (
374
- <Button
375
- variant="ghost"
376
- size="sm"
377
- className="gap-1.5 text-muted-foreground hover:text-foreground"
378
- onClick={openAdd}
379
- disabled={isLoading}
380
- >
381
- <Plus className="size-3.5" />
382
- {t('actions.add')}
383
- </Button>
384
- )}
385
- </div>
386
-
387
- {/* KPI summary cards */}
388
- {isLoading ? (
389
- <div className="grid grid-cols-2 gap-2">
390
- {Array.from({ length: 4 }).map((_, i) => (
391
- <Skeleton key={i} className="h-16 w-full rounded-lg" />
392
- ))}
393
- </div>
394
- ) : (
395
- <div className="grid grid-cols-2 gap-2">
396
- <Card className="py-0">
397
- <CardContent className="flex items-center gap-2 px-3 py-2.5">
398
- <DollarSign className="size-4 shrink-0 text-muted-foreground" />
399
- <div className="min-w-0">
400
- <p className="truncate text-[10px] text-muted-foreground">
401
- {t('summary.monthlyEstimate')}
402
- </p>
403
- <p className="truncate text-sm font-semibold tabular-nums">
404
- {fmt(kpi.monthlyTotal)}
405
- </p>
406
- </div>
407
- </CardContent>
408
- </Card>
409
- <Card className="py-0">
410
- <CardContent className="flex items-center gap-2 px-3 py-2.5">
411
- <Check className="size-4 shrink-0 text-green-500" />
412
- <div className="min-w-0">
413
- <p className="truncate text-[10px] text-muted-foreground">
414
- {t('summary.allocatable')}
415
- </p>
416
- <p className="truncate text-sm font-semibold tabular-nums">
417
- {fmt(kpi.allocatableTotal)}
418
- </p>
419
- </div>
420
- </CardContent>
421
- </Card>
422
- <Card className="py-0">
423
- <CardContent className="flex items-center gap-2 px-3 py-2.5">
424
- <X className="size-4 shrink-0 text-muted-foreground" />
425
- <div className="min-w-0">
426
- <p className="truncate text-[10px] text-muted-foreground">
427
- {t('summary.nonAllocatable')}
428
- </p>
429
- <p className="truncate text-sm font-semibold tabular-nums">
430
- {fmt(kpi.nonAllocatableTotal)}
431
- </p>
432
- </div>
433
- </CardContent>
434
- </Card>
435
- <Card className="py-0">
436
- <CardContent className="flex items-center gap-2 px-3 py-2.5">
437
- <DollarSign className="size-4 shrink-0 text-muted-foreground" />
438
- <div className="min-w-0">
439
- <p className="truncate text-[10px] text-muted-foreground">
440
- {t('summary.costPerHour')}
441
- </p>
442
- <p className="truncate text-sm font-semibold tabular-nums">
443
- {kpi.costPerHour != null
444
- ? fmt(kpi.costPerHour)
445
- : commonT('labels.notAvailable')}
446
- </p>
447
- </div>
448
- </CardContent>
449
- </Card>
450
- </div>
451
- )}
452
-
453
- {/* Error state */}
454
- {!isLoading && error ? (
455
- <div className="flex items-center gap-2 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2.5 text-sm text-destructive">
456
- <AlertCircle className="size-4 shrink-0" />
457
- {t('messages.loadError')}
458
- </div>
459
- ) : null}
460
-
461
- {/* ── Inline form ──────────────────────────────────────────────────── */}
462
- {isFormOpen && (
463
- <Card className="border-primary/20 bg-card shadow-sm">
464
- <CardContent className="p-4">
465
- {/* Form title + close */}
466
- <div className="mb-4 flex items-center justify-between">
467
- <p className="text-sm font-semibold">
468
- {editingCostId !== null ? t('actions.edit') : t('actions.add')}
469
- </p>
470
- <Button
471
- variant="ghost"
472
- size="icon"
473
- className="size-7"
474
- onClick={closeForm}
475
- disabled={saving}
476
- >
477
- <X className="size-3.5" />
478
- </Button>
479
- </div>
480
-
481
- <div className="grid gap-2 sm:grid-cols-2">
482
- {/* Cost type — full width */}
483
- <div className="sm:col-span-2">
484
- <Label className="mb-1 block text-xs">
485
- {t('fields.costType')}
486
- <span className="ml-0.5 text-destructive">*</span>
487
- </Label>
488
- <EntityPicker<CostType>
489
- placeholder={t('placeholders.costType')}
490
- value={form.costTypeId}
491
- onChange={(value, option) => {
492
- const costType = option ?? null;
493
- setField('costTypeId', value as number | null);
494
- setSelectedCostType(costType);
495
- if (costType) {
496
- if (costType.defaultRecurrence) {
497
- setField(
498
- 'recurrence',
499
- costType.defaultRecurrence as Recurrence
500
- );
501
- }
502
- if (costType.isAllocatable != null) {
503
- setField(
504
- 'allocatable',
505
- Boolean(costType.isAllocatable)
506
- );
507
- }
508
- }
509
- }}
510
- valueType="number"
511
- loadOptions={async ({ search, page, pageSize }) => {
512
- const items = await fetchCostTypes(request, {
513
- search,
514
- active: true,
515
- page,
516
- pageSize,
517
- });
518
- return { items, hasMore: false };
519
- }}
520
- getOptionValue={(o) => o.id}
521
- getOptionLabel={(o) => o.name}
522
- getOptionDescription={(o) => {
523
- const parts = [o.code, o.category].filter(Boolean);
524
- return parts.length > 0 ? parts.join(' · ') : undefined;
525
- }}
526
- showCreateButton
527
- createFields={[
528
- {
529
- name: 'name',
530
- label: t('fields.costTypeName'),
531
- placeholder: t('placeholders.costTypeName'),
532
- required: true,
533
- },
534
- {
535
- name: 'code',
536
- label: t('fields.costTypeCode'),
537
- placeholder: t('placeholders.costTypeCode'),
538
- },
539
- {
540
- name: 'category',
541
- label: t('fields.category'),
542
- placeholder: t('placeholders.category'),
543
- },
544
- {
545
- name: 'description',
546
- label: t('fields.costTypeDescription'),
547
- placeholder: t('placeholders.costTypeDescription'),
548
- },
549
- ]}
550
- onCreate={async (values) => {
551
- const created = await createCostType(request, {
552
- name: values.name as string,
553
- code: (values.code as string) || null,
554
- category: (values.category as string) || null,
555
- description: (values.description as string) || null,
556
- });
557
- return created ?? null;
558
- }}
559
- mapSearchToCreateValues={(search) => ({ name: search })}
560
- createActionLabel={t('actions.createCostType')}
561
- />
562
- {selectedCostType?.category ? (
563
- <p className="mt-1 text-[11px] text-muted-foreground">
564
- {t('fields.category')}: {selectedCostType.category}
565
- </p>
566
- ) : null}
567
- {formErrors.costTypeId ? (
568
- <p className="mt-1 text-[11px] text-destructive">
569
- {formErrors.costTypeId}
570
- </p>
571
- ) : null}
572
- </div>
573
-
574
- {/* Description — full width */}
575
- <div className="sm:col-span-2">
576
- <Label className="mb-1 block text-xs">
577
- {t('fields.description')}
578
- </Label>
579
- <Input
580
- value={form.description}
581
- onChange={(e) => setField('description', e.target.value)}
582
- placeholder={t('placeholders.description')}
583
- />
584
- </div>
585
-
586
- {/* Amount */}
587
- <div>
588
- <Label className="mb-1 block text-xs">
589
- {t('fields.amount')}
590
- <span className="ml-0.5 text-destructive">*</span>
591
- </Label>
592
- <InputMoney
593
- value={form.amount}
594
- onChange={(e) => setField('amount', e.target.value)}
595
- placeholder="0,00"
596
- />
597
- {formErrors.amount ? (
598
- <p className="mt-1 text-[11px] text-destructive">
599
- {formErrors.amount}
600
- </p>
601
- ) : null}
602
- </div>
603
-
604
- {/* Recurrence */}
605
- <div>
606
- <Label className="mb-1 block text-xs">
607
- {t('fields.recurrence')}
608
- </Label>
609
- <Select
610
- value={form.recurrence}
611
- onValueChange={(v) => {
612
- setField('recurrence', v as Recurrence);
613
- if (v !== 'one_time') {
614
- setField('depreciationMonths', '');
615
- }
616
- }}
617
- >
618
- <SelectTrigger className="w-full">
619
- <SelectValue />
620
- </SelectTrigger>
621
- <SelectContent>
622
- {RECURRENCE_VALUES.map((r) => (
623
- <SelectItem key={r} value={r}>
624
- {getRecurrenceLabel(r)}
625
- </SelectItem>
626
- ))}
627
- </SelectContent>
628
- </Select>
629
- </div>
630
-
631
- {/* Start date */}
632
- <div>
633
- <Label className="mb-1 block text-xs">
634
- {t('fields.startDate')}
635
- </Label>
636
- <input
637
- type="date"
638
- className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
639
- value={form.startDate}
640
- onChange={(e) => setField('startDate', e.target.value)}
641
- />
642
- </div>
643
-
644
- {/* End date */}
645
- <div>
646
- <Label className="mb-1 block text-xs">
647
- {t('fields.endDate')}
648
- </Label>
649
- <input
650
- type="date"
651
- className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
652
- value={form.endDate}
653
- min={form.startDate || undefined}
654
- onChange={(e) => setField('endDate', e.target.value)}
655
- />
656
- {formErrors.endDate ? (
657
- <p className="mt-1 text-[11px] text-destructive">
658
- {formErrors.endDate}
659
- </p>
660
- ) : null}
661
- </div>
662
-
663
- {/* Depreciation months — only for one_time and when type is depreciable */}
664
- {form.recurrence === 'one_time' &&
665
- selectedCostType?.isDepreciable !== false && (
666
- <div className="sm:col-span-2">
667
- <Label className="mb-1 block text-xs">
668
- {t('fields.depreciationMonths')}
669
- </Label>
670
- <Input
671
- type="number"
672
- min={1}
673
- step={1}
674
- value={form.depreciationMonths}
675
- onChange={(e) =>
676
- setField('depreciationMonths', e.target.value)
677
- }
678
- placeholder={t('placeholders.depreciationMonths')}
679
- />
680
- {formErrors.depreciationMonths ? (
681
- <p className="mt-1 text-[11px] text-destructive">
682
- {formErrors.depreciationMonths}
683
- </p>
684
- ) : null}
685
- <p className="mt-1 text-[11px] text-muted-foreground">
686
- {t('hints.depreciationMonths')}
687
- </p>
688
- </div>
689
- )}
690
-
691
- {/* Notes — full width */}
692
- <div className="sm:col-span-2">
693
- <Label className="mb-1 block text-xs">
694
- {t('fields.notes')}
695
- </Label>
696
- <Textarea
697
- rows={2}
698
- className="resize-none"
699
- value={form.notes}
700
- onChange={(e) => setField('notes', e.target.value)}
701
- placeholder={t('placeholders.notes')}
702
- />
703
- </div>
704
- </div>
705
-
706
- {/* Actions */}
707
- <div className="mt-4 flex justify-end gap-2 border-t pt-3">
708
- <Button
709
- variant="ghost"
710
- size="sm"
711
- onClick={closeForm}
712
- disabled={saving}
713
- >
714
- <X className="mr-1 size-3.5" />
715
- {commonT('actions.cancel')}
716
- </Button>
717
- <Button
718
- size="sm"
719
- onClick={() => void handleSave()}
720
- disabled={saving || !form.costTypeId || !form.amount}
721
- >
722
- <Check className="mr-1 size-3.5" />
723
- {saving ? t('actions.saving') : commonT('actions.save')}
724
- </Button>
725
- </div>
726
- </CardContent>
727
- </Card>
728
- )}
729
-
730
- {/* ── Cost list ─────────────────────────────────────────────────────── */}
731
- {isLoading ? (
732
- <div className="space-y-1.5">
733
- {Array.from({ length: 3 }).map((_, i) => (
734
- <Skeleton key={i} className="h-11 w-full rounded-lg" />
735
- ))}
736
- </div>
737
- ) : costs.length > 0 ? (
738
- <div className="overflow-hidden rounded-lg border">
739
- {costs.map((cost, idx) => (
740
- <div
741
- key={cost.id}
742
- className={
743
- 'group flex items-start gap-2 px-3 py-2.5 transition-colors hover:bg-muted/30' +
744
- (idx > 0 ? ' border-t' : '') +
745
- (editingCostId === cost.id ? ' bg-primary/5' : '')
746
- }
747
- >
748
- {/* Info */}
749
- <div className="min-w-0 flex-1">
750
- <p className="truncate text-sm font-medium leading-tight">
751
- {cost.costTypeName}
752
- </p>
753
- {cost.description ? (
754
- <p className="mt-0.5 truncate text-[11px] text-muted-foreground">
755
- {cost.description}
756
- </p>
757
- ) : null}
758
- <div className="mt-1 flex flex-wrap items-center gap-1">
759
- <Badge
760
- variant="secondary"
761
- className="h-4.5 px-1.5 text-[10px] font-normal"
762
- >
763
- {getRecurrenceLabel(cost.recurrence)}
764
- </Badge>
765
- {(cost.allocatable ?? true) && (
766
- <Badge
767
- variant="outline"
768
- className="h-4.5 border-green-500/40 px-1.5 text-[10px] font-normal text-green-600 dark:border-green-500/30 dark:text-green-400"
769
- >
770
- {t('table.allocatable')}
771
- </Badge>
772
- )}
773
- {cost.startDate || cost.referenceDate ? (
774
- <span className="text-[10px] text-muted-foreground">
775
- {formatValidityRange(cost)}
776
- </span>
777
- ) : null}
778
- </div>
779
- </div>
780
-
781
- {/* Amount + actions */}
782
- <div className="flex shrink-0 items-start gap-1">
783
- <div className="text-right">
784
- <p className="text-sm font-semibold tabular-nums">
785
- {fmt(Number(cost.amount))}
786
- </p>
787
- {cost.recurrence === 'one_time' && cost.depreciationMonths ? (
788
- <p className="text-[10px] text-muted-foreground">
789
- /{cost.depreciationMonths}m
790
- </p>
791
- ) : null}
792
- </div>
793
- {!readOnly &&
794
- (confirmDeleteId === cost.id ? (
795
- <div className="flex items-center gap-0.5 pt-0.5">
796
- <Button
797
- variant="destructive"
798
- size="sm"
799
- className="h-6 px-2 text-[10px]"
800
- onClick={() => void handleDelete(cost.id)}
801
- >
802
- {commonT('actions.delete')}
803
- </Button>
804
- <Button
805
- variant="ghost"
806
- size="sm"
807
- className="h-6 px-2 text-[10px]"
808
- onClick={() => setConfirmDeleteId(null)}
809
- >
810
- {commonT('actions.cancel')}
811
- </Button>
812
- </div>
813
- ) : (
814
- <div className="flex items-center gap-0.5 pt-0.5 opacity-0 transition-opacity group-hover:opacity-100">
815
- <Button
816
- variant="ghost"
817
- size="icon"
818
- className="size-6"
819
- onClick={() => openEdit(cost)}
820
- disabled={isFormOpen}
821
- >
822
- <Pencil className="size-3" />
823
- </Button>
824
- <Button
825
- variant="ghost"
826
- size="icon"
827
- className="size-6 text-destructive hover:text-destructive"
828
- onClick={() => setConfirmDeleteId(cost.id)}
829
- disabled={isFormOpen}
830
- >
831
- <Trash2 className="size-3" />
832
- </Button>
833
- </div>
834
- ))}
835
- </div>
836
- </div>
837
- ))}
838
- {!readOnly && !isFormOpen && (
839
- <button
840
- type="button"
841
- onClick={openAdd}
842
- className="flex w-full items-center gap-1.5 border-t px-3 py-2 text-[11px] text-muted-foreground transition-colors hover:bg-muted/30 hover:text-foreground"
843
- >
844
- <Plus className="size-3" />
845
- {t('actions.add')}
846
- </button>
847
- )}
848
- </div>
849
- ) : !isFormOpen && !error ? (
850
- <div className="flex flex-col items-center gap-2 rounded-lg border border-dashed py-6 text-center">
851
- <DollarSign className="size-8 text-muted-foreground/40" />
852
- <p className="text-sm text-muted-foreground">{t('empty')}</p>
853
- {!readOnly && (
854
- <Button
855
- variant="ghost"
856
- size="sm"
857
- className="gap-1.5"
858
- onClick={openAdd}
859
- >
860
- <Plus className="size-3.5" />
861
- {t('actions.add')}
862
- </Button>
863
- )}
864
- </div>
865
- ) : null}
866
- </div>
867
- );
868
- }