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:
@@ -72,6 +72,7 @@ export interface Staff {
|
||||
name: string;
|
||||
email: string;
|
||||
role: "groomer" | "receptionist" | "manager";
|
||||
isSuperUser: boolean;
|
||||
active: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
|
||||
Reference in New Issue
Block a user