diff --git a/devfront/src/features/clients/ClientConsentsPage.tsx b/devfront/src/features/clients/ClientConsentsPage.tsx index 88bafbf0..c0d949d4 100644 --- a/devfront/src/features/clients/ClientConsentsPage.tsx +++ b/devfront/src/features/clients/ClientConsentsPage.tsx @@ -46,7 +46,7 @@ function ClientConsentsPage() { } = useQuery({ queryKey: ["consents", clientId, subject], queryFn: () => fetchConsents(subject, clientId), - enabled: subject.length > 0, + enabled: clientId.length > 0, // Removed subject.length > 0 check }); const revokeMutation = useMutation({ mutationFn: (payload: { subject: string }) => @@ -174,105 +174,109 @@ function ClientConsentsPage() { )} - {subject.length === 0 && !isLoading && !error ? ( -
- -

사용자 검색 필요

-

- 보안상의 이유로 전체 목록은 제공되지 않습니다.
- 사용자 ID, 이메일, 또는 이름으로 검색하여 동의 내역을 확인하세요. -

-
- ) : ( - <> - - - - User - Status - Granted Scopes - Last Authenticated - Action - - - - {rows.length === 0 && !isLoading ? ( - - - 검색 결과가 없습니다. - - - ) : ( - rows.map((row) => ( - - -
-
- {(row.userName || row.subject).slice(0, 2).toUpperCase()} -
-
- - {row.userName || "Subject"} - - - {row.subject} - -
-
-
- - Active - - -
- {row.grantedScopes.map((scope) => ( - - {scope} - - ))} -
-
- - {row.authenticatedAt || "-"} - - -
+ + + User + Tenant + Status + Granted Scopes + First Granted + Last Authenticated + Action + + + + {rows.length === 0 && !isLoading ? ( + + + No consents found. + + + ) : ( + rows.map((row) => ( + + +
+
+ {(row.userName || row.subject).slice(0, 2).toUpperCase()} +
+
+ + {row.userName || "Subject"} + + + {row.subject} + +
+
+
+ +
+ + {row.tenantName || "N/A"} + + + {row.tenantId} + +
+
+ + Active + + +
+ {row.grantedScopes.map((scope) => ( + - Revoke - - - - )) - )} - -
- -

- Showing {rows.length > 0 ? 1 : 0} to{" "} - {rows.length} of{" "} - {rows.length} users -

-
- - - -
-
- - )} + {scope} + + ))} + + + + {new Date(row.createdAt).toLocaleString()} + + + {row.authenticatedAt + ? new Date(row.authenticatedAt).toLocaleString() + : "-"} + + + + + + )) + )} + + + +

+ Showing {rows.length > 0 ? 1 : 0} to{" "} + {rows.length} of{" "} + {rows.length} users +

+
+ + + +
+
diff --git a/devfront/src/lib/devApi.ts b/devfront/src/lib/devApi.ts index 014c76bd..f16220aa 100644 --- a/devfront/src/lib/devApi.ts +++ b/devfront/src/lib/devApi.ts @@ -54,6 +54,9 @@ export type ConsentSummary = { clientName?: string; grantedScopes: string[]; authenticatedAt?: string; + createdAt: string; + tenantId?: string; + tenantName?: string; }; export type ConsentListResponse = {