Ver código fonte

finish collectif data

master
Charly 3 anos atrás
pai
commit
aa11c7cc97
9 arquivos alterados com 208 adições e 55 exclusões
  1. +20
    -1
      public/build/adminlte-form.css
  2. +41
    -6
      src/Controller/Admin/CollectifDataCrudController.php
  3. +2
    -1
      src/Controller/Admin/DashboardAnimatorController.php
  4. +77
    -41
      src/Controller/Admin/DashboardController.php
  5. +25
    -1
      src/Controller/Admin/IndividualDataCrudController.php
  6. +0
    -1
      src/Controller/Admin/UserCrudController.php
  7. +5
    -0
      src/Entity/CollectifData.php
  8. +8
    -0
      templates/crud/field/association.html.twig
  9. +30
    -4
      translations/admin.fr.yaml

+ 20
- 1
public/build/adminlte-form.css Ver arquivo

@@ -35,4 +35,23 @@
z-index: 2;
}

/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9mb3JtLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUU7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7QUFESjtBQUlFO0VBQ0U7QUFGSjtBQUtFO0VBQ0U7QUFISjtBQU1FO0VBQ0U7QUFKSjs7QUFRQTtFQUNFO0FBTEY7QUFPRTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7QUFMSjs7QUFTQTtFQUNFO0VBQ0E7QUFORixDIiwiZmlsZSI6ImFkbWlubHRlLWZvcm0uY3NzIiwic291cmNlc0NvbnRlbnQiOlsiXG4uZm9ybS1zZW50IHtcbiAgLmZvcm0tY29udHJvbDppbnZhbGlkIHtcbiAgICBib3JkZXItY29sb3I6ICNkYzM1NDU7XG4gICAgcGFkZGluZy1yaWdodDogMi4yNXJlbTtcbiAgICBiYWNrZ3JvdW5kLWltYWdlOiB1cmwoXCJkYXRhOmltYWdlL3N2Zyt4bWwsJTNjc3ZnIHhtbG5zPSdodHRwOi8vd3d3LnczLm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ogbm9uZTtcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgdG9wOiAtN3B4O1xuICAgIHJpZ2h0OiAtNnB4O1xuICAgIGNvbG9yOiAjZGMzNTQ1O1xuICAgIGJhY2tncm91bmQ6ICNmZmY7XG4gICAgYm9yZGVyLXJhZGl1czogMTBweDtcbiAgICBmb250LXNpemU6IDEuMnJlbTtcbiAgfVxufVxuXG4ubmF2LWl0ZW0uaGFzLWludmFsaWQgLm5hdi1saW5rIC5pbnZhbGlkLWZvcm0ge1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIHotaW5kZXg6IDI7XG59XG5cblxuIl0sInNvdXJjZVJvb3QiOiIifQ==*/
.field-collection {
padding-top: 15px;
}
.field-collection legend {
font-weight: bold;
font-size: 18px;
}
.field-collection .field-collection-item {
background-color: gainsboro;
padding: 10px;
position: relative;
border-radius: 5px;
}
.field-collection .field-collection-item .field-collection-delete {
position: absolute;
right: 0px;
top: 0px;
}

/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9mb3JtLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUU7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7QUFESjtBQUlFO0VBQ0U7QUFGSjtBQUtFO0VBQ0U7QUFISjtBQU1FO0VBQ0U7QUFKSjs7QUFRQTtFQUNFO0FBTEY7QUFPRTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7QUFMSjs7QUFTQTtFQUNFO0VBQ0E7QUFORjs7QUFTQTtFQUNFO0FBTkY7QUFRRTtFQUNFO0VBQ0E7QUFOSjtBQVNFO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7QUFQSjtBQVNJO0VBQ0U7RUFDQTtFQUNBO0FBUE4sQyIsImZpbGUiOiJhZG1pbmx0ZS1m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Um9vdCI6IiJ9*/

+ 41
- 6
src/Controller/Admin/CollectifDataCrudController.php Ver arquivo

