feat: added last login time

This commit is contained in:
=
2025-08-07 13:37:06 +05:30
parent be20a507ac
commit eebf080e3c
29 changed files with 156 additions and 63 deletions
@@ -293,7 +293,13 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
{isPending && <TableSkeleton columns={3} innerKey="org-identities" />}
{!isPending &&
data?.identities?.map(
({ identity: { id, name }, role, customRole, lastLoggedInAuthMethod }) => {
({
identity: { id, name },
role,
customRole,
lastLoginAuthMethod,
lastLoginTime
}) => {
return (
<Tr
className="h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
@@ -309,14 +315,13 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
>
<Td className="group">
{name}
{lastLoggedInAuthMethod && (
{lastLoginAuthMethod && lastLoginTime && (
<Tooltip
className="min-w-52 max-w-96"
content={
<LastLoginSection
lastLoggedInAuthMethod={
identityAuthToNameMap[lastLoggedInAuthMethod]
}
lastLoginAuthMethod={identityAuthToNameMap[lastLoginAuthMethod]}
lastLoginTime={lastLoginTime}
/>
}
>
@@ -481,7 +481,8 @@ export const OrgMembersTable = ({
id: orgMembershipId,
status,
isActive,
lastLoggedInAuthMethod
lastLoginAuthMethod,
lastLoginTime
}) => {
const name =
u && u.firstName ? `${u.firstName} ${u.lastName ?? ""}`.trim() : null;
@@ -530,11 +531,14 @@ export const OrgMembersTable = ({
</Tooltip>
</Badge>
)}
{lastLoggedInAuthMethod && (
{lastLoginAuthMethod && lastLoginTime && (
<Tooltip
className="min-w-52 max-w-96"
content={
<LastLoginSection lastLoggedInAuthMethod={lastLoggedInAuthMethod} />
<LastLoginSection
lastLoginAuthMethod={lastLoginAuthMethod}
lastLoginTime={lastLoginTime}
/>
}
>
<FontAwesomeIcon