From 5e298dc11227b44419df120c61c304a0025409f0 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 26 Aug 2020 15:15:23 +0200 Subject: [PATCH] :chart_with_upwards_trend: ajoute les mois M - 3 et M - 4 aux stats --- mon-entreprise/scripts/fetch-stats.js | 4 +++- .../source/sites/mon-entreprise.fr/pages/Stats/Stats.tsx | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mon-entreprise/scripts/fetch-stats.js b/mon-entreprise/scripts/fetch-stats.js index bd65b57ce..95995b16b 100644 --- a/mon-entreprise/scripts/fetch-stats.js +++ b/mon-entreprise/scripts/fetch-stats.js @@ -61,7 +61,9 @@ async function fetchSimulatorsMonth() { return { currentMonth: await getDataFromXMonthAgo(0), oneMonthAgo: await getDataFromXMonthAgo(1), - twoMonthAgo: await getDataFromXMonthAgo(2) + twoMonthAgo: await getDataFromXMonthAgo(2), + threeMonthAgo: await getDataFromXMonthAgo(3), + fourMonthAgo: await getDataFromXMonthAgo(4) } } diff --git a/mon-entreprise/source/sites/mon-entreprise.fr/pages/Stats/Stats.tsx b/mon-entreprise/source/sites/mon-entreprise.fr/pages/Stats/Stats.tsx index c566a621f..5af2b77f3 100644 --- a/mon-entreprise/source/sites/mon-entreprise.fr/pages/Stats/Stats.tsx +++ b/mon-entreprise/source/sites/mon-entreprise.fr/pages/Stats/Stats.tsx @@ -28,7 +28,13 @@ import { useSimulatorsMetadata } from '../Simulateurs/Home' const stats: StatsData = statsJson as any -const monthPeriods = ['currentMonth', 'oneMonthAgo', 'twoMonthAgo'] as const +const monthPeriods = [ + 'currentMonth', + 'oneMonthAgo', + 'twoMonthAgo', + 'threeMonthAgo', + 'fourMonthAgo' +] as const type MonthPeriod = typeof monthPeriods[number] type Periodicity = 'daily' | 'monthly'