From 41a2a5a156ecd3eefe1c385060635478cf74ad8a Mon Sep 17 00:00:00 2001 From: Danil Kostromin Date: Wed, 27 Mar 2024 02:10:31 +0200 Subject: [PATCH] fix(history): not display dates in legend This will fix dates failing to display in history legend This was due to missing search params for dates Now we get it from redux store. If no search params found default one will be used Signed-off-by: Danil Kostromin --- .../history-filter-legend.container.utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/bublik/features/history/src/lib/history-filter-legend/history-filter-legend.container.utils.ts b/libs/bublik/features/history/src/lib/history-filter-legend/history-filter-legend.container.utils.ts index be81f1a2..d884871c 100644 --- a/libs/bublik/features/history/src/lib/history-filter-legend/history-filter-legend.container.utils.ts +++ b/libs/bublik/features/history/src/lib/history-filter-legend/history-filter-legend.container.utils.ts @@ -8,9 +8,10 @@ import { queryToHistorySearchState } from '../slice/history-slice.utils'; export const getLegendItems = (search: HistoryAPIQuery): LegendItem[] => { const state = queryToHistorySearchState(search); + const formattedDate = `${formatTimeToDot( - search.startDate - )} — ${formatTimeToDot(search.finishDate)}`; + state.startDate.toISOString() + )} — ${formatTimeToDot(state.finishDate.toISOString())}`; return [ {