I added functioonality to the notifications
This commit is contained in:
+11
-2
@@ -1,6 +1,15 @@
|
||||
import { User } from "@/types"
|
||||
import { User, UserRole } from "@/types"
|
||||
|
||||
export const users: User[] = [
|
||||
{
|
||||
id: "u-super",
|
||||
name: "Jason Oosthuizen",
|
||||
email: "jason@coastalit.com",
|
||||
role: "super_admin",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=Jason+Oosthuizen&background=0f172a&color=fff&size=128",
|
||||
createdAt: "2025-01-01T08:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u1",
|
||||
name: "Sarah Chen",
|
||||
@@ -79,7 +88,7 @@ export function getUserById(id: string): User | undefined {
|
||||
return users.find((u) => u.id === id)
|
||||
}
|
||||
|
||||
export function getUsersByRole(role: "admin" | "sales"): User[] {
|
||||
export function getUsersByRole(role: UserRole): User[] {
|
||||
return users.filter((u) => u.role === role)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user