Skip to content
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

Candidature : postuler pour un candidat depuis l'espace "Mes candidats" #4860

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

EwenKorr
Copy link
Contributor

@EwenKorr EwenKorr commented Oct 1, 2024

🤔 Pourquoi ?

ETQU, lorsque je clique sur le bouton postuler depuis une ligne de la liste candidat ou depuis une page de détail d’un candidat,

je peux faire une recherche d’emploi et postuler sans avoir à renseigner l’adresse e-mail, le NIR du candidat ou les informations personnelles du candidat.

🍰 Comment ?

On passe l'identifiant public du candidat en paramètre GET (job_seeker=UUID).
Une mixin permet d'ajouter aux vues utilisées la variable job_seeker dans le contexte, si l'utilisateur connecté a la permission (user.can_view_personal_info). Quand cette variable existe, les URLs utilisées contiennent paramètre GET, et un bandeau d'information rappelle que l'on postule pour un candidat.

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?

🏝️ Comment tester

En tant que prescripteur : aller sur Candidats > Postuler pour ce candidat.

En tant qu'employeur(-orienteur) (ETTI Une nouvelle chance dans les données de démo) :
Bloc Orientation (sur le tableau de bord) > Candidats > cliquer sur le nom du candidat pour aller sur sa fiche > Postuler pour ce candidat.

💻 Captures d'écran

@EwenKorr EwenKorr added the ajouté Ajouté dans le changelog. label Oct 1, 2024
@EwenKorr EwenKorr self-assigned this Oct 1, 2024
@EwenKorr EwenKorr changed the title Candidature : postuler pour un candidat depuis l'espace "Mes candiats" Candidature : postuler pour un candidat depuis l'espace "Mes candidats" Oct 1, 2024
@EwenKorr EwenKorr force-pushed the ewen/postuler-mes-candidats branch 4 times, most recently from fa19835 to 5f62cce Compare October 4, 2024 10:21
@EwenKorr EwenKorr added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Oct 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

@EwenKorr EwenKorr force-pushed the ewen/postuler-mes-candidats branch 2 times, most recently from 5cad6b6 to 17d7693 Compare October 4, 2024 12:21
@EwenKorr EwenKorr marked this pull request as ready for review October 4, 2024 12:46
Copy link
Contributor

@tonial tonial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ça m'a l'air très efficace comme solution :)

Le mixin mérite d'être retravaillé je pense pour gérer la gestion de l'argument au début et non à la fin du traitement de la requête

itou/templates/companies/job_description_card.html Outdated Show resolved Hide resolved
itou/templates/search/includes/siaes_search_content.html Outdated Show resolved Hide resolved
itou/www/apply/views/submit_views.py Outdated Show resolved Hide resolved
itou/www/apply/views/submit_views.py Outdated Show resolved Hide resolved
tests/www/companies_views/test_card_views.py Outdated Show resolved Hide resolved
tests/www/companies_views/test_card_views.py Outdated Show resolved Hide resolved
tests/www/geiq_views/__snapshots__/tests.ambr Outdated Show resolved Hide resolved
itou/templates/companies/includes/_company_info.html Outdated Show resolved Hide resolved
tests/www/search/tests.py Outdated Show resolved Hide resolved
@EwenKorr EwenKorr removed the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Oct 6, 2024
@EwenKorr EwenKorr force-pushed the ewen/postuler-mes-candidats branch 7 times, most recently from 0bbb5f5 to 8a3b6d5 Compare October 15, 2024 08:53
@EwenKorr EwenKorr requested a review from tonial October 15, 2024 09:04
itou/www/apply/views/submit_views.py Outdated Show resolved Hide resolved
itou/www/apply/views/submit_views.py Outdated Show resolved Hide resolved
itou/www/apply/views/submit_views.py Outdated Show resolved Hide resolved
itou/www/apply/views/submit_views.py Outdated Show resolved Hide resolved
@EwenKorr EwenKorr added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Oct 17, 2024
Copy link

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

@EwenKorr EwenKorr force-pushed the ewen/postuler-mes-candidats branch 2 times, most recently from 2821e15 to 8c8f6f7 Compare October 18, 2024 06:11
querystring.update(kwargs)
return urlunsplit(parsed._replace(query=querystring.urlencode()))
querystring.update(cleaned_kwargs)
return urlunsplit(parsed._replace(query=querystring.urlencode("/")))
Copy link
Contributor

@tonial tonial Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai un doute sur ce "/" : avant on passait back_url par le filtre urlencode qui avait bien ce paramètre par défaut, mais je me demande si on ne devrait pas le changer (et utiliser le template tag partout à la place de des {% if back_url %} que j'avais essaimé dans le code).
(pas pour cette PR, plus en tant que refléxion pour un nettoyage future)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai cru remarquer que la gestion de l'encodage des URLs dans les templates mérite un peu de nettoyage en effet.
Django 5.1 avec son nouveau template tag querystring tombe à point nommé (cf #4943)

itou/www/apply/views/submit_views.py Show resolved Hide resolved
Copy link
Contributor

@tonial tonial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ça me semble très bien !
Je te laisse regarder mes derniers commentaires si tu les trouves pertinents

@EwenKorr EwenKorr force-pushed the ewen/postuler-mes-candidats branch 2 times, most recently from 6549146 to 61177f2 Compare October 21, 2024 12:41
- added a link in job seekers list ("Mes candidats")
  and in job seeker details page to apply in the
  name of a specific job seeker
- all the links up to `apply:start` have been updated
  with a GET param (`job_seeker={public_id}`), this
  allows to keep track of the job seeker we are
  applying for
- when a `job_seeker` GET param is present, and when
  the current `user` is allowed to, an alert is
  displayed at the top of the page to remind that
  we're applying for this job seeker
When visiting `apply:start`, if a job_seeker GET param
is set, go directly to ApplicationJobsView
@EwenKorr EwenKorr added this pull request to the merge queue Oct 22, 2024
Merged via the queue into master with commit 4c2899e Oct 22, 2024
9 checks passed
@EwenKorr EwenKorr deleted the ewen/postuler-mes-candidats branch October 22, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC ajouté Ajouté dans le changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants