Skip to content

Commit

Permalink
feat: update siae evaluations templates
Browse files Browse the repository at this point in the history
  • Loading branch information
hellodeloo committed Apr 22, 2024
1 parent b001861 commit 5adba29
Show file tree
Hide file tree
Showing 18 changed files with 754 additions and 636 deletions.
8 changes: 0 additions & 8 deletions itou/static/css/itou.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 0 additions & 4 deletions itou/templates/siae_evaluations/campaign_calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ <h1>Calendrier</h1>
<div class="s-section__row row">
<div class="s-section__col col-12">
{{ campaign_calendar_html|safe }}

<p class="my-4">
<a href="{{ back_url }}">Retour</a>
</p>
</div>
</div>
</div>
Expand Down
61 changes: 22 additions & 39 deletions itou/templates/siae_evaluations/includes/criterion_infos.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,22 @@
<div class="row ">
<div class="col-md-9 mt-1">
<h3>{{ criteria.name }}</h3>
</div>
<div class="col-md-3 mt-1 text-end">
{% if review_state == "ACCEPTED" %}
<p class="text-success">
<i class="ri-checkbox-circle-line"></i> Validé
</p>
{% elif review_state == "REFUSED" or review_state == "REFUSED_2" %}
<p class="text-danger">
<i class="ri-indeterminate-circle-line"></i> Refusé
</p>
{% endif %}
</div>
</div>
<div class="row">
<div class="col-md-12">
{% if criteria.written_proof %}
<p class="small mb-0 form-text text-muted">
<strong>Pièce justificative :</strong>
<i>{{ criteria.written_proof }}</i>
</p>
{% endif %}
{% if criteria.written_proof_validity %}
<p class="small mb-0 form-text text-muted">
<strong>Durée de validité du justificatif :</strong>
<i>{{ criteria.written_proof_validity }}</i>
</p>
{% endif %}
{% if criteria.written_proof_url %}
<p class="small mb-0 form-text text-muted">
<a href="{{ criteria.written_proof_url }}" rel="noopener" target="_blank" aria-label="{{ criteria.written_proof_url }} (ouverture dans un nouvel onglet)">
{{ criteria.written_proof_url }}
</a>
</p>
{% endif %}
</div>
</div>
{% if review_state == "ACCEPTED" %}
<strong class="text-success"><i class="ri-check-line"></i> Validé</strong>
<br>
{% elif review_state == "REFUSED" or review_state == "REFUSED_2" %}
<strong class="text-danger"><i class="ri-close-line"></i> Refusé</strong>
<br>
{% endif %}
<strong class="fs-sm">{{ criteria.name }}</strong>
<br>
<ul class="fs-sm">
{% if criteria.written_proof %}<li class="m-0">Pièce justificative : {{ criteria.written_proof }}</li>{% endif %}
{% if criteria.written_proof_validity %}
<li class="m-0">Durée de validité du justificatif : {{ criteria.written_proof_validity }}</li>
{% endif %}
{% if criteria.written_proof_url %}
<li class="m-0">
<a href="{{ criteria.written_proof_url }}" rel="noopener" target="_blank" class="has-external-link" aria-label="{{ criteria.written_proof_url }} (ouverture dans un nouvel onglet)">
{{ criteria.written_proof_url }}
</a>
</li>
{% endif %}
</ul>
73 changes: 31 additions & 42 deletions itou/templates/siae_evaluations/includes/criterion_validation.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,34 @@
<div class="card my-3">
<div class="card-body">
<div class="row align-items-center">
<div class="col-lg-8 col-md-8 col-12">
<a href="{% url "siae_evaluations_views:view_proof" evaluated_administrative_criteria_id=evaluated_administrative_criteria.pk %}"
rel="noopener"
target="_blank"
aria-label="Vérifier ce justificatif (ouverture dans un nouvel onglet)">
<i class="ri-file-copy-2-line ri-lg mr-1"></i>
{% if evaluated_siae.state == "SUBMITTED" or evaluated_siae.state == "ACCEPTED" or evaluated_siae.state == "REFUSED" %}
Vérifier ce justificatif
{% else %}
Revoir ce justificatif
{% endif %}
<i class="ri-share-box-line"></i>
</a>
</div>
{% if can_edit_proof %}
{% if evaluated_administrative_criteria.review_state == 'PENDING' %}
<div class="col-lg-2 col-md-2 col-9">
<form method="post" action="{% url 'siae_evaluations_views:institution_evaluated_administrative_criteria' evaluated_administrative_criteria.pk 'accept' %}">
{% csrf_token %}
<button class="btn btn-success btn-sm float-end" aria-label="Accepter ce justificatif">Accepter</button>
</form>
</div>
<div class="col-lg-2 col-md-2 col-3">
<form method="post" action="{% url 'siae_evaluations_views:institution_evaluated_administrative_criteria' evaluated_administrative_criteria.pk 'refuse' %}">
{% csrf_token %}
<button class="btn btn-danger btn-sm float-end" aria-label="Refuser ce justificatif">Refuser</button>
</form>
</div>
{% else %}
<div class="col-lg-4 col-md-4 col-12">
<form method="post" action="{% url 'siae_evaluations_views:institution_evaluated_administrative_criteria' evaluated_administrative_criteria.pk 'reinit' %}">
{% csrf_token %}
<button class="btn btn-outline-primary btn-sm float-end" aria-label="Modifier l'état de ce justificatif">
Modifier
</button>
</form>
</div>
{% endif %}
<div class="d-flex justify-content-between mt-2">
<div>
<a href="{% url "siae_evaluations_views:view_proof" evaluated_administrative_criteria_id=evaluated_administrative_criteria.pk %}"
rel="noopener"
target="_blank"
class="btn btn-sm btn-link"
aria-label="Vérifier ce justificatif (ouverture dans un nouvel onglet)">
{% if evaluated_siae.state == "SUBMITTED" or evaluated_siae.state == "ACCEPTED" or evaluated_siae.state == "REFUSED" %}
Vérifier ce justificatif
{% else %}
Revoir ce justificatif
{% endif %}
</div>
</a>
</div>
{% if can_edit_proof %}
<div class="d-flex gap-2">
{% if evaluated_administrative_criteria.review_state == 'PENDING' %}
<form method="post" action="{% url 'siae_evaluations_views:institution_evaluated_administrative_criteria' evaluated_administrative_criteria.pk 'accept' %}">
{% csrf_token %}
<button class="btn btn-success btn-sm" aria-label="Accepter ce justificatif">Accepter</button>
</form>
<form method="post" action="{% url 'siae_evaluations_views:institution_evaluated_administrative_criteria' evaluated_administrative_criteria.pk 'refuse' %}">
{% csrf_token %}
<button class="btn btn-danger btn-sm" aria-label="Refuser ce justificatif">Refuser</button>
</form>
{% else %}
<form method="post" action="{% url 'siae_evaluations_views:institution_evaluated_administrative_criteria' evaluated_administrative_criteria.pk 'reinit' %}">
{% csrf_token %}
<button class="btn btn-sm btn-primary" aria-label="Modifier l'état de ce justificatif">Modifier</button>
</form>
{% endif %}
</div>
{% endif %}
</div>
Original file line number Diff line number Diff line change
@@ -1,64 +1,63 @@
{% load format_filters %}
<div class="row">
<div class="col-md-8">
<h3 class="h2">
Auto-prescription pour
<span class="text-muted">{{ job_seeker.get_full_name }}</span>
</h3>
<p class="m-0">
PASS IAE :&nbsp;<b>{{ approval.number|format_approval_number }}</b> délivré le {{ approval.start_at|date:"d E Y" }}
</p>

