@frigear-nu/shifts 0.1.2 → 0.1.4
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 +2 -2
- package/dist/module.d.mts +5 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +65 -49
- package/dist/runtime/access.d.ts +1 -1
- package/dist/runtime/access.js +7 -0
- package/dist/runtime/app/components/ShiftBulkSlideover.vue +4 -2
- package/dist/runtime/app/components/ShiftCheckInCard.vue +6 -3
- package/dist/runtime/app/components/ShiftFeedSlideover.vue +8 -6
- package/dist/runtime/app/components/ShiftNowCard.vue +2 -2
- package/dist/runtime/app/components/ShiftPerksCard.vue +2 -1
- package/dist/runtime/app/components/ShiftSlideover.vue +2 -1
- package/dist/runtime/app/dashboard/NextShift.d.vue.ts +4 -1
- package/dist/runtime/app/dashboard/NextShift.vue +14 -5
- package/dist/runtime/app/dashboard/NextShift.vue.d.ts +4 -1
- package/dist/runtime/app/dashboard/OpenSwaps.vue +11 -5
- package/dist/runtime/app/dashboard/TeamOnNow.vue +12 -4
- package/dist/runtime/app/pages/lead.vue +17 -10
- package/dist/runtime/app/pages/shift-redirect.d.vue.ts +3 -0
- package/dist/runtime/app/pages/shift-redirect.vue +10 -0
- package/dist/runtime/app/pages/shift-redirect.vue.d.ts +3 -0
- package/dist/runtime/app/pages/shift.vue +292 -286
- package/dist/runtime/app/tabs/HomeShifts.vue +101 -94
- package/dist/runtime/app/tabs/HomeSwaps.vue +17 -8
- package/dist/runtime/app/tabs/Shifts.vue +16 -8
- package/dist/runtime/dashboard.d.ts +2 -2
- package/dist/runtime/dashboard.js +5 -0
- package/dist/runtime/i18n/lang/da.json +33 -2
- package/dist/runtime/i18n/lang/en.json +33 -2
- package/dist/runtime/server/routes/lead/check-in-any.post.d.ts +2 -0
- package/dist/runtime/server/routes/lead/check-in-any.post.js +12 -0
- package/dist/runtime/server/routes/lead/check-in.post.js +1 -1
- package/dist/runtime/server/utils/shifts-assign.d.ts +10 -5
- package/dist/runtime/server/utils/shifts-assign.js +3 -3
- package/dist/runtime/utils/api.d.ts +2 -0
- package/dist/runtime/utils/api.js +2 -0
- package/dist/runtime/utils/links.d.ts +2 -0
- package/dist/runtime/utils/links.js +1 -0
- package/package.json +29 -25
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"shifts": {
|
|
15
15
|
"admin": {
|
|
16
16
|
"addSlot": "Add time slot",
|
|
17
|
+
"addSlotHint": "Make shifts at another time of day too",
|
|
17
18
|
"allTeams": "All teams",
|
|
18
19
|
"alreadyOn": "On the shift",
|
|
19
20
|
"anyRole": "Anybody on the team",
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
"peerHelp": "A swap is done as soon as the owner accepts an offer."
|
|
27
28
|
},
|
|
28
29
|
"assignAction": "Assign {name}",
|
|
30
|
+
"assignActionHint": "Puts them on this shift at once",
|
|
29
31
|
"assignAnyway": "Assign anyway",
|
|
30
32
|
"assignFailed": "Could not assign {name}",
|
|
31
33
|
"assignPerson": "Assign a person",
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
"bulkDescription": "Every time slot on every day, for one team. Times are local times in {zone}; a slot that ends before it starts ends the next day.",
|
|
38
40
|
"bulkSubmit": "Create {count} shifts",
|
|
39
41
|
"bulkTitle": "Create shifts",
|
|
42
|
+
"bulkTitleHint": "Make shifts for one team over a range of days",
|
|
40
43
|
"cancelAssignment": "Remove from shift",
|
|
41
44
|
"cancelAssignmentDescription": "Their place is freed and an open swap of it is cancelled.",
|
|
42
45
|
"cancelAssignmentTitle": "Take {name} off this shift?",
|
|
@@ -46,6 +49,7 @@
|
|
|
46
49
|
"copied": "Copied the shifts into {name}",
|
|
47
50
|
"copyDescription": "Copies the shift roles and shifts, not who works them, and the coverage, handover and approval, which replace this schedule's. Teams of another operation are matched by name.",
|
|
48
51
|
"copyShort": "Copy shifts",
|
|
52
|
+
"copyShortHint": "Copy the roles and shifts of another schedule into this one",
|
|
49
53
|
"copySubmit": "Copy shifts",
|
|
50
54
|
"copyTitle": "Copy from another schedule",
|
|
51
55
|
"coverage": "Coverage",
|
|
@@ -57,6 +61,7 @@
|
|
|
57
61
|
"flexibleHelp": "Volunteers may give shifts away and take others over."
|
|
58
62
|
},
|
|
59
63
|
"createRole": "Add shift role",
|
|
64
|
+
"createRoleHint": "Add a role such as team lead that people hold on a shift",
|
|
60
65
|
"createSchedule": "Create schedule",
|
|
61
66
|
"deleteRole": "Delete shift role",
|
|
62
67
|
"deleteRoleDescription": "A role that shifts or assignments use cannot be deleted.",
|
|
@@ -73,6 +78,7 @@
|
|
|
73
78
|
"draftNote": "Draft: volunteers do not see this schedule until you publish it.",
|
|
74
79
|
"editRole": "Edit shift role",
|
|
75
80
|
"editSchedule": "Edit schedule",
|
|
81
|
+
"editScheduleHint": "Change the name and the limits per shift and day",
|
|
76
82
|
"endsAfterStart": "A shift must end after it starts.",
|
|
77
83
|
"endsAt": "Ends",
|
|
78
84
|
"filledOf": "{filled} of {capacity}",
|
|
@@ -94,7 +100,9 @@
|
|
|
94
100
|
},
|
|
95
101
|
"lastDay": "Last day",
|
|
96
102
|
"markAttended": "Mark attended",
|
|
103
|
+
"markAttendedHint": "Record that they worked this shift",
|
|
97
104
|
"markNoShow": "Mark no-show",
|
|
105
|
+
"markNoShowHint": "Record that they did not turn up for this shift",
|
|
98
106
|
"marked": "Marked {name} {status}",
|
|
99
107
|
"maxPerShift": "Maximum per shift",
|
|
100
108
|
"maxPerShiftHelp": "Used when a shift sets no capacity. Empty is no limit.",
|
|
@@ -108,6 +116,7 @@
|
|
|
108
116
|
"nameRequired": "Give the schedule a name.",
|
|
109
117
|
"newRole": "New shift role",
|
|
110
118
|
"newSchedule": "New schedule",
|
|
119
|
+
"newScheduleHint": "Start a draft schedule; volunteers see it once published",
|
|
111
120
|
"noCandidates": "Nobody on the team matches. People need an approved place or a role added in Teams.",
|
|
112
121
|
"noFeature": "No place on the venue layout",
|
|
113
122
|
"noPendingSwaps": "No swaps wait for approval.",
|
|
@@ -127,12 +136,14 @@
|
|
|
127
136
|
"openShift": "Open shift",
|
|
128
137
|
"people": "People",
|
|
129
138
|
"publishAction": "Publish schedule",
|
|
139
|
+
"publishActionHint": "Volunteers see their shifts; it cannot go back to draft",
|
|
130
140
|
"publishDescription": "Volunteers see their shifts in it and can swap them. A published schedule cannot go back to draft.",
|
|
131
141
|
"publishFailed": "Could not publish the schedule",
|
|
132
142
|
"publishTitle": "Publish {name}?",
|
|
133
143
|
"published": "Published {name}",
|
|
134
144
|
"rangeInvalid": "The last day must be on or after the first.",
|
|
135
145
|
"removeSlot": "Remove time slot",
|
|
146
|
+
"removeSlotHint": "No shifts are made for this time slot",
|
|
136
147
|
"roleDeleted": "Deleted {name}",
|
|
137
148
|
"roleDescription": "A role people hold on a shift, such as team lead or bartender, with the lowest team role that may hold it.",
|
|
138
149
|
"roleNameRequired": "Give the role a name.",
|
|
@@ -210,6 +221,7 @@
|
|
|
210
221
|
"emptyDescription": "Message a team, or the people with a role and up on it.",
|
|
211
222
|
"failed": "Could not send the message",
|
|
212
223
|
"leadAction": "Message team",
|
|
224
|
+
"leadActionHint": "Send a message to everyone on this team",
|
|
213
225
|
"leadAudience": "Everyone on {team}.",
|
|
214
226
|
"leadTitle": "Message {team}",
|
|
215
227
|
"message": "Message",
|
|
@@ -273,7 +285,9 @@
|
|
|
273
285
|
"overrides": "Per team",
|
|
274
286
|
"overridesHint": "A team can check in differently, e.g. at its own bar.",
|
|
275
287
|
"removeOverride": "Remove the override of {team}",
|
|
288
|
+
"removeOverrideHint": "Once saved, the team checks in like everyone else",
|
|
276
289
|
"reset": "Discard changes",
|
|
290
|
+
"resetHint": "Throw away your unsaved changes",
|
|
277
291
|
"save": "Save check-in settings",
|
|
278
292
|
"saveFailed": "Could not save the check-in settings",
|
|
279
293
|
"saved": "Saved the check-in of {name}",
|
|
@@ -318,9 +332,10 @@
|
|
|
318
332
|
"activeUnused": "Made {made}, not read yet. It is not shown again: replace it to get a new one.",
|
|
319
333
|
"close": "Close",
|
|
320
334
|
"copied": "Copied the link",
|
|
321
|
-
"
|
|
335
|
+
"copyHint": "Copy the link to the clipboard",
|
|
322
336
|
"copyFailed": "Could not copy: select the link and copy it by hand",
|
|
323
337
|
"create": "Create calendar link",
|
|
338
|
+
"createHint": "Get a private link your calendar app can subscribe to",
|
|
324
339
|
"description": "Your shifts as a calendar feed for Apple Calendar, Google Calendar or Outlook. The link is secret: anyone who has it can see your shifts.",
|
|
325
340
|
"https": "Web address",
|
|
326
341
|
"httpsHelp": "For calendars that ask for a URL.",
|
|
@@ -330,9 +345,11 @@
|
|
|
330
345
|
"onceTitle": "Copy the link now",
|
|
331
346
|
"open": "Open in my calendar app",
|
|
332
347
|
"replace": "Replace link",
|
|
348
|
+
"replaceHint": "The old link stops working; calendars must subscribe again",
|
|
333
349
|
"replaceDescription": "The old link stops working: calendars subscribed to it stop updating until you subscribe with the new one.",
|
|
334
350
|
"replaceTitle": "Replace the calendar link?",
|
|
335
351
|
"revoke": "Revoke link",
|
|
352
|
+
"revokeHint": "The link stops working at once and calendars stop updating",
|
|
336
353
|
"revokeDescription": "Calendars subscribed to it stop updating. You can create a new link at any time.",
|
|
337
354
|
"revokeFailed": "Could not revoke the calendar link",
|
|
338
355
|
"revokeTitle": "Revoke the calendar link?",
|
|
@@ -384,7 +401,7 @@
|
|
|
384
401
|
"loadFailed": "Could not load who is working.",
|
|
385
402
|
"noLead": "No lead on duty",
|
|
386
403
|
"nobody": "nobody",
|
|
387
|
-
"
|
|
404
|
+
"refreshHint": "Reload who is working right now",
|
|
388
405
|
"title": "Working now"
|
|
389
406
|
},
|
|
390
407
|
"offerStatuses": {
|
|
@@ -398,6 +415,7 @@
|
|
|
398
415
|
"amountMin": "At least 1.",
|
|
399
416
|
"cardDescription": "What volunteers earn for every shift they attend, given at the end of the shift. The vouchers app hands it out.",
|
|
400
417
|
"create": "Add perk",
|
|
418
|
+
"createHint": "Volunteers earn it for every shift they attend",
|
|
401
419
|
"delete": "Delete perk",
|
|
402
420
|
"deleteDescription": "Shifts no longer earn it. A perk somebody earned already cannot be deleted: change it instead.",
|
|
403
421
|
"deleteFailed": "Could not delete the perk",
|
|
@@ -425,6 +443,8 @@
|
|
|
425
443
|
"attendDescription": "Check in on your own shifts by scanning a station's code or by your location.",
|
|
426
444
|
"broadcast": "Message shift teams",
|
|
427
445
|
"broadcastDescription": "Send an email (and an SMS, on purpose) to the members of an operation's teams or the people on a shift.",
|
|
446
|
+
"checkin": "Check people in on any shift",
|
|
447
|
+
"checkinDescription": "Check anyone in on any shift by scanning their QR pass, on every team and operation, without leading the team.",
|
|
428
448
|
"feed": "Subscribe to your shifts in a calendar",
|
|
429
449
|
"feedDescription": "Create and revoke the secret calendar feed (iCal) of your own shifts.",
|
|
430
450
|
"lead": "Lead shifts",
|
|
@@ -463,6 +483,7 @@
|
|
|
463
483
|
},
|
|
464
484
|
"shift": {
|
|
465
485
|
"acceptOffer": "Accept offer",
|
|
486
|
+
"acceptOfferHint": "The shift goes to them, after a lead approves if needed",
|
|
466
487
|
"back": "My shifts",
|
|
467
488
|
"cannotSwap": "This shift cannot be swapped now.",
|
|
468
489
|
"details": "Shift",
|
|
@@ -481,7 +502,9 @@
|
|
|
481
502
|
"offerRejected": "Turned down the offer of {name}",
|
|
482
503
|
"offerTake": "Takes your shift over",
|
|
483
504
|
"openRelease": "Give shift away",
|
|
505
|
+
"openReleaseHint": "Others on your team can offer to take it over",
|
|
484
506
|
"openTrade": "Offer shift for a trade",
|
|
507
|
+
"openTradeHint": "Others on your team can offer one of their shifts for it",
|
|
485
508
|
"operation": "Operation",
|
|
486
509
|
"pass": "Check-in pass",
|
|
487
510
|
"passAlt": "QR code to check in",
|
|
@@ -499,6 +522,7 @@
|
|
|
499
522
|
"perkUpcoming": "You will earn this",
|
|
500
523
|
"perks": "What this shift earns",
|
|
501
524
|
"rejectOffer": "Turn down offer",
|
|
525
|
+
"rejectOfferHint": "You keep the shift; other offers stay open",
|
|
502
526
|
"role": "Role",
|
|
503
527
|
"status": "Status",
|
|
504
528
|
"swap": "Swap",
|
|
@@ -519,6 +543,7 @@
|
|
|
519
543
|
"when": "When",
|
|
520
544
|
"where": "Where",
|
|
521
545
|
"withdrawSwap": "Withdraw swap",
|
|
546
|
+
"withdrawSwapHint": "You keep the shift and the offers you got are turned down",
|
|
522
547
|
"withdrawSwapDescription": "You keep the shift. The offers you got are turned down.",
|
|
523
548
|
"withdrawSwapTitle": "Withdraw the swap?"
|
|
524
549
|
},
|
|
@@ -535,6 +560,7 @@
|
|
|
535
560
|
"stations": {
|
|
536
561
|
"cardDescription": "Screens with a QR code that changes every 30 seconds. Open one on a tablet at the bar; leads of the team can open it too.",
|
|
537
562
|
"create": "Add station",
|
|
563
|
+
"createHint": "Set up a QR screen where a team checks in",
|
|
538
564
|
"delete": "Delete station",
|
|
539
565
|
"deleteDescription": "Its screen stops working at once. Volunteers check in at another station, by location or with a lead.",
|
|
540
566
|
"deleteFailed": "Could not delete the station",
|
|
@@ -576,6 +602,7 @@
|
|
|
576
602
|
},
|
|
577
603
|
"swaps": {
|
|
578
604
|
"approveAction": "Approve swap",
|
|
605
|
+
"approveActionHint": "The shifts change hands as the two agreed",
|
|
579
606
|
"approveFailed": "Could not approve the swap",
|
|
580
607
|
"approved": "Approved the swap of {name}",
|
|
581
608
|
"description": "Shifts others want to trade or give away that you can take. A trade asks for one of your own shifts in return.",
|
|
@@ -589,12 +616,14 @@
|
|
|
589
616
|
"noLongerAllowed": "No longer allowed by the schedule's settings: reject it.",
|
|
590
617
|
"nothingToTrade": "You have no upcoming shift to trade.",
|
|
591
618
|
"offerAction": "Take the shift over",
|
|
619
|
+
"offerActionHint": "The owner decides whether to give you the shift",
|
|
592
620
|
"offerFailed": "Could not make the offer",
|
|
593
621
|
"offerWithdrawFailed": "Could not withdraw the offer",
|
|
594
622
|
"offerWithdrawn": "Withdrew your offer",
|
|
595
623
|
"offered": "Offered to take the shift of {name}",
|
|
596
624
|
"pickShift": "Choose one of your shifts",
|
|
597
625
|
"rejectAction": "Reject swap",
|
|
626
|
+
"rejectActionHint": "Both keep their shifts; the shift is open for offers again",
|
|
598
627
|
"rejectDescription": "Both people keep their shifts, and the shift is open for other offers again.",
|
|
599
628
|
"rejectFailed": "Could not reject the swap",
|
|
600
629
|
"rejectTitle": "Reject this swap?",
|
|
@@ -602,10 +631,12 @@
|
|
|
602
631
|
"seeOffers": "See offers",
|
|
603
632
|
"title": "Open swaps",
|
|
604
633
|
"tradeAction": "Offer a trade",
|
|
634
|
+
"tradeActionHint": "The owner decides whether to take your shift for theirs",
|
|
605
635
|
"tradeOffered": "Offered {name} a trade",
|
|
606
636
|
"tradesWith": "{from} trades it with {to} for {team}, {when}",
|
|
607
637
|
"wants": "Wants your shift on {team}, {when}",
|
|
608
638
|
"withdrawOffer": "Withdraw offer",
|
|
639
|
+
"withdrawOfferHint": "Your offer is taken back and you keep your own shifts",
|
|
609
640
|
"youGive": "You give {team}, {when}",
|
|
610
641
|
"youTake": "You take the shift over"
|
|
611
642
|
},
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { notFound } from "@frigear-nu/module-kit/server";
|
|
2
|
+
import { shiftsAccess } from "../../../access.js";
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
const principal = await requireAuth(event);
|
|
5
|
+
const anyShift = await allows(event, shiftsAccess.permissions.checkin);
|
|
6
|
+
if (!anyShift) await authorize(event, shiftsAccess.permissions.lead);
|
|
7
|
+
const { code } = await readValidatedBody(event, shiftsCheckInInput.parse);
|
|
8
|
+
const entry = await shiftsAssignmentByCode(code);
|
|
9
|
+
if (!entry) throw notFound("Unknown check-in code.");
|
|
10
|
+
if (!anyShift && !await allows(event, shiftsAccess.permissions.lead, { teamId: entry.shift.teamId })) throw notFound("Unknown check-in code.");
|
|
11
|
+
return shiftsCheckIn(event, code, Number(principal.user.id), await allows(event, shiftsAccess.permissions.pii), { entry });
|
|
12
|
+
});
|
|
@@ -5,5 +5,5 @@ export default defineEventHandler(async (event) => {
|
|
|
5
5
|
const { teamId } = await getValidatedRouterParams(event, idParams("teamId").parse);
|
|
6
6
|
const { code } = await readValidatedBody(event, shiftsCheckInInput.parse);
|
|
7
7
|
await authorize(event, shiftsAccess.permissions.lead, { teamId });
|
|
8
|
-
return shiftsCheckIn(event,
|
|
8
|
+
return shiftsCheckIn(event, code, Number(principal.user.id), await allows(event, shiftsAccess.permissions.pii), { teamId });
|
|
9
9
|
});
|
|
@@ -61,12 +61,17 @@ export declare function shiftsDailyCascade(event: H3Event | undefined, first: Sh
|
|
|
61
61
|
/** The assignment (with its shift and schedule) a QR pass code belongs to, if any. */
|
|
62
62
|
export declare function shiftsAssignmentByCode(code: string): Promise<ShiftAssignmentEntry | undefined>;
|
|
63
63
|
/**
|
|
64
|
-
* Checks a person in with the code of their QR pass
|
|
65
|
-
* another team's shift
|
|
66
|
-
*
|
|
67
|
-
*
|
|
64
|
+
* Checks a person in with the code of their QR pass. With `teamId` (a team's scanner: a lead of it, or staff), a code of
|
|
65
|
+
* another team's shift is a 404 like an unknown one (a lead learns nothing about other teams); without it the caller has
|
|
66
|
+
* decided access already (`POST /api/shifts/check-in`). `entry` is the code's assignment when the caller resolved it
|
|
67
|
+
* already. A cancelled assignment is a 409 `assignment_cancelled`; outside the check-in window a 409 `outside_window`.
|
|
68
|
+
* Scanning twice is fine: the second scan reports `alreadyCheckedIn` with the first scan's time. Fires
|
|
69
|
+
* `shifts:attendance:marked` once.
|
|
68
70
|
*/
|
|
69
|
-
export declare function shiftsCheckIn(event: H3Event,
|
|
71
|
+
export declare function shiftsCheckIn(event: H3Event, code: string, by: number, pii: boolean, options?: {
|
|
72
|
+
teamId?: string;
|
|
73
|
+
entry?: ShiftAssignmentEntry;
|
|
74
|
+
}): Promise<ShiftCheckInDto>;
|
|
70
75
|
/**
|
|
71
76
|
* A volunteer checks in on one of their own shifts (`POST /api/shifts/me/:assignmentId/check-in`), by a mode the
|
|
72
77
|
* team's rule has on (409 `mode_disabled` otherwise):
|
|
@@ -175,9 +175,9 @@ export async function shiftsAssignmentByCode(code) {
|
|
|
175
175
|
const [found] = await db.select({ id: schema.shiftAssignments.id }).from(schema.shiftAssignments).where(eq(schema.shiftAssignments.checkInCode, code)).limit(1);
|
|
176
176
|
return found ? findShiftAssignmentEntry(found.id) : void 0;
|
|
177
177
|
}
|
|
178
|
-
export async function shiftsCheckIn(event,
|
|
179
|
-
const entry = await shiftsAssignmentByCode(code);
|
|
180
|
-
if (!entry || entry.shift.teamId !== teamId) throw notFound("Unknown check-in code.");
|
|
178
|
+
export async function shiftsCheckIn(event, code, by, pii, options = {}) {
|
|
179
|
+
const entry = options.entry ?? await shiftsAssignmentByCode(code);
|
|
180
|
+
if (!entry || options.teamId !== void 0 && entry.shift.teamId !== options.teamId) throw notFound("Unknown check-in code.");
|
|
181
181
|
const { assignment, shift, schedule } = entry;
|
|
182
182
|
if (assignment.status === "cancelled") throw apiError(409, "assignment_cancelled", "This assignment was cancelled.");
|
|
183
183
|
if (!await shiftsStillEligible(event, assignment, shift.teamId)) {
|
|
@@ -39,6 +39,8 @@ export declare const shiftsApi: {
|
|
|
39
39
|
readonly approveSwap: (swapId: string) => string;
|
|
40
40
|
/** `POST` (a lead of the team, or staff) to reject a swap waiting for approval: it is open again. */
|
|
41
41
|
readonly rejectSwap: (swapId: string) => string;
|
|
42
|
+
/** `POST` `{ code }` to check a person in with their QR pass on any shift (`shifts:checkin`, or a lead of the code's team). */
|
|
43
|
+
readonly checkIn: "/api/shifts/check-in";
|
|
42
44
|
readonly teams: {
|
|
43
45
|
/** `POST` `{ code }` to check a person in with their QR pass (a lead of the team, or staff). */
|
|
44
46
|
readonly checkIn: (teamId: string) => string;
|
|
@@ -42,6 +42,8 @@ export const shiftsApi = {
|
|
|
42
42
|
approveSwap: (swapId) => `${BASE}/swaps/${enc(swapId)}/approve`,
|
|
43
43
|
/** `POST` (a lead of the team, or staff) to reject a swap waiting for approval: it is open again. */
|
|
44
44
|
rejectSwap: (swapId) => `${BASE}/swaps/${enc(swapId)}/reject`,
|
|
45
|
+
/** `POST` `{ code }` to check a person in with their QR pass on any shift (`shifts:checkin`, or a lead of the code's team). */
|
|
46
|
+
checkIn: `${BASE}/check-in`,
|
|
45
47
|
teams: {
|
|
46
48
|
/** `POST` `{ code }` to check a person in with their QR pass (a lead of the team, or staff). */
|
|
47
49
|
checkIn: (teamId) => `${BASE}/teams/${enc(teamId)}/check-in`,
|
|
@@ -29,6 +29,8 @@ export declare const SHIFTS_DEFAULT_PAGES: {
|
|
|
29
29
|
readonly lead: "/shifts/lead/:teamId";
|
|
30
30
|
readonly station: "/shifts/station/:stationId";
|
|
31
31
|
};
|
|
32
|
+
/** Where one shift goes below the crew home when that home is in the signed-in hub (`/dashboard/crew/shifts/:assignmentId`). */
|
|
33
|
+
export declare const SHIFTS_HUB_SHIFT_SEGMENT = "shifts/:assignmentId";
|
|
32
34
|
/**
|
|
33
35
|
* Builds every link to a shifts page through `localize` (the active locale's prefix, see `useLocaleLink` of
|
|
34
36
|
* `@frigear-nu/ui`). My shifts and the swaps link to their tab of the crew home when they have no page. A page that is
|
|
@@ -9,6 +9,7 @@ export const SHIFTS_DEFAULT_PAGES = {
|
|
|
9
9
|
lead: "/shifts/lead/:teamId",
|
|
10
10
|
station: "/shifts/station/:stationId"
|
|
11
11
|
};
|
|
12
|
+
export const SHIFTS_HUB_SHIFT_SEGMENT = "shifts/:assignmentId";
|
|
12
13
|
export function createShiftsLinks(pages, localize) {
|
|
13
14
|
return {
|
|
14
15
|
shifts: () => localize(shiftsMinePath(pages) || SHIFTS_DEFAULT_PAGES.shifts),
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frigear-nu/shifts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Shifts for the frigear ecosystem: schedules, shift roles, assignment, swaps, QR check-in and who is on shift now, per operation, built on crew and teams.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"frigear-module",
|
|
7
|
+
"nuxt-module"
|
|
8
|
+
],
|
|
5
9
|
"homepage": "https://docs.frigear.dev/modules/volunteering/shifts",
|
|
6
10
|
"repository": {
|
|
7
11
|
"type": "git",
|
|
@@ -35,15 +39,15 @@
|
|
|
35
39
|
"playground"
|
|
36
40
|
],
|
|
37
41
|
"dependencies": {
|
|
38
|
-
"@frigear-nu/auth": "^0.6.
|
|
39
|
-
"@frigear-nu/crew": "^0.1.
|
|
40
|
-
"@frigear-nu/maps": "^0.0.
|
|
41
|
-
"@frigear-nu/module-kit": "^1.3.
|
|
42
|
-
"@frigear-nu/notify": "^0.2
|
|
43
|
-
"@frigear-nu/operations": "^0.1.
|
|
44
|
-
"@frigear-nu/teams": "^0.1.
|
|
45
|
-
"@frigear-nu/ui": "^0.2.
|
|
46
|
-
"@frigear-nu/users": "^3.1.
|
|
42
|
+
"@frigear-nu/auth": "^0.6.9",
|
|
43
|
+
"@frigear-nu/crew": "^0.1.4",
|
|
44
|
+
"@frigear-nu/maps": "^0.0.4",
|
|
45
|
+
"@frigear-nu/module-kit": "^1.3.13",
|
|
46
|
+
"@frigear-nu/notify": "^0.3.2",
|
|
47
|
+
"@frigear-nu/operations": "^0.1.3",
|
|
48
|
+
"@frigear-nu/teams": "^0.1.4",
|
|
49
|
+
"@frigear-nu/ui": "^0.2.12",
|
|
50
|
+
"@frigear-nu/users": "^3.1.6",
|
|
47
51
|
"@libsql/client": "^0.18.0",
|
|
48
52
|
"@nuxt/kit": "^4.6.4",
|
|
49
53
|
"@vueuse/core": "^15.0.0",
|
|
@@ -55,12 +59,12 @@
|
|
|
55
59
|
"zod": "^4.6.7"
|
|
56
60
|
},
|
|
57
61
|
"peerDependencies": {
|
|
58
|
-
"@frigear-nu/admin": "^0.5.
|
|
59
|
-
"@frigear-nu/dashboard": "^0.1.
|
|
60
|
-
"@frigear-nu/email-templates": "^0.1.
|
|
61
|
-
"@frigear-nu/menu": "^0.4.
|
|
62
|
-
"@frigear-nu/mobile": "^0.6.
|
|
63
|
-
"@frigear-nu/widget": "^0.4.
|
|
62
|
+
"@frigear-nu/admin": "^0.5.3",
|
|
63
|
+
"@frigear-nu/dashboard": "^0.1.4",
|
|
64
|
+
"@frigear-nu/email-templates": "^0.1.6",
|
|
65
|
+
"@frigear-nu/menu": "^0.4.2",
|
|
66
|
+
"@frigear-nu/mobile": "^0.6.5",
|
|
67
|
+
"@frigear-nu/widget": "^0.4.4",
|
|
64
68
|
"@nuxt/ui": "^4.12.0",
|
|
65
69
|
"@nuxthub/core": "^0.10.12"
|
|
66
70
|
},
|
|
@@ -88,15 +92,15 @@
|
|
|
88
92
|
}
|
|
89
93
|
},
|
|
90
94
|
"devDependencies": {
|
|
91
|
-
"@frigear-nu/admin": "^0.5.
|
|
92
|
-
"@frigear-nu/dashboard": "^0.1.
|
|
93
|
-
"@frigear-nu/email-templates": "^0.1.
|
|
94
|
-
"@frigear-nu/forms": "^0.5.
|
|
95
|
-
"@frigear-nu/menu": "^0.4.
|
|
96
|
-
"@frigear-nu/mobile": "^0.6.
|
|
97
|
-
"@frigear-nu/preferences": "^0.3.
|
|
98
|
-
"@frigear-nu/push": "^0.1.
|
|
99
|
-
"@frigear-nu/widget": "^0.4.
|
|
95
|
+
"@frigear-nu/admin": "^0.5.3",
|
|
96
|
+
"@frigear-nu/dashboard": "^0.1.4",
|
|
97
|
+
"@frigear-nu/email-templates": "^0.1.6",
|
|
98
|
+
"@frigear-nu/forms": "^0.5.6",
|
|
99
|
+
"@frigear-nu/menu": "^0.4.2",
|
|
100
|
+
"@frigear-nu/mobile": "^0.6.5",
|
|
101
|
+
"@frigear-nu/preferences": "^0.3.6",
|
|
102
|
+
"@frigear-nu/push": "^0.1.4",
|
|
103
|
+
"@frigear-nu/widget": "^0.4.4",
|
|
100
104
|
"@nuxt/devtools": "^4.2.0",
|
|
101
105
|
"@nuxt/eslint-config": "^1.17.0",
|
|
102
106
|
"@nuxt/module-builder": "^1.0.4",
|