|
|
@@ -99,7 +99,7 @@ class ReductionCatalogFieldDefinition extends AbstractFieldDefinition |
|
|
|
} |
|
|
|
|
|
|
|
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)) { |
|
|
@@ -140,7 +140,16 @@ class ReductionCatalogFieldDefinition extends AbstractFieldDefinition |
|
|
|
|
|
|
|
'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') |
|
|
|
->setFormTypeOption('choices', $this->usersArray) |
|
|
|
->setFormTypeOption( |
|
|
@@ -154,16 +163,6 @@ class ReductionCatalogFieldDefinition extends AbstractFieldDefinition |
|
|
|
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), |
|
|
|
'productCategories' => AssociationField::new('productCategories') |
|
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/association_many.html.twig') |