@open-mercato/core 0.7.1-develop.7178.1.ab93fbaf4e → 0.7.1-develop.7180.1.9717fbbb43

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 (808) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/dist/generated/entities/staff_time_entry/index.js +14 -0
  3. package/dist/generated/entities/staff_time_entry/index.js.map +2 -2
  4. package/dist/generated/entities/staff_time_entry_tag/index.js +15 -0
  5. package/dist/generated/entities/staff_time_entry_tag/index.js.map +7 -0
  6. package/dist/generated/entities/staff_time_project/index.js +16 -0
  7. package/dist/generated/entities/staff_time_project/index.js.map +2 -2
  8. package/dist/generated/entities/staff_time_report/index.js +57 -0
  9. package/dist/generated/entities/staff_time_report/index.js.map +7 -0
  10. package/dist/generated/entities/staff_time_report_entry/index.js +27 -0
  11. package/dist/generated/entities/staff_time_report_entry/index.js.map +7 -0
  12. package/dist/generated/entities/staff_time_report_event/index.js +21 -0
  13. package/dist/generated/entities/staff_time_report_event/index.js.map +7 -0
  14. package/dist/generated/entities/staff_time_report_project/index.js +15 -0
  15. package/dist/generated/entities/staff_time_report_project/index.js.map +7 -0
  16. package/dist/generated/entities/staff_time_tag/index.js +21 -0
  17. package/dist/generated/entities/staff_time_tag/index.js.map +7 -0
  18. package/dist/generated/entities/staff_time_task/index.js +37 -0
  19. package/dist/generated/entities/staff_time_task/index.js.map +7 -0
  20. package/dist/generated/entities/staff_time_task_comment/index.js +21 -0
  21. package/dist/generated/entities/staff_time_task_comment/index.js.map +7 -0
  22. package/dist/generated/entities/staff_time_task_status/index.js +29 -0
  23. package/dist/generated/entities/staff_time_task_status/index.js.map +7 -0
  24. package/dist/generated/entities/staff_time_task_tag/index.js +15 -0
  25. package/dist/generated/entities/staff_time_task_tag/index.js.map +7 -0
  26. package/dist/generated/entities.ids.generated.js +11 -1
  27. package/dist/generated/entities.ids.generated.js.map +2 -2
  28. package/dist/generated/entity-fields-registry.js +149 -0
  29. package/dist/generated/entity-fields-registry.js.map +2 -2
  30. package/dist/helpers/integration/timesheetFixtures.js +7 -0
  31. package/dist/helpers/integration/timesheetFixtures.js.map +2 -2
  32. package/dist/modules/auth/cli.js +16 -0
  33. package/dist/modules/auth/cli.js.map +2 -2
  34. package/dist/modules/auth/lib/backendChrome.js +1 -0
  35. package/dist/modules/auth/lib/backendChrome.js.map +2 -2
  36. package/dist/modules/customer_accounts/lib/customerRoleAcls.js +44 -0
  37. package/dist/modules/customer_accounts/lib/customerRoleAcls.js.map +7 -0
  38. package/dist/modules/customer_accounts/setup.js +1 -28
  39. package/dist/modules/customer_accounts/setup.js.map +2 -2
  40. package/dist/modules/data_sync/api/options.js +2 -0
  41. package/dist/modules/data_sync/api/options.js.map +2 -2
  42. package/dist/modules/data_sync/backend/data-sync/page.js +39 -17
  43. package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
  44. package/dist/modules/data_sync/lib/start-controls.js +42 -0
  45. package/dist/modules/data_sync/lib/start-controls.js.map +7 -0
  46. package/dist/modules/staff/acl.js +9 -1
  47. package/dist/modules/staff/acl.js.map +2 -2
  48. package/dist/modules/staff/ai-agents.js +142 -0
  49. package/dist/modules/staff/ai-agents.js.map +7 -0
  50. package/dist/modules/staff/ai-tools/time-tracking-pack.js +348 -0
  51. package/dist/modules/staff/ai-tools/time-tracking-pack.js.map +7 -0
  52. package/dist/modules/staff/ai-tools/types.js +54 -0
  53. package/dist/modules/staff/ai-tools/types.js.map +7 -0
  54. package/dist/modules/staff/ai-tools.js +8 -0
  55. package/dist/modules/staff/ai-tools.js.map +7 -0
  56. package/dist/modules/staff/analytics.js +84 -1
  57. package/dist/modules/staff/analytics.js.map +2 -2
  58. package/dist/modules/staff/api/guards.js +37 -3
  59. package/dist/modules/staff/api/guards.js.map +2 -2
  60. package/dist/modules/staff/api/leave-requests/accept/route.js +1 -3
  61. package/dist/modules/staff/api/leave-requests/accept/route.js.map +2 -2
  62. package/dist/modules/staff/api/leave-requests/reject/route.js +1 -3
  63. package/dist/modules/staff/api/leave-requests/reject/route.js.map +2 -2
  64. package/dist/modules/staff/api/portal/time-reports/[id]/route.js +131 -0
  65. package/dist/modules/staff/api/portal/time-reports/[id]/route.js.map +7 -0
  66. package/dist/modules/staff/api/portal/time-reports/route.js +179 -0
  67. package/dist/modules/staff/api/portal/time-reports/route.js.map +7 -0
  68. package/dist/modules/staff/api/team-members/self/route.js +1 -3
  69. package/dist/modules/staff/api/team-members/self/route.js.map +2 -2
  70. package/dist/modules/staff/api/team-members/tags/assign/route.js +1 -3
  71. package/dist/modules/staff/api/team-members/tags/assign/route.js.map +2 -2
  72. package/dist/modules/staff/api/team-members/tags/unassign/route.js +1 -3
  73. package/dist/modules/staff/api/team-members/tags/unassign/route.js.map +2 -2
  74. package/dist/modules/staff/api/timesheets/_shared/withTimesheetInterceptors.js +174 -0
  75. package/dist/modules/staff/api/timesheets/_shared/withTimesheetInterceptors.js.map +7 -0
  76. package/dist/modules/staff/api/timesheets/access-requests/route.js +226 -0
  77. package/dist/modules/staff/api/timesheets/access-requests/route.js.map +7 -0
  78. package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js +15 -8
  79. package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js.map +2 -2
  80. package/dist/modules/staff/api/timesheets/my-projects/route.js +13 -1
  81. package/dist/modules/staff/api/timesheets/my-projects/route.js.map +2 -2
  82. package/dist/modules/staff/api/timesheets/my-work/myWorkAggregate.js +42 -0
  83. package/dist/modules/staff/api/timesheets/my-work/myWorkAggregate.js.map +7 -0
  84. package/dist/modules/staff/api/timesheets/my-work/route.js +383 -0
  85. package/dist/modules/staff/api/timesheets/my-work/route.js.map +7 -0
  86. package/dist/modules/staff/api/timesheets/projects/kpis/route.js +14 -2
  87. package/dist/modules/staff/api/timesheets/projects/kpis/route.js.map +2 -2
  88. package/dist/modules/staff/api/timesheets/reports/[id]/close/route.js +168 -0
  89. package/dist/modules/staff/api/timesheets/reports/[id]/close/route.js.map +7 -0
  90. package/dist/modules/staff/api/timesheets/reports/[id]/export/route.js +246 -0
  91. package/dist/modules/staff/api/timesheets/reports/[id]/export/route.js.map +7 -0
  92. package/dist/modules/staff/api/timesheets/reports/[id]/sheet/route.js +183 -0
  93. package/dist/modules/staff/api/timesheets/reports/[id]/sheet/route.js.map +7 -0
  94. package/dist/modules/staff/api/timesheets/reports/[id]/unlock/route.js +164 -0
  95. package/dist/modules/staff/api/timesheets/reports/[id]/unlock/route.js.map +7 -0
  96. package/dist/modules/staff/api/timesheets/reports/preview/route.js +360 -0
  97. package/dist/modules/staff/api/timesheets/reports/preview/route.js.map +7 -0
  98. package/dist/modules/staff/api/timesheets/reports/route.js +316 -0
  99. package/dist/modules/staff/api/timesheets/reports/route.js.map +7 -0
  100. package/dist/modules/staff/api/timesheets/reports/shared.js +63 -0
  101. package/dist/modules/staff/api/timesheets/reports/shared.js.map +7 -0
  102. package/dist/modules/staff/api/timesheets/settings/reapply-rounding/route.js +164 -0
  103. package/dist/modules/staff/api/timesheets/settings/reapply-rounding/route.js.map +7 -0
  104. package/dist/modules/staff/api/timesheets/settings/rounding-impact/route.js +168 -0
  105. package/dist/modules/staff/api/timesheets/settings/rounding-impact/route.js.map +7 -0
  106. package/dist/modules/staff/api/timesheets/settings/route.js +199 -0
  107. package/dist/modules/staff/api/timesheets/settings/route.js.map +7 -0
  108. package/dist/modules/staff/api/timesheets/tags/access.js +76 -0
  109. package/dist/modules/staff/api/timesheets/tags/access.js.map +7 -0
  110. package/dist/modules/staff/api/timesheets/tags/entry-assignments/route.js +235 -0
  111. package/dist/modules/staff/api/timesheets/tags/entry-assignments/route.js.map +7 -0
  112. package/dist/modules/staff/api/timesheets/tags/route.js +160 -0
  113. package/dist/modules/staff/api/timesheets/tags/route.js.map +7 -0
  114. package/dist/modules/staff/api/timesheets/tags/task-assignments/route.js +233 -0
  115. package/dist/modules/staff/api/timesheets/tags/task-assignments/route.js.map +7 -0
  116. package/dist/modules/staff/api/timesheets/task-statuses/route.js +188 -0
  117. package/dist/modules/staff/api/timesheets/task-statuses/route.js.map +7 -0
  118. package/dist/modules/staff/api/timesheets/tasks/[id]/comments/route.js +399 -0
  119. package/dist/modules/staff/api/timesheets/tasks/[id]/comments/route.js.map +7 -0
  120. package/dist/modules/staff/api/timesheets/tasks/[id]/status/route.js +210 -0
  121. package/dist/modules/staff/api/timesheets/tasks/[id]/status/route.js.map +7 -0
  122. package/dist/modules/staff/api/timesheets/tasks/route.js +333 -0
  123. package/dist/modules/staff/api/timesheets/tasks/route.js.map +7 -0
  124. package/dist/modules/staff/api/timesheets/time-entries/[id]/duplicate/route.js +228 -0
  125. package/dist/modules/staff/api/timesheets/time-entries/[id]/duplicate/route.js.map +7 -0
  126. package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.js +29 -10
  127. package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.js.map +2 -2
  128. package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js +31 -18
  129. package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js.map +2 -2
  130. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js +21 -7
  131. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js.map +2 -2
  132. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js +27 -7
  133. package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js.map +2 -2
  134. package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js +215 -32
  135. package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js.map +2 -2
  136. package/dist/modules/staff/api/timesheets/time-entries/copy-day/route.js +378 -0
  137. package/dist/modules/staff/api/timesheets/time-entries/copy-day/route.js.map +7 -0
  138. package/dist/modules/staff/api/timesheets/time-entries/overlaps/route.js +340 -0
  139. package/dist/modules/staff/api/timesheets/time-entries/overlaps/route.js.map +7 -0
  140. package/dist/modules/staff/api/timesheets/time-entries/route.js +238 -26
  141. package/dist/modules/staff/api/timesheets/time-entries/route.js.map +2 -2
  142. package/dist/modules/staff/api/timesheets/time-entries/start-timer/route.js +23 -8
  143. package/dist/modules/staff/api/timesheets/time-entries/start-timer/route.js.map +2 -2
  144. package/dist/modules/staff/api/timesheets/time-projects/[id]/change-currency/route.js +209 -0
  145. package/dist/modules/staff/api/timesheets/time-projects/[id]/change-currency/route.js.map +7 -0
  146. package/dist/modules/staff/api/timesheets/time-projects/[id]/employees/route.js +59 -2
  147. package/dist/modules/staff/api/timesheets/time-projects/[id]/employees/route.js.map +2 -2
  148. package/dist/modules/staff/api/timesheets/time-projects/route.js +264 -22
  149. package/dist/modules/staff/api/timesheets/time-projects/route.js.map +2 -2
  150. package/dist/modules/staff/backend/staff/time-tracking/board/page.js +110 -0
  151. package/dist/modules/staff/backend/staff/time-tracking/board/page.js.map +7 -0
  152. package/dist/modules/staff/backend/staff/time-tracking/board/page.meta.js +18 -0
  153. package/dist/modules/staff/backend/staff/time-tracking/board/page.meta.js.map +7 -0
  154. package/dist/modules/staff/backend/staff/time-tracking/entries/page.js +981 -0
  155. package/dist/modules/staff/backend/staff/time-tracking/entries/page.js.map +7 -0
  156. package/dist/modules/staff/backend/staff/time-tracking/entries/page.meta.js +18 -0
  157. package/dist/modules/staff/backend/staff/time-tracking/entries/page.meta.js.map +7 -0
  158. package/dist/modules/staff/backend/staff/time-tracking/page.js +583 -0
  159. package/dist/modules/staff/backend/staff/time-tracking/page.js.map +7 -0
  160. package/dist/modules/staff/backend/staff/time-tracking/page.meta.js +15 -0
  161. package/dist/modules/staff/backend/staff/time-tracking/page.meta.js.map +7 -0
  162. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.js +65 -0
  163. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.js.map +7 -0
  164. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.meta.js +16 -0
  165. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.meta.js.map +7 -0
  166. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.js +229 -0
  167. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.js.map +7 -0
  168. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.meta.js +16 -0
  169. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.meta.js.map +7 -0
  170. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.js +1014 -0
  171. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.js.map +7 -0
  172. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.meta.js +16 -0
  173. package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.meta.js.map +7 -0
  174. package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.js +97 -0
  175. package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.js.map +7 -0
  176. package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.meta.js +16 -0
  177. package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.meta.js.map +7 -0
  178. package/dist/modules/staff/backend/staff/time-tracking/projects/page.js +1040 -0
  179. package/dist/modules/staff/backend/staff/time-tracking/projects/page.js.map +7 -0
  180. package/dist/modules/staff/backend/staff/time-tracking/projects/page.meta.js +19 -0
  181. package/dist/modules/staff/backend/staff/time-tracking/projects/page.meta.js.map +7 -0
  182. package/dist/modules/staff/backend/staff/time-tracking/projects/projectFormConfig.js +353 -0
  183. package/dist/modules/staff/backend/staff/time-tracking/projects/projectFormConfig.js.map +7 -0
  184. package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.js +457 -0
  185. package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.js.map +7 -0
  186. package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.meta.js +16 -0
  187. package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.meta.js.map +7 -0
  188. package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.js +697 -0
  189. package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.js.map +7 -0
  190. package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.meta.js +16 -0
  191. package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.meta.js.map +7 -0
  192. package/dist/modules/staff/backend/staff/time-tracking/reports/page.js +174 -0
  193. package/dist/modules/staff/backend/staff/time-tracking/reports/page.js.map +7 -0
  194. package/dist/modules/staff/backend/staff/time-tracking/reports/page.meta.js +18 -0
  195. package/dist/modules/staff/backend/staff/time-tracking/reports/page.meta.js.map +7 -0
  196. package/dist/modules/staff/backend/staff/time-tracking/settings/page.js +546 -0
  197. package/dist/modules/staff/backend/staff/time-tracking/settings/page.js.map +7 -0
  198. package/dist/modules/staff/backend/staff/time-tracking/settings/page.meta.js +18 -0
  199. package/dist/modules/staff/backend/staff/time-tracking/settings/page.meta.js.map +7 -0
  200. package/dist/modules/staff/backend/staff/time-tracking/timesheet/GridView.js +710 -0
  201. package/dist/modules/staff/backend/staff/time-tracking/timesheet/GridView.js.map +7 -0
  202. package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.js +646 -0
  203. package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.js.map +7 -0
  204. package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.meta.js +18 -0
  205. package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.meta.js.map +7 -0
  206. package/dist/modules/staff/backend/staff/timesheets/page.js +4 -793
  207. package/dist/modules/staff/backend/staff/timesheets/page.js.map +2 -2
  208. package/dist/modules/staff/backend/staff/timesheets/page.meta.js +2 -7
  209. package/dist/modules/staff/backend/staff/timesheets/page.meta.js.map +2 -2
  210. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.js +5 -136
  211. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.js.map +2 -2
  212. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.js +1 -7
  213. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.js.map +2 -2
  214. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js +5 -445
  215. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js.map +3 -3
  216. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.js +1 -7
  217. package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.js.map +2 -2
  218. package/dist/modules/staff/backend/staff/timesheets/projects/create/page.js +4 -76
  219. package/dist/modules/staff/backend/staff/timesheets/projects/create/page.js.map +2 -2
  220. package/dist/modules/staff/backend/staff/timesheets/projects/create/page.meta.js +1 -7
  221. package/dist/modules/staff/backend/staff/timesheets/projects/create/page.meta.js.map +2 -2
  222. package/dist/modules/staff/backend/staff/timesheets/projects/page.js +4 -613
  223. package/dist/modules/staff/backend/staff/timesheets/projects/page.js.map +2 -2
  224. package/dist/modules/staff/backend/staff/timesheets/projects/page.meta.js +2 -17
  225. package/dist/modules/staff/backend/staff/timesheets/projects/page.meta.js.map +2 -2
  226. package/dist/modules/staff/ce.js +40 -0
  227. package/dist/modules/staff/ce.js.map +2 -2
  228. package/dist/modules/staff/cli.js +166 -1
  229. package/dist/modules/staff/cli.js.map +2 -2
  230. package/dist/modules/staff/commands/index.js +5 -0
  231. package/dist/modules/staff/commands/index.js.map +2 -2
  232. package/dist/modules/staff/commands/timesheets-entries.js +569 -21
  233. package/dist/modules/staff/commands/timesheets-entries.js.map +3 -3
  234. package/dist/modules/staff/commands/timesheets-projects.js +450 -7
  235. package/dist/modules/staff/commands/timesheets-projects.js.map +2 -2
  236. package/dist/modules/staff/commands/timesheets-reports.js +1036 -0
  237. package/dist/modules/staff/commands/timesheets-reports.js.map +7 -0
  238. package/dist/modules/staff/commands/timesheets-tags.js +1015 -0
  239. package/dist/modules/staff/commands/timesheets-tags.js.map +7 -0
  240. package/dist/modules/staff/commands/timesheets-task-comments.js +438 -0
  241. package/dist/modules/staff/commands/timesheets-task-comments.js.map +7 -0
  242. package/dist/modules/staff/commands/timesheets-task-statuses.js +723 -0
  243. package/dist/modules/staff/commands/timesheets-task-statuses.js.map +7 -0
  244. package/dist/modules/staff/commands/timesheets-tasks.js +834 -0
  245. package/dist/modules/staff/commands/timesheets-tasks.js.map +7 -0
  246. package/dist/modules/staff/data/enrichers.js +426 -12
  247. package/dist/modules/staff/data/enrichers.js.map +2 -2
  248. package/dist/modules/staff/data/entities.js +552 -3
  249. package/dist/modules/staff/data/entities.js.map +2 -2
  250. package/dist/modules/staff/data/extensions.js +41 -0
  251. package/dist/modules/staff/data/extensions.js.map +7 -0
  252. package/dist/modules/staff/data/validators.js +254 -9
  253. package/dist/modules/staff/data/validators.js.map +2 -2
  254. package/dist/modules/staff/di.js +42 -1
  255. package/dist/modules/staff/di.js.map +2 -2
  256. package/dist/modules/staff/events.js +84 -6
  257. package/dist/modules/staff/events.js.map +2 -2
  258. package/dist/modules/staff/events.payloads.js +158 -0
  259. package/dist/modules/staff/events.payloads.js.map +7 -0
  260. package/dist/modules/staff/extension-points.js +261 -0
  261. package/dist/modules/staff/extension-points.js.map +7 -0
  262. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.js +138 -0
  263. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.js.map +7 -0
  264. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.meta.js +12 -0
  265. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.meta.js.map +7 -0
  266. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.js +133 -0
  267. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.js.map +7 -0
  268. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.meta.js +19 -0
  269. package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.meta.js.map +7 -0
  270. package/dist/modules/staff/lib/crud.js +11 -1
  271. package/dist/modules/staff/lib/crud.js.map +2 -2
  272. package/dist/modules/staff/lib/time-tracking/access.js +92 -0
  273. package/dist/modules/staff/lib/time-tracking/access.js.map +7 -0
  274. package/dist/modules/staff/lib/time-tracking/billability.js +39 -0
  275. package/dist/modules/staff/lib/time-tracking/billability.js.map +7 -0
  276. package/dist/modules/staff/lib/time-tracking/capacity.js +68 -0
  277. package/dist/modules/staff/lib/time-tracking/capacity.js.map +7 -0
  278. package/dist/modules/staff/lib/time-tracking/componentContracts.js +15 -0
  279. package/dist/modules/staff/lib/time-tracking/componentContracts.js.map +7 -0
  280. package/dist/modules/staff/lib/time-tracking/cost.js +82 -0
  281. package/dist/modules/staff/lib/time-tracking/cost.js.map +7 -0
  282. package/dist/modules/staff/lib/time-tracking/duration.js +55 -0
  283. package/dist/modules/staff/lib/time-tracking/duration.js.map +7 -0
  284. package/dist/modules/staff/lib/time-tracking/featureAccess.js +41 -0
  285. package/dist/modules/staff/lib/time-tracking/featureAccess.js.map +7 -0
  286. package/dist/modules/staff/lib/time-tracking/interval.js +72 -0
  287. package/dist/modules/staff/lib/time-tracking/interval.js.map +7 -0
  288. package/dist/modules/staff/lib/time-tracking/migrateProjectCodes.js +88 -0
  289. package/dist/modules/staff/lib/time-tracking/migrateProjectCodes.js.map +7 -0
  290. package/dist/modules/staff/lib/time-tracking/moneyVisibility.js +10 -0
  291. package/dist/modules/staff/lib/time-tracking/moneyVisibility.js.map +7 -0
  292. package/dist/modules/staff/lib/time-tracking/overlap.js +87 -0
  293. package/dist/modules/staff/lib/time-tracking/overlap.js.map +7 -0
  294. package/dist/modules/staff/lib/time-tracking/portalRecipients.js +27 -0
  295. package/dist/modules/staff/lib/time-tracking/portalRecipients.js.map +7 -0
  296. package/dist/modules/staff/lib/time-tracking/portalReports.js +16 -0
  297. package/dist/modules/staff/lib/time-tracking/portalReports.js.map +7 -0
  298. package/dist/modules/staff/lib/time-tracking/projectCode.js +135 -0
  299. package/dist/modules/staff/lib/time-tracking/projectCode.js.map +7 -0
  300. package/dist/modules/staff/lib/time-tracking/reapplyRounding.js +187 -0
  301. package/dist/modules/staff/lib/time-tracking/reapplyRounding.js.map +7 -0
  302. package/dist/modules/staff/lib/time-tracking/recalculationRunner.js +80 -0
  303. package/dist/modules/staff/lib/time-tracking/recalculationRunner.js.map +7 -0
  304. package/dist/modules/staff/lib/time-tracking/recalculations.js +56 -0
  305. package/dist/modules/staff/lib/time-tracking/recalculations.js.map +7 -0
  306. package/dist/modules/staff/lib/time-tracking/registries/invoke.js +63 -0
  307. package/dist/modules/staff/lib/time-tracking/registries/invoke.js.map +7 -0
  308. package/dist/modules/staff/lib/time-tracking/registries/registry.js +62 -0
  309. package/dist/modules/staff/lib/time-tracking/registries/registry.js.map +7 -0
  310. package/dist/modules/staff/lib/time-tracking/registries/scope.js +21 -0
  311. package/dist/modules/staff/lib/time-tracking/registries/scope.js.map +7 -0
  312. package/dist/modules/staff/lib/time-tracking/rollup.js +34 -0
  313. package/dist/modules/staff/lib/time-tracking/rollup.js.map +7 -0
  314. package/dist/modules/staff/lib/time-tracking/rounding.js +66 -0
  315. package/dist/modules/staff/lib/time-tracking/rounding.js.map +7 -0
  316. package/dist/modules/staff/lib/time-tracking/roundingImpact.js +39 -0
  317. package/dist/modules/staff/lib/time-tracking/roundingImpact.js.map +7 -0
  318. package/dist/modules/staff/lib/time-tracking/settingKeys.js +214 -0
  319. package/dist/modules/staff/lib/time-tracking/settingKeys.js.map +7 -0
  320. package/dist/modules/staff/lib/time-tracking/settings.js +87 -0
  321. package/dist/modules/staff/lib/time-tracking/settings.js.map +7 -0
  322. package/dist/modules/staff/lib/time-tracking/sqlInClause.js +9 -0
  323. package/dist/modules/staff/lib/time-tracking/sqlInClause.js.map +7 -0
  324. package/dist/modules/staff/lib/time-tracking/timeEntrySources.js +48 -0
  325. package/dist/modules/staff/lib/time-tracking/timeEntrySources.js.map +7 -0
  326. package/dist/modules/staff/lib/time-tracking-ui/BoardFilterChips.js +283 -0
  327. package/dist/modules/staff/lib/time-tracking-ui/BoardFilterChips.js.map +7 -0
  328. package/dist/modules/staff/lib/time-tracking-ui/CustomerPicker.js +324 -0
  329. package/dist/modules/staff/lib/time-tracking-ui/CustomerPicker.js.map +7 -0
  330. package/dist/modules/staff/lib/time-tracking-ui/DurationInput.js +121 -0
  331. package/dist/modules/staff/lib/time-tracking-ui/DurationInput.js.map +7 -0
  332. package/dist/modules/staff/lib/time-tracking-ui/EntryDetailsFields.js +188 -0
  333. package/dist/modules/staff/lib/time-tracking-ui/EntryDetailsFields.js.map +7 -0
  334. package/dist/modules/staff/lib/time-tracking-ui/EntryFilterBar.js +89 -0
  335. package/dist/modules/staff/lib/time-tracking-ui/EntryFilterBar.js.map +7 -0
  336. package/dist/modules/staff/lib/time-tracking-ui/KanbanBoard.js +855 -0
  337. package/dist/modules/staff/lib/time-tracking-ui/KanbanBoard.js.map +7 -0
  338. package/dist/modules/staff/lib/time-tracking-ui/KanbanCard.js +360 -0
  339. package/dist/modules/staff/lib/time-tracking-ui/KanbanCard.js.map +7 -0
  340. package/dist/modules/staff/lib/time-tracking-ui/KanbanColumn.js +259 -0
  341. package/dist/modules/staff/lib/time-tracking-ui/KanbanColumn.js.map +7 -0
  342. package/dist/modules/staff/lib/time-tracking-ui/NewTaskDialog.js +238 -0
  343. package/dist/modules/staff/lib/time-tracking-ui/NewTaskDialog.js.map +7 -0
  344. package/dist/modules/staff/lib/time-tracking-ui/NoProjectAccess.js +130 -0
  345. package/dist/modules/staff/lib/time-tracking-ui/NoProjectAccess.js.map +7 -0
  346. package/dist/modules/staff/lib/time-tracking-ui/PeriodSelector.js +98 -0
  347. package/dist/modules/staff/lib/time-tracking-ui/PeriodSelector.js.map +7 -0
  348. package/dist/modules/staff/lib/time-tracking-ui/PhasePlaceholder.js +27 -0
  349. package/dist/modules/staff/lib/time-tracking-ui/PhasePlaceholder.js.map +7 -0
  350. package/dist/modules/staff/lib/time-tracking-ui/ProjectCodeField.js +166 -0
  351. package/dist/modules/staff/lib/time-tracking-ui/ProjectCodeField.js.map +7 -0
  352. package/dist/modules/staff/lib/time-tracking-ui/ProjectCurrencyField.js +295 -0
  353. package/dist/modules/staff/lib/time-tracking-ui/ProjectCurrencyField.js.map +7 -0
  354. package/dist/modules/staff/lib/time-tracking-ui/ProjectFormSections.js +212 -0
  355. package/dist/modules/staff/lib/time-tracking-ui/ProjectFormSections.js.map +7 -0
  356. package/dist/modules/staff/lib/time-tracking-ui/ProjectTeamDrawer.js +729 -0
  357. package/dist/modules/staff/lib/time-tracking-ui/ProjectTeamDrawer.js.map +7 -0
  358. package/dist/modules/staff/lib/time-tracking-ui/ReportSheet.js +217 -0
  359. package/dist/modules/staff/lib/time-tracking-ui/ReportSheet.js.map +7 -0
  360. package/dist/modules/staff/lib/time-tracking-ui/TagPicker.js +158 -0
  361. package/dist/modules/staff/lib/time-tracking-ui/TagPicker.js.map +7 -0
  362. package/dist/modules/staff/lib/time-tracking-ui/TaskBoardScreen.js +224 -0
  363. package/dist/modules/staff/lib/time-tracking-ui/TaskBoardScreen.js.map +7 -0
  364. package/dist/modules/staff/lib/time-tracking-ui/TaskCommentThread.js +93 -0
  365. package/dist/modules/staff/lib/time-tracking-ui/TaskCommentThread.js.map +7 -0
  366. package/dist/modules/staff/lib/time-tracking-ui/TaskDrawer.js +1196 -0
  367. package/dist/modules/staff/lib/time-tracking-ui/TaskDrawer.js.map +7 -0
  368. package/dist/modules/staff/lib/time-tracking-ui/TaskListView.js +176 -0
  369. package/dist/modules/staff/lib/time-tracking-ui/TaskListView.js.map +7 -0
  370. package/dist/modules/staff/lib/time-tracking-ui/TaskPicker.js +307 -0
  371. package/dist/modules/staff/lib/time-tracking-ui/TaskPicker.js.map +7 -0
  372. package/dist/modules/staff/lib/time-tracking-ui/TaskQuickLog.js +284 -0
  373. package/dist/modules/staff/lib/time-tracking-ui/TaskQuickLog.js.map +7 -0
  374. package/dist/modules/staff/lib/time-tracking-ui/TimeEntriesSummaryFooter.js +73 -0
  375. package/dist/modules/staff/lib/time-tracking-ui/TimeEntriesSummaryFooter.js.map +7 -0
  376. package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDialog.js +1499 -0
  377. package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDialog.js.map +7 -0
  378. package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDurationCell.js +95 -0
  379. package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDurationCell.js.map +7 -0
  380. package/dist/modules/staff/lib/time-tracking-ui/TimesheetCalendar.js +188 -0
  381. package/dist/modules/staff/lib/time-tracking-ui/TimesheetCalendar.js.map +7 -0
  382. package/dist/modules/staff/lib/time-tracking-ui/TimesheetPeriodFooter.js +61 -0
  383. package/dist/modules/staff/lib/time-tracking-ui/TimesheetPeriodFooter.js.map +7 -0
  384. package/dist/modules/staff/lib/time-tracking-ui/TimesheetViewSwitch.js +45 -0
  385. package/dist/modules/staff/lib/time-tracking-ui/TimesheetViewSwitch.js.map +7 -0
  386. package/dist/modules/staff/lib/time-tracking-ui/boardDirectory.js +176 -0
  387. package/dist/modules/staff/lib/time-tracking-ui/boardDirectory.js.map +7 -0
  388. package/dist/modules/staff/lib/time-tracking-ui/boardFilters.js +82 -0
  389. package/dist/modules/staff/lib/time-tracking-ui/boardFilters.js.map +7 -0
  390. package/dist/modules/staff/lib/time-tracking-ui/boardSummary.js +5 -0
  391. package/dist/modules/staff/lib/time-tracking-ui/boardSummary.js.map +7 -0
  392. package/dist/modules/staff/lib/time-tracking-ui/kanbanBoardData.js +152 -0
  393. package/dist/modules/staff/lib/time-tracking-ui/kanbanBoardData.js.map +7 -0
  394. package/dist/modules/staff/lib/time-tracking-ui/projectTeamAssignment.js +92 -0
  395. package/dist/modules/staff/lib/time-tracking-ui/projectTeamAssignment.js.map +7 -0
  396. package/dist/modules/staff/lib/time-tracking-ui/taskDrawerData.js +111 -0
  397. package/dist/modules/staff/lib/time-tracking-ui/taskDrawerData.js.map +7 -0
  398. package/dist/modules/staff/lib/time-tracking-ui/timeEntryDialogState.js +243 -0
  399. package/dist/modules/staff/lib/time-tracking-ui/timeEntryDialogState.js.map +7 -0
  400. package/dist/modules/staff/lib/time-tracking-ui/timeEntryListData.js +151 -0
  401. package/dist/modules/staff/lib/time-tracking-ui/timeEntryListData.js.map +7 -0
  402. package/dist/modules/staff/lib/time-tracking-ui/timeTrackingSettingsForm.js +105 -0
  403. package/dist/modules/staff/lib/time-tracking-ui/timeTrackingSettingsForm.js.map +7 -0
  404. package/dist/modules/staff/lib/time-tracking-ui/timesheetData.js +132 -0
  405. package/dist/modules/staff/lib/time-tracking-ui/timesheetData.js.map +7 -0
  406. package/dist/modules/staff/lib/time-tracking-ui/timesheetPeriod.js +205 -0
  407. package/dist/modules/staff/lib/time-tracking-ui/timesheetPeriod.js.map +7 -0
  408. package/dist/modules/staff/lib/time-tracking-ui/timesheetTargets.js +53 -0
  409. package/dist/modules/staff/lib/time-tracking-ui/timesheetTargets.js.map +7 -0
  410. package/dist/modules/staff/lib/time-tracking-ui/useBoardFilters.js +77 -0
  411. package/dist/modules/staff/lib/time-tracking-ui/useBoardFilters.js.map +7 -0
  412. package/dist/modules/staff/lib/time-tracking-ui/useTimesheetPreferences.js +151 -0
  413. package/dist/modules/staff/lib/time-tracking-ui/useTimesheetPreferences.js.map +7 -0
  414. package/dist/modules/staff/lib/timeTrackingSeeds.js +809 -0
  415. package/dist/modules/staff/lib/timeTrackingSeeds.js.map +7 -0
  416. package/dist/modules/staff/lib/timesheets/timeEntryCacheInvalidation.js +2 -3
  417. package/dist/modules/staff/lib/timesheets/timeEntryCacheInvalidation.js.map +2 -2
  418. package/dist/modules/staff/lib/timesheets/timeEntryDecoration.js +152 -0
  419. package/dist/modules/staff/lib/timesheets/timeEntryDecoration.js.map +7 -0
  420. package/dist/modules/staff/lib/timesheets-projects/budgetBurn.js +36 -0
  421. package/dist/modules/staff/lib/timesheets-projects/budgetBurn.js.map +7 -0
  422. package/dist/modules/staff/lib/timesheets-projects/budgetThreshold.js +66 -0
  423. package/dist/modules/staff/lib/timesheets-projects/budgetThreshold.js.map +7 -0
  424. package/dist/modules/staff/lib/timesheets-projects/budgetThresholdState.js +78 -0
  425. package/dist/modules/staff/lib/timesheets-projects/budgetThresholdState.js.map +7 -0
  426. package/dist/modules/staff/lib/timesheets-projects/computeProjectFinancials.js +81 -0
  427. package/dist/modules/staff/lib/timesheets-projects/computeProjectFinancials.js.map +7 -0
  428. package/dist/modules/staff/lib/timesheets-projects/reportSelection.js +44 -0
  429. package/dist/modules/staff/lib/timesheets-projects/reportSelection.js.map +7 -0
  430. package/dist/modules/staff/lib/timesheets-projects-ui/AssignMembersDialog.js +169 -0
  431. package/dist/modules/staff/lib/timesheets-projects-ui/AssignMembersDialog.js.map +7 -0
  432. package/dist/modules/staff/lib/timesheets-projects-ui/ProjectBudgetCell.js +22 -0
  433. package/dist/modules/staff/lib/timesheets-projects-ui/ProjectBudgetCell.js.map +7 -0
  434. package/dist/modules/staff/lib/timesheets-projects-ui/ProjectCard.js +51 -1
  435. package/dist/modules/staff/lib/timesheets-projects-ui/ProjectCard.js.map +2 -2
  436. package/dist/modules/staff/lib/timesheets-projects-ui/ProjectsBulkActionsBar.js +70 -0
  437. package/dist/modules/staff/lib/timesheets-projects-ui/ProjectsBulkActionsBar.js.map +7 -0
  438. package/dist/modules/staff/lib/timesheets-reports/buildReportSheet.js +63 -0
  439. package/dist/modules/staff/lib/timesheets-reports/buildReportSheet.js.map +7 -0
  440. package/dist/modules/staff/lib/timesheets-reports/loadReportData.js +170 -0
  441. package/dist/modules/staff/lib/timesheets-reports/loadReportData.js.map +7 -0
  442. package/dist/modules/staff/lib/timesheets-reports/pdf.js +205 -0
  443. package/dist/modules/staff/lib/timesheets-reports/pdf.js.map +7 -0
  444. package/dist/modules/staff/lib/timesheets-reports/reportApprovalPolicies.js +68 -0
  445. package/dist/modules/staff/lib/timesheets-reports/reportApprovalPolicies.js.map +7 -0
  446. package/dist/modules/staff/lib/timesheets-reports/reportConfigData.js +135 -0
  447. package/dist/modules/staff/lib/timesheets-reports/reportConfigData.js.map +7 -0
  448. package/dist/modules/staff/lib/timesheets-reports/reportConfigState.js +48 -0
  449. package/dist/modules/staff/lib/timesheets-reports/reportConfigState.js.map +7 -0
  450. package/dist/modules/staff/lib/timesheets-reports/reportExport.js +262 -0
  451. package/dist/modules/staff/lib/timesheets-reports/reportExport.js.map +7 -0
  452. package/dist/modules/staff/lib/timesheets-reports/reportExportFormats.js +34 -0
  453. package/dist/modules/staff/lib/timesheets-reports/reportExportFormats.js.map +7 -0
  454. package/dist/modules/staff/lib/timesheets-reports/reportGroupings.js +79 -0
  455. package/dist/modules/staff/lib/timesheets-reports/reportGroupings.js.map +7 -0
  456. package/dist/modules/staff/lib/timesheets-reports/reportLabels.js +11 -0
  457. package/dist/modules/staff/lib/timesheets-reports/reportLabels.js.map +7 -0
  458. package/dist/modules/staff/lib/timesheets-reports/reportReference.js +83 -0
  459. package/dist/modules/staff/lib/timesheets-reports/reportReference.js.map +7 -0
  460. package/dist/modules/staff/lib/timesheets-reports/reportRows.js +42 -0
  461. package/dist/modules/staff/lib/timesheets-reports/reportRows.js.map +7 -0
  462. package/dist/modules/staff/lib/timesheets-reports/reportSheetData.js +107 -0
  463. package/dist/modules/staff/lib/timesheets-reports/reportSheetData.js.map +7 -0
  464. package/dist/modules/staff/lib/timesheets-reports/reportTotals.js +289 -0
  465. package/dist/modules/staff/lib/timesheets-reports/reportTotals.js.map +7 -0
  466. package/dist/modules/staff/lib/timesheets-reports/xlsx.js +145 -0
  467. package/dist/modules/staff/lib/timesheets-reports/xlsx.js.map +7 -0
  468. package/dist/modules/staff/lib/timesheets-tasks/computeTaskRollups.js +116 -0
  469. package/dist/modules/staff/lib/timesheets-tasks/computeTaskRollups.js.map +7 -0
  470. package/dist/modules/staff/lib/timesheets-tasks/defaultStatusTemplate.js +50 -0
  471. package/dist/modules/staff/lib/timesheets-tasks/defaultStatusTemplate.js.map +7 -0
  472. package/dist/modules/staff/lib/timesheets-tasks/seedProjectStatuses.js +27 -0
  473. package/dist/modules/staff/lib/timesheets-tasks/seedProjectStatuses.js.map +7 -0
  474. package/dist/modules/staff/lib/timesheets-tasks/statusPositions.js +65 -0
  475. package/dist/modules/staff/lib/timesheets-tasks/statusPositions.js.map +7 -0
  476. package/dist/modules/staff/lib/timesheets-tasks/statusSlug.js +31 -0
  477. package/dist/modules/staff/lib/timesheets-tasks/statusSlug.js.map +7 -0
  478. package/dist/modules/staff/lib/timesheets-tasks/taskHierarchy.js +31 -0
  479. package/dist/modules/staff/lib/timesheets-tasks/taskHierarchy.js.map +7 -0
  480. package/dist/modules/staff/lib/timesheets-tasks/taskHoursTotals.js +17 -0
  481. package/dist/modules/staff/lib/timesheets-tasks/taskHoursTotals.js.map +7 -0
  482. package/dist/modules/staff/lib/timesheets-tasks/taskReference.js +51 -0
  483. package/dist/modules/staff/lib/timesheets-tasks/taskReference.js.map +7 -0
  484. package/dist/modules/staff/lib/timesheets-ui/CreateProjectDialog.js +11 -4
  485. package/dist/modules/staff/lib/timesheets-ui/CreateProjectDialog.js.map +2 -2
  486. package/dist/modules/staff/lib/timesheets-ui/ListView.js +369 -111
  487. package/dist/modules/staff/lib/timesheets-ui/ListView.js.map +2 -2
  488. package/dist/modules/staff/lib/timesheets-ui/TimerBar.js +47 -2
  489. package/dist/modules/staff/lib/timesheets-ui/TimerBar.js.map +2 -2
  490. package/dist/modules/staff/migrations/Migration20260813073131_staff.js +79 -0
  491. package/dist/modules/staff/migrations/Migration20260813073131_staff.js.map +7 -0
  492. package/dist/modules/staff/migrations/Migration20260824143357_staff.js +15 -0
  493. package/dist/modules/staff/migrations/Migration20260824143357_staff.js.map +7 -0
  494. package/dist/modules/staff/notifications.client.js +16 -0
  495. package/dist/modules/staff/notifications.client.js.map +7 -0
  496. package/dist/modules/staff/notifications.handlers.js +80 -0
  497. package/dist/modules/staff/notifications.handlers.js.map +7 -0
  498. package/dist/modules/staff/notifications.js +168 -0
  499. package/dist/modules/staff/notifications.js.map +2 -2
  500. package/dist/modules/staff/search.js +159 -1
  501. package/dist/modules/staff/search.js.map +2 -2
  502. package/dist/modules/staff/setup.js +20 -1
  503. package/dist/modules/staff/setup.js.map +2 -2
  504. package/dist/modules/staff/subscribers/time-project-access-requested-notification.js +68 -0
  505. package/dist/modules/staff/subscribers/time-project-access-requested-notification.js.map +7 -0
  506. package/dist/modules/staff/subscribers/time-project-budget-threshold-notification.js +149 -0
  507. package/dist/modules/staff/subscribers/time-project-budget-threshold-notification.js.map +7 -0
  508. package/dist/modules/staff/subscribers/time-report-approved-notification.js +78 -0
  509. package/dist/modules/staff/subscribers/time-report-approved-notification.js.map +7 -0
  510. package/dist/modules/staff/subscribers/time-report-portal-broadcast.js +78 -0
  511. package/dist/modules/staff/subscribers/time-report-portal-broadcast.js.map +7 -0
  512. package/dist/modules/staff/translations.js +4 -1
  513. package/dist/modules/staff/translations.js.map +2 -2
  514. package/dist/modules/staff/widgets/components.js +7 -0
  515. package/dist/modules/staff/widgets/components.js.map +7 -0
  516. package/dist/modules/staff/widgets/injection/timer-sidebar-indicator/widget.js +5 -4
  517. package/dist/modules/staff/widgets/injection/timer-sidebar-indicator/widget.js.map +2 -2
  518. package/dist/modules/staff/widgets/notifications/TimeProjectAccessRequestedRenderer.js +135 -0
  519. package/dist/modules/staff/widgets/notifications/TimeProjectAccessRequestedRenderer.js.map +7 -0
  520. package/dist/modules/staff/widgets/notifications/index.js +5 -0
  521. package/dist/modules/staff/widgets/notifications/index.js.map +7 -0
  522. package/dist/modules/staff/workers/timesheets-reapply-rounding.js +43 -0
  523. package/dist/modules/staff/workers/timesheets-reapply-rounding.js.map +7 -0
  524. package/generated/entities/staff_time_entry/index.ts +7 -0
  525. package/generated/entities/staff_time_entry_tag/index.ts +6 -0
  526. package/generated/entities/staff_time_project/index.ts +8 -0
  527. package/generated/entities/staff_time_report/index.ts +27 -0
  528. package/generated/entities/staff_time_report_entry/index.ts +12 -0
  529. package/generated/entities/staff_time_report_event/index.ts +9 -0
  530. package/generated/entities/staff_time_report_project/index.ts +6 -0
  531. package/generated/entities/staff_time_tag/index.ts +9 -0
  532. package/generated/entities/staff_time_task/index.ts +17 -0
  533. package/generated/entities/staff_time_task_comment/index.ts +9 -0
  534. package/generated/entities/staff_time_task_status/index.ts +13 -0
  535. package/generated/entities/staff_time_task_tag/index.ts +6 -0
  536. package/generated/entities.ids.generated.ts +11 -1
  537. package/generated/entity-fields-registry.ts +149 -0
  538. package/package.json +7 -7
  539. package/src/helpers/integration/timesheetFixtures.ts +31 -1
  540. package/src/modules/auth/README.md +1 -1
  541. package/src/modules/auth/cli.ts +35 -1
  542. package/src/modules/auth/i18n/de.json +7 -0
  543. package/src/modules/auth/i18n/en.json +7 -0
  544. package/src/modules/auth/i18n/es.json +7 -0
  545. package/src/modules/auth/i18n/ko.json +7 -0
  546. package/src/modules/auth/i18n/pl.json +7 -0
  547. package/src/modules/auth/lib/backendChrome.tsx +1 -0
  548. package/src/modules/customer_accounts/lib/customerRoleAcls.ts +79 -0
  549. package/src/modules/customer_accounts/setup.ts +1 -45
  550. package/src/modules/data_sync/AGENTS.md +34 -0
  551. package/src/modules/data_sync/api/options.ts +2 -0
  552. package/src/modules/data_sync/backend/data-sync/page.tsx +82 -33
  553. package/src/modules/data_sync/i18n/de.json +1 -0
  554. package/src/modules/data_sync/i18n/en.json +1 -0
  555. package/src/modules/data_sync/i18n/es.json +1 -0
  556. package/src/modules/data_sync/i18n/ko.json +1 -0
  557. package/src/modules/data_sync/i18n/pl.json +1 -0
  558. package/src/modules/data_sync/lib/adapter.ts +45 -0
  559. package/src/modules/data_sync/lib/start-controls.ts +89 -0
  560. package/src/modules/staff/AGENTS.md +769 -1
  561. package/src/modules/staff/acl.ts +9 -0
  562. package/src/modules/staff/ai-agents.ts +189 -0
  563. package/src/modules/staff/ai-tools/time-tracking-pack.ts +494 -0
  564. package/src/modules/staff/ai-tools/types.ts +82 -0
  565. package/src/modules/staff/ai-tools.ts +13 -0
  566. package/src/modules/staff/analytics.ts +113 -0
  567. package/src/modules/staff/api/guards.ts +85 -3
  568. package/src/modules/staff/api/leave-requests/accept/route.ts +0 -2
  569. package/src/modules/staff/api/leave-requests/reject/route.ts +0 -2
  570. package/src/modules/staff/api/portal/time-reports/[id]/route.ts +182 -0
  571. package/src/modules/staff/api/portal/time-reports/route.ts +270 -0
  572. package/src/modules/staff/api/team-members/self/route.ts +0 -2
  573. package/src/modules/staff/api/team-members/tags/assign/route.ts +0 -2
  574. package/src/modules/staff/api/team-members/tags/unassign/route.ts +0 -2
  575. package/src/modules/staff/api/timesheets/_shared/withTimesheetInterceptors.ts +292 -0
  576. package/src/modules/staff/api/timesheets/access-requests/route.ts +299 -0
  577. package/src/modules/staff/api/timesheets/my-projects/[projectId]/route.ts +15 -7
  578. package/src/modules/staff/api/timesheets/my-projects/route.ts +14 -1
  579. package/src/modules/staff/api/timesheets/my-work/myWorkAggregate.ts +90 -0
  580. package/src/modules/staff/api/timesheets/my-work/route.ts +475 -0
  581. package/src/modules/staff/api/timesheets/projects/kpis/route.ts +15 -2
  582. package/src/modules/staff/api/timesheets/reports/[id]/close/route.ts +203 -0
  583. package/src/modules/staff/api/timesheets/reports/[id]/export/route.ts +315 -0
  584. package/src/modules/staff/api/timesheets/reports/[id]/sheet/route.ts +220 -0
  585. package/src/modules/staff/api/timesheets/reports/[id]/unlock/route.ts +208 -0
  586. package/src/modules/staff/api/timesheets/reports/preview/route.ts +449 -0
  587. package/src/modules/staff/api/timesheets/reports/route.ts +386 -0
  588. package/src/modules/staff/api/timesheets/reports/shared.ts +121 -0
  589. package/src/modules/staff/api/timesheets/settings/reapply-rounding/route.ts +205 -0
  590. package/src/modules/staff/api/timesheets/settings/rounding-impact/route.ts +226 -0
  591. package/src/modules/staff/api/timesheets/settings/route.ts +242 -0
  592. package/src/modules/staff/api/timesheets/tags/access.ts +134 -0
  593. package/src/modules/staff/api/timesheets/tags/entry-assignments/route.ts +290 -0
  594. package/src/modules/staff/api/timesheets/tags/route.ts +177 -0
  595. package/src/modules/staff/api/timesheets/tags/task-assignments/route.ts +294 -0
  596. package/src/modules/staff/api/timesheets/task-statuses/route.ts +232 -0
  597. package/src/modules/staff/api/timesheets/tasks/[id]/comments/route.ts +532 -0
  598. package/src/modules/staff/api/timesheets/tasks/[id]/status/route.ts +271 -0
  599. package/src/modules/staff/api/timesheets/tasks/route.ts +443 -0
  600. package/src/modules/staff/api/timesheets/time-entries/[id]/duplicate/route.ts +306 -0
  601. package/src/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.ts +32 -10
  602. package/src/modules/staff/api/timesheets/time-entries/[id]/segments/route.ts +32 -17
  603. package/src/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.ts +27 -6
  604. package/src/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.ts +36 -6
  605. package/src/modules/staff/api/timesheets/time-entries/bulk/route.ts +331 -34
  606. package/src/modules/staff/api/timesheets/time-entries/copy-day/route.ts +533 -0
  607. package/src/modules/staff/api/timesheets/time-entries/overlaps/route.ts +457 -0
  608. package/src/modules/staff/api/timesheets/time-entries/route.ts +378 -24
  609. package/src/modules/staff/api/timesheets/time-entries/start-timer/route.ts +31 -9
  610. package/src/modules/staff/api/timesheets/time-projects/[id]/change-currency/route.ts +246 -0
  611. package/src/modules/staff/api/timesheets/time-projects/[id]/employees/route.ts +62 -2
  612. package/src/modules/staff/api/timesheets/time-projects/route.ts +397 -22
  613. package/src/modules/staff/backend/staff/time-tracking/board/page.meta.ts +14 -0
  614. package/src/modules/staff/backend/staff/time-tracking/board/page.tsx +151 -0
  615. package/src/modules/staff/backend/staff/time-tracking/entries/page.meta.ts +14 -0
  616. package/src/modules/staff/backend/staff/time-tracking/entries/page.tsx +1229 -0
  617. package/src/modules/staff/backend/staff/time-tracking/page.meta.ts +11 -0
  618. package/src/modules/staff/backend/staff/time-tracking/page.tsx +823 -0
  619. package/src/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.meta.ts +12 -0
  620. package/src/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.tsx +81 -0
  621. package/src/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.meta.ts +12 -0
  622. package/src/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.tsx +275 -0
  623. package/src/modules/staff/backend/staff/time-tracking/projects/[id]/page.meta.ts +12 -0
  624. package/src/modules/staff/backend/staff/time-tracking/projects/[id]/page.tsx +1420 -0
  625. package/src/modules/staff/backend/staff/time-tracking/projects/create/page.meta.ts +12 -0
  626. package/src/modules/staff/backend/staff/time-tracking/projects/create/page.tsx +109 -0
  627. package/src/modules/staff/backend/staff/time-tracking/projects/page.meta.ts +15 -0
  628. package/src/modules/staff/backend/staff/time-tracking/projects/page.tsx +1254 -0
  629. package/src/modules/staff/backend/staff/time-tracking/projects/projectFormConfig.ts +466 -0
  630. package/src/modules/staff/backend/staff/time-tracking/reports/[id]/page.meta.ts +12 -0
  631. package/src/modules/staff/backend/staff/time-tracking/reports/[id]/page.tsx +632 -0
  632. package/src/modules/staff/backend/staff/time-tracking/reports/create/page.meta.ts +12 -0
  633. package/src/modules/staff/backend/staff/time-tracking/reports/create/page.tsx +867 -0
  634. package/src/modules/staff/backend/staff/time-tracking/reports/page.meta.ts +14 -0
  635. package/src/modules/staff/backend/staff/time-tracking/reports/page.tsx +246 -0
  636. package/src/modules/staff/backend/staff/time-tracking/settings/page.meta.ts +14 -0
  637. package/src/modules/staff/backend/staff/time-tracking/settings/page.tsx +701 -0
  638. package/src/modules/staff/backend/staff/time-tracking/timesheet/GridView.tsx +953 -0
  639. package/src/modules/staff/backend/staff/time-tracking/timesheet/page.meta.ts +14 -0
  640. package/src/modules/staff/backend/staff/time-tracking/timesheet/page.tsx +800 -0
  641. package/src/modules/staff/backend/staff/timesheets/page.meta.ts +6 -6
  642. package/src/modules/staff/backend/staff/timesheets/page.tsx +12 -1010
  643. package/src/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.ts +0 -6
  644. package/src/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.tsx +4 -158
  645. package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.ts +0 -6
  646. package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.tsx +4 -609
  647. package/src/modules/staff/backend/staff/timesheets/projects/create/page.meta.ts +0 -6
  648. package/src/modules/staff/backend/staff/timesheets/projects/create/page.tsx +3 -89
  649. package/src/modules/staff/backend/staff/timesheets/projects/page.meta.ts +2 -19
  650. package/src/modules/staff/backend/staff/timesheets/projects/page.tsx +3 -778
  651. package/src/modules/staff/ce.ts +63 -0
  652. package/src/modules/staff/cli.ts +207 -1
  653. package/src/modules/staff/commands/index.ts +5 -0
  654. package/src/modules/staff/commands/timesheets-entries.ts +1006 -28
  655. package/src/modules/staff/commands/timesheets-projects.ts +593 -7
  656. package/src/modules/staff/commands/timesheets-reports.ts +1329 -0
  657. package/src/modules/staff/commands/timesheets-tags.ts +1315 -0
  658. package/src/modules/staff/commands/timesheets-task-comments.ts +583 -0
  659. package/src/modules/staff/commands/timesheets-task-statuses.ts +889 -0
  660. package/src/modules/staff/commands/timesheets-tasks.ts +1121 -0
  661. package/src/modules/staff/data/enrichers.ts +675 -10
  662. package/src/modules/staff/data/entities.ts +494 -2
  663. package/src/modules/staff/data/extensions.ts +68 -0
  664. package/src/modules/staff/data/validators.ts +348 -3
  665. package/src/modules/staff/di.ts +96 -0
  666. package/src/modules/staff/events.payloads.ts +268 -0
  667. package/src/modules/staff/events.ts +87 -5
  668. package/src/modules/staff/extension-points.ts +308 -0
  669. package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.meta.ts +10 -0
  670. package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.tsx +225 -0
  671. package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/page.meta.ts +17 -0
  672. package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/page.tsx +182 -0
  673. package/src/modules/staff/i18n/de.json +899 -0
  674. package/src/modules/staff/i18n/en.json +899 -0
  675. package/src/modules/staff/i18n/es.json +899 -0
  676. package/src/modules/staff/i18n/ko.json +899 -0
  677. package/src/modules/staff/i18n/pl.json +899 -0
  678. package/src/modules/staff/lib/crud.ts +14 -3
  679. package/src/modules/staff/lib/time-tracking/access.ts +155 -0
  680. package/src/modules/staff/lib/time-tracking/billability.ts +68 -0
  681. package/src/modules/staff/lib/time-tracking/capacity.ts +124 -0
  682. package/src/modules/staff/lib/time-tracking/componentContracts.ts +26 -0
  683. package/src/modules/staff/lib/time-tracking/cost.ts +144 -0
  684. package/src/modules/staff/lib/time-tracking/duration.ts +68 -0
  685. package/src/modules/staff/lib/time-tracking/featureAccess.ts +115 -0
  686. package/src/modules/staff/lib/time-tracking/interval.ts +90 -0
  687. package/src/modules/staff/lib/time-tracking/migrateProjectCodes.ts +161 -0
  688. package/src/modules/staff/lib/time-tracking/moneyVisibility.ts +37 -0
  689. package/src/modules/staff/lib/time-tracking/overlap.ts +159 -0
  690. package/src/modules/staff/lib/time-tracking/portalRecipients.ts +76 -0
  691. package/src/modules/staff/lib/time-tracking/portalReports.ts +31 -0
  692. package/src/modules/staff/lib/time-tracking/projectCode.ts +221 -0
  693. package/src/modules/staff/lib/time-tracking/reapplyRounding.ts +313 -0
  694. package/src/modules/staff/lib/time-tracking/recalculationRunner.ts +118 -0
  695. package/src/modules/staff/lib/time-tracking/recalculations.ts +135 -0
  696. package/src/modules/staff/lib/time-tracking/registries/invoke.ts +122 -0
  697. package/src/modules/staff/lib/time-tracking/registries/registry.ts +124 -0
  698. package/src/modules/staff/lib/time-tracking/registries/scope.ts +56 -0
  699. package/src/modules/staff/lib/time-tracking/rollup.ts +59 -0
  700. package/src/modules/staff/lib/time-tracking/rounding.ts +126 -0
  701. package/src/modules/staff/lib/time-tracking/roundingImpact.ts +75 -0
  702. package/src/modules/staff/lib/time-tracking/settingKeys.ts +274 -0
  703. package/src/modules/staff/lib/time-tracking/settings.ts +168 -0
  704. package/src/modules/staff/lib/time-tracking/sqlInClause.ts +22 -0
  705. package/src/modules/staff/lib/time-tracking/timeEntrySources.ts +85 -0
  706. package/src/modules/staff/lib/time-tracking-ui/BoardFilterChips.tsx +360 -0
  707. package/src/modules/staff/lib/time-tracking-ui/CustomerPicker.tsx +427 -0
  708. package/src/modules/staff/lib/time-tracking-ui/DurationInput.tsx +192 -0
  709. package/src/modules/staff/lib/time-tracking-ui/EntryDetailsFields.tsx +224 -0
  710. package/src/modules/staff/lib/time-tracking-ui/EntryFilterBar.tsx +144 -0
  711. package/src/modules/staff/lib/time-tracking-ui/KanbanBoard.tsx +1065 -0
  712. package/src/modules/staff/lib/time-tracking-ui/KanbanCard.tsx +435 -0
  713. package/src/modules/staff/lib/time-tracking-ui/KanbanColumn.tsx +316 -0
  714. package/src/modules/staff/lib/time-tracking-ui/NewTaskDialog.tsx +291 -0
  715. package/src/modules/staff/lib/time-tracking-ui/NoProjectAccess.tsx +162 -0
  716. package/src/modules/staff/lib/time-tracking-ui/PeriodSelector.tsx +149 -0
  717. package/src/modules/staff/lib/time-tracking-ui/PhasePlaceholder.tsx +31 -0
  718. package/src/modules/staff/lib/time-tracking-ui/ProjectCodeField.tsx +230 -0
  719. package/src/modules/staff/lib/time-tracking-ui/ProjectCurrencyField.tsx +432 -0
  720. package/src/modules/staff/lib/time-tracking-ui/ProjectFormSections.tsx +323 -0
  721. package/src/modules/staff/lib/time-tracking-ui/ProjectTeamDrawer.tsx +930 -0
  722. package/src/modules/staff/lib/time-tracking-ui/ReportSheet.tsx +357 -0
  723. package/src/modules/staff/lib/time-tracking-ui/TagPicker.tsx +195 -0
  724. package/src/modules/staff/lib/time-tracking-ui/TaskBoardScreen.tsx +243 -0
  725. package/src/modules/staff/lib/time-tracking-ui/TaskCommentThread.tsx +137 -0
  726. package/src/modules/staff/lib/time-tracking-ui/TaskDrawer.tsx +1405 -0
  727. package/src/modules/staff/lib/time-tracking-ui/TaskListView.tsx +260 -0
  728. package/src/modules/staff/lib/time-tracking-ui/TaskPicker.tsx +435 -0
  729. package/src/modules/staff/lib/time-tracking-ui/TaskQuickLog.tsx +296 -0
  730. package/src/modules/staff/lib/time-tracking-ui/TimeEntriesSummaryFooter.tsx +97 -0
  731. package/src/modules/staff/lib/time-tracking-ui/TimeEntryDialog.tsx +1929 -0
  732. package/src/modules/staff/lib/time-tracking-ui/TimeEntryDurationCell.tsx +126 -0
  733. package/src/modules/staff/lib/time-tracking-ui/TimesheetCalendar.tsx +265 -0
  734. package/src/modules/staff/lib/time-tracking-ui/TimesheetPeriodFooter.tsx +78 -0
  735. package/src/modules/staff/lib/time-tracking-ui/TimesheetViewSwitch.tsx +70 -0
  736. package/src/modules/staff/lib/time-tracking-ui/boardDirectory.ts +231 -0
  737. package/src/modules/staff/lib/time-tracking-ui/boardFilters.ts +128 -0
  738. package/src/modules/staff/lib/time-tracking-ui/boardSummary.ts +20 -0
  739. package/src/modules/staff/lib/time-tracking-ui/kanbanBoardData.ts +228 -0
  740. package/src/modules/staff/lib/time-tracking-ui/projectTeamAssignment.ts +143 -0
  741. package/src/modules/staff/lib/time-tracking-ui/taskDrawerData.ts +194 -0
  742. package/src/modules/staff/lib/time-tracking-ui/timeEntryDialogState.ts +400 -0
  743. package/src/modules/staff/lib/time-tracking-ui/timeEntryListData.ts +271 -0
  744. package/src/modules/staff/lib/time-tracking-ui/timeTrackingSettingsForm.ts +168 -0
  745. package/src/modules/staff/lib/time-tracking-ui/timesheetData.ts +225 -0
  746. package/src/modules/staff/lib/time-tracking-ui/timesheetPeriod.ts +278 -0
  747. package/src/modules/staff/lib/time-tracking-ui/timesheetTargets.ts +93 -0
  748. package/src/modules/staff/lib/time-tracking-ui/useBoardFilters.ts +107 -0
  749. package/src/modules/staff/lib/time-tracking-ui/useTimesheetPreferences.ts +245 -0
  750. package/src/modules/staff/lib/timeTrackingSeeds.ts +1037 -0
  751. package/src/modules/staff/lib/timesheets/timeEntryCacheInvalidation.ts +11 -10
  752. package/src/modules/staff/lib/timesheets/timeEntryDecoration.ts +256 -0
  753. package/src/modules/staff/lib/timesheets-projects/budgetBurn.ts +60 -0
  754. package/src/modules/staff/lib/timesheets-projects/budgetThreshold.ts +135 -0
  755. package/src/modules/staff/lib/timesheets-projects/budgetThresholdState.ts +137 -0
  756. package/src/modules/staff/lib/timesheets-projects/computeProjectFinancials.ts +142 -0
  757. package/src/modules/staff/lib/timesheets-projects/reportSelection.ts +82 -0
  758. package/src/modules/staff/lib/timesheets-projects-ui/AssignMembersDialog.tsx +237 -0
  759. package/src/modules/staff/lib/timesheets-projects-ui/ProjectBudgetCell.tsx +33 -0
  760. package/src/modules/staff/lib/timesheets-projects-ui/ProjectCard.tsx +56 -1
  761. package/src/modules/staff/lib/timesheets-projects-ui/ProjectsBulkActionsBar.tsx +90 -0
  762. package/src/modules/staff/lib/timesheets-reports/buildReportSheet.ts +125 -0
  763. package/src/modules/staff/lib/timesheets-reports/loadReportData.ts +251 -0
  764. package/src/modules/staff/lib/timesheets-reports/pdf.ts +263 -0
  765. package/src/modules/staff/lib/timesheets-reports/reportApprovalPolicies.ts +137 -0
  766. package/src/modules/staff/lib/timesheets-reports/reportConfigData.ts +247 -0
  767. package/src/modules/staff/lib/timesheets-reports/reportConfigState.ts +89 -0
  768. package/src/modules/staff/lib/timesheets-reports/reportExport.ts +373 -0
  769. package/src/modules/staff/lib/timesheets-reports/reportExportFormats.ts +71 -0
  770. package/src/modules/staff/lib/timesheets-reports/reportGroupings.ts +153 -0
  771. package/src/modules/staff/lib/timesheets-reports/reportLabels.ts +23 -0
  772. package/src/modules/staff/lib/timesheets-reports/reportReference.ts +146 -0
  773. package/src/modules/staff/lib/timesheets-reports/reportRows.ts +89 -0
  774. package/src/modules/staff/lib/timesheets-reports/reportSheetData.ts +196 -0
  775. package/src/modules/staff/lib/timesheets-reports/reportTotals.ts +544 -0
  776. package/src/modules/staff/lib/timesheets-reports/xlsx.ts +207 -0
  777. package/src/modules/staff/lib/timesheets-tasks/computeTaskRollups.ts +238 -0
  778. package/src/modules/staff/lib/timesheets-tasks/defaultStatusTemplate.ts +90 -0
  779. package/src/modules/staff/lib/timesheets-tasks/seedProjectStatuses.ts +43 -0
  780. package/src/modules/staff/lib/timesheets-tasks/statusPositions.ts +132 -0
  781. package/src/modules/staff/lib/timesheets-tasks/statusSlug.ts +43 -0
  782. package/src/modules/staff/lib/timesheets-tasks/taskHierarchy.ts +99 -0
  783. package/src/modules/staff/lib/timesheets-tasks/taskHoursTotals.ts +42 -0
  784. package/src/modules/staff/lib/timesheets-tasks/taskReference.ts +108 -0
  785. package/src/modules/staff/lib/timesheets-ui/CreateProjectDialog.tsx +18 -4
  786. package/src/modules/staff/lib/timesheets-ui/ListView.tsx +504 -149
  787. package/src/modules/staff/lib/timesheets-ui/TimerBar.tsx +50 -2
  788. package/src/modules/staff/migrations/.snapshot-open-mercato.json +3244 -228
  789. package/src/modules/staff/migrations/Migration20260813073131_staff.ts +94 -0
  790. package/src/modules/staff/migrations/Migration20260824143357_staff.ts +17 -0
  791. package/src/modules/staff/notifications.client.ts +16 -0
  792. package/src/modules/staff/notifications.handlers.ts +88 -0
  793. package/src/modules/staff/notifications.ts +163 -0
  794. package/src/modules/staff/search.ts +191 -1
  795. package/src/modules/staff/setup.ts +22 -0
  796. package/src/modules/staff/subscribers/time-project-access-requested-notification.ts +95 -0
  797. package/src/modules/staff/subscribers/time-project-budget-threshold-notification.ts +226 -0
  798. package/src/modules/staff/subscribers/time-report-approved-notification.ts +116 -0
  799. package/src/modules/staff/subscribers/time-report-portal-broadcast.ts +120 -0
  800. package/src/modules/staff/translations.ts +17 -0
  801. package/src/modules/staff/widgets/components.ts +34 -0
  802. package/src/modules/staff/widgets/injection/timer-sidebar-indicator/widget.tsx +6 -5
  803. package/src/modules/staff/widgets/notifications/TimeProjectAccessRequestedRenderer.tsx +138 -0
  804. package/src/modules/staff/widgets/notifications/index.ts +1 -0
  805. package/src/modules/staff/workers/timesheets-reapply-rounding.ts +59 -0
  806. package/dist/modules/staff/backend/staff/timesheets/projects/projectFormConfig.js +0 -123
  807. package/dist/modules/staff/backend/staff/timesheets/projects/projectFormConfig.js.map +0 -7
  808. package/src/modules/staff/backend/staff/timesheets/projects/projectFormConfig.ts +0 -138
