Przeglądaj źródła

thematique facultatif

develop
Charly 3 lat temu
rodzic
commit
1e7b41093a
6 zmienionych plików z 12 dodań i 7 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz