From f956ed575198dbdd3821a3ffb0874078a3e081af Mon Sep 17 00:00:00 2001 From: Wang Zixiao Date: Mon, 29 Apr 2024 09:17:06 +0800 Subject: [PATCH] fix(ui): analytics date display format (#1999) --- .../app/(dashboard)/reports/components/daily-activity.tsx | 2 +- ee/tabby-ui/app/(home)/components/completion-charts.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ee/tabby-ui/app/(dashboard)/reports/components/daily-activity.tsx b/ee/tabby-ui/app/(dashboard)/reports/components/daily-activity.tsx index fd352debefdf..5818057db858 100644 --- a/ee/tabby-ui/app/(dashboard)/reports/components/daily-activity.tsx +++ b/ee/tabby-ui/app/(dashboard)/reports/components/daily-activity.tsx @@ -89,7 +89,7 @@ export function DailyActivity({ const selects = dailySelectMap[dateKey] || 0 const pendings = views - selects return { - name: moment(date).format('D MMM'), + name: moment(date).format('MMMM D'), views, selects, pendings diff --git a/ee/tabby-ui/app/(home)/components/completion-charts.tsx b/ee/tabby-ui/app/(home)/components/completion-charts.tsx index 38169c4c73e8..ae9ab69c15b8 100644 --- a/ee/tabby-ui/app/(home)/components/completion-charts.tsx +++ b/ee/tabby-ui/app/(home)/components/completion-charts.tsx @@ -130,7 +130,7 @@ export function CompletionCharts({ const views = dailyViewMap[dateKey] || 0 const selects = dailySelectMap[dateKey] || 0 return { - name: moment(date).format('D MMM'), + name: moment(date).format('MMMM D'), value: views === 0 ? 0 : parseFloat(((selects / views) * 100).toFixed(2)), selects, views @@ -142,7 +142,7 @@ export function CompletionCharts({ const selects = dailySelectMap[dateKey] || 0 const pendings = views - selects return { - name: moment(date).format('D MMM'), + name: moment(date).format('MMMM D'), views, selects, pending: views === 0 ? 0.5 : pendings,