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
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: 2 additions & 0 deletions itou/common_apps/address/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ def geocoding_address(self):
@property
def city_slug(self):
"""For cities.city matching / search"""
if not self.city or not self.department:
return ""
return slugify(f"{self.city}-{self.department}")

@cached_property
Expand Down
39 changes: 39 additions & 0 deletions itou/fixtures/django/05_test_users.json
Original file line number Diff line number Diff line change
Expand Up @@ -1051,5 +1051,44 @@
},
"model": "users.user",
"pk": 29
},
{
"fields": {
"address_filled_at": null,
EwenKorr marked this conversation as resolved.
Show resolved Hide resolved
"address_line_1": "7 Rue Judaïque",
"address_line_2": "",
"ban_api_resolved_address": "7 Rue Judaïque 33000 Bordeaux",
"city": "Bordeaux",
"coords": "SRID=4326;POINT (-0.581538 44.841654)",
"created_by": 3,
"date_joined": "2024-10-04T05:55:52.147Z",
"department": "33",
"email": "[email protected]",
"external_data_source_history": null,
"first_login": null,
"first_name": "Julie",
"geocoding_score": 0.9861654545454543,
"geocoding_updated_at": null,
"groups": [],
"has_completed_welcoming_tour": false,
"identity_provider": "DJANGO",
"insee_city": null,
"is_active": true,
"is_staff": false,
"is_superuser": false,
"kind": "job_seeker",
"last_checked_at": "2024-10-04T05:55:52.147Z",
"last_login": null,
"last_name": "TIBO",
"password": "!tPrUo20WjlqhW3gQguRBS92jiiOCShriRvlN9QHc",
"phone": "",
"post_code": "33000",
"public_id": "c8bc7388-8a9e-480d-8ad6-25bab7be9523",
"title": "MME",
"user_permissions": [],
"username": "job_seeker_sent_by_company"
},
"model": "users.user",
"pk": 47
}
]
35 changes: 35 additions & 0 deletions itou/fixtures/django/07_jobseeker_profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,5 +313,40 @@
},
"model": "users.jobseekerprofile",
"pk": 26
},
{
"fields": {
"aah_allocation_since": "",
"asp_uid": "f403018e1423501927500c8bdf79bb",
"ass_allocation_since": "",
"ata_allocation_since": "",
"birth_country": 91,
"birth_place": 26973,
"birthdate": "2005-05-03",
"education_level": "40",
"has_rsa_allocation": "NON",
"hexa_additional_address": "",
"hexa_commune": null,
"hexa_lane_name": "",
"hexa_lane_number": "",
"hexa_lane_type": "",
"hexa_non_std_extension": "",
"hexa_post_code": "",
"hexa_std_extension": "",
"lack_of_nir_reason": "",
"lack_of_pole_emploi_id_reason": "NOT_REGISTERED",
"nir": "205056929022109",
"oeth_employee": false,
"pe_last_certification_attempt_at": null,
"pe_obfuscated_nir": null,
"pole_emploi_id": "",
"pole_emploi_since": "",
"resourceless": false,
"rqth_employee": false,
"rsa_allocation_since": "",
"unemployed_since": "04"
},
"model": "users.jobseekerprofile",
"pk": 47
}
]
106 changes: 106 additions & 0 deletions itou/fixtures/django/24_job_applications.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,112 @@
"model": "job_applications.jobapplication",
"pk": "4edf8044-b892-4167-b872-f2ef5ac9e05f"
},
{
"fields": {
"answer": "",
"answer_to_prescriber": "",
"approval": null,
"approval_delivery_mode": "",
"approval_manually_delivered_by": null,
"approval_manually_refused_at": null,
"approval_manually_refused_by": null,
"approval_number_sent_at": null,
"approval_number_sent_by_email": false,
"archived_at": null,
"archived_by": null,
"contract_type": "",
"contract_type_details": "",
"create_employee_record": true,
"created_at": "2024-10-10T08:22:06.278Z",
"diagoriente_invite_sent_at": null,
"eligibility_diagnosis": null,
"geiq_eligibility_diagnosis": null,
"hired_job": null,
"hiring_end_at": null,
"hiring_start_at": null,
"hiring_without_approval": false,
"inverted_vae_contract": null,
"job_seeker": 47,
"message": "Julie est très motivée.",
"nb_hours_per_week": null,
"origin": "default",
"planned_training_hours": null,
"prehiring_guidance_days": null,
"processed_at": null,
"qualification_level": "",
"qualification_type": "",
"refusal_reason": "",
"refusal_reason_shared_with_job_seeker": false,
"resume_link": "",
"selected_jobs": [],
"sender": 7,
"sender_company": null,
"sender_kind": "prescriber",
"sender_prescriber_organization": 121,
"state": "new",
"to_company": 3855,
"transferred_at": null,
"transferred_by": null,
"transferred_from": null,
"updated_at": "2024-10-10T08:22:06.279Z"
},
"model": "job_applications.jobapplication",
"pk": "4fd07a20-a8f5-4d19-9b7c-84de3f76dc2a"
},
{
"fields": {
"answer": "",
"answer_to_prescriber": "",
"approval": null,
"approval_delivery_mode": "",
"approval_manually_delivered_by": null,
"approval_manually_refused_at": null,
"approval_manually_refused_by": null,
"approval_number_sent_at": null,
"approval_number_sent_by_email": false,
"archived_at": null,
"archived_by": null,
"contract_type": "",
"contract_type_details": "",
"create_employee_record": true,
"created_at": "2024-10-04T05:57:12.474Z",
"diagoriente_invite_sent_at": null,
"eligibility_diagnosis": null,
"geiq_eligibility_diagnosis": null,
"hired_job": null,
"hiring_end_at": null,
"hiring_start_at": null,
"hiring_without_approval": false,
"inverted_vae_contract": null,
"job_seeker": 47,
"message": "Je suis très motivée.",
"nb_hours_per_week": null,
"origin": "default",
"planned_training_hours": null,
"prehiring_guidance_days": null,
"processed_at": null,
"qualification_level": "",
"qualification_type": "",
"refusal_reason": "",
"refusal_reason_shared_with_job_seeker": false,
"resume_link": "",
"selected_jobs": [
4
],
"sender": 4,
"sender_company": 2653,
"sender_kind": "employer",
"sender_prescriber_organization": null,
"state": "new",
"to_company": 3851,
"transferred_at": null,
"transferred_by": null,
"transferred_from": null,
"updated_at": "2024-10-04T05:57:12.474Z"
},
"model": "job_applications.jobapplication",
"pk": "5e074295-bc38-4ce5-b684-f674b2be1a74"
},
{
"fields": {
"answer": "Bonjour, \r\n\r\nNous vous remercions de votre candidature et nous avons le plaisir de vous faire savoir que vous êtes désormais membre de \"l'équipe A\" du Garage Martinet.",
Expand Down
14 changes: 14 additions & 0 deletions itou/templates/apply/includes/applying_for_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% load str_filters %}

<div class="alert alert-primary fade show" role="status">
<div class="d-flex flex-row justify-content-between align-items-center">
<p class="mb-0 text-start">
<i class="ri-arrow-right-line fw-bold pe-2" aria-hidden="true"></i>
<strong>Vous postulez actuellement pour {{ job_seeker.get_full_name|mask_unless:can_view_personal_information }}</strong>
</p>
<a href="{{ exit_url }}" class="btn-link-white btn-ico align-items-center" aria-label="Quitter la procédure">
<i class="ri-close-line ri-xl fw-medium me-1" aria-hidden="true"></i>
<span class="fs-sm fw-medium">Quitter</span>
</a>
</div>
</div>
14 changes: 12 additions & 2 deletions itou/templates/companies/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
{% load str_filters %}
{% load matomo %}
{% load markdownify %}
{% load url_add_query %}

{% block title %}{{ siae.display_name }} {{ block.super }}{% endblock %}

{% block global_messages %}
{{ block.super }}
{% if job_seeker %}
{% include "apply/includes/applying_for_banner.html" with job_seeker=job_seeker can_view_personal_information=can_view_personal_information %}
{% endif %}
{% endblock %}

{% block title_prevstep %}
{% include "layout/previous_step.html" with back_url=back_url only %}
{% endblock %}
Expand All @@ -32,7 +40,8 @@ <h2 class="visually-hidden">Actions rapides</h2>
</div>
{% else %}
<div class="form-group col-12 col-lg-auto">
<a href="{% url 'apply:start' company_pk=siae.pk %}"
{% url 'apply:start' company_pk=siae.pk as apply_url %}
<a href="{% url_add_query apply_url job_seeker=job_seeker.public_id|default:"" %}"
class="btn btn-lg btn-white btn-block btn-ico"
{% matomo_event "candidature" "clic" "start_application" %}
aria-label="Postuler auprès de l'employeur inclusif {{ siae.display_name }}">
Expand Down Expand Up @@ -191,8 +200,9 @@ <h2 class="visually-hidden" id="metiers-title">Métiers de la structure</h2>
</div>
{% else %}
<div class="d-flex justify-content-end mt-3">
{% url 'apply:start' company_pk=siae.pk as apply_url %}
<a class="btn btn-primary btn-ico flex-grow-1 flex-lg-grow-0"
href="{% url 'apply:start' company_pk=siae.pk %}"
href="{% url_add_query apply_url job_seeker=job_seeker.public_id|default:"" %}"
{% matomo_event "candidature" "clic" "start_application" %}
aria-label="Postuler auprès de l'employeur inclusif {{ siae.display_name }}">
<i class="ri-draft-line"></i>
Expand Down
7 changes: 5 additions & 2 deletions itou/templates/companies/includes/_card_jobdescription.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% load static %}
{% load matomo %}
{% load url_add_query %}

