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

Création de compte candidat : remise à plat des query params pour les vues Update #5357

Merged
merged 4 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion itou/templates/apply/submit/application/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="mb-0 me-3 text-md-nowrap">{% include 'apply/includes/_submit_title.ht
<p>
Dernière actualisation du profil : {{ job_seeker.last_checked_at|date }} à {{ job_seeker.last_checked_at|time }}
{% if can_view_personal_information and not request.user.is_job_seeker %}
<a class="btn-link ms-3" href="{% url "job_seekers_views:update_job_seeker_start" %}{% querystring job_seeker=job_seeker.public_id company=siae.pk from_url=request.get_full_path|urlencode %}">Vérifier le profil</a>
<a class="btn-link ms-3" href="{% url "job_seekers_views:update_job_seeker_start" %}{% querystring job_seeker=job_seeker.public_id from_url=request.get_full_path|urlencode %}">Vérifier le profil</a>
{% endif %}
{% if new_check_needed %}<i class="ri-information-line ri-xl text-warning"></i>{% endif %}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ <h1 class="mb-0 me-3 text-md-nowrap">Informations personnelles de {{ job_seeker.
<div class="c-box my-4">
<h2>
Informations personnelles
<a class="btn btn-outline-primary float-end"
href="{% url "job_seekers_views:update_job_seeker_start" %}{% querystring job_seeker=job_seeker.public_id company=siae.pk from_url=request.get_full_path|urlencode %}">Mettre à jour</a>
<a class="btn btn-outline-primary float-end" href="{% url "job_seekers_views:update_job_seeker_start" %}{% querystring job_seeker=job_seeker.public_id from_url=request.get_full_path|urlencode %}">Mettre à jour</a>
</h2>

{% include "apply/includes/profile_infos.html" %}
Expand Down
9 changes: 2 additions & 7 deletions itou/www/apply/views/submit_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,11 @@
from itou.users.models import User
from itou.utils.session import SessionNamespace
from itou.utils.urls import add_url_params
from itou.www.apply.forms import (
ApplicationJobsForm,
SubmitJobApplicationForm,
)
from itou.www.apply.forms import ApplicationJobsForm, SubmitJobApplicationForm
from itou.www.apply.views import common as common_views, constants as apply_view_constants
from itou.www.eligibility_views.forms import AdministrativeCriteriaForm
from itou.www.geiq_eligibility_views.forms import GEIQAdministrativeCriteriaForm
from itou.www.job_seekers_views.forms import (
CreateOrUpdateJobSeekerStep2Form,
)
from itou.www.job_seekers_views.forms import CreateOrUpdateJobSeekerStep2Form


logger = logging.getLogger(__name__)
Expand Down
10 changes: 3 additions & 7 deletions itou/www/job_seekers_views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,9 @@ def setup(self, request, *args, **kwargs):
except ValidationError:
raise Http404("Aucun candidat n'a été trouvé")

try:
company = get_object_or_404(Company.objects.with_has_active_members(), pk=request.GET.get("company"))
except ValueError:
raise Http404("Aucune entreprise n'a été trouvée")

from_url = get_safe_url(request, "from_url", fallback_url=reverse("dashboard:index"))
from_url = get_safe_url(request, "from_url")
if not from_url:
raise Http404

if request.user.is_job_seeker or not request.user.can_view_personal_information(job_seeker):
raise PermissionDenied("Votre utilisateur n'est pas autorisé à vérifier les informations de ce candidat")
Expand All @@ -790,7 +787,6 @@ def setup(self, request, *args, **kwargs):
data={
"config": {"from_url": from_url, "session_kind": "job-seeker-update"},
"job_seeker_pk": job_seeker.pk,
"apply": {"company_pk": company.pk},
},
)

Expand Down
5 changes: 5 additions & 0 deletions migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ Cette migration est problématique quand la modale est liée à un `{% include %
car on ne peut pas avoir des `{% include %}` et des `{% block %}`, mais devrait
éviter des problèmes de `z-index` lorsque le *markup* de la modale est dans un
élément avec `z-index` différent.

## Extraction du parcours de recherche/création/modification de compte candidat
Historiquement, la création de compte candidat par un prescripteur ou un employeur était rattachée au processus de candidature.
Nous voulons à présent déconnecter les deux processus.
Trois applications sont impactées : `job_seekers_views`, `apply` et `gps`.
Loading
Loading