@@ -9,10 +9,18 @@ use App\Type\ProjectsBoostType;
use App\Type\ProjectsInspiringType;
use App\Type\RevoltsType;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FilterCollection;
use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\SearchDto;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\HiddenField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController;
use Lc\SovBundle\Doctrine\Extension\TreeInterface;
use Lc\SovBundle\Field\CollectionField;
use Lc\SovBundle\Field\StatusField;

@@ -27,28 +35,36 @@ class CollectifDataCrudController extends AbstractCrudController
{
$fields = array();

$fields[] = AssociationField::new('territory');
$fields[] = TextField::new('resume');
$fields[] = AssociationField::new('territory')
->setTemplatePath('crud/field/association.html.twig');
$fields[] = IntegerField::new('nbParticipant');
$fields[] = CollectionField::new('revolts')
->setFormTypeOption('entry_type', RevoltsType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false);
->setRequired(false)
->hideOnIndex();
$fields[] = CollectionField::new('dreams')
->setFormTypeOption('entry_type', DreamsType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false);
->setRequired(false)
->hideOnIndex();
$fields[] = CollectionField::new('projectsboost')
->setFormTypeOption('entry_type', ProjectsBoostType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false);
->setRequired(false)
->hideOnIndex();
$fields[] = CollectionField::new('projectsinspiring')
->setFormTypeOption('entry_type', ProjectsInspiringType::class)
->setFormTypeOption('by_reference', false)
->setRequired(false);
->setRequired(false)
->hideOnIndex();
$hasAccess = $this->isGranted('ROLE_ADMIN');
if ($hasAccess) {
$fields[] = StatusField::new('status')
->setFormTypeOption('data', 0);
->setFormTypeOption('data', 0)
->setFormTypeOption('choices', ['Validé' => 1, 'En attente' => 0])
->setCustomOption('toggle_label', 'Valider');
} else {
$fields[] = HiddenField::new('status')
->setFormTypeOption('data', 0);
@@ -58,6 +74,25 @@ class CollectifDataCrudController extends AbstractCrudController
return $fields;
}

public function createIndexQueryBuilder(
SearchDto $searchDto,
EntityDto $entityDto,
FieldCollection $fields,
FilterCollection $filters
): QueryBuilder
{
$queryBuilder = parent::createIndexQueryBuilder(
$searchDto,
$entityDto,
$fields,
$filters
);

$queryBuilder->andWhere('entity.status = ' . $searchDto->getRequest()->get('status'));

return $queryBuilder;
}

public function persistEntity(EntityManagerInterface $entityManager, $entityInstance): void
{
$entityManager->persist($entityInstance);

+ 2
- 1
src/Controller/Admin/DashboardAnimatorController.php Ver arquivo

@@ -12,6 +12,7 @@ use App\Entity\Territory;
use App\Entity\Thematic;
use App\Entity\User\GroupUser;
use App\Entity\User\User;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Assets;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
@@ -32,7 +33,7 @@ class DashboardAnimatorController extends SovDashboardController
{
$urlCreate = $this->adminUrlGenerator
->setController(CollectifDataCrudController::class)
->setAction('new')
->setAction(Action::NEW)
->generateUrl();

yield MenuItem::linkToDashboard('dashboard', 'circle');

+ 77
- 41
src/Controller/Admin/DashboardController.php Ver arquivo

@@ -12,6 +12,7 @@ use App\Entity\Territory;
use App\Entity\Thematic;
use App\Entity\User\GroupUser;
use App\Entity\User\User;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Assets;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
@@ -32,50 +33,85 @@ class DashboardController extends SovDashboardController

public function configureMenuItems(): iterable
{
$urlNewCollectif = $this->adminUrlGenerator
->setController(CollectifDataCrudController::class)
->setAction(Action::NEW)
->set('menuIndex', 3)
->set('submenuIndex', 0)
->generateUrl();

$urlOnlineCollectif = $this->adminUrlGenerator
->setController(CollectifDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 1)
->set('menuIndex', 3)
->set('submenuIndex', 2)
->generateUrl();

$urlCreate = $this->adminUrlGenerator
$urlOfflineCollectif = $this->adminUrlGenerator
->setController(CollectifDataCrudController::class)
->setAction('new')
->setAction(Action::INDEX)
->set('status', 0)
->set('menuIndex', 3)
->set('submenuIndex', 1)
->generateUrl();

yield MenuItem::linkToDashboard('dashboard', 'circle');
yield MenuItem::subMenu('account', 'user')
->setSubItems(
[
MenuItem::linkToRoute('account_profile', '', 'sov_admin_account_profile'),
MenuItem::linkToRoute('account_password', '', 'sov_admin_account_password'),
]
);
yield MenuItem::subMenu('user', 'user')
->setPermission(self::ROLE_ADMIN)
->setSubItems(
[
MenuItem::linkToCrud('user_index', '', User::class),
]
);
yield MenuItem::subMenu('data_individual', 'user')
->setPermission(self::ROLE_ADMIN)
->setSubItems(
[
MenuItem::linkToCrud('data_individual_validate', '', IndividualData::class),
MenuItem::linkToCrud('data_individual_waiting', '', IndividualData::class),
]
);
yield MenuItem::subMenu('data_collectif', 'user')
->setPermission(self::ROLE_ADMIN)
->setSubItems(
[
MenuItem::linkToCrud('data_collectif_validate', '', CollectifData::class),
MenuItem::linkToCrud('data_collectif_waiting', '', CollectifData::class),
]
);
yield MenuItem::linkToCrud('thematic', 'copy', Thematic::class)
->setPermission(self::ROLE_ADMIN);
yield MenuItem::linkToCrud('territory', 'copy', Territory::class)
->setPermission(self::ROLE_SUPER_ADMIN);
yield MenuItem::linkToCrud('configuration', 'copy', Configuration::class)
->setPermission(self::ROLE_SUPER_ADMIN);
yield MenuItem::linkToCrud('page', 'copy', Page::class)
->setPermission(self::ROLE_ADMIN);
$urlOnlineIndividuel = $this->adminUrlGenerator
->setController(IndividualDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 1)
->set('menuIndex', 3)
->set('submenuIndex', 1)
->generateUrl();

$urlOfflineIndividuel = $this->adminUrlGenerator
->setController(IndividualDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 0)
->set('menuIndex', 3)
->set('submenuIndex', 0)
->generateUrl();

$menuItems = [
MenuItem::linkToDashboard('dashboard', 'far fa-circle'),
MenuItem::subMenu('account', 'fas fa-user')
->setSubItems(
[
MenuItem::linkToRoute('account_profile', 'fas fa-user-cog', 'sov_admin_account_profile'),
MenuItem::linkToRoute('account_password', 'fas fa-key', 'sov_admin_account_password'),
]
),
MenuItem::linkToCrud('user', 'fas fa-users', User::class)
->setPermission(self::ROLE_ADMIN),
/*MenuItem::subMenu('data_individual', 'user')
->setPermission(self::ROLE_ADMIN)
->setSubItems(
[
MenuItem::linkToUrl('data_individual_waiting', '', $urlOfflineIndividuel),
MenuItem::linkToUrl('data_individual_validate', '', $urlOnlineIndividuel),
]
),*/
MenuItem::subMenu('data_collectif', 'fas fa-database')
->setPermission(self::ROLE_ADMIN)
->setSubItems(
[
MenuItem::linkToUrl('data_collectif_new', 'fas fa-plus', $urlNewCollectif),
MenuItem::linkToUrl('data_collectif_waiting', 'fas fa-hourglass-half', $urlOfflineCollectif),
MenuItem::linkToUrl('data_collectif_validate', 'fas fa-check', $urlOnlineCollectif),
]
),
MenuItem::linkToCrud('thematic', 'fas fa-book', Thematic::class)
->setPermission(self::ROLE_ADMIN),
MenuItem::linkToCrud('territory', 'far fa-copy', Territory::class)
->setPermission(self::ROLE_SUPER_ADMIN),
MenuItem::linkToCrud('configuration', 'far fa-copy', Configuration::class)
->setPermission(self::ROLE_SUPER_ADMIN),
MenuItem::linkToCrud('page', 'far fa-copy', Page::class)
->setPermission(self::ROLE_ADMIN),
];

/*$this->setMenuIndexes($menuItems);*/

return $menuItems;
}
}

+ 25
- 1
src/Controller/Admin/IndividualDataCrudController.php Ver arquivo

@@ -5,8 +5,13 @@ namespace App\Controller\Admin;
use App\Entity\Configuration;
use App\Entity\IndividualData;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FilterCollection;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\SearchDto;
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Field\EmailField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Field\StatusField;
@@ -40,4 +45,23 @@ class IndividualDataCrudController extends AbstractCrudController

parent::persistEntity($entityManager, $entityInstance); // TODO: Change the autogenerated stub
}

public function createIndexQueryBuilder(
SearchDto $searchDto,
EntityDto $entityDto,
FieldCollection $fields,
FilterCollection $filters
): QueryBuilder
{
$queryBuilder = parent::createIndexQueryBuilder(
$searchDto,
$entityDto,
$fields,
$filters
);

$queryBuilder->andWhere('entity.status = ' . $searchDto->getRequest()->get('status'));

return $queryBuilder;
}
}