{% comment %} takes argument siae <Siae>{% endcomment %}
<div class="c-box c-box--results has-links-inside my-3 my-md-4">
Expand All @@ -10,7 +11,9 @@
<i class="ri-community-line fw-medium me-1" aria-hidden="true"></i>
<span class="fw-bold">{{ job_description.market_context_description | default:"Entreprise anonyme" }}</span>
{% else %}
<a href="{{ job_description.company.get_card_url }}?back_url={{ request.get_full_path|urlencode }}" class="btn-ico btn-link" {% matomo_event "candidature" "clic" "clic-structure-fichedeposte" %}>
<a href="{% url_add_query job_description.company.get_card_url job_seeker=job_seeker.public_id|default:'' back_url=request.get_full_path %}"
class="btn-ico btn-link"
{% matomo_event "candidature" "clic" "clic-structure-fichedeposte" %}>
<i class="ri-community-line fw-medium" aria-hidden="true"></i>
<span>{{ job_description.company.kind }} - {{ job_description.company.display_name }}</span>
</a>
Expand All @@ -29,7 +32,7 @@
<li class="list-group-item list-group-item-action">
<div class="d-flex flex-column flex-md-row justify-content-md-between">
<div class="order-2 order-md-1">
<a href="{{ job_description.get_absolute_url }}?back_url={{ request.get_full_path|urlencode }}"
<a href="{% url_add_query job_description.get_absolute_url job_seeker=job_seeker.public_id|default:'' back_url=request.get_full_path %}"
class="fw-bold text-decoration-none {% if job_description.is_external %}has-external-link{% else %}stretched-link{% endif %}"
{% if job_description.is_external %} {% matomo_event "candidature" "clic" "clic-card-fichedeposte-externe" %} rel="noopener" target="_blank" aria-label="Visiter l'offre sur le site d'origine" {% else %} {% matomo_event "candidature" "clic" "clic-card-fichedeposte" %} aria-label="Aller vers la description de ce poste" {% endif %}>
{{ job_description.display_name | capfirst }}
Expand Down
9 changes: 6 additions & 3 deletions itou/templates/companies/includes/_card_siae.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% load matomo %}
{% load str_filters %}
{% load url_add_query %}

