feat: override feedback author
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use App\Entity\Destination;
|
||||
use App\Entity\Feedback;
|
||||
use App\Entity\FeedbackSet;
|
||||
use App\Entity\Teamer;
|
||||
use App\Entity\User;
|
||||
use App\Repository\FeedbackSetRepository;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
@@ -32,6 +32,17 @@ class AdminFeedbackType extends AbstractType
|
||||
'label_function' => fn(Teamer $teamer) => (string) $teamer,
|
||||
'endpoint_route' => 'app_admin_autocomplete_teamer',
|
||||
])
|
||||
->add('authorOverride', AutocompleteEntityType::class, [
|
||||
'mapped' => false,
|
||||
'label' => 'abweichender Absender',
|
||||
'class' => User::class,
|
||||
'label_property' => 'lastName',
|
||||
'label_function' => fn(User $user) => (string) $user,
|
||||
'endpoint_route' => 'app_admin_autocomplete_user',
|
||||
'endpoint_parameters' => [
|
||||
'role' => 'ROLE_HOUSE_MANAGER',
|
||||
],
|
||||
])
|
||||
->add('feedbackSet', EntityType::class, [
|
||||
'label' => 'Feedbackvorlage',
|
||||
'class' => FeedbackSet::class,
|
||||
|
||||
Reference in New Issue
Block a user