+ 0
- 1
src/Controller/Admin/UserCrudController.php Ver arquivo

@@ -55,7 +55,6 @@ class UserCrudController extends AbstractUserCrudController
TextField::new('firstname'),
TextField::new('lastname'),
EmailField::new('email'),
ArrayField::new('roles'),
ChoiceField::new('roles')
->allowMultipleChoices()
->autocomplete()

+ 5
- 0
src/Entity/CollectifData.php Ver arquivo

@@ -73,6 +73,11 @@ class CollectifData implements StatusInterface, EntityInterface
return $this->nbParticipant . " participants";
}

public function getResume()
{
return count($this->getRevolts()) . " révolte(s) - " . count($this->getDreams()) . " rêve(s) - " . count($this->getProjectsBoost()) . " projet(s) boosté(s) - " . count($this->getProjectsInspiring()) . " projets inspirants";
}

public function getId(): ?int
{
return $this->id;

+ 8
- 0
templates/crud/field/association.html.twig Ver arquivo

@@ -0,0 +1,8 @@
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% if 'toMany' == field.customOptions.get('associationType') %}
<span class="badge badge-secondary">{{ field.formattedValue }}</span>
{% else %}
{{ field.formattedValue }}
{% endif %}

+ 30
- 4
translations/admin.fr.yaml Ver arquivo