<div class="d-flex flex-column flex-lg-row gap-2 gap-lg-3">
<div class="c-box--results__summary flex-grow-1">
<i class="ri-pass-valid-line" aria-hidden="true"></i>
<div>
<h3>PASS IAE {{ approval.number|format_approval_number }} délivré le {{ approval.start_at|date:"d E Y" }}</h3>
<span>{{ job_seeker.get_full_name }}</span>
</div>
</div>
<div class="col-md-4 text-end">
<div>
{% if evaluated_siae.evaluation_is_final %}
{% if state == "PENDING" %}
<p class="badge rounded-pill bg-danger float-end">Non téléversés</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Non téléversés</span>
{% elif state == "PROCESSING" %}
<p class="badge rounded-pill bg-warning float-end">Téléversement incomplet</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-warning text-white">Téléversement incomplet</span>
{% elif state == "UPLOADED" %}
<p class="badge rounded-pill bg-warning float-end">Justificatifs téléversés</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-warning text-white">Justificatifs téléversés</span>
{% elif state == "SUBMITTED" %}
<p class="badge rounded-pill bg-info-light text-primary float-end">Justificatifs non contrôlés</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-emploi-light text-primary">Justificatifs non contrôlés</span>
{% elif state == "ACCEPTED" %}
<p class="badge rounded-pill bg-success float-end">Validé</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-success text-white">Validé</span>
{% elif state == "REFUSED" or state == "REFUSED_2" %}
<p class="badge rounded-pill bg-danger float-end">Problème constaté</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Problème constaté</span>
{% endif %}
{% else %}
{% if state == "PENDING" or state == "PROCESSING" %}
{% if evaluated_siae.submission_freezed_at %}
<p class="badge rounded-pill bg-danger float-end">Justificatifs non transmis</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Justificatifs non transmis</span>
{% else %}
<p class="badge rounded-pill bg-emploi float-end">En attente</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-info text-white">En attente</span>
{% endif %}
{% elif state == "UPLOADED" %}
{% if evaluated_siae.submission_freezed_at %}
<p class="badge rounded-pill bg-danger float-end">Justificatifs non transmis</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Justificatifs non transmis</span>
{% else %}
<p class="badge rounded-pill bg-pilotage float-end">Justificatifs téléversés</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-accent-03 text-primary">Justificatifs téléversés</span>
{% endif %}
{% elif state == "SUBMITTED" %}
<p class="badge rounded-pill bg-pilotage float-end">
<span class="badge badge-sm rounded-pill text-nowrap bg-accent-03 text-primary">
{% if reviewed_at %}
Nouveaux justificatifs à traiter
{% else %}
À traiter
{% endif %}
</p>
</span>
{% elif state == "ACCEPTED" %}
<p class="badge rounded-pill bg-success float-end">Validé</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-success text-white">Validé</span>
{% elif state == "REFUSED" %}
{% if reviewed_at %}
<p class="badge rounded-pill bg-emploi float-end">Phase contradictoire - En attente</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-info text-white">Phase contradictoire - En attente</span>
{% else %}
{% comment %}
Show “Problème constaté” until the review is submitted, which starts the “phase contradictoire”
(tracked by the reviewed_at field).
{% endcomment %}
<p class="badge rounded-pill bg-danger float-end">Problème constaté</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Problème constaté</span>
{% endif %}
{% elif state == "REFUSED_2" %}
<p class="badge rounded-pill bg-danger float-end">Problème constaté</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Problème constaté</span>
{% endif %}
{% endif %}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,40 @@
{% load format_filters %}
<div class="row">
<div class="col-lg-8 col-md-7 col-12">
<h3 class="h2">
Auto-prescription pour
<span class="text-muted">{{ job_seeker.get_full_name }}</span>
</h3>

