Add task assignment notification system

- Introduced `AssignTaskEvent`, `TaskAssignEventSubscriber`, and `AssignTaskNotificationFlagProvider` for task assignment notifications
- WIP : Added notification templates for task assignment title and content
- Updated `SingleTaskController` to dispatch `AssignTaskEvent`
- Adjusted translations and service configurations accordingly
This commit is contained in:
2025-08-14 14:54:18 +02:00
parent 30e1416018
commit ad579f3269
14 changed files with 177 additions and 15 deletions

View File

@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\TaskBundle\Event;
use Chill\MainBundle\Entity\User;
use Chill\TaskBundle\Entity\SingleTask;
use Symfony\Contracts\EventDispatcher\Event;
class AssignTaskEvent extends Event
{
final public const PERSIST = 'chill_task.assign_task';
public function __construct(
private readonly SingleTask $task,
private readonly User $assignedUser,
) {}
public function getTask(): SingleTask
{
return $this->task;
}
public function getAssignedUser(): User
{
return $this->assignedUser;
}
}