mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +00:00 
			
		
		
		
	remove date field
This commit is contained in:
		| @@ -11,9 +11,9 @@ declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; | ||||
|  | ||||
| use Chill\MainBundle\Entity\User; | ||||
| use Chill\MainBundle\Export\FilterInterface; | ||||
| use Chill\MainBundle\Form\Type\PickUserDynamicType; | ||||
| use Chill\MainBundle\Templating\TranslatableStringHelper; | ||||
| use Chill\PersonBundle\Export\Declarations; | ||||
| use Doctrine\ORM\QueryBuilder; | ||||
| use Symfony\Component\Form\FormBuilderInterface; | ||||
| @@ -22,9 +22,7 @@ class CreatorFilter implements FilterInterface | ||||
| { | ||||
|     private const PREFIX = 'acpw_filter_creator'; | ||||
|  | ||||
|     public function __construct( | ||||
|         private readonly TranslatableStringHelper $translatableStringHelper | ||||
|     ) {} | ||||
|     public function __construct() {} | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -38,12 +36,7 @@ class CreatorFilter implements FilterInterface | ||||
|         $qb | ||||
|             ->join('acpw.createdBy', "{$p}_creator") | ||||
|             ->andWhere($qb->expr()->in("{$p}_creator", ":{$p}_creators")) | ||||
|             ->setParameter("{$p}_creators", $data['creators']) | ||||
|             //->setParameter("{$p}_calc_date", $this->rollingDateConverter->convert( | ||||
|             //    $data['creator_at'] ?? new RollingDate(RollingDate::T_TODAY) | ||||
|             //)) | ||||
|         ; | ||||
|  | ||||
|             ->setParameter("{$p}_creators", $data['creators']); | ||||
|     } | ||||
|  | ||||
|     public function applyOn(): string | ||||
| @@ -57,24 +50,22 @@ class CreatorFilter implements FilterInterface | ||||
|             ->add('creators', PickUserDynamicType::class, [ | ||||
|                 'multiple' => true, | ||||
|                 'label' => 'export.filter.work.by_creator.Creators', | ||||
|             ]) | ||||
|             //->add('creator_at', PickRollingDateType::class, [ | ||||
|             //    'label' => 'export.filter.work.by_creator.Calc date', | ||||
|             //    'help' => 'export.filter.work.by_creator.calc_date_help', | ||||
|             //]) | ||||
|         ; | ||||
|             ]); | ||||
|     } | ||||
|  | ||||
|     public function describeAction($data, $format = 'string'): array | ||||
|     { | ||||
|         return []; | ||||
|         return [ | ||||
|             'export.filter.work.by_creator.Filtered by creator: only %creators%', [ | ||||
|                 '%creators%' => implode(', ', array_map(static fn (User $u) => $u->getLabel(), $data['creators'])), | ||||
|             ], | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|         return [ | ||||
|             'creators' => [], | ||||
|             //'creator_at' => new RollingDate(RollingDate::T_TODAY), | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1223,6 +1223,7 @@ export: | ||||
|             by_creator: | ||||
|                 title: Filtrer les actions par créateur | ||||
|                 Creators: Créateur de l'action | ||||
|                 "Filtered by creator: only %creators%": "Filtré par créateur de l'action: uniquement %creators%" | ||||
|                 #Calc date: Date à laquelle le créateur ... | ||||
|                 #calc_date_help: Il s'agit de la date à laquelle le créateur ... | ||||
|             by_creator_job: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user