From 93fd27aebe1e988c1f988aa1e51c809befea1538 Mon Sep 17 00:00:00 2001 From: Ramon Date: Mon, 1 Sep 2025 14:02:35 +0800 Subject: [PATCH] fix(console): Timestamp to date Pipe type coercion (#10588) # Which Problems Are Solved Correctly display timestamps even if the seconds or nanos property is 0. # How the Problems Are Solved Instead of relying on javascript type coercion correctly check explictly for undefined. # Additional Changes Use TypeSafeCellDefModule in personal-access-tokens component. # Additional Context - Closes #10032 Co-authored-by: Max Peintner Co-authored-by: Livio Spring --- .../personal-access-tokens.component.html | 10 +++++----- .../personal-access-tokens.component.ts | 7 +++---- .../personal-access-tokens.module.ts | 2 ++ .../timestamp-to-date-pipe/timestamp-to-date.pipe.ts | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/console/src/app/modules/personal-access-tokens/personal-access-tokens.component.html b/console/src/app/modules/personal-access-tokens/personal-access-tokens.component.html index 2e51fb3cc..d8e62afe1 100644 --- a/console/src/app/modules/personal-access-tokens/personal-access-tokens.component.html +++ b/console/src/app/modules/personal-access-tokens/personal-access-tokens.component.html @@ -29,7 +29,7 @@ > - + {{ 'USER.PERSONALACCESSTOKEN.ID' | translate }} - {{ key?.id }} + {{ key?.id }} {{ 'USER.MACHINE.CREATIONDATE' | translate }} - + {{ key.details?.creationDate | timestampToDate | localizedDate: 'fromNow' }} {{ 'USER.MACHINE.EXPIRATIONDATE' | translate }} - + {{ key.expirationDate | timestampToDate | localizedDate: 'EEE dd. MMM yyyy, HH:mm' }} - +