From 90c56cbcb9103fa8a12056c2cc198cd0ccb51abc Mon Sep 17 00:00:00 2001 From: hellodeloo Date: Thu, 28 Mar 2024 14:31:44 +0100 Subject: [PATCH] feat: update siae evaluations templates --- itou/static/css/itou.css | 8 - .../siae_evaluations/campaign_calendar.html | 8 +- .../includes/criterion_infos.html | 61 ++--- .../includes/criterion_validation.html | 73 +++--- .../job_seeker_infos_for_institution.html | 51 ++-- .../includes/job_seeker_infos_for_siae.html | 47 ++-- .../siae_evaluations/includes/list_item.html | 131 +++++----- .../siae_evaluations/includes/siae_infos.html | 39 ++- ...institution_evaluated_job_application.html | 112 +++++---- .../institution_evaluated_siae_detail.html | 151 ++++++------ .../institution_evaluated_siae_list.html | 75 +++--- .../siae_job_applications_list.html | 79 +++--- .../siae_evaluations/siae_upload_doc.html | 8 - itou/www/siae_evaluations_views/views.py | 3 - tests/siae_evaluations/factories.py | 5 + .../test_institutions_views.ambr | 232 +++++++++++++----- .../test_institutions_views.py | 187 ++++++++------ .../test_siaes_views.py | 145 ++++++----- 18 files changed, 776 insertions(+), 639 deletions(-) diff --git a/itou/static/css/itou.css b/itou/static/css/itou.css index 1c8f794b8c..8eb978c551 100644 --- a/itou/static/css/itou.css +++ b/itou/static/css/itou.css @@ -339,14 +339,6 @@ an input field being invalid, generating an uncontrolled red box-shadow. */ } } -.scrolldown-anchor { - /* navigation : class to force the scroll down and avoid the banner to hide the map */ - display: block; - position: relative; - top: -130px; - visibility: hidden; -} - .approval-left-border { border-left-width: 3px !important; } diff --git a/itou/templates/siae_evaluations/campaign_calendar.html b/itou/templates/siae_evaluations/campaign_calendar.html index b83ad2f47d..f22e238520 100644 --- a/itou/templates/siae_evaluations/campaign_calendar.html +++ b/itou/templates/siae_evaluations/campaign_calendar.html @@ -15,13 +15,7 @@

Calendrier

-
- {{ campaign_calendar_html|safe }} - -

- Retour -

-
+
{{ campaign_calendar_html|safe }}
diff --git a/itou/templates/siae_evaluations/includes/criterion_infos.html b/itou/templates/siae_evaluations/includes/criterion_infos.html index 406b79dac9..8119030dcf 100644 --- a/itou/templates/siae_evaluations/includes/criterion_infos.html +++ b/itou/templates/siae_evaluations/includes/criterion_infos.html @@ -1,39 +1,22 @@ -
-
-

{{ criteria.name }}

-
-
- {% if review_state == "ACCEPTED" %} -

- Validé -

- {% elif review_state == "REFUSED" or review_state == "REFUSED_2" %} -

- Refusé -

- {% endif %} -
-
-
-
- {% if criteria.written_proof %} -

- Pièce justificative : - {{ criteria.written_proof }} -

- {% endif %} - {% if criteria.written_proof_validity %} -

- Durée de validité du justificatif : - {{ criteria.written_proof_validity }} -

- {% endif %} - {% if criteria.written_proof_url %} -

- - {{ criteria.written_proof_url }} - -

- {% endif %} -
-
+{% if review_state == "ACCEPTED" %} + Validé +
+{% elif review_state == "REFUSED" or review_state == "REFUSED_2" %} + Refusé +
+{% endif %} +{{ criteria.name }} +
+ diff --git a/itou/templates/siae_evaluations/includes/criterion_validation.html b/itou/templates/siae_evaluations/includes/criterion_validation.html index 5247ee73d3..626d39ee90 100644 --- a/itou/templates/siae_evaluations/includes/criterion_validation.html +++ b/itou/templates/siae_evaluations/includes/criterion_validation.html @@ -1,45 +1,34 @@ -
-
-
- - {% if can_edit_proof %} - {% if evaluated_administrative_criteria.review_state == 'PENDING' %} -
-
- {% csrf_token %} - -
-
-
-
- {% csrf_token %} - -
-
- {% else %} -
-
- {% csrf_token %} - -
-
- {% endif %} + + {% if can_edit_proof %} +
+ {% if evaluated_administrative_criteria.review_state == 'PENDING' %} +
+ {% csrf_token %} + +
+
+ {% csrf_token %} + +
+ {% else %} +
+ {% csrf_token %} + +
+ {% endif %} +
+ {% endif %}
diff --git a/itou/templates/siae_evaluations/includes/job_seeker_infos_for_institution.html b/itou/templates/siae_evaluations/includes/job_seeker_infos_for_institution.html index 81b2f4f6a2..79784a372a 100644 --- a/itou/templates/siae_evaluations/includes/job_seeker_infos_for_institution.html +++ b/itou/templates/siae_evaluations/includes/job_seeker_infos_for_institution.html @@ -1,64 +1,63 @@ {% load format_filters %} -
-
-