@@ -0,0 +1,205 @@
1
+ const TIMESHEET_PERIOD_KINDS = ["year", "quarter", "month", "week"];
2
+ const ISO_DAY_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/;
3
+ function isTimesheetPeriodKind(value) {
4
+ return typeof value === "string" && TIMESHEET_PERIOD_KINDS.includes(value);
5
+ }
6
+ function toIsoDay(date) {
7
+ const year = date.getFullYear();
8
+ const month = String(date.getMonth() + 1).padStart(2, "0");
9
+ const day = String(date.getDate()).padStart(2, "0");
10
+ return `${year}-${month}-${day}`;
11
+ }
12
+ function parseIsoDay(value) {
13
+ const match = ISO_DAY_PATTERN.exec(value);
14
+ if (!match) return null;
15
+ const year = Number(match[1]);
16
+ const month = Number(match[2]);
17
+ const day = Number(match[3]);
18
+ const parsed = new Date(year, month - 1, day);
19
+ if (Number.isNaN(parsed.getTime())) return null;
20
+ if (parsed.getFullYear() !== year || parsed.getMonth() !== month - 1 || parsed.getDate() !== day) return null;
21
+ return parsed;
22
+ }
23
+ function safeParse(value, fallback) {
24
+ return parseIsoDay(value) ?? fallback;
25
+ }
26
+ function todayIso(now = /* @__PURE__ */ new Date()) {
27
+ return toIsoDay(now);
28
+ }
29
+ function addDaysIso(iso, days) {
30
+ const base = parseIsoDay(iso);
31
+ if (!base) return iso;
32
+ const next = new Date(base.getFullYear(), base.getMonth(), base.getDate() + days);
33
+ return toIsoDay(next);
34
+ }
35
+ function addMonthsIso(iso, months) {
36
+ const base = parseIsoDay(iso);
37
+ if (!base) return iso;
38
+ const targetMonthFirst = new Date(base.getFullYear(), base.getMonth() + months, 1);
39
+ const daysInTarget = new Date(targetMonthFirst.getFullYear(), targetMonthFirst.getMonth() + 1, 0).getDate();
40
+ const day = Math.min(base.getDate(), daysInTarget);
41
+ return toIsoDay(new Date(targetMonthFirst.getFullYear(), targetMonthFirst.getMonth(), day));
42
+ }
43
+ function startOfWeekIso(iso) {
44
+ const base = parseIsoDay(iso);
45
+ if (!base) return iso;
46
+ const weekday = (base.getDay() + 6) % 7;
47
+ return addDaysIso(iso, -weekday);
48
+ }
49
+ function startOfMonthIso(iso) {
50
+ const base = parseIsoDay(iso);
51
+ if (!base) return iso;
52
+ return toIsoDay(new Date(base.getFullYear(), base.getMonth(), 1));
53
+ }
54
+ function endOfMonthIso(iso) {
55
+ const base = parseIsoDay(iso);
56
+ if (!base) return iso;
57
+ return toIsoDay(new Date(base.getFullYear(), base.getMonth() + 1, 0));
58
+ }
59
+ function quarterOfIso(iso) {
60
+ const base = parseIsoDay(iso);
61
+ if (!base) return 1;
62
+ return Math.floor(base.getMonth() / 3) + 1;
63
+ }
64
+ function isoWeekNumber(iso) {
65
+ const base = parseIsoDay(iso);
66
+ if (!base) return 1;
67
+ const utc = new Date(Date.UTC(base.getFullYear(), base.getMonth(), base.getDate()));
68
+ utc.setUTCDate(utc.getUTCDate() + 4 - (utc.getUTCDay() || 7));
69
+ const yearStart = new Date(Date.UTC(utc.getUTCFullYear(), 0, 1));
70
+ return Math.ceil(((utc.getTime() - yearStart.getTime()) / 864e5 + 1) / 7);
71
+ }
72
+ function resolvePeriodRange(kind, anchorIso) {
73
+ const base = safeParse(anchorIso, /* @__PURE__ */ new Date());
74
+ const anchor = toIsoDay(base);
75
+ if (kind === "week") {
76
+ const from = startOfWeekIso(anchor);
77
+ return { from, to: addDaysIso(from, 6) };
78
+ }
79
+ if (kind === "month") {
80
+ return { from: startOfMonthIso(anchor), to: endOfMonthIso(anchor) };
81
+ }
82
+ if (kind === "quarter") {
83
+ const firstMonth = Math.floor(base.getMonth() / 3) * 3;
84
+ const from = toIsoDay(new Date(base.getFullYear(), firstMonth, 1));
85
+ const to = toIsoDay(new Date(base.getFullYear(), firstMonth + 3, 0));
86
+ return { from, to };
87
+ }
88
+ return {
89
+ from: toIsoDay(new Date(base.getFullYear(), 0, 1)),
90
+ to: toIsoDay(new Date(base.getFullYear(), 11, 31))
91
+ };
92
+ }
93
+ function shiftPeriodAnchor(kind, anchorIso, direction) {
94
+ if (kind === "week") return addDaysIso(anchorIso, 7 * direction);
95
+ if (kind === "month") return addMonthsIso(anchorIso, direction);
96
+ if (kind === "quarter") return addMonthsIso(anchorIso, 3 * direction);
97
+ return addMonthsIso(anchorIso, 12 * direction);
98
+ }
99
+ function eachDayIso(range) {
100
+ const start = parseIsoDay(range.from);
101
+ const end = parseIsoDay(range.to);
102
+ if (!start || !end || end.getTime() < start.getTime()) return [];
103
+ const days = [];
104
+ let cursor = range.from;
105
+ for (let guard = 0; guard < 400; guard += 1) {
106
+ days.push(cursor);
107
+ if (cursor === range.to) break;
108
+ cursor = addDaysIso(cursor, 1);
109
+ }
110
+ return days;
111
+ }
112
+ function isWeekendIso(iso) {
113
+ const parsed = parseIsoDay(iso);
114
+ if (!parsed) return false;
115
+ const day = parsed.getDay();
116
+ return day === 0 || day === 6;
117
+ }
118
+ function countWorkingDays(range) {
119
+ return eachDayIso(range).filter((iso) => !isWeekendIso(iso)).length;
120
+ }
121
+ function periodTargetMinutes(range, dailyHours) {
122
+ if (dailyHours === null || dailyHours === void 0 || !Number.isFinite(dailyHours) || dailyHours <= 0) return null;
123
+ return Math.round(countWorkingDays(range) * dailyHours * 60);
124
+ }
125
+ function buildCalendarWeeks(anchorIso, todayIsoValue = todayIso()) {
126
+ const range = resolvePeriodRange("month", anchorIso);
127
+ const gridStart = startOfWeekIso(range.from);
128
+ const lastWeekStart = startOfWeekIso(range.to);
129
+ const gridEnd = addDaysIso(lastWeekStart, 6);
130
+ const days = eachDayIso({ from: gridStart, to: gridEnd });
131
+ const weeks = [];
132
+ for (let index = 0; index < days.length; index += 7) {
133
+ weeks.push(
134
+ days.slice(index, index + 7).map((date) => {
135
+ const parsed = parseIsoDay(date);
136
+ return {
137
+ date,
138
+ dayOfMonth: parsed ? parsed.getDate() : 0,
139
+ inPeriod: date >= range.from && date <= range.to,
140
+ isWeekend: isWeekendIso(date),
141
+ isToday: date === todayIsoValue
142
+ };
143
+ })
144
+ );
145
+ }
146
+ return weeks;
147
+ }
148
+ function formatWithIntl(date, locale, options) {
149
+ try {
150
+ return new Intl.DateTimeFormat(locale, options).format(date);
151
+ } catch {
152
+ return toIsoDay(date);
153
+ }
154
+ }
155
+ function formatPeriodLabel(kind, anchorIso, locale) {
156
+ const range = resolvePeriodRange(kind, anchorIso);
157
+ const from = parseIsoDay(range.from);
158
+ const to = parseIsoDay(range.to);
159
+ if (!from || !to) return anchorIso;
160
+ if (kind === "year") return String(from.getFullYear());
161
+ if (kind === "quarter") return `Q${quarterOfIso(range.from)} ${from.getFullYear()}`;
162
+ if (kind === "month") {
163
+ const label = formatWithIntl(from, locale, { month: "long", year: "numeric" });
164
+ return label.charAt(0).toUpperCase() + label.slice(1);
165
+ }
166
+ const fromLabel = formatWithIntl(from, locale, { day: "numeric", month: "short" });
167
+ const toLabel = formatWithIntl(to, locale, { day: "numeric", month: "short", year: "numeric" });
168
+ return `${fromLabel} \u2013 ${toLabel} \xB7 W${isoWeekNumber(range.from)}`;
169
+ }
170
+ function formatDayLabel(iso, locale) {
171
+ const parsed = parseIsoDay(iso);
172
+ if (!parsed) return iso;
173
+ return formatWithIntl(parsed, locale, { weekday: "short", day: "numeric", month: "short" });
174
+ }
175
+ function formatLongDayLabel(iso, locale) {
176
+ const parsed = parseIsoDay(iso);
177
+ if (!parsed) return iso;
178
+ const label = formatWithIntl(parsed, locale, { weekday: "long", day: "numeric", month: "long" });
179
+ return label.charAt(0).toUpperCase() + label.slice(1);
180
+ }
181
+ export {
182
+ TIMESHEET_PERIOD_KINDS,
183
+ addDaysIso,
184
+ addMonthsIso,
185
+ buildCalendarWeeks,
186
+ countWorkingDays,
187
+ eachDayIso,
188
+ endOfMonthIso,
189
+ formatDayLabel,
190
+ formatLongDayLabel,
191
+ formatPeriodLabel,
192
+ isTimesheetPeriodKind,
193
+ isWeekendIso,
194
+ isoWeekNumber,
195
+ parseIsoDay,
196
+ periodTargetMinutes,
197
+ quarterOfIso,
198
+ resolvePeriodRange,
199
+ shiftPeriodAnchor,
200
+ startOfMonthIso,
201
+ startOfWeekIso,
202
+ toIsoDay,
203
+ todayIso
204
+ };
205
+ //# sourceMappingURL=timesheetPeriod.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/modules/staff/lib/time-tracking-ui/timesheetPeriod.ts"],
4
+ "sourcesContent": ["/**\n * The timesheet's sense of \"when\" (T5.1, US-E1).\n *\n * Everything here is pure date arithmetic on `YYYY-MM-DD` strings, kept out of\n * the React tree so the one rule the user story actually states can be tested as\n * arithmetic: **switching the period kind preserves the current date context.**\n *\n * That rule is why the state this module is driven by is a single ANCHOR DAY\n * rather than a range. A range would have to be re-derived on every switch and\n * the obvious derivation (\"take the range start\") is exactly the bug US-E1\n * forbids \u2014 a month range starting 1 July, switched to `year`, would land on\n * 1 January and the user would be looking at a different part of their life. An\n * anchor never moves on a kind switch, so week\u2194month\u2194quarter\u2194year always stays\n * \"around now\".\n *\n * Navigation moves the anchor by one unit of the current kind and deliberately\n * does NOT snap it to the period start, for the same reason: after\n * month \u2192 previous \u2192 week the anchor is still the same day-of-month, so the week\n * shown is the one containing it.\n */\n\nexport type TimesheetPeriodKind = 'year' | 'quarter' | 'month' | 'week'\n\nexport const TIMESHEET_PERIOD_KINDS: readonly TimesheetPeriodKind[] = ['year', 'quarter', 'month', 'week']\n\nexport type TimesheetDateRange = {\n from: string\n to: string\n}\n\nconst ISO_DAY_PATTERN = /^(\\d{4})-(\\d{2})-(\\d{2})$/\n\nexport function isTimesheetPeriodKind(value: unknown): value is TimesheetPeriodKind {\n return typeof value === 'string' && (TIMESHEET_PERIOD_KINDS as readonly string[]).includes(value)\n}\n\n/** Local calendar day of a `Date`, because an entry is addressed by its day and not by an instant. */\nexport function toIsoDay(date: Date): string {\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/** `YYYY-MM-DD` \u2192 local midnight. Invalid text answers `null` rather than an Invalid Date. */\nexport function parseIsoDay(value: string): Date | null {\n const match = ISO_DAY_PATTERN.exec(value)\n if (!match) return null\n const year = Number(match[1])\n const month = Number(match[2])\n const day = Number(match[3])\n const parsed = new Date(year, month - 1, day)\n if (Number.isNaN(parsed.getTime())) return null\n if (parsed.getFullYear() !== year || parsed.getMonth() !== month - 1 || parsed.getDate() !== day) return null\n return parsed\n}\n\nfunction safeParse(value: string, fallback: Date): Date {\n return parseIsoDay(value) ?? fallback\n}\n\nexport function todayIso(now: Date = new Date()): string {\n return toIsoDay(now)\n}\n\nexport function addDaysIso(iso: string, days: number): string {\n const base = parseIsoDay(iso)\n if (!base) return iso\n const next = new Date(base.getFullYear(), base.getMonth(), base.getDate() + days)\n return toIsoDay(next)\n}\n\n/**\n * Adds whole months, clamping the day into the target month \u2014 31 Jan + 1 month is\n * 28/29 Feb, never 2/3 March. Without the clamp, paging forward through the year\n * from a 31st would skip February entirely.\n */\nexport function addMonthsIso(iso: string, months: number): string {\n const base = parseIsoDay(iso)\n if (!base) return iso\n const targetMonthFirst = new Date(base.getFullYear(), base.getMonth() + months, 1)\n const daysInTarget = new Date(targetMonthFirst.getFullYear(), targetMonthFirst.getMonth() + 1, 0).getDate()\n const day = Math.min(base.getDate(), daysInTarget)\n return toIsoDay(new Date(targetMonthFirst.getFullYear(), targetMonthFirst.getMonth(), day))\n}\n\n/** Monday of the week containing `iso` \u2014 the module's week starts on Monday everywhere. */\nexport function startOfWeekIso(iso: string): string {\n const base = parseIsoDay(iso)\n if (!base) return iso\n const weekday = (base.getDay() + 6) % 7\n return addDaysIso(iso, -weekday)\n}\n\nexport function startOfMonthIso(iso: string): string {\n const base = parseIsoDay(iso)\n if (!base) return iso\n return toIsoDay(new Date(base.getFullYear(), base.getMonth(), 1))\n}\n\nexport function endOfMonthIso(iso: string): string {\n const base = parseIsoDay(iso)\n if (!base) return iso\n return toIsoDay(new Date(base.getFullYear(), base.getMonth() + 1, 0))\n}\n\nexport function quarterOfIso(iso: string): number {\n const base = parseIsoDay(iso)\n if (!base) return 1\n return Math.floor(base.getMonth() / 3) + 1\n}\n\n/** ISO-8601 week number, matching the mockup's `Tydzie\u0144 29`. */\nexport function isoWeekNumber(iso: string): number {\n const base = parseIsoDay(iso)\n if (!base) return 1\n const utc = new Date(Date.UTC(base.getFullYear(), base.getMonth(), base.getDate()))\n utc.setUTCDate(utc.getUTCDate() + 4 - (utc.getUTCDay() || 7))\n const yearStart = new Date(Date.UTC(utc.getUTCFullYear(), 0, 1))\n return Math.ceil(((utc.getTime() - yearStart.getTime()) / 86_400_000 + 1) / 7)\n}\n\nexport function resolvePeriodRange(kind: TimesheetPeriodKind, anchorIso: string): TimesheetDateRange {\n const base = safeParse(anchorIso, new Date())\n const anchor = toIsoDay(base)\n if (kind === 'week') {\n const from = startOfWeekIso(anchor)\n return { from, to: addDaysIso(from, 6) }\n }\n if (kind === 'month') {\n return { from: startOfMonthIso(anchor), to: endOfMonthIso(anchor) }\n }\n if (kind === 'quarter') {\n const firstMonth = Math.floor(base.getMonth() / 3) * 3\n const from = toIsoDay(new Date(base.getFullYear(), firstMonth, 1))\n const to = toIsoDay(new Date(base.getFullYear(), firstMonth + 3, 0))\n return { from, to }\n }\n return {\n from: toIsoDay(new Date(base.getFullYear(), 0, 1)),\n to: toIsoDay(new Date(base.getFullYear(), 11, 31)),\n }\n}\n\n/**\n * One period earlier (`-1`) or later (`+1`), expressed as a new anchor day.\n *\n * The anchor keeps its day-of-month / day-of-week, so paging never drifts and a\n * later kind switch still lands \"around\" the day the user was looking at.\n */\nexport function shiftPeriodAnchor(kind: TimesheetPeriodKind, anchorIso: string, direction: 1 | -1): string {\n if (kind === 'week') return addDaysIso(anchorIso, 7 * direction)\n if (kind === 'month') return addMonthsIso(anchorIso, direction)\n if (kind === 'quarter') return addMonthsIso(anchorIso, 3 * direction)\n return addMonthsIso(anchorIso, 12 * direction)\n}\n\nexport function eachDayIso(range: TimesheetDateRange): string[] {\n const start = parseIsoDay(range.from)\n const end = parseIsoDay(range.to)\n if (!start || !end || end.getTime() < start.getTime()) return []\n const days: string[] = []\n let cursor = range.from\n // Bounded by a year and a bit, so a corrupt range can never spin forever.\n for (let guard = 0; guard < 400; guard += 1) {\n days.push(cursor)\n if (cursor === range.to) break\n cursor = addDaysIso(cursor, 1)\n }\n return days\n}\n\nexport function isWeekendIso(iso: string): boolean {\n const parsed = parseIsoDay(iso)\n if (!parsed) return false\n const day = parsed.getDay()\n return day === 0 || day === 6\n}\n\n/**\n * Mon\u2013Fri days inside the range. Screen 11's footer scales its target by this\n * (\"Cel (14 dni \u00D7 8h)\"), and screen 12 note 4 is explicit that a weekend does not\n * raise the target even though time logged on one still raises the total.\n */\nexport function countWorkingDays(range: TimesheetDateRange): number {\n return eachDayIso(range).filter((iso) => !isWeekendIso(iso)).length\n}\n\nexport function periodTargetMinutes(range: TimesheetDateRange, dailyHours: number | null | undefined): number | null {\n if (dailyHours === null || dailyHours === undefined || !Number.isFinite(dailyHours) || dailyHours <= 0) return null\n return Math.round(countWorkingDays(range) * dailyHours * 60)\n}\n\nexport type TimesheetCalendarCell = {\n date: string\n dayOfMonth: number\n inPeriod: boolean\n isWeekend: boolean\n isToday: boolean\n}\n\n/**\n * The month grid of screen 11: whole Monday-to-Sunday weeks covering the month,\n * with the leading/trailing days of the neighbouring months kept as `inPeriod:\n * false` cells so the grid stays rectangular (the mockup draws `29 cze` and\n * `30 cze` in the first row).\n */\nexport function buildCalendarWeeks(anchorIso: string, todayIsoValue: string = todayIso()): TimesheetCalendarCell[][] {\n const range = resolvePeriodRange('month', anchorIso)\n const gridStart = startOfWeekIso(range.from)\n const lastWeekStart = startOfWeekIso(range.to)\n const gridEnd = addDaysIso(lastWeekStart, 6)\n const days = eachDayIso({ from: gridStart, to: gridEnd })\n const weeks: TimesheetCalendarCell[][] = []\n for (let index = 0; index < days.length; index += 7) {\n weeks.push(\n days.slice(index, index + 7).map((date) => {\n const parsed = parseIsoDay(date)\n return {\n date,\n dayOfMonth: parsed ? parsed.getDate() : 0,\n inPeriod: date >= range.from && date <= range.to,\n isWeekend: isWeekendIso(date),\n isToday: date === todayIsoValue,\n }\n }),\n )\n }\n return weeks\n}\n\nfunction formatWithIntl(date: Date, locale: string | undefined, options: Intl.DateTimeFormatOptions): string {\n try {\n return new Intl.DateTimeFormat(locale, options).format(date)\n } catch {\n return toIsoDay(date)\n }\n}\n\n/**\n * `Lipiec 2026`, `Q3 2026`, `2026`, `13\u201319 lip 2026 \u00B7 W29` \u2014 the label beside the\n * prev/next arrows. Month and day names come from the runtime locale, the same\n * way every other date in the backoffice is rendered.\n */\nexport function formatPeriodLabel(\n kind: TimesheetPeriodKind,\n anchorIso: string,\n locale?: string,\n): string {\n const range = resolvePeriodRange(kind, anchorIso)\n const from = parseIsoDay(range.from)\n const to = parseIsoDay(range.to)\n if (!from || !to) return anchorIso\n if (kind === 'year') return String(from.getFullYear())\n if (kind === 'quarter') return `Q${quarterOfIso(range.from)} ${from.getFullYear()}`\n if (kind === 'month') {\n const label = formatWithIntl(from, locale, { month: 'long', year: 'numeric' })\n return label.charAt(0).toUpperCase() + label.slice(1)\n }\n const fromLabel = formatWithIntl(from, locale, { day: 'numeric', month: 'short' })\n const toLabel = formatWithIntl(to, locale, { day: 'numeric', month: 'short', year: 'numeric' })\n return `${fromLabel} \u2013 ${toLabel} \u00B7 W${isoWeekNumber(range.from)}`\n}\n\n/** `pon 13 lip` \u2014 the row label of screen 12's day bars. */\nexport function formatDayLabel(iso: string, locale?: string): string {\n const parsed = parseIsoDay(iso)\n if (!parsed) return iso\n return formatWithIntl(parsed, locale, { weekday: 'short', day: 'numeric', month: 'short' })\n}\n\n/** `Pi\u0105tek 17 lipca` \u2014 the heading of an expanded day. */\nexport function formatLongDayLabel(iso: string, locale?: string): string {\n const parsed = parseIsoDay(iso)\n if (!parsed) return iso\n const label = formatWithIntl(parsed, locale, { weekday: 'long', day: 'numeric', month: 'long' })\n return label.charAt(0).toUpperCase() + label.slice(1)\n}\n"],
5
+ "mappings": "AAuBO,MAAM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AAC9F,SAAO,GAAG,SAAS,WAAM,OAAO,UAAO,cAAc,MAAM,IAAI,CAAC;AAClE;AAGO,SAAS,eAAe,KAAa,QAAyB;AACnE,QAAM,SAAS,YAAY,GAAG;AAC9B,MAAI,CAAC,OAAQ,QAAO;AACpB,SAAO,eAAe,QAAQ,QAAQ,EAAE,SAAS,SAAS,KAAK,WAAW,OAAO,QAAQ,CAAC;AAC5F;AAGO,SAAS,mBAAmB,KAAa,QAAyB;AACvE,QAAM,SAAS,YAAY,GAAG;AAC9B,MAAI,CAAC,OAAQ,QAAO;AACpB,QAAM,QAAQ,eAAe,QAAQ,QAAQ,EAAE,SAAS,QAAQ,KAAK,WAAW,OAAO,OAAO,CAAC;AAC/F,SAAO,MAAM,OAAO,CAAC,EAAE,YAAY,IAAI,MAAM,MAAM,CAAC;AACtD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,53 @@
1
+ function buildTargetKey(timeProjectId, taskId) {
2
+ return taskId ? `${timeProjectId}:${taskId}` : timeProjectId;
3
+ }
4
+ function parseTargetKey(key) {
5
+ const separator = key.indexOf(":");
6
+ if (separator < 0) return { timeProjectId: key, taskId: null };
7
+ return { timeProjectId: key.slice(0, separator), taskId: key.slice(separator + 1) || null };
8
+ }
9
+ function projectTarget(project) {
10
+ return {
11
+ key: buildTargetKey(project.id, null),
12
+ timeProjectId: project.id,
13
+ taskId: null,
14
+ projectName: project.name,
15
+ projectCode: project.code,
16
+ projectColor: project.color,
17
+ taskTitle: null
18
+ };
19
+ }
20
+ function taskTarget(project, task) {
21
+ return {
22
+ key: buildTargetKey(project.id, task.id),
23
+ timeProjectId: project.id,
24
+ taskId: task.id,
25
+ projectName: project.name,
26
+ projectCode: project.code,
27
+ projectColor: project.color,
28
+ taskTitle: task.title
29
+ };
30
+ }
31
+ function buildLogTargets(projects, tasks) {
32
+ const targets = [];
33
+ for (const project of projects) {
34
+ targets.push(projectTarget(project));
35
+ for (const task of tasks) {
36
+ if (task.timeProjectId !== project.id) continue;
37
+ targets.push(taskTarget(project, task));
38
+ }
39
+ }
40
+ return targets;
41
+ }
42
+ function targetLabel(target) {
43
+ return target.taskTitle ? `${target.projectName} \xB7 ${target.taskTitle}` : target.projectName;
44
+ }
45
+ export {
46
+ buildLogTargets,
47
+ buildTargetKey,
48
+ parseTargetKey,
49
+ projectTarget,
50
+ targetLabel,
51
+ taskTarget
52
+ };
53
+ //# sourceMappingURL=timesheetTargets.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/modules/staff/lib/time-tracking-ui/timesheetTargets.ts"],
4
+ "sourcesContent": ["/**\n * What a timesheet line logs against \u2014 a project, or a project **and** a task.\n *\n * The spec's second grid upgrade (\"rows can be project or project + task, so\n * grid entries carry `taskId` like every other entry\") and screen 12's quick-add\n * row are the same question asked twice, so they share one model. A target is\n * addressed by a single opaque key, because the grid's dirty map, its row list\n * and the list view's `<select>` all need one string that identifies a line\n * without pretending a project row and a task row are different kinds of thing.\n */\n\nexport type TimesheetLogTarget = {\n /** `<projectId>` for a project row, `<projectId>:<taskId>` for a task row. */\n key: string\n timeProjectId: string\n taskId: string | null\n projectName: string\n projectCode: string | null\n projectColor: string | null\n taskTitle: string | null\n}\n\nexport type TimesheetProjectRef = {\n id: string\n name: string\n code: string | null\n color: string | null\n}\n\nexport type TimesheetTaskRef = {\n id: string\n title: string\n timeProjectId: string\n}\n\nexport function buildTargetKey(timeProjectId: string, taskId: string | null | undefined): string {\n return taskId ? `${timeProjectId}:${taskId}` : timeProjectId\n}\n\nexport function parseTargetKey(key: string): { timeProjectId: string; taskId: string | null } {\n const separator = key.indexOf(':')\n if (separator < 0) return { timeProjectId: key, taskId: null }\n return { timeProjectId: key.slice(0, separator), taskId: key.slice(separator + 1) || null }\n}\n\nexport function projectTarget(project: TimesheetProjectRef): TimesheetLogTarget {\n return {\n key: buildTargetKey(project.id, null),\n timeProjectId: project.id,\n taskId: null,\n projectName: project.name,\n projectCode: project.code,\n projectColor: project.color,\n taskTitle: null,\n }\n}\n\nexport function taskTarget(project: TimesheetProjectRef, task: TimesheetTaskRef): TimesheetLogTarget {\n return {\n key: buildTargetKey(project.id, task.id),\n timeProjectId: project.id,\n taskId: task.id,\n projectName: project.name,\n projectCode: project.code,\n projectColor: project.color,\n taskTitle: task.title,\n }\n}\n\n/**\n * Every loggable line for a set of projects: the project itself, then its tasks.\n * Tasks of a project the caller cannot see are dropped rather than rendered\n * without a project name \u2014 a row whose project is unknown cannot be saved.\n */\nexport function buildLogTargets(\n projects: readonly TimesheetProjectRef[],\n tasks: readonly TimesheetTaskRef[],\n): TimesheetLogTarget[] {\n const targets: TimesheetLogTarget[] = []\n for (const project of projects) {\n targets.push(projectTarget(project))\n for (const task of tasks) {\n if (task.timeProjectId !== project.id) continue\n targets.push(taskTarget(project, task))\n }\n }\n return targets\n}\n\n/** `Nordvik \u2014 migracja B2B \u00B7 Mapowanie cen` \u2014 one line for a picker or a row header. */\nexport function targetLabel(target: TimesheetLogTarget): string {\n return target.taskTitle ? `${target.projectName} \u00B7 ${target.taskTitle}` : target.projectName\n}\n"],
5
+ "mappings": "AAmCO,SAAS,eAAe,eAAuB,QAA2C;AAC/F,SAAO,SAAS,GAAG,aAAa,IAAI,MAAM,KAAK;AACjD;AAEO,SAAS,eAAe,KAA+D;AAC5F,QAAM,YAAY,IAAI,QAAQ,GAAG;AACjC,MAAI,YAAY,EAAG,QAAO,EAAE,eAAe,KAAK,QAAQ,KAAK;AAC7D,SAAO,EAAE,eAAe,IAAI,MAAM,GAAG,SAAS,GAAG,QAAQ,IAAI,MAAM,YAAY,CAAC,KAAK,KAAK;AAC5F;AAEO,SAAS,cAAc,SAAkD;AAC9E,SAAO;AAAA,IACL,KAAK,eAAe,QAAQ,IAAI,IAAI;AAAA,IACpC,eAAe,QAAQ;AAAA,IACvB,QAAQ;AAAA,IACR,aAAa,QAAQ;AAAA,IACrB,aAAa,QAAQ;AAAA,IACrB,cAAc,QAAQ;AAAA,IACtB,WAAW;AAAA,EACb;AACF;AAEO,SAAS,WAAW,SAA8B,MAA4C;AACnG,SAAO;AAAA,IACL,KAAK,eAAe,QAAQ,IAAI,KAAK,EAAE;AAAA,IACvC,eAAe,QAAQ;AAAA,IACvB,QAAQ,KAAK;AAAA,IACb,aAAa,QAAQ;AAAA,IACrB,aAAa,QAAQ;AAAA,IACrB,cAAc,QAAQ;AAAA,IACtB,WAAW,KAAK;AAAA,EAClB;AACF;AAOO,SAAS,gBACd,UACA,OACsB;AACtB,QAAM,UAAgC,CAAC;AACvC,aAAW,WAAW,UAAU;AAC9B,YAAQ,KAAK,cAAc,OAAO,CAAC;AACnC,eAAW,QAAQ,OAAO;AACxB,UAAI,KAAK,kBAAkB,QAAQ,GAAI;AACvC,cAAQ,KAAK,WAAW,SAAS,IAAI,CAAC;AAAA,IACxC;AAAA,EACF;AACA,SAAO;AACT;AAGO,SAAS,YAAY,QAAoC;AAC9D,SAAO,OAAO,YAAY,GAAG,OAAO,WAAW,SAAM,OAAO,SAAS,KAAK,OAAO;AACnF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,77 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import { EMPTY_BOARD_FILTERS, normalizeBoardFilters } from "./boardFilters.js";
4
+ const FILTERS_STORAGE_KEY_PREFIX = "staff.time_tracking.board.filters";
5
+ const VIEW_STORAGE_KEY_PREFIX = "staff.time_tracking.board.viewMode";
6
+ function storageKey(prefix, ...segments) {
7
+ const parts = [prefix];
8
+ for (const segment of segments) {
9
+ if (segment) parts.push(segment);
10
+ }
11
+ return parts.join(":");
12
+ }
13
+ function readStored(key) {
14
+ if (typeof window === "undefined") return null;
15
+ try {
16
+ const raw = window.localStorage.getItem(key);
17
+ if (!raw) return null;
18
+ return JSON.parse(raw);
19
+ } catch {
20
+ return null;
21
+ }
22
+ }
23
+ function writeStored(key, value) {
24
+ if (typeof window === "undefined") return;
25
+ try {
26
+ window.localStorage.setItem(key, JSON.stringify(value));
27
+ } catch {
28
+ }
29
+ }
30
+ function useBoardFilters({
31
+ timeProjectId,
32
+ userKey
33
+ }) {
34
+ const key = storageKey(FILTERS_STORAGE_KEY_PREFIX, timeProjectId, userKey);
35
+ const [filters, setFilters] = React.useState(
36
+ () => normalizeBoardFilters(readStored(key))
37
+ );
38
+ const keyRef = React.useRef(key);
39
+ React.useEffect(() => {
40
+ if (keyRef.current === key) return;
41
+ keyRef.current = key;
42
+ setFilters(normalizeBoardFilters(readStored(key)));
43
+ }, [key]);
44
+ const update = React.useCallback(
45
+ (next) => {
46
+ const normalized = normalizeBoardFilters(next);
47
+ setFilters(normalized);
48
+ writeStored(key, normalized);
49
+ },
50
+ [key]
51
+ );
52
+ return [filters, update];
53
+ }
54
+ function useBoardViewMode({
55
+ userKey,
56
+ fallback = "board"
57
+ } = {}) {
58
+ const key = storageKey(VIEW_STORAGE_KEY_PREFIX, userKey);
59
+ const [mode, setMode] = React.useState(() => {
60
+ const stored = readStored(key);
61
+ return stored === "board" || stored === "list" ? stored : fallback;
62
+ });
63
+ const update = React.useCallback(
64
+ (next) => {
65
+ setMode(next);
66
+ writeStored(key, next);
67
+ },
68
+ [key]
69
+ );
70
+ return [mode, update];
71
+ }
72
+ export {
73
+ EMPTY_BOARD_FILTERS,
74
+ useBoardFilters,
75
+ useBoardViewMode
76
+ };
77
+ //# sourceMappingURL=useBoardFilters.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/modules/staff/lib/time-tracking-ui/useBoardFilters.ts"],
4
+ "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { EMPTY_BOARD_FILTERS, normalizeBoardFilters, type BoardFilters } from './boardFilters'\n\n/**\n * Persisted board chrome (T3.8) \u2014 the spec's \"Persistent context\" principle applied to\n * screen 6: a filter you set is still set when you come back to the board.\n *\n * Storage follows `timesheets-projects-ui/useProjectsViewMode.ts` verbatim rather than\n * introducing a second mechanism for the same job: `localStorage`, guarded reads and\n * writes, an optional `userKey` segment, and a lazy first read so a remount restores\n * without a round-trip. Filters are additionally scoped by project, because \"assigned to\n * me on Nordvik\" is not a statement about any other project's board.\n */\n\nconst FILTERS_STORAGE_KEY_PREFIX = 'staff.time_tracking.board.filters'\nconst VIEW_STORAGE_KEY_PREFIX = 'staff.time_tracking.board.viewMode'\n\nexport type BoardViewMode = 'board' | 'list'\n\nfunction storageKey(prefix: string, ...segments: Array<string | null | undefined>): string {\n const parts = [prefix]\n for (const segment of segments) {\n if (segment) parts.push(segment)\n }\n return parts.join(':')\n}\n\nfunction readStored(key: string): unknown {\n if (typeof window === 'undefined') return null\n try {\n const raw = window.localStorage.getItem(key)\n if (!raw) return null\n return JSON.parse(raw) as unknown\n } catch {\n return null\n }\n}\n\nfunction writeStored(key: string, value: unknown): void {\n if (typeof window === 'undefined') return\n try {\n window.localStorage.setItem(key, JSON.stringify(value))\n } catch {\n // ignore \u2014 quota errors etc. are non-critical\n }\n}\n\nexport function useBoardFilters({\n timeProjectId,\n userKey,\n}: {\n timeProjectId: string | null | undefined\n userKey?: string | null\n}): [BoardFilters, (next: BoardFilters) => void] {\n const key = storageKey(FILTERS_STORAGE_KEY_PREFIX, timeProjectId, userKey)\n const [filters, setFilters] = React.useState<BoardFilters>(() =>\n normalizeBoardFilters(readStored(key)),\n )\n const keyRef = React.useRef(key)\n\n React.useEffect(() => {\n if (keyRef.current === key) return\n keyRef.current = key\n // Switching project (or identity) swaps which saved set is in force \u2014 it never\n // carries the previous project's chips over.\n setFilters(normalizeBoardFilters(readStored(key)))\n }, [key])\n\n const update = React.useCallback(\n (next: BoardFilters) => {\n const normalized = normalizeBoardFilters(next)\n setFilters(normalized)\n writeStored(key, normalized)\n },\n [key],\n )\n\n return [filters, update]\n}\n\nexport function useBoardViewMode({\n userKey,\n fallback = 'board',\n}: {\n userKey?: string | null\n fallback?: BoardViewMode\n} = {}): [BoardViewMode, (next: BoardViewMode) => void] {\n const key = storageKey(VIEW_STORAGE_KEY_PREFIX, userKey)\n const [mode, setMode] = React.useState<BoardViewMode>(() => {\n const stored = readStored(key)\n return stored === 'board' || stored === 'list' ? stored : fallback\n })\n\n const update = React.useCallback(\n (next: BoardViewMode) => {\n setMode(next)\n writeStored(key, next)\n },\n [key],\n )\n\n return [mode, update]\n}\n\nexport { EMPTY_BOARD_FILTERS }\n"],
5
+ "mappings": ";AAEA,YAAY,WAAW;AACvB,SAAS,qBAAqB,6BAAgD;AAa9E,MAAM,6BAA6B;AACnC,MAAM,0BAA0B;AAIhC,SAAS,WAAW,WAAmB,UAAoD;AACzF,QAAM,QAAQ,CAAC,MAAM;AACrB,aAAW,WAAW,UAAU;AAC9B,QAAI,QAAS,OAAM,KAAK,OAAO;AAAA,EACjC;AACA,SAAO,MAAM,KAAK,GAAG;AACvB;AAEA,SAAS,WAAW,KAAsB;AACxC,MAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,MAAI;AACF,UAAM,MAAM,OAAO,aAAa,QAAQ,GAAG;AAC3C,QAAI,CAAC,IAAK,QAAO;AACjB,WAAO,KAAK,MAAM,GAAG;AAAA,EACvB,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,YAAY,KAAa,OAAsB;AACtD,MAAI,OAAO,WAAW,YAAa;AACnC,MAAI;AACF,WAAO,aAAa,QAAQ,KAAK,KAAK,UAAU,KAAK,CAAC;AAAA,EACxD,QAAQ;AAAA,EAER;AACF;AAEO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AACF,GAGiD;AAC/C,QAAM,MAAM,WAAW,4BAA4B,eAAe,OAAO;AACzE,QAAM,CAAC,SAAS,UAAU,IAAI,MAAM;AAAA,IAAuB,MACzD,sBAAsB,WAAW,GAAG,CAAC;AAAA,EACvC;AACA,QAAM,SAAS,MAAM,OAAO,GAAG;AAE/B,QAAM,UAAU,MAAM;AACpB,QAAI,OAAO,YAAY,IAAK;AAC5B,WAAO,UAAU;AAGjB,eAAW,sBAAsB,WAAW,GAAG,CAAC,CAAC;AAAA,EACnD,GAAG,CAAC,GAAG,CAAC;AAER,QAAM,SAAS,MAAM;AAAA,IACnB,CAAC,SAAuB;AACtB,YAAM,aAAa,sBAAsB,IAAI;AAC7C,iBAAW,UAAU;AACrB,kBAAY,KAAK,UAAU;AAAA,IAC7B;AAAA,IACA,CAAC,GAAG;AAAA,EACN;AAEA,SAAO,CAAC,SAAS,MAAM;AACzB;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,WAAW;AACb,IAGI,CAAC,GAAmD;AACtD,QAAM,MAAM,WAAW,yBAAyB,OAAO;AACvD,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAwB,MAAM;AAC1D,UAAM,SAAS,WAAW,GAAG;AAC7B,WAAO,WAAW,WAAW,WAAW,SAAS,SAAS;AAAA,EAC5D,CAAC;AAED,QAAM,SAAS,MAAM;AAAA,IACnB,CAAC,SAAwB;AACvB,cAAQ,IAAI;AACZ,kBAAY,KAAK,IAAI;AAAA,IACvB;AAAA,IACA,CAAC,GAAG;AAAA,EACN;AAEA,SAAO,CAAC,MAAM,MAAM;AACtB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,151 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import { isTimesheetPeriodKind } from "./timesheetPeriod.js";
4
+ const PERIOD_KEY_PREFIX = "staff.time_tracking.timesheet.period";
5
+ const VIEW_KEY_PREFIX = "staff.time_tracking.timesheet.view";
6
+ const PROJECT_KEY_PREFIX = "staff.time_tracking.timesheet.projectId";
7
+ const PERSON_KEY_PREFIX = "staff.time_tracking.timesheet.staffMemberId";
8
+ const ALL_OPTION_VALUE = "all";
9
+ function storageKey(prefix, ...segments) {
10
+ const parts = [prefix];
11
+ for (const segment of segments) {
12
+ if (segment) parts.push(segment);
13
+ }
14
+ return parts.join(":");
15
+ }
16
+ function readStored(key) {
17
+ if (typeof window === "undefined") return null;
18
+ try {
19
+ return window.localStorage.getItem(key);
20
+ } catch {
21
+ return null;
22
+ }
23
+ }
24
+ function writeStored(key, value) {
25
+ if (typeof window === "undefined") return;
26
+ try {
27
+ window.localStorage.setItem(key, value);
28
+ } catch {
29
+ }
30
+ }
31
+ function readPreference(scopedKey, sharedKey, parse) {
32
+ const scoped = parse(readStored(scopedKey));
33
+ if (scoped !== null) return scoped;
34
+ if (scopedKey === sharedKey) return null;
35
+ return parse(readStored(sharedKey));
36
+ }
37
+ function writePreference(scopedKey, sharedKey, value) {
38
+ writeStored(scopedKey, value);
39
+ if (scopedKey !== sharedKey) writeStored(sharedKey, value);
40
+ }
41
+ function isTimesheetView(value) {
42
+ return value === "calendar" || value === "list" || value === "grid";
43
+ }
44
+ function parsePeriodKind(raw) {
45
+ return isTimesheetPeriodKind(raw) ? raw : null;
46
+ }
47
+ function parseView(raw) {
48
+ return isTimesheetView(raw) ? raw : null;
49
+ }
50
+ function defaultViewForPeriod(kind) {
51
+ return kind === "week" ? "grid" : "calendar";
52
+ }
53
+ function viewsForPeriod(kind) {
54
+ return kind === "week" || kind === "month" ? ["calendar", "list", "grid"] : ["calendar", "list"];
55
+ }
56
+ function resolveEffectiveView(kind, stored) {
57
+ return viewsForPeriod(kind).includes(stored) ? stored : defaultViewForPeriod(kind);
58
+ }
59
+ function usePersistedPeriodKind(options = {}) {
60
+ const { userKey, urlOverride } = options;
61
+ const key = storageKey(PERIOD_KEY_PREFIX, userKey);
62
+ const sharedKey = storageKey(PERIOD_KEY_PREFIX);
63
+ const override = parsePeriodKind(urlOverride ?? null);
64
+ const [kind, setKind] = React.useState(
65
+ () => override ?? readPreference(key, sharedKey, parsePeriodKind) ?? "week"
66
+ );
67
+ React.useEffect(() => {
68
+ if (override === null) return;
69
+ setKind(override);
70
+ }, [override]);
71
+ const keyRef = React.useRef(key);
72
+ React.useEffect(() => {
73
+ if (keyRef.current === key) return;
74
+ keyRef.current = key;
75
+ if (override !== null) return;
76
+ setKind(readPreference(key, sharedKey, parsePeriodKind) ?? "week");
77
+ }, [key, override, sharedKey]);
78
+ const update = React.useCallback(
79
+ (next) => {
80
+ setKind(next);
81
+ writePreference(key, sharedKey, next);
82
+ },
83
+ [key, sharedKey]
84
+ );
85
+ return [kind, update];
86
+ }
87
+ function usePersistedView(periodKind, options = {}) {
88
+ const { userKey, urlOverride } = options;
89
+ const key = storageKey(VIEW_KEY_PREFIX, periodKind, userKey);
90
+ const sharedKey = storageKey(VIEW_KEY_PREFIX, periodKind);
91
+ const override = parseView(urlOverride ?? null);
92
+ const [view, setView] = React.useState(
93
+ () => override ?? readPreference(key, sharedKey, parseView) ?? defaultViewForPeriod(periodKind)
94
+ );
95
+ React.useEffect(() => {
96
+ if (override === null) return;
97
+ setView(override);
98
+ }, [override]);
99
+ const keyRef = React.useRef(key);
100
+ const periodRef = React.useRef(periodKind);
101
+ React.useEffect(() => {
102
+ if (keyRef.current === key) return;
103
+ const periodChanged = periodRef.current !== periodKind;
104
+ keyRef.current = key;
105
+ periodRef.current = periodKind;
106
+ if (override !== null && !periodChanged) return;
107
+ setView(readPreference(key, sharedKey, parseView) ?? defaultViewForPeriod(periodKind));
108
+ }, [key, override, periodKind, sharedKey]);
109
+ const update = React.useCallback(
110
+ (next) => {
111
+ setView(next);
112
+ writePreference(key, sharedKey, next);
113
+ },
114
+ [key, sharedKey]
115
+ );
116
+ return [view, update];
117
+ }
118
+ function usePersistedFilterValue(kind, options = {}) {
119
+ const { userKey } = options;
120
+ const prefix = kind === "project" ? PROJECT_KEY_PREFIX : PERSON_KEY_PREFIX;
121
+ const key = storageKey(prefix, userKey);
122
+ const sharedKey = storageKey(prefix);
123
+ const [value, setValue] = React.useState(
124
+ () => readPreference(key, sharedKey, (raw) => raw) ?? ALL_OPTION_VALUE
125
+ );
126
+ const keyRef = React.useRef(key);
127
+ React.useEffect(() => {
128
+ if (keyRef.current === key) return;
129
+ keyRef.current = key;
130
+ setValue(readPreference(key, sharedKey, (raw) => raw) ?? ALL_OPTION_VALUE);
131
+ }, [key, sharedKey]);
132
+ const update = React.useCallback(
133
+ (next) => {
134
+ setValue(next);
135
+ writePreference(key, sharedKey, next);
136
+ },
137
+ [key, sharedKey]
138
+ );
139
+ return [value, update];
140
+ }
141
+ export {
142
+ ALL_OPTION_VALUE,
143
+ defaultViewForPeriod,
144
+ isTimesheetView,
145
+ resolveEffectiveView,
146
+ usePersistedFilterValue,
147
+ usePersistedPeriodKind,
148
+ usePersistedView,
149
+ viewsForPeriod
150
+ };
151
+ //# sourceMappingURL=useTimesheetPreferences.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/modules/staff/lib/time-tracking-ui/useTimesheetPreferences.ts"],
4
+ "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { isTimesheetPeriodKind, type TimesheetPeriodKind } from './timesheetPeriod'\n\n/**\n * \"Filters (project, person, period) are remembered per user and come back next\n * time\" \u2014 screen 11 note 4, US-E2.\n *\n * Three inputs decide what the timesheet opens on, in this order:\n *\n * 1. **The query string** \u2014 `?period=` and `?view=` are the documented deep-link\n * contract for screens 11 and 12, so a shared URL must beat whatever this\n * browser happens to remember. An unparseable value is ignored rather than\n * thrown on: a hand-edited link degrades to the remembered preference.\n * 2. **The remembered preference**, scoped to the signed-in staff member.\n * 3. **The period-dependent default.**\n *\n * `userKey` is the caller's staff member id, which only exists once the page has\n * resolved it. Reading the unscoped key first and writing BOTH keys keeps that\n * late arrival free: the unscoped entry is a first-paint hint (whoever wrote\n * last), the scoped entry is the truth, and for a browser with one user the two\n * always agree \u2014 so the hydration that follows the id is a no-op and costs no\n * reload. Two people sharing a browser converge on their own entry after the\n * first render pass instead of sharing one set of filters forever.\n *\n * **The anchor day is deliberately NOT persisted.** A remembered week would\n * reopen the timesheet on whatever week the user last looked at, which is wrong\n * on Monday morning for everybody. The period *kind* is a preference; the period\n * *instance* is context, and context starts at today.\n */\n\nexport type TimesheetView = 'calendar' | 'list' | 'grid'\n\nexport type TimesheetPreferenceScope = {\n /** Staff member id the preference belongs to; `null` until the page resolves it. */\n userKey?: string | null\n}\n\nexport type TimesheetPreferenceOptions = TimesheetPreferenceScope & {\n /** Raw `?period=` / `?view=` value; anything unparseable is ignored. */\n urlOverride?: string | null\n}\n\nconst PERIOD_KEY_PREFIX = 'staff.time_tracking.timesheet.period'\nconst VIEW_KEY_PREFIX = 'staff.time_tracking.timesheet.view'\nconst PROJECT_KEY_PREFIX = 'staff.time_tracking.timesheet.projectId'\nconst PERSON_KEY_PREFIX = 'staff.time_tracking.timesheet.staffMemberId'\n\nexport const ALL_OPTION_VALUE = 'all'\n\nfunction storageKey(prefix: string, ...segments: Array<string | null | undefined>): string {\n const parts = [prefix]\n for (const segment of segments) {\n if (segment) parts.push(segment)\n }\n return parts.join(':')\n}\n\nfunction readStored(key: string): string | null {\n if (typeof window === 'undefined') return null\n try {\n return window.localStorage.getItem(key)\n } catch {\n return null\n }\n}\n\nfunction writeStored(key: string, value: string): void {\n if (typeof window === 'undefined') return\n try {\n window.localStorage.setItem(key, value)\n } catch {\n // ignore \u2014 quota errors etc. are non-critical\n }\n}\n\nfunction readPreference<T>(\n scopedKey: string,\n sharedKey: string,\n parse: (raw: string | null) => T | null,\n): T | null {\n const scoped = parse(readStored(scopedKey))\n if (scoped !== null) return scoped\n if (scopedKey === sharedKey) return null\n return parse(readStored(sharedKey))\n}\n\nfunction writePreference(scopedKey: string, sharedKey: string, value: string): void {\n writeStored(scopedKey, value)\n if (scopedKey !== sharedKey) writeStored(sharedKey, value)\n}\n\nexport function isTimesheetView(value: unknown): value is TimesheetView {\n return value === 'calendar' || value === 'list' || value === 'grid'\n}\n\nfunction parsePeriodKind(raw: string | null): TimesheetPeriodKind | null {\n return isTimesheetPeriodKind(raw) ? raw : null\n}\n\nfunction parseView(raw: string | null): TimesheetView | null {\n return isTimesheetView(raw) ? raw : null\n}\n\n/**\n * Grid is the default for a week and the calendar for everything longer (the\n * spec fixes both ends; a quarter and a year read like a month, only more of\n * it). A week is the period people fill in, so it opens on the fastest surface\n * for filling it in.\n */\nexport function defaultViewForPeriod(kind: TimesheetPeriodKind): TimesheetView {\n return kind === 'week' ? 'grid' : 'calendar'\n}\n\n/**\n * The grid is a bulk-entry surface: one column per day, typed across. That holds\n * for a week and (tightly) for a month; ninety or three hundred and sixty five\n * columns is not a grid anybody can fill in, so longer periods simply do not\n * offer it.\n */\nexport function viewsForPeriod(kind: TimesheetPeriodKind): TimesheetView[] {\n return kind === 'week' || kind === 'month'\n ? ['calendar', 'list', 'grid']\n : ['calendar', 'list']\n}\n\n/** The view actually rendered \u2014 a remembered choice the current period cannot honour falls back to its default. */\nexport function resolveEffectiveView(kind: TimesheetPeriodKind, stored: TimesheetView): TimesheetView {\n return viewsForPeriod(kind).includes(stored) ? stored : defaultViewForPeriod(kind)\n}\n\nexport function usePersistedPeriodKind(\n options: TimesheetPreferenceOptions = {},\n): [TimesheetPeriodKind, (next: TimesheetPeriodKind) => void] {\n const { userKey, urlOverride } = options\n const key = storageKey(PERIOD_KEY_PREFIX, userKey)\n const sharedKey = storageKey(PERIOD_KEY_PREFIX)\n const override = parsePeriodKind(urlOverride ?? null)\n\n const [kind, setKind] = React.useState<TimesheetPeriodKind>(\n () => override ?? readPreference(key, sharedKey, parsePeriodKind) ?? 'week',\n )\n\n // Back/forward and any other in-place URL change re-assert the link.\n React.useEffect(() => {\n if (override === null) return\n setKind(override)\n }, [override])\n\n const keyRef = React.useRef(key)\n React.useEffect(() => {\n if (keyRef.current === key) return\n keyRef.current = key\n if (override !== null) return\n setKind(readPreference(key, sharedKey, parsePeriodKind) ?? 'week')\n }, [key, override, sharedKey])\n\n const update = React.useCallback(\n (next: TimesheetPeriodKind) => {\n setKind(next)\n writePreference(key, sharedKey, next)\n },\n [key, sharedKey],\n )\n return [kind, update]\n}\n\n/**\n * The view is remembered PER PERIOD KIND, because the default is per period\n * kind. Choosing the list for a month must not silently override the grid a week\n * opens on, and vice versa.\n *\n * That is also why a period switch outranks `?view=`: the parameter described\n * the period the link was made on, while the remembered choice is specific to\n * the period now on screen.\n */\nexport function usePersistedView(\n periodKind: TimesheetPeriodKind,\n options: TimesheetPreferenceOptions = {},\n): [TimesheetView, (next: TimesheetView) => void] {\n const { userKey, urlOverride } = options\n const key = storageKey(VIEW_KEY_PREFIX, periodKind, userKey)\n const sharedKey = storageKey(VIEW_KEY_PREFIX, periodKind)\n const override = parseView(urlOverride ?? null)\n\n const [view, setView] = React.useState<TimesheetView>(\n () => override ?? readPreference(key, sharedKey, parseView) ?? defaultViewForPeriod(periodKind),\n )\n\n React.useEffect(() => {\n if (override === null) return\n setView(override)\n }, [override])\n\n const keyRef = React.useRef(key)\n const periodRef = React.useRef(periodKind)\n React.useEffect(() => {\n if (keyRef.current === key) return\n const periodChanged = periodRef.current !== periodKind\n keyRef.current = key\n periodRef.current = periodKind\n if (override !== null && !periodChanged) return\n setView(readPreference(key, sharedKey, parseView) ?? defaultViewForPeriod(periodKind))\n }, [key, override, periodKind, sharedKey])\n\n const update = React.useCallback(\n (next: TimesheetView) => {\n setView(next)\n writePreference(key, sharedKey, next)\n },\n [key, sharedKey],\n )\n return [view, update]\n}\n\nexport function usePersistedFilterValue(\n kind: 'project' | 'person',\n options: TimesheetPreferenceScope = {},\n): [string, (next: string) => void] {\n const { userKey } = options\n const prefix = kind === 'project' ? PROJECT_KEY_PREFIX : PERSON_KEY_PREFIX\n const key = storageKey(prefix, userKey)\n const sharedKey = storageKey(prefix)\n\n const [value, setValue] = React.useState<string>(\n () => readPreference(key, sharedKey, (raw) => raw) ?? ALL_OPTION_VALUE,\n )\n\n const keyRef = React.useRef(key)\n React.useEffect(() => {\n if (keyRef.current === key) return\n keyRef.current = key\n setValue(readPreference(key, sharedKey, (raw) => raw) ?? ALL_OPTION_VALUE)\n }, [key, sharedKey])\n\n const update = React.useCallback(\n (next: string) => {\n setValue(next)\n writePreference(key, sharedKey, next)\n },\n [key, sharedKey],\n )\n return [value, update]\n}\n"],
5
+ "mappings": ";AAEA,YAAY,WAAW;AACvB,SAAS,6BAAuD;AAyChE,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AACxB,MAAM,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