From af388dd7fa88789c914372244a04f0a9410e55a1 Mon Sep 17 00:00:00 2001 From: Lebret Audrey Date: Tue, 22 Nov 2022 10:09:18 +0100 Subject: [PATCH 1/6] feat(recrutement): modal --- src/components/results/Intentions.js | 2 + src/components/results/RecruitParents.js | 64 ++++++++++++++++++++++++ styles/results.scss | 25 +++++++++ 3 files changed, 91 insertions(+) create mode 100644 src/components/results/RecruitParents.js diff --git a/src/components/results/Intentions.js b/src/components/results/Intentions.js index 5a548ee3..818eff93 100644 --- a/src/components/results/Intentions.js +++ b/src/components/results/Intentions.js @@ -3,6 +3,7 @@ import React, { useEffect, useState } from "react" import { ButtonGroup, ToggleButton } from "react-bootstrap" import { trackerForIntentions } from "../../utils/ab-testing/measuring-intentions.utils" import * as PdfUtils from "../../utils/pdf.utils" +import { RecruitParents } from "./RecruitParents" /** * @param {number} moodLevel @@ -96,6 +97,7 @@ export const Intentions = ({ moodLevel }) => {
{questionBlock(questionAboutScore)} +
) diff --git a/src/components/results/RecruitParents.js b/src/components/results/RecruitParents.js new file mode 100644 index 00000000..823151ef --- /dev/null +++ b/src/components/results/RecruitParents.js @@ -0,0 +1,64 @@ +import { Button } from "@dataesr/react-dsfr" +import { useState } from "react" +import { Modal } from "react-bootstrap" + +export function RecruitParents() { + const [show, setShow] = useState() + + const INDUVIDUAL_URL = "https://calendly.com/1000-jours-blues/30min" + const GROUP_URL = "" // TODO: + + const openModal = () => setShow(true) + const closeModal = () => setShow(false) + const openUrl = (url) => window.open(url, "_blank") + + return ( +
+
+ Participez à l'amélioration de cet outil afin que le pls grand nombre de + parents soient aidés +
+ + + + + + + + + Merci pour votre soutien.
+ Comment souhaitez-vous participer ? +
+ + +
+ En groupe, avec d'autres parents + +
+
+ En individuel, avec un membre de l'équipe + +
+
+
+
+ ) +} diff --git a/styles/results.scss b/styles/results.scss index 653c1674..c232986d 100644 --- a/styles/results.scss +++ b/styles/results.scss @@ -223,6 +223,31 @@ } } +.recruit-parents { + margin-top: $xxxs; + display: flex; + flex-direction: column; + + .participate-btn { + align-self: center; + margin-block: $xxxxs; + } +} + +.recruit-modale-response { + display: flex; + flex-direction: column; + width: 100%; + text-align: center; + + .participate-modal-btn { + align-self: center; + margin-block: $xxxxs; + } +} + + + @media screen and (max-width: 770px) { .measure .buttons-block, From fa2e8b826a3028638f405511c3a0abe41852c1d3 Mon Sep 17 00:00:00 2001 From: Lebret Audrey Date: Tue, 22 Nov 2022 11:11:23 +0100 Subject: [PATCH 2/6] feat(recrutement): ajout trackers --- src/components/results/RecruitParents.js | 17 ++++++++++++++--- src/utils/tracker.utils.js | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/results/RecruitParents.js b/src/components/results/RecruitParents.js index 823151ef..4f274670 100644 --- a/src/components/results/RecruitParents.js +++ b/src/components/results/RecruitParents.js @@ -1,6 +1,7 @@ import { Button } from "@dataesr/react-dsfr" import { useState } from "react" import { Modal } from "react-bootstrap" +import * as TrackerUtils from "../../utils/tracker.utils" export function RecruitParents() { const [show, setShow] = useState() @@ -10,7 +11,15 @@ export function RecruitParents() { const openModal = () => setShow(true) const closeModal = () => setShow(false) - const openUrl = (url) => window.open(url, "_blank") + + const onClickParticipate = (url, label) => { + window.open(url, "_blank") + TrackerUtils.trackerClick( + TrackerUtils.CATEG.recruit, + TrackerUtils.EVENT_CLICK, + label + ) + } return (
@@ -43,7 +52,7 @@ export function RecruitParents() { En groupe, avec d'autres parents @@ -52,7 +61,9 @@ export function RecruitParents() { En individuel, avec un membre de l'équipe diff --git a/src/utils/tracker.utils.js b/src/utils/tracker.utils.js index d291ec39..3b25351b 100644 --- a/src/utils/tracker.utils.js +++ b/src/utils/tracker.utils.js @@ -7,6 +7,7 @@ export const CATEG = { test: "Test", intentions: "Intentions", demography: "Démographie", + recruit: "Recrutement", results: "Résultats", } From 5ab272243c99229a04d60ebf6e2221a30b268415 Mon Sep 17 00:00:00 2001 From: Lebret Audrey Date: Thu, 24 Nov 2022 09:48:30 +0100 Subject: [PATCH 3/6] feat(recrutement): retours de PR --- src/components/results/RecruitParents.js | 2 +- styles/results.scss | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/results/RecruitParents.js b/src/components/results/RecruitParents.js index 4f274670..186f3ef2 100644 --- a/src/components/results/RecruitParents.js +++ b/src/components/results/RecruitParents.js @@ -24,7 +24,7 @@ export function RecruitParents() { return (
- Participez à l'amélioration de cet outil afin que le pls grand nombre de + Participez à l'amélioration de cet outil afin que le plus grand nombre de parents soient aidés
-
+ {GROUP_URL && ( +
+ En groupe, avec d'autres parents + +
+ )}
En individuel, avec un membre de l'équipe