Add "created at" column to user credentials table in admin ui (#21831)

Fixes #21746
This commit is contained in:
Thomas Darimont 2023-07-20 08:07:26 +02:00 committed by GitHub
parent 13d412989c
commit 2b91b5ba98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -408,6 +408,7 @@ export const UserCredentials = ({ user }: UserCredentialsProps) => {
<Th aria-hidden="true" />
<Th>{t("type")}</Th>
<Th>{t("userLabel")}</Th>
<Th>{t("createdAt")}</Th>
<Th>{t("data")}</Th>
<Th aria-hidden="true" />
<Th aria-hidden="true" />

View file

@ -13,6 +13,7 @@ import type CredentialRepresentation from "@keycloak/keycloak-admin-client/lib/d
import useToggle from "../../utils/useToggle";
import useLocaleSort from "../../utils/useLocaleSort";
import { CredentialDataDialog } from "./CredentialDataDialog";
import useFormatDate from "../../utils/useFormatDate";
type CredentialRowProps = {
credential: CredentialRepresentation;
@ -27,6 +28,7 @@ export const CredentialRow = ({
toggleDelete,
children,
}: CredentialRowProps) => {
const formatDate = useFormatDate();
const { t } = useTranslation("users");
const [showData, toggleShow] = useToggle();
const [kebabOpen, toggleKebab] = useToggle();
@ -63,6 +65,7 @@ export const CredentialRow = ({
)}
<Td>{children}</Td>
<Td>{formatDate(new Date(credential.createdDate!))}</Td>
<Td>
<Button
className="kc-showData-btn"