-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨(dashboard) add validated consent view and reuse no-data card template
Implemented a view to display validated consents with appropriate permissions. Modularized the no-data card template to reduce duplication across consent summary templates. Added tests to ensure proper behavior of the validated consent view and permissions.
- Loading branch information
Showing
9 changed files
with
207 additions
and
28 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
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
11 changes: 11 additions & 0 deletions
11
src/dashboard/apps/consent/templates/consent/includes/_no_data_card.html
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,11 @@ | ||
<div class="fr-card__desc fr-highlight"> | ||
<p class="fr-card__desc"> | ||
{{ description }} | ||
<br /> | ||
Si vous pensez qu'il s'agit d'une erreur, merci de contacter l'équipe QualiCharge. | ||
<a class="fr-link fr-card__desc" | ||
href="mailto:{{ contact_email }}?subject=[QualiCharge] Dashboard - {{ description }}." target="_blank"> | ||
{{ contact_email }} | ||
</a> | ||
</p> | ||
</div> |
64 changes: 64 additions & 0 deletions
64
src/dashboard/apps/consent/templates/consent/validated.html
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,64 @@ | ||
{% extends "consent/base.html" %} | ||
|
||
{% load dsfr_tags %} | ||
|
||
{% load i18n static %} | ||
|
||
{% block dashboard_content %} | ||
<h2>Stations suivies</h2> | ||
|
||
<p> | ||
Retrouver ici la liste des stations pour lesquelles la DGEC consulte le gestionnaire | ||
de réseau et émet des certificats. | ||
</p> | ||
|
||
{% if consents %} | ||
<div class="fr-table fr-table--no-caption" id="table-pdl-component"> | ||
<div class="fr-table__wrapper"> | ||
<div class="fr-table__container"> | ||
<div class="fr-table__content"> | ||
|
||
<table id="table-pdl" aria-labelledby="table-pdl-caption"> | ||
<caption id="table-pdl-caption"> Points de livraison suivis </caption> | ||
|
||
<thead> | ||
<tr> | ||
<th scope="col"> | ||
<div class="fr-cell__title">Nom de la station</div> | ||
</th> | ||
<th scope="col"> | ||
<div class="fr-cell__title">Identifiant de la station</div> | ||
</th> | ||
<th scope="col"> | ||
<div class="fr-cell__title">Identifiant du PDL</div> | ||
</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
{% for consent in consents %} | ||
<tr id="table-pdl-row-key-{{ forloop.counter }}" | ||
data-row-key="{{ forloop.counter }}" | ||
aria-labelledby="row-label-{{ forloop.counter }}"> | ||
|
||
{# todo : get station_name, station_id, prm_id #} | ||
<td> -- station name -- </td> | ||
<td> -- station id -- </td> | ||
<td> {{ consent.delivery_point.provider_assigned_id }} </td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% dsfr_pagination page_obj %} | ||
|
||
{% else %} | ||
{% include "consent/includes/_no_data_card.html" with description="Aucune station suivie." %} | ||
{% endif %} | ||
|
||
{% endblock dashboard_content %} |
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
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