@@ -1,23 +1,49 @@
menu:
data_individual: Formulaire individuel
data_individual_validate: Données validées
data_individual_waiting: Données en attente de validation
data_individual_waiting: Données en attente
data_collectif: Formulaire collectif
data_collectif_new: Créer
data_collectif_validate: Données validées
data_collectif_waiting: Données en attente de validation
data_collectif_waiting: Données en attente
data_collectif_create: Formulaire collectif
territory: Territoires
thematic: Thématiques
configuration: Configuration question Intro
configuration: Configuration
entity:
User:
fields:
roles: Rôle(s)
CollectifData:
label: Données collectif
label_plurial: Données du formulaire collectif
fields:
territory: Territoire
nbParticipant: Nombre de participant
nbParticipant: Nombre de participants
revolts: Les révoltes
dreams: Les rêves
projectsboost: Les projets boostés
projectsinspiring: Les projets inspirants
resume: Résumé
IndividualData:
label: Données individuel
label_plurial: Données du formulaire individuel
fields:
firstname: Prénom
lastname: Nom
Thematic:
label_plurial: Les thémes
label: Thématique
fields:
name: Nom
Territory:
label_plurial: Les territoires
label: Territoire
fields:
name: Nom
Configuration:
label_plurial: Les configurations
label: Configuration
form:
field:
dreams:

Carregando…
Cancelar
Salvar