feat(sprint-5): Phase 6 — Staff management UI (list, invite, permissions, revoke)
- /settings/staff: staff account table with role badges + permission chips - Invite sheet: email + role template + 8 granular permission checkboxes - Edit permissions dialog with optimistic update - Revoke access with AlertDialog confirmation - React Query hooks wired (useStaffListQuery, mutations) - Full i18n (de/en), mock fallback, loading skeletons - Sidebar nav updated: Personal → /settings/staff with UserCog icon - Added @radix-ui/react-checkbox + Checkbox UI component
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
import type { StaffMember } from "@/services/staff"
|
||||
|
||||
export const mockStaffAccounts: StaffMember[] = [
|
||||
{
|
||||
id: "staff-1",
|
||||
displayName: "Maria Schulz",
|
||||
email: "maria@gruener-daumen.de",
|
||||
role: "STAFF",
|
||||
permissions: [
|
||||
"RECORD_DISTRIBUTION",
|
||||
"VIEW_MEMBER_LIST",
|
||||
"VIEW_MEMBER_QUOTA",
|
||||
],
|
||||
status: "ACTIVE",
|
||||
lastLoginAt: "2026-06-10T14:30:00Z",
|
||||
createdAt: "2025-11-15T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "staff-2",
|
||||
displayName: "Thomas Klein",
|
||||
email: "thomas@gruener-daumen.de",
|
||||
role: "STAFF",
|
||||
permissions: ["VIEW_STOCK", "RECORD_STOCK_IN", "MANAGE_GROW_CALENDAR"],
|
||||
status: "ACTIVE",
|
||||
lastLoginAt: "2026-06-11T08:45:00Z",
|
||||
createdAt: "2025-12-01T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "staff-3",
|
||||
displayName: "Petra Wagner",
|
||||
email: "petra@gruener-daumen.de",
|
||||
role: "MANAGER",
|
||||
permissions: [
|
||||
"RECORD_DISTRIBUTION",
|
||||
"VIEW_MEMBER_LIST",
|
||||
"VIEW_MEMBER_QUOTA",
|
||||
"ADD_MEMBER",
|
||||
"VIEW_STOCK",
|
||||
"RECORD_STOCK_IN",
|
||||
"VIEW_COMPLIANCE_REPORT",
|
||||
],
|
||||
status: "ACTIVE",
|
||||
lastLoginAt: "2026-06-12T07:15:00Z",
|
||||
createdAt: "2026-01-10T11:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "staff-4",
|
||||
displayName: "Stefan Braun",
|
||||
email: "stefan@gruener-daumen.de",
|
||||
role: "STAFF",
|
||||
permissions: ["RECORD_DISTRIBUTION", "VIEW_MEMBER_LIST"],
|
||||
status: "REVOKED",
|
||||
createdAt: "2025-10-01T08:00:00Z",
|
||||
},
|
||||
]
|
||||
@@ -30,9 +30,9 @@ export const navigationsData: NavigationType[] = [
|
||||
iconName: "FileText",
|
||||
},
|
||||
{
|
||||
title: "Einstellungen",
|
||||
href: "/settings",
|
||||
iconName: "Settings",
|
||||
title: "Personal",
|
||||
href: "/settings/staff",
|
||||
iconName: "UserCog",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user