Skip to content

Commit

Permalink
Merge pull request #2205 from EmanuelGustafzon/temp/16511
Browse files Browse the repository at this point in the history
Issue 16511, add time for when user last logged in, in the grid user card
  • Loading branch information
nielslyngsoe authored Oct 4, 2024
2 parents 6e21fce + a1ced8e commit 723541d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,13 @@ export class UmbUserGridCollectionViewElement extends UmbLitElement {
if (!user.lastLoginDate) {
return html`<div class="user-login-time">${`${user.name} ${this.localize.term('user_noLogin')}`}</div>`;
}
const lastLoggedinLocalTime: Date = new Date(user.lastLoginDate);
const formattedTime = lastLoggedinLocalTime.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });

return html`<div class="user-login-time">
<umb-localize key="user_lastLogin"></umb-localize>
${this.localize.date(user.lastLoginDate)}
${formattedTime}
</div>`;
}

Expand Down

0 comments on commit 723541d

Please sign in to comment.