-
Notifications
You must be signed in to change notification settings - Fork 25
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
GPS: Transformer la liste des bénéficiaires en tableau #5359
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,53 +1,52 @@ | ||
{% load str_filters %} | ||
{% load matomo %} | ||
|
||
<section aria-labelledby="results" id="follow-up-groups-section"> | ||
<div aria-labelledby="results" id="follow-up-groups-section" class="mt-3 mt-md-4"> | ||
{% if not memberships_page %} | ||
<div class="c-box my-3 my-md-4"> | ||
<div class="c-box"> | ||
<p class="mb-0">Aucun résultat.</p> | ||
</div> | ||
{% else %} | ||
{% for membership in memberships_page %} | ||
<div class="c-box c-box--results has-links-inside my-3 my-md-4 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"> | ||
<div class="c-box--results__body"> | ||
{% with membership.nb_members|add:"-1" as counter %} | ||
<p class="mb-0"> | ||
{# 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 #} | ||
{% if counter < 1 %} | ||
Aucun autre professionnel que vous n'est intervenu auprès de ce bénéficiaire. | ||
{% else %} | ||
{{ counter }} {{ counter|pluralizefr:"autre professionnel est intervenu,autres professionnels sont intervenus" }} auprès de ce bénéficiaire. | ||
{% endif %} | ||
</p> | ||
{% endwith %} | ||
</div> | ||
<div class="c-box--results__footer"> | ||
<div class="d-flex justify-content-md-end"> | ||
<a href="{% url 'gps:user_details' public_id=membership.follow_up_group.beneficiary.public_id %}?back_url={{ request.get_full_path|urlencode }}" | ||
class="btn btn-primary btn-block btn-ico w-100 w-md-auto" | ||
aria-label="Consulter la fiche de {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
{% matomo_event "GPS_liste_groupes" "clic" "consulter_fiche_candidat" %}> | ||
<i class="ri-eye-line ri-xl fw-medium" aria-hidden="true"></i> | ||
<span>Consulter la fiche</span> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
<div class="table-responsive"> | ||
<table class="table table-hover"> | ||
<caption class="visually-hidden">Liste des bénéficiaires</caption> | ||
<thead> | ||
<tr> | ||
<th scope="col">Prénom Nom</th> | ||
<th scope="col">Suivi depuis</th> | ||
<th scope="col" aria-label="Référent ou référente">Référent⸱e</th> | ||
<th scope="col" aria-label="Nombre d’intervenants">Nbr d’intervenants</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for membership in memberships_page %} | ||
<tr> | ||
<td> | ||
<a href="{% url 'gps:user_details' public_id=membership.follow_up_group.beneficiary.public_id %}?back_url={{ request.get_full_path|urlencode }}" | ||
class="btn-link" | ||
aria-label="Consulter la fiche de {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
{% matomo_event "GPS_liste_groupes" "clic" "consulter_fiche_candidat" %}> | ||
{{ membership.follow_up_group.beneficiary.get_full_name }} | ||
</a> | ||
</td> | ||
<td>{{ membership.created_at|date:"d/m/Y" }}</td> | ||
<td> | ||
{% if membership.is_referent %} | ||
<span class="badge badge-xs rounded-pill bg-accent-03-lighter text-primary">vous êtes référent</span> | ||
{% elif membership.follow_up_group.referent %} | ||
{{ membership.follow_up_group.referent.0.member.get_full_name }} | ||
{% else %} | ||
<span class="badge badge-xs rounded-pill bg-danger-light text-warning">pas de référent</span> | ||
{% endif %} | ||
</td> | ||
<td>{{ membership.nb_members }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
{% include "includes/pagination.html" with page=memberships_page boost=True boost_target="#follow-up-groups-section" boost_indicator="#follow-up-groups-section" %} | ||
|
||
{% endif %} | ||
</section> | ||
</div> |
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je me dis qu'un assertSnapshotQueries sur la vue pourrait être bien du coup :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est ajouté