- Auto-prescription pour - {{ job_seeker.get_full_name }} -

-

- PASS IAE : {{ approval.number|format_approval_number }} délivré le {{ approval.start_at|date:"d E Y" }} -

+ +
+
+ +
+

PASS IAE {{ approval.number|format_approval_number }} délivré le {{ approval.start_at|date:"d E Y" }}

+ {{ job_seeker.get_full_name }} +
-
+
{% if evaluated_siae.evaluation_is_final %} {% if state == "PENDING" %} -

Non téléversés

+ Non téléversés {% elif state == "PROCESSING" %} -

Téléversement incomplet

+ Téléversement incomplet {% elif state == "UPLOADED" %} -

Justificatifs téléversés

+ Justificatifs téléversés {% elif state == "SUBMITTED" %} -

Justificatifs non contrôlés

+ Justificatifs non contrôlés {% elif state == "ACCEPTED" %} -

Validé

+ Validé {% elif state == "REFUSED" or state == "REFUSED_2" %} -

Problème constaté

+ Problème constaté {% endif %} {% else %} {% if state == "PENDING" or state == "PROCESSING" %} {% if evaluated_siae.submission_freezed_at %} -

Justificatifs non transmis

+ Justificatifs non transmis {% else %} -

En attente

+ En attente {% endif %} {% elif state == "UPLOADED" %} {% if evaluated_siae.submission_freezed_at %} -

Justificatifs non transmis

+ Justificatifs non transmis {% else %} -

Justificatifs téléversés

+ Justificatifs téléversés {% endif %} {% elif state == "SUBMITTED" %} -

+ {% if reviewed_at %} Nouveaux justificatifs à traiter {% else %} À traiter {% endif %} -

+ {% elif state == "ACCEPTED" %} -

Validé

+ Validé {% elif state == "REFUSED" %} {% if reviewed_at %} -

Phase contradictoire - En attente

+ Phase contradictoire - En attente {% else %} {% comment %} Show “Problème constaté” until the review is submitted, which starts the “phase contradictoire” (tracked by the reviewed_at field). {% endcomment %} -

Problème constaté

+ Problème constaté {% endif %} {% elif state == "REFUSED_2" %} -

Problème constaté

+ Problème constaté {% endif %} {% endif %}
diff --git a/itou/templates/siae_evaluations/includes/job_seeker_infos_for_siae.html b/itou/templates/siae_evaluations/includes/job_seeker_infos_for_siae.html index 0fc6952521..a6e49bca81 100644 --- a/itou/templates/siae_evaluations/includes/job_seeker_infos_for_siae.html +++ b/itou/templates/siae_evaluations/includes/job_seeker_infos_for_siae.html @@ -1,47 +1,40 @@ {% load format_filters %} -
-
-

- Auto-prescription pour - {{ job_seeker.get_full_name }} -

+ +
+
+ +
+

PASS IAE {{ approval.number|format_approval_number }} délivré le {{ approval.start_at|date:"d E Y" }}

+ {{ job_seeker.get_full_name }} +
-
+
{% if state == "REFUSED_2" %} -

problème constaté

- + Problème constaté {% elif reviewed_at %} {% if state == "ACCEPTED" %} -

validé

+ Validé {% elif state == "UPLOADED" %} -

justificatifs téléversés

+ Justificatifs téléversés {% elif state == "SUBMITTED" %} -

transmis

+ Transmis {% elif state == "REFUSED" %} -

problème constaté

+ Problème constaté {% elif state == "PROCESSING" %} -

à traiter

+ À traiter {% else %} -

nouveaux justificatifs à traiter

+ Nouveaux justificatifs à traiter {% endif %} - {% else %} {% if state == "PENDING" %} -

à traiter

+ À traiter {% elif state == "PROCESSING" %} -

en cours

+ En cours {% elif state == "UPLOADED" %} -

justificatifs téléversés

+ Justificatifs téléversés {% elif state == "SUBMITTED" or state == "REFUSED" or state == "ACCEPTED" %} -

transmis

+ Transmis {% endif %} {% endif %}
-
-
-

- PASS IAE : {{ approval.number|format_approval_number }} délivré le {{ approval.start_at|date:"d E Y" }} -

-
-
diff --git a/itou/templates/siae_evaluations/includes/list_item.html b/itou/templates/siae_evaluations/includes/list_item.html index d16277caaa..b23ddef17d 100644 --- a/itou/templates/siae_evaluations/includes/list_item.html +++ b/itou/templates/siae_evaluations/includes/list_item.html @@ -1,64 +1,81 @@ -
- {# navigation : anchor to scroll to a specific card when returning to this page #} - -
+{% load str_filters %} + +{# navigation : anchor to scroll to a specific card when returning to this page #} +