You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Server checks Staff table first, then Apprentices table
36
+
2. Server checks Staff table first, then external access fields, then Apprentices table
36
37
3. JWT token generated (15-minute expiry) and emailed via Resend
37
38
4. User clicks link → token verified → session cookie set (90-day expiry)
38
-
5. User redirected based on type: staff → `/admin`, students → `/checkin`
39
+
5. User redirected based on type: staff/external → `/admin`, students → `/checkin`
39
40
40
41
### Route Protection
41
42
@@ -64,6 +65,39 @@ See [Staff Who Are Also Apprentices](#staff-who-are-also-apprentices) for setup
64
65
2. Add a record in the **Staff - Apprentice Pulse** table, selecting their collaborator profile
65
66
3. They can now log in at `/login` using their collaborator email
66
67
68
+
### Adding External Staff Access
69
+
70
+
External staff are people who need login access to view attendance data but are not regular staff members or apprentices. Examples include external trainers, consultants, or partner organization staff.
71
+
72
+
To grant external staff access:
73
+
74
+
1.**In the Staff - Apprentice Pulse table**, find any existing staff record (or create a dummy one)
75
+
2.**Add the external person's email** to the `Attendace access` field (this field can contain multiple emails, one per line)
76
+
3.**Add their name** to the `Name - Attendance access` field (this should match the order of emails in step 2)
- External staff can log in at `/login` using their email
84
+
- They receive the same magic link authentication as regular staff
85
+
- They have **full admin access** - same permissions as regular staff members
86
+
- No Airtable workspace collaboration required
87
+
88
+
**Multiple external users:**
89
+
You can add multiple external users to the same staff record by putting each email on a new line:
90
+
-`Attendace access` field:
91
+
```
92
+
trainer1@company.com
93
+
trainer2@company.com
94
+
```
95
+
-`Name - Attendance access` field:
96
+
```
97
+
External Trainer 1
98
+
External Trainer 2
99
+
```
100
+
67
101
### Staff Who Are Also Apprentices
68
102
69
103
Some staff members may also be apprentices (e.g., apprentice coaches). These users need to:
@@ -193,10 +227,4 @@ Event types are cached for performance (5-minute cache) and include automatic co
193
227
194
228
### Default Values
195
229
196
-
Default values used in forms are stored in `src/lib/airtable/config.ts` under `DEFAULTS`:
197
-
198
-
| Key | Description |
199
-
|-----|-------------|
200
-
|`SURVEY_URL`| Default survey URL pre-filled when creating events |
201
-
202
-
To change the default survey URL, update `DEFAULTS.SURVEY_URL` in the config file.
230
+
Default values for event creation are now managed dynamically through Airtable's "Event types - Apprentice Pulse" table. Each event type can have its own default survey URL, providing more flexibility than hardcoded values.
0 commit comments