Skip to content

Commit 8719020

Browse files
authored
Merge pull request #1046 from MTES-MCT/call-me-maybe
Bloc contact dans les avis
2 parents 563c631 + fa54109 commit 8719020

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

envergo/static/js/libs/evaluation_analytics.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
// Track a moulinette result page load
1+
// Track an AR page load
22
window.addEventListener('load', function () {
33
_paq.push(['trackEvent', 'Evaluation', 'Visit', DEPARTMENT]);
44
});
55

6+
// Track when an appointment request button is clicked
7+
window.addEventListener("load", function () {
8+
const pickAppointmentBtn = document.getElementById("pick-appointment-btn");
9+
if (!pickAppointmentBtn) {
10+
return;
11+
}
12+
pickAppointmentBtn.addEventListener("click", function (evt) {
13+
_paq.push(["trackEvent", "Evaluation", "ChooseAppointmentClick"]);
14+
});
15+
});
616

717
// Track when a "self declaration" button is clicked
818
window.addEventListener('load', function () {

envergo/static/sass/project.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,3 +2483,17 @@ section#actions-to-take {
24832483
.form-actions {
24842484
text-align: right;
24852485
}
2486+
2487+
section#pick-appointment > div {
2488+
display: flex;
2489+
flex-direction: row;
2490+
background-color: var(--grey-975-100);
2491+
border-radius: 10px;
2492+
padding: 1em;
2493+
2494+
.icon {
2495+
border-radius: 1rem;
2496+
background-color: var(--blue-france-sun-113-625);
2497+
color: var(--text-inverted-blue-france);
2498+
}
2499+
}

envergo/templates/evaluations/_content.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,23 @@ <h3 class="fr-callout__title">Commentaire de l'équipe Envergo</h3>
7878
</div>
7979
{% endif %}
8080

81+
<section id="pick-appointment" class="hide-print fr-mb-5w">
82+
<div class="fr-px-2w fr-pt-5v fr-pb-2w">
83+
<div class="fr-my-1w">
84+
<span class="icon fr-icon-customer-service-fill fr-mx-2w fr-p-1v"></span>
85+
</div>
86+
<div class="fr-my-1w">
87+
<h6 class="fr-mb-1w">Une question sur cet avis réglementaire ?</h6>
88+
<p class="fr-mb-1w">Vous pouvez en discuter par téléphone avec un membre de l'équipe Envergo</p>
89+
<a id="pick-appointment-btn"
90+
class="fr-btn fr-btn--icon-left fr-icon-calendar-2-line fr-btn--tertiary fr-btn--sm fr-mt-2v"
91+
href="https://calendly.com/envergo/echange-envergo-10min?utm_source=envergo&utm_medium=avis&a1={{ evaluation.reference }}"
92+
target="_blank"
93+
rel="noopener external">Choisir un rendez-vous</a>
94+
</div>
95+
</div>
96+
</section>
97+
8198
{% for regulation in moulinette.regulations %}
8299
{% include 'amenagement/moulinette/_result_regulation.html' with regulation=regulation %}
83100
{% endfor %}

0 commit comments

Comments
 (0)