From d52796321b8773c7b8344bfe206f676a273484ae Mon Sep 17 00:00:00 2001 From: EmanuelGustafzon Date: Sat, 10 Aug 2024 12:51:43 +0200 Subject: [PATCH] add local time for when user logged in last --- .../collection/views/grid/user-grid-collection-view.element.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts b/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts index 00a816ed97..ff5448c4ed 100644 --- a/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts +++ b/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts @@ -148,10 +148,13 @@ export class UmbUserGridCollectionViewElement extends UmbLitElement { if (!user.lastLoginDate) { return html`
${`${user.name} ${this.localize.term('user_noLogin')}`}
`; } + const lastLoggedinLocalTime: Date = new Date(user.lastLoginDate); + const formattedTime = lastLoggedinLocalTime.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); return html`

${this.localize.date(user.lastLoginDate)} + ${formattedTime}
`; }