<div class="d-flex flex-column flex-lg-row gap-2 gap-lg-3">
<div class="c-box--results__summary flex-grow-1">
<i class="ri-pass-valid-line" aria-hidden="true"></i>
<div>
<h3>PASS IAE {{ approval.number|format_approval_number }} délivré le {{ approval.start_at|date:"d E Y" }}</h3>
<span>{{ job_seeker.get_full_name }}</span>
</div>
</div>
<div class="col-lg-4 col-md-5 col-12 text-end">
<div>
{% if state == "REFUSED_2" %}
<p class="badge rounded-pill bg-danger float-end">problème constaté</p>

<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Problème constaté</span>
{% elif reviewed_at %}
{% if state == "ACCEPTED" %}
<p class="badge rounded-pill bg-success float-end">validé</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-success text-white">Validé</span>
{% elif state == "UPLOADED" %}
<p class="badge rounded-pill bg-success float-end">justificatifs téléversés</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-accent-03 text-primary">Justificatifs téléversés</span>
{% elif state == "SUBMITTED" %}
<p class="badge rounded-pill bg-communaute-light float-end">transmis</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-success-lighter text-success">Transmis</span>
{% elif state == "REFUSED" %}
<p class="badge rounded-pill bg-danger float-end">problème constaté</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-danger text-white">Problème constaté</span>
{% elif state == "PROCESSING" %}
<p class="badge rounded-pill bg-pilotage float-end">à traiter</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-accent-03 text-primary">À traiter</span>
{% else %}
<p class="badge rounded-pill bg-pilotage float-end">nouveaux justificatifs à traiter</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-accent-03 text-primary">Nouveaux justificatifs à traiter</span>
{% endif %}

{% else %}
{% if state == "PENDING" %}
<p class="badge rounded-pill bg-pilotage float-end">à traiter</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-accent-03 text-primary">À traiter</span>
{% elif state == "PROCESSING" %}
<p class="badge rounded-pill bg-pilotage float-end">en cours</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-info text-white">En cours</span>
{% elif state == "UPLOADED" %}
<p class="badge rounded-pill bg-success float-end">justificatifs téléversés</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-accent-03 text-primary">Justificatifs téléversés</span>
{% elif state == "SUBMITTED" or state == "REFUSED" or state == "ACCEPTED" %}
<p class="badge rounded-pill bg-communaute-light float-end">transmis</p>
<span class="badge badge-sm rounded-pill text-nowrap bg-success-lighter text-success">Transmis</span>
{% endif %}
{% endif %}
</div>
</div>
<div class="row">
<div class="col-12">
<p class="m-0">
PASS IAE :&nbsp;<b>{{ approval.number|format_approval_number }}</b> délivré le {{ approval.start_at|date:"d E Y" }}
</p>
</div>
</div>
Loading

0 comments on commit 5adba29

Please sign in to comment.