From c0e068db89dd915595ebfcfba2c0bf0e4e12129c Mon Sep 17 00:00:00 2001 From: 1AhmedYasser <26207361+1AhmedYasser@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:12:05 +0300 Subject: [PATCH 1/2] fix(730): Fixed quality overview timezone --- DSL/Resql/analytics/POST/chat-quality-overview.sql | 2 +- DSL/Ruuter/analytics/POST/chats/quality-overview.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DSL/Resql/analytics/POST/chat-quality-overview.sql b/DSL/Resql/analytics/POST/chat-quality-overview.sql index d8f06e9b..538ff5d0 100644 --- a/DSL/Resql/analytics/POST/chat-quality-overview.sql +++ b/DSL/Resql/analytics/POST/chat-quality-overview.sql @@ -6,7 +6,7 @@ WITH latest_per_base AS ( ORDER BY c.base_id, c.updated DESC ) SELECT - DATE_TRUNC(:period, lp.ended) AS time, + DATE_TRUNC(:period, lp.ended AT TIME ZONE :timezone) AT TIME ZONE :timezone AS time, COUNT(DISTINCT lp.base_id) AS total, COUNT(DISTINCT cm_theme.chat_base_id) AS themes, COUNT(DISTINCT cm_quality.chat_base_id) AS response_quality, diff --git a/DSL/Ruuter/analytics/POST/chats/quality-overview.yml b/DSL/Ruuter/analytics/POST/chats/quality-overview.yml index 333f7d47..209fa3f4 100644 --- a/DSL/Ruuter/analytics/POST/chats/quality-overview.yml +++ b/DSL/Ruuter/analytics/POST/chats/quality-overview.yml @@ -23,6 +23,9 @@ declaration: - field: showTest type: boolean description: "Body field 'showTest'" + - field: timezone + type: string + description: "Body field 'timezone'" check_for_required_parameters: switch: @@ -40,6 +43,7 @@ post_chart_data: period: ${incoming.body.period} urls: ${incoming.body.urls} showTest: ${incoming.body.showTest} + timezone: ${incoming.body.timezone} result: chart_result assign_chart_data: From e1bebad0ee3176efc24029d1fa74128103dfced5 Mon Sep 17 00:00:00 2001 From: 1AhmedYasser <26207361+1AhmedYasser@users.noreply.github.com> Date: Thu, 11 Jun 2026 10:18:45 +0300 Subject: [PATCH 2/2] fix(730): pass timezone to getQualityOverview --- GUI/src/pages/ChatsPage/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GUI/src/pages/ChatsPage/index.tsx b/GUI/src/pages/ChatsPage/index.tsx index addd5f4d..3b5570e1 100644 --- a/GUI/src/pages/ChatsPage/index.tsx +++ b/GUI/src/pages/ChatsPage/index.tsx @@ -338,7 +338,7 @@ const ChatsPage: React.FC = () => { let result: ChartData = { chartData: [], colors: [] }; try { const response = await request< - Readonly<{ start_date: string; end_date: string; period: string; urls: (string | null)[]; showTest: boolean }>, + Readonly<{ start_date: string; end_date: string; period: string; urls: (string | null)[]; showTest: boolean; timezone: string }>, { response: [ { time: string; total: number; themes: number; responseQuality: number; followUp: number }[], @@ -361,6 +361,7 @@ const ChatsPage: React.FC = () => { period: config.groupByPeriod || 'day', urls: getDomainsArray(), showTest: getShowTestData(), + timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, }, }); const chartRows = response.response[0] ?? [];