diff --git a/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx b/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx index 81e32c7f6cd31..65b94ed0d4445 100644 --- a/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx +++ b/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx @@ -53,3 +53,8 @@ WithABACAttributes.args = { }, ], }; + +export const InvitedUser = Template.bind({}); +InvitedUser.args = { + invitationDate: '2025-01-01T12:00:00Z', +}; diff --git a/apps/meteor/client/components/UserInfo/UserInfo.tsx b/apps/meteor/client/components/UserInfo/UserInfo.tsx index 28a82c3835da1..59ddb7710a921 100644 --- a/apps/meteor/client/components/UserInfo/UserInfo.tsx +++ b/apps/meteor/client/components/UserInfo/UserInfo.tsx @@ -52,6 +52,7 @@ type UserInfoProps = UserInfoDataProps & { actions: ReactElement; roles: ReactElement[]; reason?: string; + invitationDate?: string; }; const UserInfo = ({ @@ -75,6 +76,7 @@ const UserInfo = ({ reason, freeSwitchExtension, abacAttributes, + invitationDate, ...props }: UserInfoProps): ReactElement => { const { t } = useTranslation(); @@ -207,6 +209,13 @@ const UserInfo = ({ ), )} + {invitationDate && ( + + {t('Invitation_date')} + {timeAgo(invitationDate)} + + )} + {createdAt && ( {t('Created_at')} diff --git a/apps/meteor/client/components/UserInfo/__snapshots__/UserInfo.spec.tsx.snap b/apps/meteor/client/components/UserInfo/__snapshots__/UserInfo.spec.tsx.snap index 3625392b362c2..ad214a8b86be0 100644 --- a/apps/meteor/client/components/UserInfo/__snapshots__/UserInfo.spec.tsx.snap +++ b/apps/meteor/client/components/UserInfo/__snapshots__/UserInfo.spec.tsx.snap @@ -261,6 +261,281 @@ exports[`renders Default without crashing 1`] = ` `; +exports[`renders InvitedUser without crashing 1`] = ` + +
+