{% comment %} takes argument siae <Siae>{% endcomment %}
<div class="c-box c-box--results has-links-inside mb-3 mb-md-4">
Expand Down Expand Up @@ -51,7 +52,7 @@ <h3>{{ siae.display_name }}</h3>
</div>
{% else %}
<div>
<a href="{{ siae.get_card_url }}?back_url={{ request.get_full_path|urlencode }}"
<a href="{% url_add_query siae.get_card_url job_seeker=job_seeker.public_id|default:'' back_url=request.get_full_path %}"
class="btn btn-outline-primary btn-block w-100 w-md-auto white-space-nowrap"
{% matomo_event "candidature" "clic" "clic-structure" %}>Voir la fiche de l'entreprise</a>
</div>
Expand All @@ -77,8 +78,9 @@ <h3>{{ siae.display_name }}</h3>
<div class="c-box--results__body">
<div class="d-flex flex-column flex-md-row justify-content-md-between align-items-md-center">
<p class="mb-3 mb-md-0">Cette structure vous intéresse ?</p>
{% url 'apply:start' company_pk=siae.pk as apply_url %}
<a class="btn btn-ico btn-primary"
href="{% url 'apply:start' company_pk=siae.pk %}"
href="{% url_add_query apply_url job_seeker=job_seeker.public_id|default:'' %}"
{% matomo_event "candidature" "clic" "start_application" %}
aria-label="Postuler auprès de l'employeur inclusif {{ siae.display_name }}">
<i class="ri ri-draft-line" aria-hidden="true"></i>
Expand Down Expand Up @@ -153,8 +155,9 @@ <h3>{{ siae.display_name }}</h3>
<div class="c-box--results__footer">
<div class="d-flex flex-column flex-md-row justify-content-md-between align-items-md-center">
<p class="mb-3 mb-md-0">Cette structure vous intéresse ?</p>
{% url 'apply:start' company_pk=siae.pk as apply_url %}
<a class="btn btn-ico btn-primary"
href="{% url 'apply:start' company_pk=siae.pk %}"
href="{% url_add_query apply_url job_seeker=job_seeker.public_id|default:'' %}"
{% matomo_event "candidature" "clic" "start_application" %}
aria-label="Postuler auprès de l'employeur inclusif {{ siae.display_name }}">
<i class="ri ri-draft-line" aria-hidden="true"></i>
Expand Down
12 changes: 9 additions & 3 deletions itou/templates/companies/includes/_company_info.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% load url_add_query %}

