From 5ae16dbb6627b990a18a8f757fe0420bc09a183b Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 12 Apr 2024 21:15:54 +0200 Subject: [PATCH] fix(NcDateTime): When relative time is disabled return a string and not the reference to it The `.value` call was missing in case of disabled relative time. This causes the string to be quoted (because of stringification of the computed value). To prevent similar issues the file is now migrated to Typescript, also fixed some other issues discovered by type checking. Signed-off-by: Ferdinand Thiessen --- src/components/NcDateTime/NcDateTime.vue | 3 +- src/composables/index.js | 2 +- ...FormatDateTime.js => useFormatDateTime.ts} | 50 +++++++++++++------ 3 files changed, 38 insertions(+), 17 deletions(-) rename src/composables/{useFormatDateTime.js => useFormatDateTime.ts} (73%) diff --git a/src/components/NcDateTime/NcDateTime.vue b/src/components/NcDateTime/NcDateTime.vue index 9946007a52..9e8736e190 100644 --- a/src/components/NcDateTime/NcDateTime.vue +++ b/src/components/NcDateTime/NcDateTime.vue @@ -109,7 +109,8 @@ h4 {