Initial commit
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
import { User } from "@/types"
|
||||
|
||||
export const users: User[] = [
|
||||
{
|
||||
id: "u1",
|
||||
name: "Sarah Chen",
|
||||
email: "sarah@coastalit.com",
|
||||
role: "admin",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=Sarah+Chen&background=1d4ed8&color=fff&size=128",
|
||||
createdAt: "2025-01-15T08:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u2",
|
||||
name: "Marcus Johnson",
|
||||
email: "marcus@coastalit.com",
|
||||
role: "sales",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=Marcus+Johnson&background=2563eb&color=fff&size=128",
|
||||
createdAt: "2025-02-01T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u3",
|
||||
name: "Emily Rodriguez",
|
||||
email: "emily@coastalit.com",
|
||||
role: "sales",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=Emily+Rodriguez&background=3b82f6&color=fff&size=128",
|
||||
createdAt: "2025-02-15T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u4",
|
||||
name: "David Kim",
|
||||
email: "david@coastalit.com",
|
||||
role: "sales",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=David+Kim&background=60a5fa&color=fff&size=128",
|
||||
createdAt: "2025-03-01T08:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u5",
|
||||
name: "Jessica Patel",
|
||||
email: "jessica@coastalit.com",
|
||||
role: "sales",
|
||||
active: false,
|
||||
avatar: "https://ui-avatars.com/api/?name=Jessica+Patel&background=93c5fd&color=fff&size=128",
|
||||
createdAt: "2025-03-10T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u6",
|
||||
name: "Alex Thompson",
|
||||
email: "alex@coastalit.com",
|
||||
role: "sales",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=Alex+Thompson&background=1d4ed8&color=fff&size=128",
|
||||
createdAt: "2025-04-01T08:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u7",
|
||||
name: "Rachel Williams",
|
||||
email: "rachel@coastalit.com",
|
||||
role: "sales",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=Rachel+Williams&background=2563eb&color=fff&size=128",
|
||||
createdAt: "2025-04-15T10:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "u8",
|
||||
name: "Tom Nakamura",
|
||||
email: "tom@coastalit.com",
|
||||
role: "admin",
|
||||
active: true,
|
||||
avatar: "https://ui-avatars.com/api/?name=Tom+Nakamura&background=3b82f6&color=fff&size=128",
|
||||
createdAt: "2025-05-01T09:00:00Z",
|
||||
},
|
||||
]
|
||||
|
||||
export const currentUser: User = users[0]
|
||||
|
||||
export function getUserById(id: string): User | undefined {
|
||||
return users.find((u) => u.id === id)
|
||||
}
|
||||
|
||||
export function getUsersByRole(role: "admin" | "sales"): User[] {
|
||||
return users.filter((u) => u.role === role)
|
||||
}
|
||||
|
||||
export function getActiveUsers(): User[] {
|
||||
return users.filter((u) => u.active)
|
||||
}
|
||||
Reference in New Issue
Block a user