Browse Source

[Admin] ReductionCatalog : suppression optimisation

develop
Guillaume Bourgeois 1 year ago
parent
commit
18a8c4f8af
1 changed files with 11 additions and 12 deletions
  1. +11
    -12
      Definition/Field/Reduction/ReductionCatalogFieldDefinition.php

+ 11
- 12
Definition/Field/Reduction/ReductionCatalogFieldDefinition.php View File

} }


if(is_null($this->productFamilyArray)) { if(is_null($this->productFamilyArray)) {
$this->productFamilyArray = $this->productFamilyStore->setMerchant($this->merchant)->get();
$this->productFamilyArray = $this->productFamilyStore->setMerchant($this->merchant)->getOnlineAndOffline();
} }


if(is_null($this->productCategoryArray)) { if(is_null($this->productCategoryArray)) {


'usersActive' => BooleanField::new('usersActive')->setFormTypeOption('mapped', false), 'usersActive' => BooleanField::new('usersActive')->setFormTypeOption('mapped', false),


'users' => AssociationField::new('users')
'users' => /*ChoiceField::new('users')
->setChoices([null])
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig')
->setFormTypeOption('attr', [
'data-ajax' => json_encode([
'url' => $this->urlGenerator->generate('app_admin_ajax_users'),
'dataType' => 'json'
])
]),*/
AssociationField::new('users')
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') ->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig')
->setFormTypeOption('choices', $this->usersArray) ->setFormTypeOption('choices', $this->usersArray)
->setFormTypeOption( ->setFormTypeOption(
return ['data-group-users' => json_encode($data)]; return ['data-group-users' => json_encode($data)];
}, },
), ),

/*ChoiceField::new('users')
->setChoices([null])
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig')
->setFormTypeOption('attr', [
'data-ajax' => json_encode([
'url' => $this->urlGenerator->generate('app_admin_ajax_users'),
'dataType' => 'json'
])
]),*/
'productCategoriesActive' => BooleanField::new('productCategoriesActive')->setFormTypeOption('mapped', false), 'productCategoriesActive' => BooleanField::new('productCategoriesActive')->setFormTypeOption('mapped', false),
'productCategories' => AssociationField::new('productCategories') 'productCategories' => AssociationField::new('productCategories')
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') ->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig')

Loading…
Cancel
Save