Projects view by user

This commit is contained in:
2026-02-02 01:27:15 -06:00
parent 1d278936b1
commit 46aab5fbba
7 changed files with 70 additions and 14 deletions

View File

@@ -17,6 +17,7 @@ export interface User {
description: string;
permissions: Record<string, Record<string, boolean>>;
};
project_id: string | null;
is_active: boolean;
last_login: string | null;
created_at: string;
@@ -28,6 +29,7 @@ export interface CreateUserInput {
password: string;
name: string;
role_id: string;
project_id?: string | null;
is_active?: boolean;
}
@@ -35,6 +37,7 @@ export interface UpdateUserInput {
email?: string;
name?: string;
role_id?: string;
project_id?: string | null;
is_active?: boolean;
}

View File

@@ -16,6 +16,7 @@ interface User {
email: string;
roleId: string;
roleName: string;
projectId: string | null;
status: "ACTIVE" | "INACTIVE";
createdAt: string;
}
@@ -65,6 +66,7 @@ export default function UsersPage() {
email: apiUser.email,
roleId: apiUser.role_id,
roleName: apiUser.role?.name || '',
projectId: apiUser.project_id || null,
status: apiUser.is_active ? "ACTIVE" : "INACTIVE",
createdAt: new Date(apiUser.created_at).toISOString().slice(0, 10)
}));
@@ -126,6 +128,7 @@ export default function UsersPage() {
email: form.email,
name: form.name.trim(),
role_id: form.roleId,
project_id: form.projectId || null,
is_active: form.status === "ACTIVE",
};
@@ -136,6 +139,7 @@ export default function UsersPage() {
password: form.password!,
name: form.name.trim(),
role_id: form.roleId,
project_id: form.projectId || null,
is_active: form.status === "ACTIVE",
};
@@ -221,7 +225,7 @@ export default function UsersPage() {
name: user.name,
email: user.email,
roleId: user.roleId,
projectId: "",
projectId: user.projectId || "",
status: user.status,
createdAt: user.createdAt,
password: ""