Charly 3 лет назад
Родитель
Сommit
1e7b41093a
6 измененных файлов: 12 добавлений и 7 удалений
  1. +1
    -1
      Controller/IndividualData/IndividualDataAdminController.php
  2. +7
    -2
      Definition/Field/IndividualData/IndividualDataFieldDefinition.php
  3. +1
    -1
      Form/Dream/DreamType.php
  4. +1
    -1
      Form/ProjectBoost/ProjectBoostType.php
  5. +1
    -1
      Form/ProjectInspiring/ProjectInspiringType.php
  6. +1
    -1
      Form/Revolt/RevoltType.php

+ 1
- 1
Controller/IndividualData/IndividualDataAdminController.php Просмотреть файл

@@ -63,7 +63,7 @@ abstract class IndividualDataAdminController extends AbstractAdminController
): RepositoryQueryInterface {
$repositoryQuery = parent::createIndexRepositoryQuery($searchDto, $entityDto, $fields, $filters);
$status = $searchDto->getRequest()->get('status');
if ($status || $status == 0) {
if ($status || $status === 0) {
$repositoryQuery->filterByStatus($searchDto->getRequest()->get('status'));
}
return $repositoryQuery;

+ 7
- 2
Definition/Field/IndividualData/IndividualDataFieldDefinition.php Просмотреть файл

@@ -11,6 +11,7 @@ use Lc\PietroBundle\Form\Dream\DreamType;
use Lc\PietroBundle\Form\ProjectBoost\ProjectBoostType;
use Lc\PietroBundle\Form\ProjectInspiring\ProjectInspiringType;
use Lc\PietroBundle\Form\Revolt\RevoltType;
use Lc\PietroBundle\Repository\Territory\TerritoryStore;
use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
use Lc\SovBundle\Field\CollectionField;
use Lc\SovBundle\Field\StatusField;
@@ -21,10 +22,12 @@ class IndividualDataFieldDefinition extends AbstractFieldDefinition
{

protected AuthorizationCheckerInterface $authorizationChecker;
protected TerritoryStore $territoryStore;

public function __construct(TranslatorAdmin $translatorAdmin, AuthorizationCheckerInterface $authorizationChecker)
public function __construct(TranslatorAdmin $translatorAdmin, AuthorizationCheckerInterface $authorizationChecker, TerritoryStore $territoryStore)
{
$this->authorizationChecker = $authorizationChecker;
$this->territoryStore = $territoryStore;

parent::__construct($translatorAdmin);
}
@@ -46,10 +49,12 @@ class IndividualDataFieldDefinition extends AbstractFieldDefinition
{
$fields = array();

$territoryArray = $this->territoryStore->get();

$fields['firstname'] = TextField::new('firstname');
$fields['lastname'] = TextField::new('lastname');
$fields['email'] = EmailField::new('email');
$fields['territory'] = AssociationField::new('territory');
$fields['territory'] = AssociationField::new('territory')->setFormTypeOption('choices', $territoryArray);
$fields['nbDream'] = TextField::new('nbDream');
$fields['nbRevolt'] = TextField::new('nbRevolt');
$fields['nbProjectBoost'] = TextField::new('nbProjectBoost');

+ 1
- 1
Form/Dream/DreamType.php Просмотреть файл

@@ -58,7 +58,7 @@ class DreamType extends AbstractType
]
);
}
if ($options['context'] == "backend") {
if ($options['context'] == "backend" && $options['thematic'] == true) {
$builder->add(
'subthematic',
EntityType::class,

+ 1
- 1
Form/ProjectBoost/ProjectBoostType.php Просмотреть файл

@@ -58,7 +58,7 @@ class ProjectBoostType extends AbstractType
]
);
}
if ($options['context'] == "backend") {
if ($options['context'] == "backend" && $options['thematic'] == true) {
$builder->add(
'subthematic',
EntityType::class,

+ 1
- 1
Form/ProjectInspiring/ProjectInspiringType.php Просмотреть файл

@@ -59,7 +59,7 @@ class ProjectInspiringType extends AbstractType
]
);
}
if ($options['context'] == "backend") {
if ($options['context'] == "backend" && $options['thematic'] == true) {
$builder->add(
'subthematic',
EntityType::class,

+ 1
- 1
Form/Revolt/RevoltType.php Просмотреть файл

@@ -58,7 +58,7 @@ class RevoltType extends AbstractType
]
);
}
if ($options['context'] == "backend") {
if ($options['context'] == "backend" && $options['thematic'] == true) {
$builder->add(
'subthematic',
EntityType::class,

Загрузка…
Отмена
Сохранить