@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.
- package/README.md +53 -2
- package/dist/module.d.mts +716 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +272 -0
- package/dist/runtime/access.d.ts +2 -0
- package/dist/runtime/access.js +84 -0
- package/dist/runtime/app/components/ShiftBroadcastSlideover.d.vue.ts +19 -0
- package/dist/runtime/app/components/ShiftBroadcastSlideover.vue +142 -0
- package/dist/runtime/app/components/ShiftBroadcastSlideover.vue.d.ts +19 -0
- package/dist/runtime/app/components/ShiftBroadcastsCard.d.vue.ts +9 -0
- package/dist/runtime/app/components/ShiftBroadcastsCard.vue +74 -0
- package/dist/runtime/app/components/ShiftBroadcastsCard.vue.d.ts +9 -0
- package/dist/runtime/app/components/ShiftBulkSlideover.d.vue.ts +15 -0
- package/dist/runtime/app/components/ShiftBulkSlideover.vue +185 -0
- package/dist/runtime/app/components/ShiftBulkSlideover.vue.d.ts +15 -0
- package/dist/runtime/app/components/ShiftCheckInCard.d.vue.ts +13 -0
- package/dist/runtime/app/components/ShiftCheckInCard.vue +238 -0
- package/dist/runtime/app/components/ShiftCheckInCard.vue.d.ts +13 -0
- package/dist/runtime/app/components/ShiftCopySlideover.d.vue.ts +11 -0
- package/dist/runtime/app/components/ShiftCopySlideover.vue +71 -0
- package/dist/runtime/app/components/ShiftCopySlideover.vue.d.ts +11 -0
- package/dist/runtime/app/components/ShiftDayView.d.vue.ts +16 -0
- package/dist/runtime/app/components/ShiftDayView.vue +124 -0
- package/dist/runtime/app/components/ShiftDayView.vue.d.ts +16 -0
- package/dist/runtime/app/components/ShiftFeedSlideover.d.vue.ts +7 -0
- package/dist/runtime/app/components/ShiftFeedSlideover.vue +172 -0
- package/dist/runtime/app/components/ShiftFeedSlideover.vue.d.ts +7 -0
- package/dist/runtime/app/components/ShiftNowCard.d.vue.ts +6 -0
- package/dist/runtime/app/components/ShiftNowCard.vue +83 -0
- package/dist/runtime/app/components/ShiftNowCard.vue.d.ts +6 -0
- package/dist/runtime/app/components/ShiftPassFullscreen.d.vue.ts +13 -0
- package/dist/runtime/app/components/ShiftPassFullscreen.vue +79 -0
- package/dist/runtime/app/components/ShiftPassFullscreen.vue.d.ts +13 -0
- package/dist/runtime/app/components/ShiftPerkSlideover.d.vue.ts +14 -0
- package/dist/runtime/app/components/ShiftPerkSlideover.vue +103 -0
- package/dist/runtime/app/components/ShiftPerkSlideover.vue.d.ts +14 -0
- package/dist/runtime/app/components/ShiftPerksCard.d.vue.ts +8 -0
- package/dist/runtime/app/components/ShiftPerksCard.vue +66 -0
- package/dist/runtime/app/components/ShiftPerksCard.vue.d.ts +8 -0
- package/dist/runtime/app/components/ShiftQrScanner.d.vue.ts +10 -0
- package/dist/runtime/app/components/ShiftQrScanner.vue +44 -0
- package/dist/runtime/app/components/ShiftQrScanner.vue.d.ts +10 -0
- package/dist/runtime/app/components/ShiftRoleSlideover.d.vue.ts +15 -0
- package/dist/runtime/app/components/ShiftRoleSlideover.vue +88 -0
- package/dist/runtime/app/components/ShiftRoleSlideover.vue.d.ts +15 -0
- package/dist/runtime/app/components/ShiftScheduleSettingsFields.d.vue.ts +11 -0
- package/dist/runtime/app/components/ShiftScheduleSettingsFields.vue +61 -0
- package/dist/runtime/app/components/ShiftScheduleSettingsFields.vue.d.ts +11 -0
- package/dist/runtime/app/components/ShiftScheduleSlideover.d.vue.ts +12 -0
- package/dist/runtime/app/components/ShiftScheduleSlideover.vue +129 -0
- package/dist/runtime/app/components/ShiftScheduleSlideover.vue.d.ts +12 -0
- package/dist/runtime/app/components/ShiftSlideover.d.vue.ts +13 -0
- package/dist/runtime/app/components/ShiftSlideover.vue +353 -0
- package/dist/runtime/app/components/ShiftSlideover.vue.d.ts +13 -0
- package/dist/runtime/app/components/ShiftStationSlideover.d.vue.ts +15 -0
- package/dist/runtime/app/components/ShiftStationSlideover.vue +92 -0
- package/dist/runtime/app/components/ShiftStationSlideover.vue.d.ts +15 -0
- package/dist/runtime/app/composables/index.d.ts +6 -0
- package/dist/runtime/app/composables/index.js +5 -0
- package/dist/runtime/app/composables/useShiftsActions.d.ts +61 -0
- package/dist/runtime/app/composables/useShiftsActions.js +224 -0
- package/dist/runtime/app/composables/useShiftsFormat.d.ts +12 -0
- package/dist/runtime/app/composables/useShiftsFormat.js +14 -0
- package/dist/runtime/app/composables/useShiftsLinks.d.ts +12 -0
- package/dist/runtime/app/composables/useShiftsLinks.js +6 -0
- package/dist/runtime/app/composables/useShiftsTranslate.d.ts +5 -0
- package/dist/runtime/app/composables/useShiftsTranslate.js +12 -0
- package/dist/runtime/app/composables/useShiftsVenueFeatures.d.ts +17 -0
- package/dist/runtime/app/composables/useShiftsVenueFeatures.js +18 -0
- package/dist/runtime/app/dashboard/NextShift.d.vue.ts +3 -0
- package/dist/runtime/app/dashboard/NextShift.vue +69 -0
- package/dist/runtime/app/dashboard/NextShift.vue.d.ts +3 -0
- package/dist/runtime/app/dashboard/OpenSwaps.d.vue.ts +3 -0
- package/dist/runtime/app/dashboard/OpenSwaps.vue +69 -0
- package/dist/runtime/app/dashboard/OpenSwaps.vue.d.ts +3 -0
- package/dist/runtime/app/dashboard/TeamOnNow.d.vue.ts +3 -0
- package/dist/runtime/app/dashboard/TeamOnNow.vue +72 -0
- package/dist/runtime/app/dashboard/TeamOnNow.vue.d.ts +3 -0
- package/dist/runtime/app/pages/check-in.d.vue.ts +3 -0
- package/dist/runtime/app/pages/check-in.vue +93 -0
- package/dist/runtime/app/pages/check-in.vue.d.ts +3 -0
- package/dist/runtime/app/pages/lead.d.vue.ts +3 -0
- package/dist/runtime/app/pages/lead.vue +300 -0
- package/dist/runtime/app/pages/lead.vue.d.ts +3 -0
- package/dist/runtime/app/pages/shift.d.vue.ts +3 -0
- package/dist/runtime/app/pages/shift.vue +482 -0
- package/dist/runtime/app/pages/shift.vue.d.ts +3 -0
- package/dist/runtime/app/pages/shifts.d.vue.ts +3 -0
- package/dist/runtime/app/pages/shifts.vue +21 -0
- package/dist/runtime/app/pages/shifts.vue.d.ts +3 -0
- package/dist/runtime/app/pages/station.d.vue.ts +3 -0
- package/dist/runtime/app/pages/station.vue +104 -0
- package/dist/runtime/app/pages/station.vue.d.ts +3 -0
- package/dist/runtime/app/pages/swaps.d.vue.ts +3 -0
- package/dist/runtime/app/pages/swaps.vue +32 -0
- package/dist/runtime/app/pages/swaps.vue.d.ts +3 -0
- package/dist/runtime/app/tabs/HomeShifts.d.vue.ts +6 -0
- package/dist/runtime/app/tabs/HomeShifts.vue +194 -0
- package/dist/runtime/app/tabs/HomeShifts.vue.d.ts +6 -0
- package/dist/runtime/app/tabs/HomeSwaps.d.vue.ts +3 -0
- package/dist/runtime/app/tabs/HomeSwaps.vue +188 -0
- package/dist/runtime/app/tabs/HomeSwaps.vue.d.ts +3 -0
- package/dist/runtime/app/tabs/Shifts.d.vue.ts +9 -0
- package/dist/runtime/app/tabs/Shifts.vue +487 -0
- package/dist/runtime/app/tabs/Shifts.vue.d.ts +9 -0
- package/dist/runtime/app/utils/admin-shifts.d.ts +42 -0
- package/dist/runtime/app/utils/admin-shifts.js +36 -0
- package/dist/runtime/dashboard.d.ts +8 -0
- package/dist/runtime/dashboard.js +30 -0
- package/dist/runtime/emails/shifts-broadcast.d.vue.ts +8 -0
- package/dist/runtime/emails/shifts-broadcast.vue +24 -0
- package/dist/runtime/emails/shifts-broadcast.vue.d.ts +8 -0
- package/dist/runtime/emails/shifts-reminder.d.vue.ts +12 -0
- package/dist/runtime/emails/shifts-reminder.vue +34 -0
- package/dist/runtime/emails/shifts-reminder.vue.d.ts +12 -0
- package/dist/runtime/emails/shifts-swap-accepted.d.vue.ts +11 -0
- package/dist/runtime/emails/shifts-swap-accepted.vue +32 -0
- package/dist/runtime/emails/shifts-swap-accepted.vue.d.ts +11 -0
- package/dist/runtime/emails/shifts-swap-completed.d.vue.ts +11 -0
- package/dist/runtime/emails/shifts-swap-completed.vue +32 -0
- package/dist/runtime/emails/shifts-swap-completed.vue.d.ts +11 -0
- package/dist/runtime/emails/shifts-swap-offered.d.vue.ts +11 -0
- package/dist/runtime/emails/shifts-swap-offered.vue +32 -0
- package/dist/runtime/emails/shifts-swap-offered.vue.d.ts +11 -0
- package/dist/runtime/emails/shifts-swap-pending.d.vue.ts +11 -0
- package/dist/runtime/emails/shifts-swap-pending.vue +32 -0
- package/dist/runtime/emails/shifts-swap-pending.vue.d.ts +11 -0
- package/dist/runtime/emails/shifts-swap-proposed.d.vue.ts +11 -0
- package/dist/runtime/emails/shifts-swap-proposed.vue +32 -0
- package/dist/runtime/emails/shifts-swap-proposed.vue.d.ts +11 -0
- package/dist/runtime/emails/shifts-swap-rejected.d.vue.ts +11 -0
- package/dist/runtime/emails/shifts-swap-rejected.vue +32 -0
- package/dist/runtime/emails/shifts-swap-rejected.vue.d.ts +11 -0
- package/dist/runtime/i18n/lang/da.json +627 -0
- package/dist/runtime/i18n/lang/en.json +627 -0
- package/dist/runtime/notifications.d.ts +9 -0
- package/dist/runtime/notifications.js +36 -0
- package/dist/runtime/server/db/schema.postgresql.d.ts +2151 -0
- package/dist/runtime/server/db/schema.postgresql.js +228 -0
- package/dist/runtime/server/db/schema.sqlite.d.ts +2263 -0
- package/dist/runtime/server/db/schema.sqlite.js +228 -0
- package/dist/runtime/server/digest-email.d.ts +17 -0
- package/dist/runtime/server/digest-email.js +42 -0
- package/dist/runtime/server/plugins/station-key.d.ts +2 -0
- package/dist/runtime/server/plugins/station-key.js +5 -0
- package/dist/runtime/server/plugins/teams.d.ts +2 -0
- package/dist/runtime/server/plugins/teams.js +19 -0
- package/dist/runtime/server/policies.d.ts +2 -0
- package/dist/runtime/server/policies.js +41 -0
- package/dist/runtime/server/reminder-email.d.ts +67 -0
- package/dist/runtime/server/reminder-email.js +109 -0
- package/dist/runtime/server/routes/admin/assignment.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/assignment.delete.js +10 -0
- package/dist/runtime/server/routes/admin/assignments.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/assignments.post.js +11 -0
- package/dist/runtime/server/routes/admin/broadcasts.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/broadcasts.get.js +8 -0
- package/dist/runtime/server/routes/admin/broadcasts.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/broadcasts.post.js +9 -0
- package/dist/runtime/server/routes/admin/candidates.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/candidates.get.js +10 -0
- package/dist/runtime/server/routes/admin/operation-teams.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/operation-teams.get.js +9 -0
- package/dist/runtime/server/routes/admin/perk.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/perk.delete.js +10 -0
- package/dist/runtime/server/routes/admin/perk.patch.d.ts +2 -0
- package/dist/runtime/server/routes/admin/perk.patch.js +10 -0
- package/dist/runtime/server/routes/admin/perks.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/perks.get.js +9 -0
- package/dist/runtime/server/routes/admin/perks.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/perks.post.js +10 -0
- package/dist/runtime/server/routes/admin/role.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/role.delete.js +11 -0
- package/dist/runtime/server/routes/admin/role.patch.d.ts +2 -0
- package/dist/runtime/server/routes/admin/role.patch.js +11 -0
- package/dist/runtime/server/routes/admin/roles.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/roles.get.js +9 -0
- package/dist/runtime/server/routes/admin/roles.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/roles.post.js +10 -0
- package/dist/runtime/server/routes/admin/schedule-copy.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/schedule-copy.post.js +12 -0
- package/dist/runtime/server/routes/admin/schedule-publish.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/schedule-publish.post.js +9 -0
- package/dist/runtime/server/routes/admin/schedule.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/schedule.delete.js +10 -0
- package/dist/runtime/server/routes/admin/schedule.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/schedule.get.js +9 -0
- package/dist/runtime/server/routes/admin/schedule.patch.d.ts +2 -0
- package/dist/runtime/server/routes/admin/schedule.patch.js +10 -0
- package/dist/runtime/server/routes/admin/schedules.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/schedules.get.js +10 -0
- package/dist/runtime/server/routes/admin/schedules.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/schedules.post.js +9 -0
- package/dist/runtime/server/routes/admin/shift.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/shift.delete.js +10 -0
- package/dist/runtime/server/routes/admin/shift.patch.d.ts +2 -0
- package/dist/runtime/server/routes/admin/shift.patch.js +10 -0
- package/dist/runtime/server/routes/admin/shifts-bulk.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/shifts-bulk.post.js +10 -0
- package/dist/runtime/server/routes/admin/shifts.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/shifts.get.js +10 -0
- package/dist/runtime/server/routes/admin/station.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/station.delete.js +11 -0
- package/dist/runtime/server/routes/admin/station.patch.d.ts +2 -0
- package/dist/runtime/server/routes/admin/station.patch.js +11 -0
- package/dist/runtime/server/routes/admin/stations.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/stations.get.js +9 -0
- package/dist/runtime/server/routes/admin/stations.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/stations.post.js +10 -0
- package/dist/runtime/server/routes/admin/swap-cancel.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/swap-cancel.post.js +10 -0
- package/dist/runtime/server/routes/admin/swaps.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/swaps.get.js +10 -0
- package/dist/runtime/server/routes/feed/feed.get.d.ts +2 -0
- package/dist/runtime/server/routes/feed/feed.get.js +9 -0
- package/dist/runtime/server/routes/lead/attended.post.d.ts +2 -0
- package/dist/runtime/server/routes/lead/attended.post.js +11 -0
- package/dist/runtime/server/routes/lead/broadcast.post.d.ts +2 -0
- package/dist/runtime/server/routes/lead/broadcast.post.js +12 -0
- package/dist/runtime/server/routes/lead/check-in.post.d.ts +2 -0
- package/dist/runtime/server/routes/lead/check-in.post.js +9 -0
- package/dist/runtime/server/routes/lead/exceptions.get.d.ts +2 -0
- package/dist/runtime/server/routes/lead/exceptions.get.js +8 -0
- package/dist/runtime/server/routes/lead/no-show.post.d.ts +2 -0
- package/dist/runtime/server/routes/lead/no-show.post.js +11 -0
- package/dist/runtime/server/routes/lead/now.get.d.ts +2 -0
- package/dist/runtime/server/routes/lead/now.get.js +9 -0
- package/dist/runtime/server/routes/lead/on-duty.get.d.ts +2 -0
- package/dist/runtime/server/routes/lead/on-duty.get.js +10 -0
- package/dist/runtime/server/routes/lead/stations.get.d.ts +2 -0
- package/dist/runtime/server/routes/lead/stations.get.js +8 -0
- package/dist/runtime/server/routes/lead/team-shifts.get.d.ts +2 -0
- package/dist/runtime/server/routes/lead/team-shifts.get.js +9 -0
- package/dist/runtime/server/routes/lead/team-swaps.get.d.ts +2 -0
- package/dist/runtime/server/routes/lead/team-swaps.get.js +9 -0
- package/dist/runtime/server/routes/me/check-in.post.d.ts +2 -0
- package/dist/runtime/server/routes/me/check-in.post.js +11 -0
- package/dist/runtime/server/routes/me/earned-perk-claim.post.d.ts +2 -0
- package/dist/runtime/server/routes/me/earned-perk-claim.post.js +10 -0
- package/dist/runtime/server/routes/me/earned-perks.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/earned-perks.get.js +9 -0
- package/dist/runtime/server/routes/me/feed-token.delete.d.ts +2 -0
- package/dist/runtime/server/routes/me/feed-token.delete.js +7 -0
- package/dist/runtime/server/routes/me/feed-token.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/feed-token.get.js +6 -0
- package/dist/runtime/server/routes/me/feed-token.post.d.ts +2 -0
- package/dist/runtime/server/routes/me/feed-token.post.js +7 -0
- package/dist/runtime/server/routes/me/leads.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/leads.get.js +5 -0
- package/dist/runtime/server/routes/me/now.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/now.get.js +5 -0
- package/dist/runtime/server/routes/me/pass.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/pass.get.js +11 -0
- package/dist/runtime/server/routes/me/settle.post.d.ts +2 -0
- package/dist/runtime/server/routes/me/settle.post.js +14 -0
- package/dist/runtime/server/routes/me/shift.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/shift.get.js +10 -0
- package/dist/runtime/server/routes/me/shifts.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/shifts.get.js +6 -0
- package/dist/runtime/server/routes/me/swap.delete.d.ts +2 -0
- package/dist/runtime/server/routes/me/swap.delete.js +11 -0
- package/dist/runtime/server/routes/me/swap.post.d.ts +2 -0
- package/dist/runtime/server/routes/me/swap.post.js +11 -0
- package/dist/runtime/server/routes/stations/token.get.d.ts +2 -0
- package/dist/runtime/server/routes/stations/token.get.js +12 -0
- package/dist/runtime/server/routes/swaps/approve.post.d.ts +2 -0
- package/dist/runtime/server/routes/swaps/approve.post.js +9 -0
- package/dist/runtime/server/routes/swaps/list.get.d.ts +2 -0
- package/dist/runtime/server/routes/swaps/list.get.js +5 -0
- package/dist/runtime/server/routes/swaps/offer-accept.post.d.ts +2 -0
- package/dist/runtime/server/routes/swaps/offer-accept.post.js +9 -0
- package/dist/runtime/server/routes/swaps/offer-reject.post.d.ts +2 -0
- package/dist/runtime/server/routes/swaps/offer-reject.post.js +9 -0
- package/dist/runtime/server/routes/swaps/offer.delete.d.ts +2 -0
- package/dist/runtime/server/routes/swaps/offer.delete.js +11 -0
- package/dist/runtime/server/routes/swaps/offer.post.d.ts +2 -0
- package/dist/runtime/server/routes/swaps/offer.post.js +11 -0
- package/dist/runtime/server/routes/swaps/reject.post.d.ts +2 -0
- package/dist/runtime/server/routes/swaps/reject.post.js +9 -0
- package/dist/runtime/server/swap-email.d.ts +28 -0
- package/dist/runtime/server/swap-email.js +49 -0
- package/dist/runtime/server/tasks/close-shifts.d.ts +2 -0
- package/dist/runtime/server/tasks/close-shifts.js +9 -0
- package/dist/runtime/server/tasks/send-reminders.d.ts +2 -0
- package/dist/runtime/server/tasks/send-reminders.js +9 -0
- package/dist/runtime/server/utils/shifts-admin.d.ts +67 -0
- package/dist/runtime/server/utils/shifts-admin.js +312 -0
- package/dist/runtime/server/utils/shifts-assign.d.ts +89 -0
- package/dist/runtime/server/utils/shifts-assign.js +264 -0
- package/dist/runtime/server/utils/shifts-automation.d.ts +37 -0
- package/dist/runtime/server/utils/shifts-automation.js +171 -0
- package/dist/runtime/server/utils/shifts-broadcasts.d.ts +38 -0
- package/dist/runtime/server/utils/shifts-broadcasts.js +113 -0
- package/dist/runtime/server/utils/shifts-core.d.ts +78 -0
- package/dist/runtime/server/utils/shifts-core.js +142 -0
- package/dist/runtime/server/utils/shifts-dto.d.ts +32 -0
- package/dist/runtime/server/utils/shifts-dto.js +127 -0
- package/dist/runtime/server/utils/shifts-emails.d.ts +16 -0
- package/dist/runtime/server/utils/shifts-emails.js +44 -0
- package/dist/runtime/server/utils/shifts-exceptions.d.ts +7 -0
- package/dist/runtime/server/utils/shifts-exceptions.js +32 -0
- package/dist/runtime/server/utils/shifts-feed.d.ts +16 -0
- package/dist/runtime/server/utils/shifts-feed.js +73 -0
- package/dist/runtime/server/utils/shifts-notify.d.ts +40 -0
- package/dist/runtime/server/utils/shifts-notify.js +22 -0
- package/dist/runtime/server/utils/shifts-on-duty.d.ts +12 -0
- package/dist/runtime/server/utils/shifts-on-duty.js +37 -0
- package/dist/runtime/server/utils/shifts-perks.d.ts +46 -0
- package/dist/runtime/server/utils/shifts-perks.js +183 -0
- package/dist/runtime/server/utils/shifts-reminders.d.ts +30 -0
- package/dist/runtime/server/utils/shifts-reminders.js +102 -0
- package/dist/runtime/server/utils/shifts-schemas.d.ts +318 -0
- package/dist/runtime/server/utils/shifts-schemas.js +177 -0
- package/dist/runtime/server/utils/shifts-station-key.d.ts +7 -0
- package/dist/runtime/server/utils/shifts-station-key.js +22 -0
- package/dist/runtime/server/utils/shifts-stations.d.ts +28 -0
- package/dist/runtime/server/utils/shifts-stations.js +109 -0
- package/dist/runtime/server/utils/shifts-swaps.d.ts +114 -0
- package/dist/runtime/server/utils/shifts-swaps.js +559 -0
- package/dist/runtime/server/utils/shifts-views.d.ts +62 -0
- package/dist/runtime/server/utils/shifts-views.js +212 -0
- package/dist/runtime/utils/api.d.ts +108 -0
- package/dist/runtime/utils/api.js +111 -0
- package/dist/runtime/utils/checkin.d.ts +59 -0
- package/dist/runtime/utils/checkin.js +57 -0
- package/dist/runtime/utils/guards.d.ts +21 -0
- package/dist/runtime/utils/guards.js +36 -0
- package/dist/runtime/utils/ics.d.ts +32 -0
- package/dist/runtime/utils/ics.js +56 -0
- package/dist/runtime/utils/index.d.ts +16 -0
- package/dist/runtime/utils/index.js +15 -0
- package/dist/runtime/utils/links.d.ts +44 -0
- package/dist/runtime/utils/links.js +21 -0
- package/dist/runtime/utils/reminders.d.ts +27 -0
- package/dist/runtime/utils/reminders.js +28 -0
- package/dist/runtime/utils/settings.d.ts +28 -0
- package/dist/runtime/utils/settings.js +18 -0
- package/dist/runtime/utils/station-key.d.ts +9 -0
- package/dist/runtime/utils/station-key.js +12 -0
- package/dist/runtime/utils/status.d.ts +23 -0
- package/dist/runtime/utils/status.js +46 -0
- package/dist/runtime/utils/time.d.ts +22 -0
- package/dist/runtime/utils/time.js +14 -0
- package/dist/types.d.mts +5 -0
- package/package.json +131 -3
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { shiftsApi } from "../../utils/api";
|
|
3
|
+
import { $fetch, computed, errorMessage, navigateTo, ref, useAuthPages, useHead, useModuleT, useRoute, useShiftsFormat } from "#imports";
|
|
4
|
+
defineOptions({ name: "ShiftsCheckInPage" });
|
|
5
|
+
const t = useModuleT("shifts");
|
|
6
|
+
const format = useShiftsFormat();
|
|
7
|
+
const route = useRoute();
|
|
8
|
+
const teamId = computed(() => String(route.params.teamId ?? ""));
|
|
9
|
+
const result = ref(null);
|
|
10
|
+
const code = ref("");
|
|
11
|
+
const busy = ref(false);
|
|
12
|
+
const failureTitle = (status, errorCode) => {
|
|
13
|
+
if (status === 404) return t("scanner.unknown", "Unknown code for this team");
|
|
14
|
+
if (status === 403) return t("scanner.forbidden", "You do not lead this team");
|
|
15
|
+
if (errorCode === "outside_window") return t("scanner.outsideWindow", "Check-in for this shift is not open now");
|
|
16
|
+
if (errorCode === "assignment_cancelled") return t("scanner.cancelled", "This person was taken off the shift");
|
|
17
|
+
return t("scanner.failed", "Could not check in");
|
|
18
|
+
};
|
|
19
|
+
const REPEAT_MS = 3e3;
|
|
20
|
+
let last = null;
|
|
21
|
+
async function scan(value) {
|
|
22
|
+
const trimmed = value.trim();
|
|
23
|
+
if (!trimmed || busy.value) return;
|
|
24
|
+
if (last && last.code === trimmed && Date.now() - last.at < REPEAT_MS) return;
|
|
25
|
+
last = { code: trimmed, at: Date.now() };
|
|
26
|
+
busy.value = true;
|
|
27
|
+
try {
|
|
28
|
+
const answer = await $fetch(shiftsApi.teams.checkIn(teamId.value), { method: "POST", body: { code: trimmed } });
|
|
29
|
+
const name = answer.assignment.person.name ?? `#${answer.assignment.userId}`;
|
|
30
|
+
const when = `${format.time(answer.shift.startsAt)}\u2013${format.time(answer.shift.endsAt)}`;
|
|
31
|
+
result.value = answer.alreadyCheckedIn ? { tone: "warning", title: t("scanner.already", "{name} was checked in already", { name }), description: t("scanner.alreadyAt", "At {time}, shift {when}", { time: format.time(answer.checkedInAt), when }) } : {
|
|
32
|
+
tone: "success",
|
|
33
|
+
title: t("scanner.checkedIn", "Checked in {name}", { name }),
|
|
34
|
+
description: answer.alsoCheckedIn.length ? t("scanner.shiftAndDaily", "Shift {when}, and {count} more today", { when, count: answer.alsoCheckedIn.length }) : t("scanner.shift", "Shift {when}", { when })
|
|
35
|
+
};
|
|
36
|
+
code.value = "";
|
|
37
|
+
} catch (error) {
|
|
38
|
+
const status = error.statusCode;
|
|
39
|
+
if (status === 401) return navigateTo({ path: useAuthPages().login, query: { redirect: route.path } });
|
|
40
|
+
const errorCode = error.data?.data?.code;
|
|
41
|
+
result.value = {
|
|
42
|
+
tone: "error",
|
|
43
|
+
title: failureTitle(status, errorCode),
|
|
44
|
+
description: status === 404 || status === 403 ? void 0 : errorMessage(error, "")
|
|
45
|
+
};
|
|
46
|
+
} finally {
|
|
47
|
+
busy.value = false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
useHead({ title: () => t("scanner.title", "Check in") });
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<UContainer>
|
|
55
|
+
<UPage>
|
|
56
|
+
<UPageHeader
|
|
57
|
+
:title="t('scanner.title', 'Check in')"
|
|
58
|
+
:description="t('scanner.description', 'Scan the QR pass of a person on your team, or type the code under it.')"
|
|
59
|
+
/>
|
|
60
|
+
<UPageBody class="mx-auto flex w-full max-w-md flex-col gap-4">
|
|
61
|
+
<UAlert
|
|
62
|
+
v-if="result"
|
|
63
|
+
:color="result.tone"
|
|
64
|
+
variant="subtle"
|
|
65
|
+
:icon="result.tone === 'success' ? 'i-lucide-check-circle' : result.tone === 'warning' ? 'i-lucide-info' : 'i-lucide-circle-alert'"
|
|
66
|
+
:title="result.title"
|
|
67
|
+
:description="result.description"
|
|
68
|
+
/>
|
|
69
|
+
<ShiftQrScanner
|
|
70
|
+
:paused="busy"
|
|
71
|
+
@detect="scan"
|
|
72
|
+
/>
|
|
73
|
+
<form
|
|
74
|
+
class="flex gap-2"
|
|
75
|
+
@submit.prevent="scan(code)"
|
|
76
|
+
>
|
|
77
|
+
<UInput
|
|
78
|
+
v-model="code"
|
|
79
|
+
:placeholder="t('scanner.codePlaceholder', 'Code')"
|
|
80
|
+
:aria-label="t('scanner.code', 'Check-in code')"
|
|
81
|
+
autocomplete="off"
|
|
82
|
+
class="flex-1"
|
|
83
|
+
/>
|
|
84
|
+
<UButton
|
|
85
|
+
type="submit"
|
|
86
|
+
:loading="busy"
|
|
87
|
+
:label="t('scanner.checkInAction', 'Check in person')"
|
|
88
|
+
/>
|
|
89
|
+
</form>
|
|
90
|
+
</UPageBody>
|
|
91
|
+
</UPage>
|
|
92
|
+
</UContainer>
|
|
93
|
+
</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,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,300 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { shiftsApi } from "../../utils/api";
|
|
3
|
+
import { SHIFT_ASSIGNMENT_STATUS_LABELS } from "../../utils/status";
|
|
4
|
+
import { dayKey } from "@frigear-nu/module-kit/time";
|
|
5
|
+
import { $fetch, computed, errorMessage, navigateTo, ref, useAction, useAuthPages, useFetch, useHead, useModuleT, useRoute, useShiftsActions, useShiftsFormat, useShiftsLinks, useShiftsTranslate } from "#imports";
|
|
6
|
+
defineOptions({ name: "ShiftsLeadPage" });
|
|
7
|
+
const t = useModuleT("shifts");
|
|
8
|
+
const tr = useShiftsTranslate();
|
|
9
|
+
const format = useShiftsFormat();
|
|
10
|
+
const links = useShiftsLinks();
|
|
11
|
+
const actions = useShiftsActions();
|
|
12
|
+
const { run } = useAction();
|
|
13
|
+
const route = useRoute();
|
|
14
|
+
const teamId = computed(() => String(route.params.teamId ?? ""));
|
|
15
|
+
const from = `${dayKey(/* @__PURE__ */ new Date(), format.timeZone)}T00:00:00.000Z`;
|
|
16
|
+
const { data: shifts, error, refresh } = await useFetch(() => shiftsApi.teams.shifts(teamId.value), {
|
|
17
|
+
query: { from },
|
|
18
|
+
key: computed(() => `shifts:lead:${teamId.value}`),
|
|
19
|
+
default: () => []
|
|
20
|
+
});
|
|
21
|
+
if (error.value?.statusCode === 401) {
|
|
22
|
+
await navigateTo({ path: useAuthPages().login, query: { redirect: route.path } });
|
|
23
|
+
}
|
|
24
|
+
const { data: swaps, refresh: refreshSwaps } = await useFetch(() => shiftsApi.teams.swaps(teamId.value), {
|
|
25
|
+
query: { status: "pending_approval" },
|
|
26
|
+
key: computed(() => `shifts:lead-swaps:${teamId.value}`),
|
|
27
|
+
default: () => []
|
|
28
|
+
});
|
|
29
|
+
const { data: exceptions, refresh: refreshExceptions } = await useFetch(() => shiftsApi.teams.exceptions(teamId.value), {
|
|
30
|
+
key: computed(() => `shifts:lead-exceptions:${teamId.value}`),
|
|
31
|
+
default: () => []
|
|
32
|
+
});
|
|
33
|
+
const { data: stations } = await useFetch(() => shiftsApi.teams.stations(teamId.value), {
|
|
34
|
+
key: computed(() => `shifts:lead-stations:${teamId.value}`),
|
|
35
|
+
default: () => []
|
|
36
|
+
});
|
|
37
|
+
const view = ref("exceptions");
|
|
38
|
+
const viewItems = computed(() => [
|
|
39
|
+
{ label: t("lead.viewExceptions", "Exceptions ({count})", { count: exceptions.value.length }), value: "exceptions", icon: "i-lucide-triangle-alert" },
|
|
40
|
+
{ label: t("lead.viewShifts", "All shifts"), value: "shifts", icon: "i-lucide-list" }
|
|
41
|
+
]);
|
|
42
|
+
const exceptionLabel = (item) => ({
|
|
43
|
+
no_show: t("exceptions.no_show", "No-show"),
|
|
44
|
+
late: t("exceptions.late", "Late by {minutes} min", { minutes: item.lateMinutes ?? 0 }),
|
|
45
|
+
not_checked_in: t("exceptions.not_checked_in", "Not checked in"),
|
|
46
|
+
claimed_no_show: t("exceptions.claimed_no_show", "No-show, perk claimed")
|
|
47
|
+
})[item.kind];
|
|
48
|
+
const exceptionColor = (kind) => kind === "late" ? "warning" : kind === "not_checked_in" ? "info" : "error";
|
|
49
|
+
const { data: led } = await useFetch(shiftsApi.me.leads, { key: "shifts:leads", default: () => [] });
|
|
50
|
+
const team = computed(() => led.value.find((item) => item.teamId === teamId.value));
|
|
51
|
+
const days = computed(() => {
|
|
52
|
+
const byDay = /* @__PURE__ */ new Map();
|
|
53
|
+
for (const shift of shifts.value) {
|
|
54
|
+
const key = dayKey(shift.startsAt, format.timeZone);
|
|
55
|
+
byDay.set(key, [...byDay.get(key) ?? [], shift]);
|
|
56
|
+
}
|
|
57
|
+
return [...byDay.entries()].map(([day, items]) => ({ day, items }));
|
|
58
|
+
});
|
|
59
|
+
const nameOf = (person) => person.name ?? `#${person.userId}`;
|
|
60
|
+
const statusLabel = (status) => t(`statuses.${status}`, SHIFT_ASSIGNMENT_STATUS_LABELS[status]);
|
|
61
|
+
async function mark(assignee, to) {
|
|
62
|
+
const done = await run(
|
|
63
|
+
() => $fetch(to === "attended" ? shiftsApi.attended(assignee.id) : shiftsApi.noShow(assignee.id), { method: "POST" }).then(() => true),
|
|
64
|
+
{ success: t("admin.marked", "Marked {name} {status}", { name: nameOf(assignee.person), status: statusLabel(to).toLowerCase() }), error: t("lead.markFailed", "Could not mark attendance") }
|
|
65
|
+
);
|
|
66
|
+
if (done) await Promise.all([refresh(), refreshExceptions()]);
|
|
67
|
+
}
|
|
68
|
+
async function approve(swap) {
|
|
69
|
+
if (await actions.approveSwap(swap)) await Promise.all([refresh(), refreshSwaps()]);
|
|
70
|
+
}
|
|
71
|
+
async function reject(swap) {
|
|
72
|
+
if (await actions.rejectSwap(swap)) await Promise.all([refresh(), refreshSwaps()]);
|
|
73
|
+
}
|
|
74
|
+
useHead({ title: () => t("lead.title", "Lead {team}", { team: team.value ? tr(team.value.teamName) : "" }) });
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<template>
|
|
78
|
+
<UContainer>
|
|
79
|
+
<UPage>
|
|
80
|
+
<UPageHeader
|
|
81
|
+
:title="team ? tr(team.teamName) : t('lead.titleFallback', 'Your team')"
|
|
82
|
+
:description="team ? tr(team.operationName) : t('lead.description', 'Your team\'s shifts, attendance and swaps.')"
|
|
83
|
+
>
|
|
84
|
+
<template #links>
|
|
85
|
+
<UButton
|
|
86
|
+
icon="i-lucide-megaphone"
|
|
87
|
+
color="neutral"
|
|
88
|
+
variant="outline"
|
|
89
|
+
:label="t('broadcast.leadAction', 'Message team')"
|
|
90
|
+
@click="actions.broadcastToTeam(teamId, team ? tr(team.teamName) : '')"
|
|
91
|
+
/>
|
|
92
|
+
<UButton
|
|
93
|
+
:to="links.checkIn(teamId)"
|
|
94
|
+
icon="i-lucide-scan-line"
|
|
95
|
+
:label="t('lead.scanner', 'Open the check-in scanner')"
|
|
96
|
+
/>
|
|
97
|
+
</template>
|
|
98
|
+
</UPageHeader>
|
|
99
|
+
<UPageBody class="max-w-3xl">
|
|
100
|
+
<UEmpty
|
|
101
|
+
v-if="error && error.statusCode !== 401"
|
|
102
|
+
icon="i-lucide-circle-alert"
|
|
103
|
+
:title="error.statusCode === 403 ? t('lead.forbidden', 'You do not lead this team') : t('lead.loadFailed', 'The team could not be loaded')"
|
|
104
|
+
:description="error.statusCode === 403 ? void 0 : errorMessage(error, '')"
|
|
105
|
+
:actions="[{ label: t('shift.back', 'My shifts'), to: links.shifts(), color: 'neutral', variant: 'outline' }]"
|
|
106
|
+
/>
|
|
107
|
+
<div
|
|
108
|
+
v-else
|
|
109
|
+
class="flex flex-col gap-4"
|
|
110
|
+
>
|
|
111
|
+
<SectionCard
|
|
112
|
+
v-if="swaps.length"
|
|
113
|
+
:title="t('admin.viewSwapsTitle', 'Swaps to approve')"
|
|
114
|
+
icon="i-lucide-arrow-left-right"
|
|
115
|
+
>
|
|
116
|
+
<ul class="divide-default divide-y">
|
|
117
|
+
<li
|
|
118
|
+
v-for="swap in swaps"
|
|
119
|
+
:key="swap.id"
|
|
120
|
+
class="flex flex-wrap items-center justify-between gap-2 py-2"
|
|
121
|
+
>
|
|
122
|
+
<div class="flex flex-col text-sm">
|
|
123
|
+
<span class="text-highlighted font-medium">{{ tr(swap.shift.teamName) }} · {{ format.range(swap.shift.startsAt, swap.shift.endsAt) }}</span>
|
|
124
|
+
<span class="text-muted">
|
|
125
|
+
{{ actions.swapSummary(swap) }}
|
|
126
|
+
</span>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="flex items-center gap-2">
|
|
129
|
+
<span
|
|
130
|
+
v-if="!actions.swapAllowed(swap)"
|
|
131
|
+
class="text-muted text-sm"
|
|
132
|
+
>
|
|
133
|
+
{{ t("swaps.noLongerAllowed", "No longer allowed by the schedule's settings: reject it.") }}
|
|
134
|
+
</span>
|
|
135
|
+
<UButton
|
|
136
|
+
color="neutral"
|
|
137
|
+
variant="outline"
|
|
138
|
+
:label="t('swaps.rejectAction', 'Reject swap')"
|
|
139
|
+
@click="reject(swap)"
|
|
140
|
+
/>
|
|
141
|
+
<UButton
|
|
142
|
+
v-if="actions.swapAllowed(swap)"
|
|
143
|
+
:label="t('swaps.approveAction', 'Approve swap')"
|
|
144
|
+
@click="approve(swap)"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
</li>
|
|
148
|
+
</ul>
|
|
149
|
+
</SectionCard>
|
|
150
|
+
|
|
151
|
+
<SectionCard
|
|
152
|
+
v-if="stations.length"
|
|
153
|
+
:title="t('lead.stations', 'Check-in stations')"
|
|
154
|
+
icon="i-lucide-qr-code"
|
|
155
|
+
>
|
|
156
|
+
<div class="flex flex-wrap gap-2">
|
|
157
|
+
<UButton
|
|
158
|
+
v-for="station in stations"
|
|
159
|
+
:key="station.id"
|
|
160
|
+
:to="links.station(station.id)"
|
|
161
|
+
icon="i-lucide-monitor"
|
|
162
|
+
color="neutral"
|
|
163
|
+
variant="outline"
|
|
164
|
+
:label="t('lead.openStation', 'Open {name}', { name: tr(station.name) })"
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
</SectionCard>
|
|
168
|
+
|
|
169
|
+
<UTabs
|
|
170
|
+
v-model="view"
|
|
171
|
+
:items="viewItems"
|
|
172
|
+
:content="false"
|
|
173
|
+
variant="link"
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
<template v-if="view === 'exceptions'">
|
|
177
|
+
<UEmpty
|
|
178
|
+
v-if="!exceptions.length"
|
|
179
|
+
icon="i-lucide-check-circle"
|
|
180
|
+
:title="t('lead.noExceptions', 'Nothing to look at')"
|
|
181
|
+
:description="t('lead.noExceptionsDescription', 'Everybody on the team\'s shifts of the last day checked in on time.')"
|
|
182
|
+
/>
|
|
183
|
+
<SectionCard
|
|
184
|
+
v-else
|
|
185
|
+
:title="t('lead.exceptionsTitle', 'Exceptions')"
|
|
186
|
+
:description="t('lead.exceptionsDescription', 'No-shows, late check-ins and people not checked in on the shifts of the last day.')"
|
|
187
|
+
>
|
|
188
|
+
<ul class="divide-default divide-y">
|
|
189
|
+
<li
|
|
190
|
+
v-for="item in exceptions"
|
|
191
|
+
:key="`${item.kind}:${item.assignment.id}`"
|
|
192
|
+
class="flex flex-wrap items-center justify-between gap-2 py-1.5"
|
|
193
|
+
>
|
|
194
|
+
<div class="flex flex-col gap-0.5">
|
|
195
|
+
<TableIdentity
|
|
196
|
+
:title="nameOf(item.assignment.person)"
|
|
197
|
+
:description="`${format.day(dayKey(item.shift.startsAt, format.timeZone))} \xB7 ${format.time(item.shift.startsAt)}\u2013${format.time(item.shift.endsAt)}`"
|
|
198
|
+
:avatar="{ src: item.assignment.person.avatar ?? void 0, alt: nameOf(item.assignment.person) }"
|
|
199
|
+
/>
|
|
200
|
+
</div>
|
|
201
|
+
<div class="flex items-center gap-2">
|
|
202
|
+
<UBadge
|
|
203
|
+
:color="exceptionColor(item.kind)"
|
|
204
|
+
variant="subtle"
|
|
205
|
+
:label="exceptionLabel(item)"
|
|
206
|
+
/>
|
|
207
|
+
<UButton
|
|
208
|
+
v-if="item.assignment.status !== 'attended'"
|
|
209
|
+
size="xs"
|
|
210
|
+
color="neutral"
|
|
211
|
+
variant="outline"
|
|
212
|
+
:label="t('admin.markAttended', 'Mark attended')"
|
|
213
|
+
@click="mark(item.assignment, 'attended')"
|
|
214
|
+
/>
|
|
215
|
+
<UButton
|
|
216
|
+
v-if="item.assignment.status === 'assigned'"
|
|
217
|
+
size="xs"
|
|
218
|
+
color="neutral"
|
|
219
|
+
variant="ghost"
|
|
220
|
+
:label="t('admin.markNoShow', 'Mark no-show')"
|
|
221
|
+
@click="mark(item.assignment, 'no_show')"
|
|
222
|
+
/>
|
|
223
|
+
</div>
|
|
224
|
+
</li>
|
|
225
|
+
</ul>
|
|
226
|
+
</SectionCard>
|
|
227
|
+
</template>
|
|
228
|
+
|
|
229
|
+
<UEmpty
|
|
230
|
+
v-if="view === 'shifts' && !days.length"
|
|
231
|
+
icon="i-lucide-calendar-clock"
|
|
232
|
+
:title="t('lead.empty', 'No upcoming shifts for the team')"
|
|
233
|
+
/>
|
|
234
|
+
<SectionCard
|
|
235
|
+
v-for="group in view === 'shifts' ? days : []"
|
|
236
|
+
:key="group.day"
|
|
237
|
+
:title="format.day(group.day)"
|
|
238
|
+
>
|
|
239
|
+
<div class="flex flex-col gap-4">
|
|
240
|
+
<div
|
|
241
|
+
v-for="shift in group.items"
|
|
242
|
+
:key="shift.id"
|
|
243
|
+
class="flex flex-col gap-1"
|
|
244
|
+
>
|
|
245
|
+
<span class="text-highlighted text-sm font-semibold tabular-nums">
|
|
246
|
+
{{ format.time(shift.startsAt) }}–{{ format.time(shift.endsAt) }}
|
|
247
|
+
<span class="text-muted font-normal">· {{ shift.effectiveCapacity === null ? shift.filled : `${shift.filled}/${shift.effectiveCapacity}` }}</span>
|
|
248
|
+
</span>
|
|
249
|
+
<p
|
|
250
|
+
v-if="!shift.assignees.length"
|
|
251
|
+
class="text-muted text-sm"
|
|
252
|
+
>
|
|
253
|
+
{{ t("admin.nobodyYet", "Nobody yet.") }}
|
|
254
|
+
</p>
|
|
255
|
+
<ul
|
|
256
|
+
v-else
|
|
257
|
+
class="divide-default divide-y"
|
|
258
|
+
>
|
|
259
|
+
<li
|
|
260
|
+
v-for="assignee in shift.assignees"
|
|
261
|
+
:key="assignee.id"
|
|
262
|
+
class="flex flex-wrap items-center justify-between gap-2 py-1.5"
|
|
263
|
+
>
|
|
264
|
+
<TableIdentity
|
|
265
|
+
:title="nameOf(assignee.person)"
|
|
266
|
+
:avatar="{ src: assignee.person.avatar ?? void 0, alt: nameOf(assignee.person) }"
|
|
267
|
+
/>
|
|
268
|
+
<div class="flex items-center gap-2">
|
|
269
|
+
<StatusBadge
|
|
270
|
+
:status="assignee.status"
|
|
271
|
+
:label="statusLabel(assignee.status)"
|
|
272
|
+
:colors="{ assigned: 'info', attended: 'success', no_show: 'error' }"
|
|
273
|
+
/>
|
|
274
|
+
<UButton
|
|
275
|
+
v-if="assignee.status !== 'attended'"
|
|
276
|
+
size="xs"
|
|
277
|
+
color="neutral"
|
|
278
|
+
variant="outline"
|
|
279
|
+
:label="t('admin.markAttended', 'Mark attended')"
|
|
280
|
+
@click="mark(assignee, 'attended')"
|
|
281
|
+
/>
|
|
282
|
+
<UButton
|
|
283
|
+
v-if="assignee.status !== 'no_show'"
|
|
284
|
+
size="xs"
|
|
285
|
+
color="neutral"
|
|
286
|
+
variant="ghost"
|
|
287
|
+
:label="t('admin.markNoShow', 'Mark no-show')"
|
|
288
|
+
@click="mark(assignee, 'no_show')"
|
|
289
|
+
/>
|
|
290
|
+
</div>
|
|
291
|
+
</li>
|
|
292
|
+
</ul>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</SectionCard>
|
|
296
|
+
</div>
|
|
297
|
+
</UPageBody>
|
|
298
|
+
</UPage>
|
|
299
|
+
</UContainer>
|
|
300
|
+
</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,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;
|