fix(portal): add Super User grant/revoke toggle to Staff page (GRO-206)

- Add isSuperUser boolean to Staff interface in types
- Fetch current user via /api/staff/me to determine if super user
- Show "Super User" column and Grant/Revoke buttons only for super users
- Disable revoke button when target is the last active super user
- Show API error messages when last-super-user guardrail triggers
- Prevent self-revocation (no Grant/Revoke button on own row)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
groombook-ci[bot]
2026-03-29 15:15:14 +00:00
parent 8ebfead2d0
commit e965b8bb7d
2 changed files with 55 additions and 2 deletions
+1
View File
@@ -72,6 +72,7 @@ export interface Staff {
name: string;
email: string;
role: "groomer" | "receptionist" | "manager";
isSuperUser: boolean;
active: boolean;
createdAt: string;
updatedAt: string;