From 039ac03ac813db49cfcfbd4872cb4c7cf02cbee9 Mon Sep 17 00:00:00 2001 From: baptou12 Date: Wed, 8 Nov 2023 17:47:35 +0100 Subject: [PATCH 1/3] fix: naming --- pages/funnel.js | 8 ++++---- services/funnelService.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/funnel.js b/pages/funnel.js index 5318dd0..d7d9dce 100644 --- a/pages/funnel.js +++ b/pages/funnel.js @@ -24,7 +24,7 @@ function Funnel() { return

Chargement...

} - const { visitToRecap, surveyData, accompanimentData } = + const { visitToResults, surveyData, accompanimentData } = chartsData[selectedMonth] return ( @@ -32,10 +32,10 @@ function Funnel() {

Metriques de parcours {selectedMonth}

-

Visites - Emails Récapitulatifs

- {visitToRecap && ( +

Visites - Page Résultats

+ {visitToResults && ( )} diff --git a/services/funnelService.js b/services/funnelService.js index d9d577d..40e3eb0 100644 --- a/services/funnelService.js +++ b/services/funnelService.js @@ -4,7 +4,7 @@ import configuration from "../next.config.js" function formatFunnelData(data) { return { - visitToRecap: [ + visitToResults: [ { label: "1ère Page", total: data.firstPageVisits }, { label: "2ème Page", total: data.secondPageVisits }, { label: "Page de Résultats", total: data.resultsPageVisits }, From a0e631328015865db38f7067ff8fe8d8f2b8a4e1 Mon Sep 17 00:00:00 2001 From: baptou12 Date: Wed, 8 Nov 2023 17:47:59 +0100 Subject: [PATCH 2/3] feat: Ajout d'un graphique sur les emails --- pages/funnel.js | 9 ++++++++- services/funnelService.js | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pages/funnel.js b/pages/funnel.js index d7d9dce..8a9cd97 100644 --- a/pages/funnel.js +++ b/pages/funnel.js @@ -24,7 +24,7 @@ function Funnel() { return

Chargement...

} - const { visitToResults, surveyData, accompanimentData } = + const { visitToResults, surveyData, accompanimentData, followupData } = chartsData[selectedMonth] return ( @@ -41,6 +41,13 @@ function Funnel() { )}
+
+

Nombre d'emails récapitulatifs

+ {followupData && ( + + )} +
+

Sondages Envoyés - Répondus

{surveyData && } diff --git a/services/funnelService.js b/services/funnelService.js index 40e3eb0..14fc4f1 100644 --- a/services/funnelService.js +++ b/services/funnelService.js @@ -9,6 +9,10 @@ function formatFunnelData(data) { { label: "2ème Page", total: data.secondPageVisits }, { label: "Page de Résultats", total: data.resultsPageVisits }, ], + followupData: [ + { label: "avec recontact", total: data.followupWithOptinCount }, + { label: "sans recontact", total: data.followupWithoutOptinCount }, + ], surveyData: [ { label: "Email de sondage envoyés", From 5282512ba9ce754d07e24b92ca6637e06e27363c Mon Sep 17 00:00:00 2001 From: baptou12 Date: Wed, 8 Nov 2023 17:51:57 +0100 Subject: [PATCH 3/3] fix: Style pour avoir 2 graph par row en desktop --- public/static/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/static/style.css b/public/static/style.css index aa57e8a..03590ae 100644 --- a/public/static/style.css +++ b/public/static/style.css @@ -416,7 +416,8 @@ table .sortable-asc:after { .funnel-charts .funnel-chart { flex: 1; - max-width: calc(100% / 3); + max-width: 50%; + flex-basis: 50%; } @media screen and (max-width: 1024px) {