-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter GPS results by beneficiary name
- Loading branch information
1 parent
244c0d6
commit ee67206
Showing
6 changed files
with
323 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{% load str_filters %} | ||
|
||
<section aria-labelledby="results" id="follow-up-groups-section"> | ||
{% if not memberships_page %} | ||
<div class="my-3 my-md-4 s-box__row row membership-card">Aucun résultat.</div> | ||
{% else %} | ||
{% for membership in memberships_page %} | ||
<div class="my-3 my-md-4 s-box__row row membership-card"> | ||
<div class="c-box--results__header"> | ||
|
||
<div class="c-box--results__summary"> | ||
<i class="ri-user-line" aria-hidden="true"></i> | ||
<div> | ||
<h3>{{ membership.follow_up_group.beneficiary.get_full_name }}</h3> | ||
<span>{{ membership.follow_up_group.beneficiary.email }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<hr class="m-0 pb-4" /> | ||
|
||
<div class="d-flex justify-content-between mb-4"> | ||
<div> | ||
{% with membership.nb_members|add:"-1" as counter %} | ||
<div> | ||
{% if not membership.created_in_bulk %} | ||
<div> | ||
{# djlint:off #} | ||
{# Don't let djlint add a newline before the . or it will add a space after référent and . #} | ||
Vous avez ajouté ce bénéficiaire le <strong>{{ membership.created_at|date:"d/m/Y" }}</strong>{% if membership.is_referent %} et êtes <strong>référent</strong>{% endif %}.{# djlint:on #} | ||
</div> | ||
{% elif membership.is_referent %} | ||
<div> | ||
Vous êtes <strong>référent</strong>. | ||
</div> | ||
{% endif %} | ||
{% if counter < 1 %} | ||
Aucun autre professionnel que vous n'est intervenu auprès de ce bénéficiaire. | ||
{% else %} | ||
{{ counter }} autre{{ counter|pluralizefr }} professionnel{{ counter|pluralizefr }} | ||
{{ counter|pluralize:"est,sont" }} | ||
intervenu{{ counter|pluralizefr }} auprès de ce bénéficiaire. | ||
{% endif %} | ||
</div> | ||
{% endwith %} | ||
</div> | ||
|
||
|
||
</div> | ||
<div class="d-flex justify-content-between"> | ||
|
||
{% with membership.follow_up_group.beneficiary.public_id as public_id %} | ||
<div> | ||
|
||
{% url 'gps:leave_group' group_id=membership.follow_up_group.id as leave_group_url %} | ||
<a href="{% url 'users:details' public_id=public_id %}" | ||
class="btn btn-warning btn-block w-100 w-md-auto btn-ico" | ||
aria-label="Ne plus suivre {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
data-bs-toggle="modal" | ||
data-bs-target="#confirm_modal" | ||
data-bs-title="Êtes-vous sûr de ne plus vouloir suivre {{ membership.follow_up_group.beneficiary.get_full_name }} ?" | ||
data-bs-body="Vous pourrez toujours suivre ce bénéficiaire de nouveau plus tard." | ||
data-bs-confirm-text="Ne plus suivre" | ||
data-bs-confirm-url="{{ leave_group_url }}" | ||
data-bs-confirm-class="btn-danger"> | ||
<i class="ri-user-unfollow-line" aria-hidden="true"></i> | ||
<span>Ne plus suivre</span> | ||
|
||
</a> | ||
|
||
|
||
{% if membership.is_referent %} | ||
|
||
{% url 'gps:toggle_referent' group_id=membership.follow_up_group.id as remove_referent_url %} | ||
<a href="{% url 'users:details' public_id=membership.follow_up_group.beneficiary.public_id %}" | ||
class="btn btn-warning btn-block w-100 w-md-auto btn-ico" | ||
aria-label="Ne plus être référent de {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
data-bs-toggle="modal" | ||
data-bs-target="#confirm_modal" | ||
data-bs-title="Êtes-vous sûr de ne plus vouloir être référent de {{ membership.follow_up_group.beneficiary.get_full_name }} ?" | ||
data-bs-body="Vous pourrez toujours devenir référent de ce bénéficiaire plus tard." | ||
data-bs-confirm-text="Ne plus être référent" | ||
data-bs-confirm-url="{{ remove_referent_url }}" | ||
data-bs-confirm-class="btn-danger"> | ||
|
||
<i class="ri-map-pin-user-line font-weight-normal me-1" aria-hidden="true"></i> | ||
<span>Ne plus être référent</span> | ||
|
||
</a> | ||
|
||
{% endif %} | ||
</div> | ||
|
||
|
||
<div> | ||
{% if not membership.is_referent %} | ||
{% url 'gps:toggle_referent' group_id=membership.follow_up_group.id as add_referent_url %} | ||
|
||
<a href="{% url 'users:details' public_id=membership.follow_up_group.beneficiary.public_id %}" | ||
class="btn btn-outline-success btn-block w-100 w-md-auto btn-ico" | ||
aria-label="Devenir référent de {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
data-bs-toggle="modal" | ||
data-bs-target="#confirm_modal" | ||
data-bs-title="Êtes-vous sûr de vouloir devenir référent de {{ membership.follow_up_group.beneficiary.get_full_name }} ?" | ||
data-bs-body="Vous pourrez toujours ne plus être référent de ce bénéficiaire plus tard." | ||
data-bs-confirm-text="Devenir référent" | ||
data-bs-confirm-url="{{ add_referent_url }}" | ||
data-bs-confirm-class="btn-success"> | ||
|
||
<i class="ri-map-pin-user-line font-weight-normal me-1" aria-hidden="true"></i> | ||
<span>Devenir référent</span> | ||
|
||
</a> | ||
|
||
{% endif %} | ||
<a href="{% url 'users:details' public_id=membership.follow_up_group.beneficiary.public_id %}" | ||
class="btn btn-outline-primary btn-block btn-ico w-100 w-md-auto" | ||
aria-label="Consulter la fiche de {{ membership.follow_up_group.beneficiary.get_full_name }}"> | ||
<i class="ri-eye-line ri-xl font-weight-medium" aria-hidden="true"></i> | ||
<span>Consulter la fiche</span> | ||
</a> | ||
</div> | ||
{% endwith %} | ||
|
||
</div> | ||
</div> | ||
{% endfor %} | ||
|
||
<div class="mt-5"> | ||
{% include "includes/pagination.html" with page=memberships_page boost=True boost_target="#follow-up-groups-section" boost_indicator="#follow-up-groups-section" %} | ||
</div> | ||
|
||
{% endif %} | ||
</section> |
Oops, something went wrong.