fix missing cases for accompanying period draft list

fix when:

* if there isn't any information into course => better render box
* if there isn't any course into list => display warning
This commit is contained in:
Julien Fastré 2022-02-11 15:26:17 +01:00
parent 981c94906d
commit 3a2370d536
4 changed files with 63 additions and 58 deletions

View File

@ -57,7 +57,7 @@ class UserAccompanyingPeriodController extends AbstractController
$total = $this->accompanyingPeriodRepository->countBy(['user' => $this->getUser(), 'step' => 'DRAFT']);
$pagination = $this->paginatorFactory->create($total);
$accompanyingPeriods = $this->accompanyingPeriodRepository->findBy(
['user' => $this->getUser(), 'step' => 'DRAFT'],
['createdBy' => $this->getUser(), 'step' => 'DRAFT'],
['id' => 'DESC'],
$pagination->getItemsPerPage(),
$pagination->getCurrentPageFirstItemNumber()

View File

@ -55,6 +55,7 @@
</div>
</div>
</div>
{% if period.requestor is not null or period.participations.count > 0 or period.socialIssues.count > 0%}
<div class="item-row separator">
<div class="wrap-list">
{% if period.requestorPerson is not null or period.requestorThirdParty is not null %}
@ -114,6 +115,7 @@
{% endif %}
</div>
</div>
{% endif %}
<div class="item-row separator">
<div class="item-col item-meta">
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %}

View File

@ -20,6 +20,8 @@
<div class="flex-table accompanyingcourse-list">
{% for period in accompanyingPeriods %}
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period, 'recordAction': _self.recordAction(period)} %}
{% else %}
<p class="chill-no-data-statement">{{ 'Any accompanying period'|trans }}</p>
{% endfor %}
</div>

View File

@ -179,6 +179,7 @@ An accompanying period is open: Une période d'accompagnement est ouverte
Accompanying period list: Périodes d'accompagnement
Accompanying period list for person: Périodes d'accompagnement de la personne
Accompanying period: Parcours d'accompagnement
Any accompanying period: Aucun parcours d'accompagnement
period: Parcours
New accompanying course: Nouveau parcours d'accompagnement
Choose a motive: Motif de fermeture