@frigear-nu/shifts 0.0.0-stage → 0.0.1

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 (345) hide show
  1. package/README.md +53 -2
  2. package/dist/module.d.mts +716 -0
  3. package/dist/module.json +9 -0
  4. package/dist/module.mjs +272 -0
  5. package/dist/runtime/access.d.ts +2 -0
  6. package/dist/runtime/access.js +84 -0
  7. package/dist/runtime/app/components/ShiftBroadcastSlideover.d.vue.ts +19 -0
  8. package/dist/runtime/app/components/ShiftBroadcastSlideover.vue +142 -0
  9. package/dist/runtime/app/components/ShiftBroadcastSlideover.vue.d.ts +19 -0
  10. package/dist/runtime/app/components/ShiftBroadcastsCard.d.vue.ts +9 -0
  11. package/dist/runtime/app/components/ShiftBroadcastsCard.vue +74 -0
  12. package/dist/runtime/app/components/ShiftBroadcastsCard.vue.d.ts +9 -0
  13. package/dist/runtime/app/components/ShiftBulkSlideover.d.vue.ts +15 -0
  14. package/dist/runtime/app/components/ShiftBulkSlideover.vue +185 -0
  15. package/dist/runtime/app/components/ShiftBulkSlideover.vue.d.ts +15 -0
  16. package/dist/runtime/app/components/ShiftCheckInCard.d.vue.ts +13 -0
  17. package/dist/runtime/app/components/ShiftCheckInCard.vue +238 -0
  18. package/dist/runtime/app/components/ShiftCheckInCard.vue.d.ts +13 -0
  19. package/dist/runtime/app/components/ShiftCopySlideover.d.vue.ts +11 -0
  20. package/dist/runtime/app/components/ShiftCopySlideover.vue +71 -0
  21. package/dist/runtime/app/components/ShiftCopySlideover.vue.d.ts +11 -0
  22. package/dist/runtime/app/components/ShiftDayView.d.vue.ts +16 -0
  23. package/dist/runtime/app/components/ShiftDayView.vue +124 -0
  24. package/dist/runtime/app/components/ShiftDayView.vue.d.ts +16 -0
  25. package/dist/runtime/app/components/ShiftFeedSlideover.d.vue.ts +7 -0
  26. package/dist/runtime/app/components/ShiftFeedSlideover.vue +172 -0
  27. package/dist/runtime/app/components/ShiftFeedSlideover.vue.d.ts +7 -0
  28. package/dist/runtime/app/components/ShiftNowCard.d.vue.ts +6 -0
  29. package/dist/runtime/app/components/ShiftNowCard.vue +83 -0
  30. package/dist/runtime/app/components/ShiftNowCard.vue.d.ts +6 -0
  31. package/dist/runtime/app/components/ShiftPassFullscreen.d.vue.ts +13 -0
  32. package/dist/runtime/app/components/ShiftPassFullscreen.vue +79 -0
  33. package/dist/runtime/app/components/ShiftPassFullscreen.vue.d.ts +13 -0
  34. package/dist/runtime/app/components/ShiftPerkSlideover.d.vue.ts +14 -0
  35. package/dist/runtime/app/components/ShiftPerkSlideover.vue +103 -0
  36. package/dist/runtime/app/components/ShiftPerkSlideover.vue.d.ts +14 -0
  37. package/dist/runtime/app/components/ShiftPerksCard.d.vue.ts +8 -0
  38. package/dist/runtime/app/components/ShiftPerksCard.vue +66 -0
  39. package/dist/runtime/app/components/ShiftPerksCard.vue.d.ts +8 -0
  40. package/dist/runtime/app/components/ShiftQrScanner.d.vue.ts +10 -0
  41. package/dist/runtime/app/components/ShiftQrScanner.vue +44 -0
  42. package/dist/runtime/app/components/ShiftQrScanner.vue.d.ts +10 -0
  43. package/dist/runtime/app/components/ShiftRoleSlideover.d.vue.ts +15 -0
  44. package/dist/runtime/app/components/ShiftRoleSlideover.vue +88 -0
  45. package/dist/runtime/app/components/ShiftRoleSlideover.vue.d.ts +15 -0
  46. package/dist/runtime/app/components/ShiftScheduleSettingsFields.d.vue.ts +11 -0
  47. package/dist/runtime/app/components/ShiftScheduleSettingsFields.vue +61 -0
  48. package/dist/runtime/app/components/ShiftScheduleSettingsFields.vue.d.ts +11 -0
  49. package/dist/runtime/app/components/ShiftScheduleSlideover.d.vue.ts +12 -0
  50. package/dist/runtime/app/components/ShiftScheduleSlideover.vue +129 -0
  51. package/dist/runtime/app/components/ShiftScheduleSlideover.vue.d.ts +12 -0
  52. package/dist/runtime/app/components/ShiftSlideover.d.vue.ts +13 -0
  53. package/dist/runtime/app/components/ShiftSlideover.vue +353 -0
  54. package/dist/runtime/app/components/ShiftSlideover.vue.d.ts +13 -0
  55. package/dist/runtime/app/components/ShiftStationSlideover.d.vue.ts +15 -0
  56. package/dist/runtime/app/components/ShiftStationSlideover.vue +92 -0
  57. package/dist/runtime/app/components/ShiftStationSlideover.vue.d.ts +15 -0
  58. package/dist/runtime/app/composables/index.d.ts +6 -0
  59. package/dist/runtime/app/composables/index.js +5 -0
  60. package/dist/runtime/app/composables/useShiftsActions.d.ts +61 -0
  61. package/dist/runtime/app/composables/useShiftsActions.js +224 -0
  62. package/dist/runtime/app/composables/useShiftsFormat.d.ts +12 -0
  63. package/dist/runtime/app/composables/useShiftsFormat.js +14 -0
  64. package/dist/runtime/app/composables/useShiftsLinks.d.ts +12 -0
  65. package/dist/runtime/app/composables/useShiftsLinks.js +6 -0
  66. package/dist/runtime/app/composables/useShiftsTranslate.d.ts +5 -0
  67. package/dist/runtime/app/composables/useShiftsTranslate.js +12 -0
  68. package/dist/runtime/app/composables/useShiftsVenueFeatures.d.ts +17 -0
  69. package/dist/runtime/app/composables/useShiftsVenueFeatures.js +18 -0
  70. package/dist/runtime/app/dashboard/NextShift.d.vue.ts +3 -0
  71. package/dist/runtime/app/dashboard/NextShift.vue +69 -0
  72. package/dist/runtime/app/dashboard/NextShift.vue.d.ts +3 -0
  73. package/dist/runtime/app/dashboard/OpenSwaps.d.vue.ts +3 -0
  74. package/dist/runtime/app/dashboard/OpenSwaps.vue +69 -0
  75. package/dist/runtime/app/dashboard/OpenSwaps.vue.d.ts +3 -0
  76. package/dist/runtime/app/dashboard/TeamOnNow.d.vue.ts +3 -0
  77. package/dist/runtime/app/dashboard/TeamOnNow.vue +72 -0
  78. package/dist/runtime/app/dashboard/TeamOnNow.vue.d.ts +3 -0
  79. package/dist/runtime/app/pages/check-in.d.vue.ts +3 -0
  80. package/dist/runtime/app/pages/check-in.vue +93 -0
  81. package/dist/runtime/app/pages/check-in.vue.d.ts +3 -0
  82. package/dist/runtime/app/pages/lead.d.vue.ts +3 -0
  83. package/dist/runtime/app/pages/lead.vue +300 -0
  84. package/dist/runtime/app/pages/lead.vue.d.ts +3 -0
  85. package/dist/runtime/app/pages/shift.d.vue.ts +3 -0
  86. package/dist/runtime/app/pages/shift.vue +482 -0
  87. package/dist/runtime/app/pages/shift.vue.d.ts +3 -0
  88. package/dist/runtime/app/pages/shifts.d.vue.ts +3 -0
  89. package/dist/runtime/app/pages/shifts.vue +21 -0
  90. package/dist/runtime/app/pages/shifts.vue.d.ts +3 -0
  91. package/dist/runtime/app/pages/station.d.vue.ts +3 -0
  92. package/dist/runtime/app/pages/station.vue +104 -0
  93. package/dist/runtime/app/pages/station.vue.d.ts +3 -0
  94. package/dist/runtime/app/pages/swaps.d.vue.ts +3 -0
  95. package/dist/runtime/app/pages/swaps.vue +32 -0
  96. package/dist/runtime/app/pages/swaps.vue.d.ts +3 -0
  97. package/dist/runtime/app/tabs/HomeShifts.d.vue.ts +6 -0
  98. package/dist/runtime/app/tabs/HomeShifts.vue +194 -0
  99. package/dist/runtime/app/tabs/HomeShifts.vue.d.ts +6 -0
  100. package/dist/runtime/app/tabs/HomeSwaps.d.vue.ts +3 -0
  101. package/dist/runtime/app/tabs/HomeSwaps.vue +188 -0
  102. package/dist/runtime/app/tabs/HomeSwaps.vue.d.ts +3 -0
  103. package/dist/runtime/app/tabs/Shifts.d.vue.ts +9 -0
  104. package/dist/runtime/app/tabs/Shifts.vue +487 -0
  105. package/dist/runtime/app/tabs/Shifts.vue.d.ts +9 -0
  106. package/dist/runtime/app/utils/admin-shifts.d.ts +42 -0
  107. package/dist/runtime/app/utils/admin-shifts.js +36 -0
  108. package/dist/runtime/dashboard.d.ts +8 -0
  109. package/dist/runtime/dashboard.js +30 -0
  110. package/dist/runtime/emails/shifts-broadcast.d.vue.ts +8 -0
  111. package/dist/runtime/emails/shifts-broadcast.vue +24 -0
  112. package/dist/runtime/emails/shifts-broadcast.vue.d.ts +8 -0
  113. package/dist/runtime/emails/shifts-reminder.d.vue.ts +12 -0
  114. package/dist/runtime/emails/shifts-reminder.vue +34 -0
  115. package/dist/runtime/emails/shifts-reminder.vue.d.ts +12 -0
  116. package/dist/runtime/emails/shifts-swap-accepted.d.vue.ts +11 -0
  117. package/dist/runtime/emails/shifts-swap-accepted.vue +32 -0
  118. package/dist/runtime/emails/shifts-swap-accepted.vue.d.ts +11 -0
  119. package/dist/runtime/emails/shifts-swap-completed.d.vue.ts +11 -0
  120. package/dist/runtime/emails/shifts-swap-completed.vue +32 -0
  121. package/dist/runtime/emails/shifts-swap-completed.vue.d.ts +11 -0
  122. package/dist/runtime/emails/shifts-swap-offered.d.vue.ts +11 -0
  123. package/dist/runtime/emails/shifts-swap-offered.vue +32 -0
  124. package/dist/runtime/emails/shifts-swap-offered.vue.d.ts +11 -0
  125. package/dist/runtime/emails/shifts-swap-pending.d.vue.ts +11 -0
  126. package/dist/runtime/emails/shifts-swap-pending.vue +32 -0
  127. package/dist/runtime/emails/shifts-swap-pending.vue.d.ts +11 -0
  128. package/dist/runtime/emails/shifts-swap-proposed.d.vue.ts +11 -0
  129. package/dist/runtime/emails/shifts-swap-proposed.vue +32 -0
  130. package/dist/runtime/emails/shifts-swap-proposed.vue.d.ts +11 -0
  131. package/dist/runtime/emails/shifts-swap-rejected.d.vue.ts +11 -0
  132. package/dist/runtime/emails/shifts-swap-rejected.vue +32 -0
  133. package/dist/runtime/emails/shifts-swap-rejected.vue.d.ts +11 -0
  134. package/dist/runtime/i18n/lang/da.json +627 -0
  135. package/dist/runtime/i18n/lang/en.json +627 -0
  136. package/dist/runtime/notifications.d.ts +9 -0
  137. package/dist/runtime/notifications.js +36 -0
  138. package/dist/runtime/server/db/schema.postgresql.d.ts +2151 -0
  139. package/dist/runtime/server/db/schema.postgresql.js +228 -0
  140. package/dist/runtime/server/db/schema.sqlite.d.ts +2263 -0
  141. package/dist/runtime/server/db/schema.sqlite.js +228 -0
  142. package/dist/runtime/server/digest-email.d.ts +17 -0
  143. package/dist/runtime/server/digest-email.js +42 -0
  144. package/dist/runtime/server/plugins/station-key.d.ts +2 -0
  145. package/dist/runtime/server/plugins/station-key.js +5 -0
  146. package/dist/runtime/server/plugins/teams.d.ts +2 -0
  147. package/dist/runtime/server/plugins/teams.js +19 -0
  148. package/dist/runtime/server/policies.d.ts +2 -0
  149. package/dist/runtime/server/policies.js +41 -0
  150. package/dist/runtime/server/reminder-email.d.ts +67 -0
  151. package/dist/runtime/server/reminder-email.js +109 -0
  152. package/dist/runtime/server/routes/admin/assignment.delete.d.ts +2 -0
  153. package/dist/runtime/server/routes/admin/assignment.delete.js +10 -0
  154. package/dist/runtime/server/routes/admin/assignments.post.d.ts +2 -0
  155. package/dist/runtime/server/routes/admin/assignments.post.js +11 -0
  156. package/dist/runtime/server/routes/admin/broadcasts.get.d.ts +2 -0
  157. package/dist/runtime/server/routes/admin/broadcasts.get.js +8 -0
  158. package/dist/runtime/server/routes/admin/broadcasts.post.d.ts +2 -0
  159. package/dist/runtime/server/routes/admin/broadcasts.post.js +9 -0
  160. package/dist/runtime/server/routes/admin/candidates.get.d.ts +2 -0
  161. package/dist/runtime/server/routes/admin/candidates.get.js +10 -0
  162. package/dist/runtime/server/routes/admin/operation-teams.get.d.ts +2 -0
  163. package/dist/runtime/server/routes/admin/operation-teams.get.js +9 -0
  164. package/dist/runtime/server/routes/admin/perk.delete.d.ts +2 -0
  165. package/dist/runtime/server/routes/admin/perk.delete.js +10 -0
  166. package/dist/runtime/server/routes/admin/perk.patch.d.ts +2 -0
  167. package/dist/runtime/server/routes/admin/perk.patch.js +10 -0
  168. package/dist/runtime/server/routes/admin/perks.get.d.ts +2 -0
  169. package/dist/runtime/server/routes/admin/perks.get.js +9 -0
  170. package/dist/runtime/server/routes/admin/perks.post.d.ts +2 -0
  171. package/dist/runtime/server/routes/admin/perks.post.js +10 -0
  172. package/dist/runtime/server/routes/admin/role.delete.d.ts +2 -0
  173. package/dist/runtime/server/routes/admin/role.delete.js +11 -0
  174. package/dist/runtime/server/routes/admin/role.patch.d.ts +2 -0
  175. package/dist/runtime/server/routes/admin/role.patch.js +11 -0
  176. package/dist/runtime/server/routes/admin/roles.get.d.ts +2 -0
  177. package/dist/runtime/server/routes/admin/roles.get.js +9 -0
  178. package/dist/runtime/server/routes/admin/roles.post.d.ts +2 -0
  179. package/dist/runtime/server/routes/admin/roles.post.js +10 -0
  180. package/dist/runtime/server/routes/admin/schedule-copy.post.d.ts +2 -0
  181. package/dist/runtime/server/routes/admin/schedule-copy.post.js +12 -0
  182. package/dist/runtime/server/routes/admin/schedule-publish.post.d.ts +2 -0
  183. package/dist/runtime/server/routes/admin/schedule-publish.post.js +9 -0
  184. package/dist/runtime/server/routes/admin/schedule.delete.d.ts +2 -0
  185. package/dist/runtime/server/routes/admin/schedule.delete.js +10 -0
  186. package/dist/runtime/server/routes/admin/schedule.get.d.ts +2 -0
  187. package/dist/runtime/server/routes/admin/schedule.get.js +9 -0
  188. package/dist/runtime/server/routes/admin/schedule.patch.d.ts +2 -0
  189. package/dist/runtime/server/routes/admin/schedule.patch.js +10 -0
  190. package/dist/runtime/server/routes/admin/schedules.get.d.ts +2 -0
  191. package/dist/runtime/server/routes/admin/schedules.get.js +10 -0
  192. package/dist/runtime/server/routes/admin/schedules.post.d.ts +2 -0
  193. package/dist/runtime/server/routes/admin/schedules.post.js +9 -0
  194. package/dist/runtime/server/routes/admin/shift.delete.d.ts +2 -0
  195. package/dist/runtime/server/routes/admin/shift.delete.js +10 -0
  196. package/dist/runtime/server/routes/admin/shift.patch.d.ts +2 -0
  197. package/dist/runtime/server/routes/admin/shift.patch.js +10 -0
  198. package/dist/runtime/server/routes/admin/shifts-bulk.post.d.ts +2 -0
  199. package/dist/runtime/server/routes/admin/shifts-bulk.post.js +10 -0
  200. package/dist/runtime/server/routes/admin/shifts.get.d.ts +2 -0
  201. package/dist/runtime/server/routes/admin/shifts.get.js +10 -0
  202. package/dist/runtime/server/routes/admin/station.delete.d.ts +2 -0
  203. package/dist/runtime/server/routes/admin/station.delete.js +11 -0
  204. package/dist/runtime/server/routes/admin/station.patch.d.ts +2 -0
  205. package/dist/runtime/server/routes/admin/station.patch.js +11 -0
  206. package/dist/runtime/server/routes/admin/stations.get.d.ts +2 -0
  207. package/dist/runtime/server/routes/admin/stations.get.js +9 -0
  208. package/dist/runtime/server/routes/admin/stations.post.d.ts +2 -0
  209. package/dist/runtime/server/routes/admin/stations.post.js +10 -0
  210. package/dist/runtime/server/routes/admin/swap-cancel.post.d.ts +2 -0
  211. package/dist/runtime/server/routes/admin/swap-cancel.post.js +10 -0
  212. package/dist/runtime/server/routes/admin/swaps.get.d.ts +2 -0
  213. package/dist/runtime/server/routes/admin/swaps.get.js +10 -0
  214. package/dist/runtime/server/routes/feed/feed.get.d.ts +2 -0
  215. package/dist/runtime/server/routes/feed/feed.get.js +9 -0
  216. package/dist/runtime/server/routes/lead/attended.post.d.ts +2 -0
  217. package/dist/runtime/server/routes/lead/attended.post.js +11 -0
  218. package/dist/runtime/server/routes/lead/broadcast.post.d.ts +2 -0
  219. package/dist/runtime/server/routes/lead/broadcast.post.js +12 -0
  220. package/dist/runtime/server/routes/lead/check-in.post.d.ts +2 -0
  221. package/dist/runtime/server/routes/lead/check-in.post.js +9 -0
  222. package/dist/runtime/server/routes/lead/exceptions.get.d.ts +2 -0
  223. package/dist/runtime/server/routes/lead/exceptions.get.js +8 -0
  224. package/dist/runtime/server/routes/lead/no-show.post.d.ts +2 -0
  225. package/dist/runtime/server/routes/lead/no-show.post.js +11 -0
  226. package/dist/runtime/server/routes/lead/now.get.d.ts +2 -0
  227. package/dist/runtime/server/routes/lead/now.get.js +9 -0
  228. package/dist/runtime/server/routes/lead/on-duty.get.d.ts +2 -0
  229. package/dist/runtime/server/routes/lead/on-duty.get.js +10 -0
  230. package/dist/runtime/server/routes/lead/stations.get.d.ts +2 -0
  231. package/dist/runtime/server/routes/lead/stations.get.js +8 -0
  232. package/dist/runtime/server/routes/lead/team-shifts.get.d.ts +2 -0
  233. package/dist/runtime/server/routes/lead/team-shifts.get.js +9 -0
  234. package/dist/runtime/server/routes/lead/team-swaps.get.d.ts +2 -0
  235. package/dist/runtime/server/routes/lead/team-swaps.get.js +9 -0
  236. package/dist/runtime/server/routes/me/check-in.post.d.ts +2 -0
  237. package/dist/runtime/server/routes/me/check-in.post.js +11 -0
  238. package/dist/runtime/server/routes/me/earned-perk-claim.post.d.ts +2 -0
  239. package/dist/runtime/server/routes/me/earned-perk-claim.post.js +10 -0
  240. package/dist/runtime/server/routes/me/earned-perks.get.d.ts +2 -0
  241. package/dist/runtime/server/routes/me/earned-perks.get.js +9 -0
  242. package/dist/runtime/server/routes/me/feed-token.delete.d.ts +2 -0
  243. package/dist/runtime/server/routes/me/feed-token.delete.js +7 -0
  244. package/dist/runtime/server/routes/me/feed-token.get.d.ts +2 -0
  245. package/dist/runtime/server/routes/me/feed-token.get.js +6 -0
  246. package/dist/runtime/server/routes/me/feed-token.post.d.ts +2 -0
  247. package/dist/runtime/server/routes/me/feed-token.post.js +7 -0
  248. package/dist/runtime/server/routes/me/leads.get.d.ts +2 -0
  249. package/dist/runtime/server/routes/me/leads.get.js +5 -0
  250. package/dist/runtime/server/routes/me/now.get.d.ts +2 -0
  251. package/dist/runtime/server/routes/me/now.get.js +5 -0
  252. package/dist/runtime/server/routes/me/pass.get.d.ts +2 -0
  253. package/dist/runtime/server/routes/me/pass.get.js +11 -0
  254. package/dist/runtime/server/routes/me/settle.post.d.ts +2 -0
  255. package/dist/runtime/server/routes/me/settle.post.js +14 -0
  256. package/dist/runtime/server/routes/me/shift.get.d.ts +2 -0
  257. package/dist/runtime/server/routes/me/shift.get.js +10 -0
  258. package/dist/runtime/server/routes/me/shifts.get.d.ts +2 -0
  259. package/dist/runtime/server/routes/me/shifts.get.js +6 -0
  260. package/dist/runtime/server/routes/me/swap.delete.d.ts +2 -0
  261. package/dist/runtime/server/routes/me/swap.delete.js +11 -0
  262. package/dist/runtime/server/routes/me/swap.post.d.ts +2 -0
  263. package/dist/runtime/server/routes/me/swap.post.js +11 -0
  264. package/dist/runtime/server/routes/stations/token.get.d.ts +2 -0
  265. package/dist/runtime/server/routes/stations/token.get.js +12 -0
  266. package/dist/runtime/server/routes/swaps/approve.post.d.ts +2 -0
  267. package/dist/runtime/server/routes/swaps/approve.post.js +9 -0
  268. package/dist/runtime/server/routes/swaps/list.get.d.ts +2 -0
  269. package/dist/runtime/server/routes/swaps/list.get.js +5 -0
  270. package/dist/runtime/server/routes/swaps/offer-accept.post.d.ts +2 -0
  271. package/dist/runtime/server/routes/swaps/offer-accept.post.js +9 -0
  272. package/dist/runtime/server/routes/swaps/offer-reject.post.d.ts +2 -0
  273. package/dist/runtime/server/routes/swaps/offer-reject.post.js +9 -0
  274. package/dist/runtime/server/routes/swaps/offer.delete.d.ts +2 -0
  275. package/dist/runtime/server/routes/swaps/offer.delete.js +11 -0
  276. package/dist/runtime/server/routes/swaps/offer.post.d.ts +2 -0
  277. package/dist/runtime/server/routes/swaps/offer.post.js +11 -0
  278. package/dist/runtime/server/routes/swaps/reject.post.d.ts +2 -0
  279. package/dist/runtime/server/routes/swaps/reject.post.js +9 -0
  280. package/dist/runtime/server/swap-email.d.ts +28 -0
  281. package/dist/runtime/server/swap-email.js +49 -0
  282. package/dist/runtime/server/tasks/close-shifts.d.ts +2 -0
  283. package/dist/runtime/server/tasks/close-shifts.js +9 -0
  284. package/dist/runtime/server/tasks/send-reminders.d.ts +2 -0
  285. package/dist/runtime/server/tasks/send-reminders.js +9 -0
  286. package/dist/runtime/server/utils/shifts-admin.d.ts +67 -0
  287. package/dist/runtime/server/utils/shifts-admin.js +312 -0
  288. package/dist/runtime/server/utils/shifts-assign.d.ts +89 -0
  289. package/dist/runtime/server/utils/shifts-assign.js +264 -0
  290. package/dist/runtime/server/utils/shifts-automation.d.ts +37 -0
  291. package/dist/runtime/server/utils/shifts-automation.js +171 -0
  292. package/dist/runtime/server/utils/shifts-broadcasts.d.ts +38 -0
  293. package/dist/runtime/server/utils/shifts-broadcasts.js +113 -0
  294. package/dist/runtime/server/utils/shifts-core.d.ts +78 -0
  295. package/dist/runtime/server/utils/shifts-core.js +142 -0
  296. package/dist/runtime/server/utils/shifts-dto.d.ts +32 -0
  297. package/dist/runtime/server/utils/shifts-dto.js +127 -0
  298. package/dist/runtime/server/utils/shifts-emails.d.ts +16 -0
  299. package/dist/runtime/server/utils/shifts-emails.js +44 -0
  300. package/dist/runtime/server/utils/shifts-exceptions.d.ts +7 -0
  301. package/dist/runtime/server/utils/shifts-exceptions.js +32 -0
  302. package/dist/runtime/server/utils/shifts-feed.d.ts +16 -0
  303. package/dist/runtime/server/utils/shifts-feed.js +73 -0
  304. package/dist/runtime/server/utils/shifts-notify.d.ts +40 -0
  305. package/dist/runtime/server/utils/shifts-notify.js +22 -0
  306. package/dist/runtime/server/utils/shifts-on-duty.d.ts +12 -0
  307. package/dist/runtime/server/utils/shifts-on-duty.js +37 -0
  308. package/dist/runtime/server/utils/shifts-perks.d.ts +46 -0
  309. package/dist/runtime/server/utils/shifts-perks.js +183 -0
  310. package/dist/runtime/server/utils/shifts-reminders.d.ts +30 -0
  311. package/dist/runtime/server/utils/shifts-reminders.js +102 -0
  312. package/dist/runtime/server/utils/shifts-schemas.d.ts +318 -0
  313. package/dist/runtime/server/utils/shifts-schemas.js +177 -0
  314. package/dist/runtime/server/utils/shifts-station-key.d.ts +7 -0
  315. package/dist/runtime/server/utils/shifts-station-key.js +22 -0
  316. package/dist/runtime/server/utils/shifts-stations.d.ts +28 -0
  317. package/dist/runtime/server/utils/shifts-stations.js +109 -0
  318. package/dist/runtime/server/utils/shifts-swaps.d.ts +114 -0
  319. package/dist/runtime/server/utils/shifts-swaps.js +559 -0
  320. package/dist/runtime/server/utils/shifts-views.d.ts +62 -0
  321. package/dist/runtime/server/utils/shifts-views.js +212 -0
  322. package/dist/runtime/utils/api.d.ts +108 -0
  323. package/dist/runtime/utils/api.js +111 -0
  324. package/dist/runtime/utils/checkin.d.ts +59 -0
  325. package/dist/runtime/utils/checkin.js +57 -0
  326. package/dist/runtime/utils/guards.d.ts +21 -0
  327. package/dist/runtime/utils/guards.js +36 -0
  328. package/dist/runtime/utils/ics.d.ts +32 -0
  329. package/dist/runtime/utils/ics.js +56 -0
  330. package/dist/runtime/utils/index.d.ts +16 -0
  331. package/dist/runtime/utils/index.js +15 -0
  332. package/dist/runtime/utils/links.d.ts +44 -0
  333. package/dist/runtime/utils/links.js +21 -0
  334. package/dist/runtime/utils/reminders.d.ts +27 -0
  335. package/dist/runtime/utils/reminders.js +28 -0
  336. package/dist/runtime/utils/settings.d.ts +28 -0
  337. package/dist/runtime/utils/settings.js +18 -0
  338. package/dist/runtime/utils/station-key.d.ts +9 -0
  339. package/dist/runtime/utils/station-key.js +12 -0
  340. package/dist/runtime/utils/status.d.ts +23 -0
  341. package/dist/runtime/utils/status.js +46 -0
  342. package/dist/runtime/utils/time.d.ts +22 -0
  343. package/dist/runtime/utils/time.js +14 -0
  344. package/dist/types.d.mts +5 -0
  345. package/package.json +131 -3
