From cc5b0e6ff404704500f65ee00e7750f034aef755 Mon Sep 17 00:00:00 2001 From: Orka Arnest CRUZE Date: Fri, 20 Dec 2024 15:19:04 +0100 Subject: [PATCH] feat(user): ajout last_login, documents_quota, documents_use, keys_quota et keys_use --- assets/@types/app.ts | 8 +++- assets/entrepot/pages/users/me/Me.tsx | 2 +- src/Security/User.php | 64 ++++++++++++++++++++++++--- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/assets/@types/app.ts b/assets/@types/app.ts index 7a51add2..2f24092a 100644 --- a/assets/@types/app.ts +++ b/assets/@types/app.ts @@ -42,8 +42,12 @@ export type CartesUser = { last_name?: string | null; roles: string[]; communities_member: CommunityMemberDto[]; - account_creation_date: string; - last_api_call_date: string; + account_creation_date?: string; + last_login_date?: string; + documents_quota?: number; + documents_use?: number; + keys_quota?: number; + keys_use?: number; }; /** datastore */ diff --git a/assets/entrepot/pages/users/me/Me.tsx b/assets/entrepot/pages/users/me/Me.tsx index 004e816d..02545c4e 100644 --- a/assets/entrepot/pages/users/me/Me.tsx +++ b/assets/entrepot/pages/users/me/Me.tsx @@ -28,7 +28,7 @@ const Me = () => {

{t("lastname", { lastName: user?.last_name ?? "" })}

{t("username", { userName: user?.user_name ?? "" })}

{t("email", { email: user.email })}

-

{t("registration_date", { date: formatDateFromISO(user.account_creation_date) })}

+ {user.account_creation_date !== undefined &&

{t("registration_date", { date: formatDateFromISO(user.account_creation_date) })}

}
{t("id", { id: user.id })}