mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
add person exports in a group
This commit is contained in:
parent
28ed09b9d9
commit
ec38dc4d21
@ -26,10 +26,10 @@
|
||||
<h1>{{ 'Exports list'|trans }}</h1>
|
||||
|
||||
<div class="container mt-4">
|
||||
|
||||
{% for group, exports in grouped_exports %}{% if group != '_' %}
|
||||
<h2>{{ group }}</h2>
|
||||
|
||||
<div class="row">
|
||||
<h2 class="display-6">{{ group|trans }}</h2>
|
||||
<div class="row grouped">
|
||||
{% for export_alias, export in exports %}
|
||||
<div class="col-6 col-md-4 mb-3">
|
||||
<h2>{{ export.title|trans }}</h2>
|
||||
@ -45,13 +45,10 @@
|
||||
{% endif %}{% endfor %}
|
||||
|
||||
{% if grouped_exports|keys|length > 1 %}
|
||||
<h2>{{ 'Ungrouped exports'|trans }}</h2>
|
||||
<h2 class="display-6">{{ 'Ungrouped exports'|trans }}</h2>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="row ungrouped">
|
||||
{% for export_alias,export in grouped_exports['_'] %}
|
||||
|
||||
<div class="col-6 col-md-4 mb-3">
|
||||
|
@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@ -22,7 +23,7 @@ use LogicException;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class CountPerson implements ExportInterface
|
||||
class CountPerson implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
@ -114,4 +115,9 @@ class CountPerson implements ExportInterface
|
||||
{
|
||||
return [Declarations::PERSON_TYPE, Declarations::PERSON_IMPLIED_IN];
|
||||
}
|
||||
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of persons';
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ use Chill\CustomFieldsBundle\Entity\CustomField;
|
||||
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
|
||||
use Chill\MainBundle\Export\ExportElementValidatedInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\MainBundle\Export\ListInterface;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
@ -45,7 +46,7 @@ use function uniqid;
|
||||
/**
|
||||
* Render a list of people.
|
||||
*/
|
||||
class ListPerson implements ExportElementValidatedInterface, ListInterface
|
||||
class ListPerson implements ExportElementValidatedInterface, ListInterface, GroupedExportInterface
|
||||
{
|
||||
protected CustomFieldProvider $customFieldProvider;
|
||||
|
||||
@ -474,4 +475,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface
|
||||
|
||||
return $uid;
|
||||
}
|
||||
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of persons';
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\DirectExportInterface;
|
||||
use Chill\MainBundle\Export\ExportElementValidatedInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
@ -30,7 +31,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
/**
|
||||
* Render a list of duplicate peoples.
|
||||
*/
|
||||
class ListPersonDuplicate implements DirectExportInterface, ExportElementValidatedInterface
|
||||
class ListPersonDuplicate implements DirectExportInterface, ExportElementValidatedInterface, GroupedExportInterface
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
@ -196,4 +197,9 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
|
||||
|
||||
return $result->fetchAllAssociative();
|
||||
}
|
||||
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of persons';
|
||||
}
|
||||
}
|
||||
|
@ -326,6 +326,7 @@ Pediod closing form is not valide: Le formulaire de fermeture n'est pas valide
|
||||
Accompanyied people: Personnes accompagnées
|
||||
|
||||
## exports
|
||||
Exports of persons: Exports des personnes
|
||||
Count peoples by various parameters.: Compte le nombre de personnes en fonction de différents filtres.
|
||||
Count peoples: Nombre de personnes
|
||||
List peoples: Liste des personnes
|
||||
|
Loading…
x
Reference in New Issue
Block a user