@@ -0,0 +1,32 @@
1
+ <script setup>
2
+ import HomeSwaps from "../tabs/HomeSwaps.vue";
3
+ import { useHead, useModuleT, useShiftsLinks } from "#imports";
4
+ defineOptions({ name: "ShiftsSwapsPage" });
5
+ const t = useModuleT("shifts");
6
+ const links = useShiftsLinks();
7
+ useHead({ title: () => t("swaps.title", "Open swaps") });
8
+ </script>
9
+
10
+ <template>
11
+ <UContainer>
12
+ <UPage>
13
+ <UPageHeader
14
+ :title="t('swaps.title', 'Open swaps')"
15
+ :description="t('swaps.description', 'Shifts others want to trade or give away that you can take. A trade asks for one of your own shifts in return.')"
16
+ >
17
+ <template #links>
18
+ <UButton
19
+ :to="links.shifts()"
20
+ icon="i-lucide-arrow-left"
21
+ color="neutral"
22
+ variant="ghost"
23
+ :label="t('shift.back', 'My shifts')"
24
+ />
25
+ </template>
26
+ </UPageHeader>
27
+ <UPageBody class="max-w-3xl">
28
+ <HomeSwaps />
29
+ </UPageBody>
30
+ </UPage>
31
+ </UContainer>
32
+ </template>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ standalone?: boolean;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,194 @@
1
+ <script setup>
2
+ import { shiftsApi } from "../../utils/api";
3
+ import { SHIFT_ASSIGNMENT_STATUS_LABELS, SHIFT_SWAP_STATUS_LABELS } from "../../utils/status";
4
+ import { dayKey } from "@frigear-nu/module-kit/time";
5
+ import { computed, errorMessage, navigateTo, ref, shallowRef, useAuthPages, useLazyFetch, useModuleT, useRoute, useShiftsActions, useShiftsFormat, useShiftsLinks, useShiftsTranslate, watch } from "#imports";
6
+ defineOptions({ name: "ShiftsHomeShiftsTab" });
7
+ defineProps({
8
+ standalone: { type: Boolean, required: false }
9
+ });
10
+ const t = useModuleT("shifts");
11
+ const tr = useShiftsTranslate();
12
+ const format = useShiftsFormat();
13
+ const links = useShiftsLinks();
14
+ const actions = useShiftsActions();
15
+ const route = useRoute();
16
+ const { data, status, error, refresh } = useLazyFetch(shiftsApi.me.shifts, { key: "shifts:me", default: () => [] });
17
+ const { data: led } = useLazyFetch(shiftsApi.me.leads, { key: "shifts:leads", default: () => [] });
18
+ const loading = computed(() => status.value === "pending" && !data.value.length);
19
+ watch(() => error.value?.statusCode, async (code) => {
20
+ if (code === 401) await navigateTo({ path: useAuthPages().login, query: { redirect: route.fullPath } });
21
+ }, { immediate: true });
22
+ const today = dayKey(/* @__PURE__ */ new Date(), format.timeZone);
23
+ const showPast = ref(false);
24
+ const picked = shallowRef();
25
+ const keyOf = (value) => `${value.year}-${String(value.month).padStart(2, "0")}-${String(value.day).padStart(2, "0")}`;
26
+ const workDays = computed(() => new Set(data.value.map((item) => dayKey(item.shift.startsAt, format.timeZone))));
27
+ const groups = computed(() => {
28
+ const pickedKey = picked.value ? keyOf(picked.value) : null;
29
+ const byDay = /* @__PURE__ */ new Map();
30
+ for (const item of data.value) {
31
+ const key = dayKey(item.shift.startsAt, format.timeZone);
32
+ if (pickedKey ? key !== pickedKey : !showPast.value && item.shift.endsAt < (/* @__PURE__ */ new Date()).toISOString()) continue;
33
+ byDay.set(key, [...byDay.get(key) ?? [], item]);
34
+ }
35
+ return [...byDay.entries()].map(([day, items]) => ({ day, items }));
36
+ });
37
+ const pastCount = computed(() => data.value.filter((item) => item.shift.endsAt < (/* @__PURE__ */ new Date()).toISOString()).length);
38
+ const statusLabel = (item) => item.swap ? t(`swapStatuses.${item.swap.status}`, SHIFT_SWAP_STATUS_LABELS[item.swap.status]) : t(`statuses.${item.assignment.status}`, SHIFT_ASSIGNMENT_STATUS_LABELS[item.assignment.status]);
39
+ </script>
40
+
41
+ <template>
42
+ <div class="flex flex-col gap-4">
43
+ <div class="flex flex-wrap justify-end gap-2">
44
+ <UButton
45
+ v-for="team in led"
46
+ :key="team.teamId"
47
+ :to="links.lead(team.teamId)"
48
+ icon="i-lucide-shield-check"
49
+ color="neutral"
50
+ variant="outline"
51
+ :label="t('mine.lead', 'Lead {team}', { team: tr(team.teamName) })"
52
+ />
53
+ <UButton
54
+ icon="i-lucide-calendar-plus"
55
+ color="neutral"
56
+ variant="outline"
57
+ :label="t('feed.title', 'Subscribe in calendar')"
58
+ @click="actions.subscribe()"
59
+ />
60
+ <UButton
61
+ v-if="standalone"
62
+ :to="links.swaps()"
63
+ icon="i-lucide-arrow-left-right"
64
+ color="neutral"
65
+ variant="outline"
66
+ :label="t('mine.openSwaps', 'Open swaps')"
67
+ />
68
+ </div>
69
+
70
+ <div
71
+ v-if="loading"
72
+ class="grid gap-4 lg:grid-cols-[20rem_1fr]"
73
+ aria-busy="true"
74
+ >
75
+ <SectionCard loading />
76
+ <SectionCard loading />
77
+ </div>
78
+ <UEmpty
79
+ v-else-if="error && !data.length"
80
+ icon="i-lucide-circle-alert"
81
+ :title="t('mine.loadFailed', 'Your shifts could not be loaded')"
82
+ :description="errorMessage(error, '')"
83
+ :actions="[{ label: t('tryAgain', 'Try again'), icon: 'i-lucide-rotate-ccw', color: 'neutral', variant: 'outline', onClick: () => refresh() }]"
84
+ />
85
+ <UEmpty
86
+ v-else-if="!data.length"
87
+ icon="i-lucide-calendar-clock"
88
+ :title="t('mine.empty', 'No shifts yet')"
89
+ :description="t('mine.emptyDescription', 'When a coordinator puts you on a shift, it shows up here.')"
90
+ :actions="[{ label: t('mine.openSwaps', 'Open swaps'), to: links.swaps(), icon: 'i-lucide-arrow-left-right', color: 'neutral', variant: 'outline' }]"
91
+ />
92
+ <div
93
+ v-else
94
+ class="grid items-start gap-4 lg:grid-cols-[20rem_1fr]"
95
+ data-shifts-mine
96
+ >
97
+ <SectionCard
98
+ :title="t('mine.calendar', 'Calendar')"
99
+ icon="i-lucide-calendar"
100
+ >
101
+ <template
102
+ v-if="picked"
103
+ #actions
104
+ >
105
+ <UButton
106
+ color="neutral"
107
+ variant="ghost"
108
+ size="xs"
109
+ icon="i-lucide-x"
110
+ :label="t('mine.showAll', 'Show all days')"
111
+ @click="picked = void 0"
112
+ />
113
+ </template>
114
+ <UCalendar
115
+ v-model="picked"
116
+ :week-starts-on="1"
117
+ class="w-full"
118
+ >
119
+ <template #day="{ day }">
120
+ <UChip
121
+ :show="workDays.has(keyOf(day))"
122
+ size="2xs"
123
+ position="bottom-right"
124
+ >
125
+ {{ day.day }}
126
+ </UChip>
127
+ </template>
128
+ </UCalendar>
129
+ </SectionCard>
130
+
131
+ <div class="flex flex-col gap-4">
132
+ <SectionCard v-if="!groups.length">
133
+ <p class="text-muted text-sm">
134
+ {{ picked ? t("mine.noneThatDay", "No shifts on that day.") : t("mine.noneUpcoming", "No upcoming shifts.") }}
135
+ </p>
136
+ </SectionCard>
137
+ <SectionCard
138
+ v-for="group in groups"
139
+ :key="group.day"
140
+ :title="format.day(group.day)"
141
+ flush
142
+ >
143
+ <template
144
+ v-if="group.day === today"
145
+ #actions
146
+ >
147
+ <UBadge
148
+ size="sm"
149
+ variant="subtle"
150
+ :label="t('mine.today', 'Today')"
151
+ />
152
+ </template>
153
+ <ul class="divide-default divide-y">
154
+ <li
155
+ v-for="item in group.items"
156
+ :key="item.assignment.id"
157
+ >
158
+ <ULink
159
+ :to="links.shift(item.assignment.id)"
160
+ class="hover:bg-elevated/50 flex items-center justify-between gap-3 px-4 py-3 transition"
161
+ >
162
+ <div class="flex min-w-0 flex-col">
163
+ <span class="text-highlighted font-medium tabular-nums">{{ format.time(item.shift.startsAt) }}–{{ format.time(item.shift.endsAt) }}</span>
164
+ <span class="text-muted truncate text-sm">
165
+ {{ tr(item.teamName) }}<template v-if="item.roleName"> · {{ tr(item.roleName) }}</template> · {{ tr(item.operationName) }}
166
+ </span>
167
+ </div>
168
+ <div class="flex shrink-0 items-center gap-2">
169
+ <StatusBadge
170
+ :status="item.swap ? item.swap.status : item.assignment.status"
171
+ :label="statusLabel(item)"
172
+ :colors="{ assigned: 'info', attended: 'success', no_show: 'error', open: 'warning', offered: 'warning', pending_approval: 'warning' }"
173
+ />
174
+ <UIcon
175
+ name="i-lucide-chevron-right"
176
+ class="text-dimmed size-4"
177
+ />
178
+ </div>
179
+ </ULink>
180
+ </li>
181
+ </ul>
182
+ </SectionCard>
183
+ <UButton
184
+ v-if="!picked && pastCount"
185
+ color="neutral"
186
+ variant="ghost"
187
+ class="self-start"
188
+ :label="showPast ? t('mine.hidePast', 'Hide past shifts') : t('mine.showPast', 'Show {count} past shifts', { count: pastCount })"
189
+ @click="showPast = !showPast"
190
+ />
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </template>
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ standalone?: boolean;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,188 @@
1
+ <script setup>
2
+ import { shiftsApi } from "../../utils/api";
3
+ import { SHIFT_SWAP_OFFER_STATUS_LABELS } from "../../utils/status";
4
+ import { allowsSwapKind } from "../../utils/settings";
5
+ import { $fetch, computed, errorMessage, navigateTo, onMounted, reactive, ref, useAction, useAuthPages, useLazyFetch, useModuleT, useRoute, useShiftsFormat, useShiftsLinks, useShiftsTranslate, watch } from "#imports";
6
+ defineOptions({ name: "ShiftsHomeSwapsTab" });
7
+ const t = useModuleT("shifts");
8
+ const tr = useShiftsTranslate();
9
+ const format = useShiftsFormat();
10
+ const links = useShiftsLinks();
11
+ const { busy, run } = useAction();
12
+ const route = useRoute();
13
+ const { data: swaps, status, error, refresh } = useLazyFetch(shiftsApi.swaps, { key: "shifts:swaps", default: () => [] });
14
+ const { data: mine, refresh: refreshMine } = useLazyFetch(shiftsApi.me.shifts, { key: "shifts:me", default: () => [] });
15
+ const loading = computed(() => status.value === "pending" && !swaps.value.length);
16
+ watch(() => error.value?.statusCode, async (code) => {
17
+ if (code === 401) await navigateTo({ path: useAuthPages().login, query: { redirect: route.fullPath } });
18
+ }, { immediate: true });
19
+ const now = ref(0);
20
+ onMounted(() => now.value = Date.now());
21
+ const upcomingMine = computed(() => mine.value.filter((item) => item.assignment.status === "assigned" && Date.parse(item.shift.startsAt) > now.value));
22
+ const myOpen = computed(() => upcomingMine.value.filter((item) => item.swap));
23
+ const giving = reactive({});
24
+ const givingOptions = (swap) => upcomingMine.value.filter((item) => !swap.wantedAssignmentId || item.assignment.id === swap.wantedAssignmentId).filter((item) => allowsSwapKind(item.settings, "trade")).filter((item) => item.shift.scheduleId === swap.shift.scheduleId || swap.settings.coverage !== "all" && item.settings.coverage !== "all").map((item) => ({ label: `${tr(item.teamName)} \xB7 ${format.range(item.shift.startsAt, item.shift.endsAt)}`, value: item.assignment.id }));
25
+ async function offer(swap) {
26
+ const back = swap.kind === "trade" ? giving[swap.id] ?? swap.wantedAssignmentId ?? null : null;
27
+ if (swap.kind === "trade" && !back) return;
28
+ const done = await run(
29
+ () => $fetch(shiftsApi.offers(swap.id), { method: "POST", body: { assignmentId: back } }).then(() => true),
30
+ swap.kind === "trade" ? { success: t("swaps.tradeOffered", "Offered {name} a trade", { name: swap.owner.name ?? "" }), error: t("swaps.offerFailed", "Could not make the offer") } : { success: t("swaps.offered", "Offered to take the shift of {name}", { name: swap.owner.name ?? "" }), error: t("swaps.offerFailed", "Could not make the offer") }
31
+ );
32
+ if (done) await Promise.all([refresh(), refreshMine()]);
33
+ }
34
+ async function withdraw(swap) {
35
+ if (!swap.myOffer) return;
36
+ const done = await run(
37
+ () => $fetch(shiftsApi.offer(swap.id, swap.myOffer.id), { method: "DELETE" }).then(() => true),
38
+ { success: t("swaps.offerWithdrawn", "Withdrew your offer"), error: t("swaps.offerWithdrawFailed", "Could not withdraw the offer") }
39
+ );
40
+ if (done) await refresh();
41
+ }
42
+ </script>
43
+
44
+ <template>
45
+ <div class="flex flex-col gap-4">
46
+ <SectionCard
47
+ v-if="myOpen.length"
48
+ :title="t('swaps.mine', 'Your shifts on offer')"
49
+ icon="i-lucide-megaphone"
50
+ flush
51
+ >
52
+ <ul class="divide-default divide-y">
53
+ <li
54
+ v-for="item in myOpen"
55
+ :key="item.assignment.id"
56
+ class="flex items-center justify-between gap-2 px-4 py-2.5"
57
+ >
58
+ <span class="text-sm">{{ tr(item.teamName) }} · {{ format.range(item.shift.startsAt, item.shift.endsAt) }}</span>
59
+ <UButton
60
+ :to="links.shift(item.assignment.id)"
61
+ size="sm"
62
+ color="neutral"
63
+ variant="outline"
64
+ :label="t('swaps.seeOffers', 'See offers')"
65
+ />
66
+ </li>
67
+ </ul>
68
+ </SectionCard>
69
+
70
+ <div
71
+ v-if="loading"
72
+ class="flex flex-col gap-3"
73
+ aria-busy="true"
74
+ >
75
+ <SectionCard
76
+ v-for="index in 2"
77
+ :key="index"
78
+ loading
79
+ />
80
+ </div>
81
+ <UEmpty
82
+ v-else-if="error && error.statusCode !== 401"
83
+ icon="i-lucide-circle-alert"
84
+ :title="t('swaps.loadFailed', 'The swaps could not be loaded')"
85
+ :description="errorMessage(error, '')"
86
+ :actions="[{ label: t('tryAgain', 'Try again'), icon: 'i-lucide-rotate-ccw', color: 'neutral', variant: 'outline', onClick: () => refresh() }]"
87
+ />
88
+ <UEmpty
89
+ v-else-if="!swaps.length"
90
+ icon="i-lucide-arrow-left-right"
91
+ :title="t('swaps.empty', 'No open swaps for you')"
92
+ :description="t('swaps.emptyDescription', 'When somebody on your team offers a shift you can take, it shows up here.')"
93
+ />
94
+ <div
95
+ v-else
96
+ class="flex flex-col gap-3"
97
+ data-shifts-swaps
98
+ >
99
+ <SectionCard
100
+ v-for="swap in swaps"
101
+ :key="swap.id"
102
+ :title="`${tr(swap.shift.teamName)} \xB7 ${format.range(swap.shift.startsAt, swap.shift.endsAt)}`"
103
+ :description="t('swaps.from', 'From {name} \xB7 {schedule}', { name: swap.owner.name ?? '', schedule: tr(swap.shift.scheduleName) })"
104
+ >
105
+ <template #actions>
106
+ <div class="flex items-center gap-2">
107
+ <UBadge
108
+ color="neutral"
109
+ variant="subtle"
110
+ :label="swap.kind === 'trade' ? t('swapKinds.trade', 'Trade') : t('swapKinds.release', 'Give away')"
111
+ />
112
+ <UBadge
113
+ v-if="swap.myOffer"
114
+ color="primary"
115
+ variant="subtle"
116
+ :label="t(`offerStatuses.${swap.myOffer.status}`, SHIFT_SWAP_OFFER_STATUS_LABELS[swap.myOffer.status])"
117
+ />
118
+ </div>
119
+ </template>
120
+ <UAlert
121
+ v-if="swap.settings.coverage === 'all'"
122
+ class="mb-3"
123
+ color="info"
124
+ variant="subtle"
125
+ icon="i-lucide-info"
126
+ :title="t('shift.tradeOnly', 'Trade only: you must work all your shifts.')"
127
+ />
128
+ <p
129
+ v-if="swap.wantedShift && !swap.myOffer"
130
+ class="text-muted mb-3 text-sm"
131
+ >
132
+ {{ t("swaps.wants", "Wants your shift on {team}, {when}", { team: tr(swap.wantedShift.teamName), when: format.range(swap.wantedShift.startsAt, swap.wantedShift.endsAt) }) }}
133
+ </p>
134
+ <div
135
+ v-if="!swap.myOffer && swap.kind === 'trade'"
136
+ class="flex flex-wrap items-end gap-2"
137
+ >
138
+ <UFormField
139
+ :label="t('swaps.giveBack', 'You give in return')"
140
+ :description="givingOptions(swap).length ? void 0 : t('swaps.nothingToTrade', 'You have no upcoming shift to trade.')"
141
+ required
142
+ class="min-w-64 flex-1"
143
+ >
144
+ <USelect
145
+ v-model="giving[swap.id]"
146
+ :items="givingOptions(swap)"
147
+ :placeholder="t('swaps.pickShift', 'Choose one of your shifts')"
148
+ :disabled="!givingOptions(swap).length"
149
+ class="w-full"
150
+ />
151
+ </UFormField>
152
+ <UButton
153
+ :loading="busy"
154
+ :disabled="!giving[swap.id] && !swap.wantedAssignmentId"
155
+ :label="t('swaps.tradeAction', 'Offer a trade')"
156
+ @click="offer(swap)"
157
+ />
158
+ </div>
159
+ <div
160
+ v-else-if="!swap.myOffer"
161
+ class="flex justify-end"
162
+ >
163
+ <UButton
164
+ :loading="busy"
165
+ :label="t('swaps.offerAction', 'Take the shift over')"
166
+ @click="offer(swap)"
167
+ />
168
+ </div>
169
+ <div
170
+ v-else
171
+ class="flex items-center justify-between gap-2"
172
+ >
173
+ <span class="text-muted text-sm">
174
+ {{ swap.myOffer.offeredShift ? t("swaps.youGive", "You give {team}, {when}", { team: tr(swap.myOffer.offeredShift.teamName), when: format.range(swap.myOffer.offeredShift.startsAt, swap.myOffer.offeredShift.endsAt) }) : t("swaps.youTake", "You take the shift over") }}
175
+ </span>
176
+ <UButton
177
+ color="neutral"
178
+ variant="outline"
179
+ size="sm"
180
+ :loading="busy"
181
+ :label="t('swaps.withdrawOffer', 'Withdraw offer')"
182
+ @click="withdraw(swap)"
183
+ />
184
+ </div>
185
+ </SectionCard>
186
+ </div>
187
+ </div>
188
+ </template>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ operation?: {
3
+ id: string;
4
+ slug?: string;
5
+ };
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;