<div class="c-box c-box--structure {{ extra_box_class|default:'' }}">
<div class="c-box--structure__summary" data-bs-toggle="collapse" data-bs-target="#collapseBoxStructure" aria-expanded="{{ show|default:False|yesno:'true,false' }}" aria-controls="collapseBoxStructure">
<i class="ri-community-line"></i>
Expand All @@ -22,9 +24,13 @@ <h3>{{ company.display_name }}</h3>
<a href="{% url 'apply:job_application_external_transfer_step_1_company_card' job_application_id=job_app_to_transfer company_pk=company.pk %}{% if back_url|default:"" %}?back_url={{ back_url|urlencode }}{% endif %}"
class="btn btn-secondary btn-block mt-4">Voir la fiche de l'entreprise</a>
{% else %}
<a href="{% url 'companies_views:card' siae_id=company.pk %}{% if back_url|default:"" and not open_in_tab|default:False %}?back_url={{ back_url|urlencode }}{% endif %}"
class="btn btn-secondary btn-block mt-4"
{% if open_in_tab|default:False %}target="_blank"{% endif %}>Voir la fiche de l'entreprise</a>
{% url 'companies_views:card' siae_id=company.pk as company_url %}
{% if back_url|default:'' and not open_in_tab|default:False %}
{% url_add_query company_url job_seeker=job_seeker.public_id|default:'' back_url=back_url as company_url_params %}
{% else %}
{% url_add_query company_url job_seeker=job_seeker.public_id|default:'' as company_url_params %}
{% endif %}
<a href="{{ company_url_params }}" class="btn btn-secondary btn-block mt-4" {% if open_in_tab|default:False %}target="_blank"{% endif %}>Voir la fiche de l'entreprise</a>
{% endif %}
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{% load matomo %}
{% load url_add_query %}

<li class="list-group-item list-group-item-action">
<div>
{% if job_app_to_transfer|default:False %}
<a href="{% if job.pk %}{% url 'apply:job_application_external_transfer_step_1_job_description_card' job_application_id=job_app_to_transfer.pk job_description_id=job.pk %}{% else %}#{% endif %}?back_url={{ request.get_full_path|urlencode }}"
class="fw-bold text-decoration-none stretched-link">{{ job.display_name }}</a>
{% else %}
<a href="{% if job.pk %}{{ job.get_absolute_url }}{% else %}#{% endif %}?back_url={{ request.get_full_path|urlencode }}"
class="fw-bold text-decoration-none stretched-link"
{% matomo_event "candidature" "clic" "clic-metiers" %}>{{ job.display_name }}</a>
{% if job.pk %}
{% url_add_query job.get_absolute_url job_seeker=job_seeker.public_id|default:'' back_url=request.get_full_path as job_url %}
{% else %}
{% url_add_query "#" job_seeker=job_seeker.public_id|default:'' back_url=request.get_full_path as job_url %}
{% endif %}
<a href="{{ job_url }}" class="fw-bold text-decoration-none stretched-link" {% matomo_event "candidature" "clic" "clic-metiers" %}>{{ job.display_name }}</a>
{% endif %}
{% if job.is_popular %}
<span class="badge badge-sm rounded-pill bg-accent-03 text-primary">
Expand Down
3 changes: 2 additions & 1 deletion itou/templates/companies/includes/_siae_jobdescription.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load matomo %}
{% load url_add_query %}

<li class="list-group-item list-group-item-action">
<div class="d-flex align-items-center">
Expand All @@ -9,7 +10,7 @@
class="fw-bold stretched-link order-2 order-md-1">{{ job.display_name }}</a>

{% else %}
<a href="{{ job.get_absolute_url }}?back_url={% if back_url %}{{ back_url|urlencode }}{% else %}{{ request.get_full_path|urlencode }}{% endif %}"
<a href="{% url_add_query job.get_absolute_url job_seeker=job_seeker.public_id|default:"" back_url=back_url|default:request.get_full_path %}"
class="fw-bold stretched-link order-2 order-md-1"
{% matomo_event "candidature" "clic" "clic-metiers" %}>{{ job.display_name }}</a>
{% endif %}
Expand Down
Loading