-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
En tant qu’employeur je peux inviter un candidat à prendre rdv depuis ma liste de candidatures [GEN-1702] #4357
Conversation
🥁 La recette jetable est prête ! 👉 Je veux tester cette PR ! |
257dd64
to
d5cbc0d
Compare
fe08205
to
8a4b4a0
Compare
ae052aa
to
4ef5548
Compare
@@ -13,10 +13,18 @@ htmx.onLoad(function () { | |||
* [2] https://select2.org/programmatic-control/events#listening-for-events | |||
* [3] https://developer.mozilla.org/en-US/docs/Web/API/Event/Event | |||
*/ | |||
e.target.dispatchEvent(new Event("change", {bubbles: true})); | |||
e.target.dispatchEvent(new Event("change", { bubbles: true })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 Est-il venu le temps de définir notre linter/formatter de fichier JS ? 🧌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
djlint
devrait le faire :
Line 30 in 404dd54
format_js = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'imagine que djlint ne format que les blocs JS des templates et pas les fichiers JS eux-mêmes ?
En tout cas en local il skip :
❯ pre-commit run --files itou/static/js/htmx_compat.js
Ruff format..........................................(no files to check)Skipped
Ruff check...........................................(no files to check)Skipped
djlint...............................................(no files to check)Skipped
ShellCheck...........................................(no files to check)Skipped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Par ailleurs j'ai un doute que djlint ait pour mission de traiter les fichiers JS. Car si je rajoute types_or: [html,javascript]
, voilà la diff produite 😵💫
Diff
diff --git a/itou/static/js/htmx_compat.js b/itou/static/js/htmx_compat.js
index f4a9fd094..fe541f7cb 100644
--- a/itou/static/js/htmx_compat.js
+++ b/itou/static/js/htmx_compat.js
@@ -1,30 +1,30 @@
"use strict";
htmx.onLoad(function (target) {
- function showEvent(e) {
- /**
- * Select2 events are jQuery events [1][2] and not standard JavaScript
- * events [3].
- *
- * Dispatch a JavaScript change event when the select2 selection changes,
- * for hx-trigger="change".
- *
- * [1] https://api.jquery.com/category/events/event-object/
- * [2] https://select2.org/programmatic-control/events#listening-for-events
- * [3] https://developer.mozilla.org/en-US/docs/Web/API/Event/Event
- */
- e.target.dispatchEvent(new Event("change", { bubbles: true }));
- }
- // Selection events from https://select2.org/programmatic-control/events
- $(".django-select2").on("select2:select", showEvent);
- $(".django-select2").on("select2:unselect", showEvent);
- $(".django-select2").on("select2:clear", showEvent);
+function showEvent(e) {
+/**
+* Select2 events are jQuery events [1][2] and not standard JavaScript
+* events [3].
+*
+* Dispatch a JavaScript change event when the select2 selection changes,
+* for hx-trigger="change".
+*
+* [1] https://api.jquery.com/category/events/event-object/
+* [2] https://select2.org/programmatic-control/events#listening-for-events
+* [3] https://developer.mozilla.org/en-US/docs/Web/API/Event/Event
+*/
+e.target.dispatchEvent(new Event("change", { bubbles: true }));
+}
+// Selection events from https://select2.org/programmatic-control/events
+$(".django-select2").on("select2:select", showEvent);
+$(".django-select2").on("select2:unselect", showEvent);
+$(".django-select2").on("select2:clear", showEvent);
- // Init target tooltips
- var tooltipTriggerList = [].slice.call(
- target.parentNode.querySelectorAll('[data-bs-toggle="tooltip"]')
- );
- tooltipTriggerList.map(function (tooltipTriggerEl) {
- return new bootstrap.Tooltip(tooltipTriggerEl);
- });
+// Init target tooltips
+var tooltipTriggerList = [].slice.call(
+target.parentNode.querySelectorAll('[data-bs-toggle="tooltip"]')
+);
+tooltipTriggerList.map(function (tooltipTriggerEl) {
+return new bootstrap.Tooltip(tooltipTriggerEl);
+});
});
Du coup je serais plutôt partant de rajouter un hook (prettier?) + config propre au projet, car là c'est manifestement ma config globale qui a pris le dessus
itou/templates/apply/includes/buttons/rdv_insertion_invite.html
Outdated
Show resolved
Hide resolved
itou/templates/apply/includes/buttons/rdv_insertion_invite.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J’ai un bug d’UI avec les STR suivants:
- sans avoir configuré RDV-I, juste l’ID de la structure sur garage martinet
- proposer un RDV (échec)
- Le bouton Réessayer un envoi s’affiche, avec le tooltip
- Cliquer sur Réessayer un envoi
- Le bouton « Réessayer un envoi » s’affiche à nouveau
En scrollant vers le bas, le tooltip du premier bouton apparaît en haut à gauche de l’écran. Il aurait dû disparaître.
Screencast.from.2024-08-27.16-51-10.webm
itou/templates/apply/includes/buttons/rdv_insertion_invite.html
Outdated
Show resolved
Hide resolved
a2af14b
to
7a57ef1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le commit de prise en compte des remarques me semble bien. J’ai refait un micro tour sur la PR 👍
itou/templates/apply/includes/buttons/rdv_insertion_invite.html
Outdated
Show resolved
Hide resolved
555e34b
to
b2ae1fc
Compare
b2ae1fc
to
d29ed17
Compare
🤔 Pourquoi ?
Faciliter l’expérience de recrutement des employeurs. Leur permettre d’inviter par mail/sms des candidats à prendre rdv avec eux depuis les emplois.
🍰 Comment ?
Mise en place d'un bouton permettant d'inviter un candidat à prendre rendez-vous avec le SIAE par l'intermédiaire de RDV Insertion.
🏝️ Comment tester
S'inscrire en tant que candidat avec un email valide
Puis postuler auprès d'un SIAE
En tant qu'employeur de ce SIAE, s'assurer que l'ID d'organisation RDV-I est bien défini en admin (
654
pour la démo)Puis parcourir la liste des candidatures et inviter le candidat à prendre RDV
En tant que candidat, je reçois un mail d'invitation de la part de RDV-I
💻 Captures d'écran