From 2bfdca43e78e965290a262477e6c0d8d885002f2 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Sun, 13 Jul 2025 03:00:01 +0200 Subject: [PATCH 1/2] fix: display ISO string for date objects in views --- src/dashboard/Data/Views/Views.react.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dashboard/Data/Views/Views.react.js b/src/dashboard/Data/Views/Views.react.js index 3ee6f5a332..59051734af 100644 --- a/src/dashboard/Data/Views/Views.react.js +++ b/src/dashboard/Data/Views/Views.react.js @@ -128,7 +128,11 @@ class Views extends TableView { .then(results => { const columns = {}; const computeWidth = str => { - const text = typeof str === 'object' && str !== null ? JSON.stringify(str) : String(str); + let text = str; + if (str && typeof str === 'object') { + text = str.__type === 'Date' && str.iso ? str.iso : JSON.stringify(str); + } + text = String(text); if (typeof document !== 'undefined') { const canvas = computeWidth._canvas || (computeWidth._canvas = document.createElement('canvas')); @@ -298,6 +302,8 @@ class Views extends TableView { ); } else if (type === 'Object') { content = JSON.stringify(value); + } else if (type === 'Date') { + content = value && value.iso ? value.iso : String(value); } else { content = String(value); } From 9d5d0ec7568921d2a13f1e5d167e3d2fda3a7021 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Sun, 13 Jul 2025 03:07:03 +0200 Subject: [PATCH 2/2] fix: show ISO date and hide undefined values --- src/dashboard/Data/Views/Views.react.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dashboard/Data/Views/Views.react.js b/src/dashboard/Data/Views/Views.react.js index 59051734af..9aa2e1cdfa 100644 --- a/src/dashboard/Data/Views/Views.react.js +++ b/src/dashboard/Data/Views/Views.react.js @@ -129,8 +129,10 @@ class Views extends TableView { const columns = {}; const computeWidth = str => { let text = str; - if (str && typeof str === 'object') { - text = str.__type === 'Date' && str.iso ? str.iso : JSON.stringify(str); + if (text === undefined) { + text = ''; + } else if (text && typeof text === 'object') { + text = text.__type === 'Date' && text.iso ? text.iso : JSON.stringify(text); } text = String(text); if (typeof document !== 'undefined') { @@ -304,6 +306,8 @@ class Views extends TableView { content = JSON.stringify(value); } else if (type === 'Date') { content = value && value.iso ? value.iso : String(value); + } else if (value === undefined) { + content = ''; } else { content = String(value); }