diff --git a/app/Http/Controllers/TasksController.php b/app/Http/Controllers/TasksController.php index 46857ba..0696e53 100644 --- a/app/Http/Controllers/TasksController.php +++ b/app/Http/Controllers/TasksController.php @@ -155,12 +155,12 @@ class TasksController extends Controller $event = Event::findOrFail($task->events_id); Notification::send($task->users, new TaskDateUpdated( - task: $task, - event: $event, + task: $task, + event: $event, oldStart: FormatDate::formatDate($task->start), - oldEnd: FormatDate::formatDate($task->end), + oldEnd: FormatDate::formatDate($task->end), newStart: FormatDate::formatDate($request['start']), - newEnd: FormatDate::formatDate($request['end']), + newEnd: FormatDate::formatDate($request['end']), )); } diff --git a/app/Notifications/TaskDateUpdated.php b/app/Notifications/TaskDateUpdated.php index 9bbc818..4e52690 100644 --- a/app/Notifications/TaskDateUpdated.php +++ b/app/Notifications/TaskDateUpdated.php @@ -43,13 +43,13 @@ class TaskDateUpdated extends Notification implements ShouldBroadcast public function toDatabase($notifiable): array { return [ - 'message' => "La date de la tâche {$this->task->name} de l'événement {$this->event->name} a été mise à jour. Cette tâche aura maintenant lieu du {$this->newStart} au {$this->newEnd}.", - 'task_id' => $this->task->id, + 'message' => "La date de la tâche {$this->task->name} de l'événement {$this->event->name} a été mise à jour. Cette tâche aura maintenant lieu du {$this->newStart} au {$this->newEnd}.", + 'task_id' => $this->task->id, 'event_id' => $this->event->id, 'old_start' => $this->oldStart, - 'old_end' => $this->oldEnd, + 'old_end' => $this->oldEnd, 'new_start' => $this->newStart, - 'new_end' => $this->newEnd, + 'new_end' => $this->newEnd, ]; } @@ -61,13 +61,13 @@ class TaskDateUpdated extends Notification implements ShouldBroadcast public function toMail($notifiable): void { Mail::to($notifiable->email)->send(new TaskDateUpdateMail([ - 'name' => $notifiable->name, - 'lastname' => $notifiable->lastname, - 'taskName' => $this->task->name, - 'oldStart' => $this->oldStart, - 'oldEnd' => $this->oldEnd, - 'newStart' => $this->newStart, - 'newEnd' => $this->newEnd, + 'name' => $notifiable->name, + 'lastname' => $notifiable->lastname, + 'taskName' => $this->task->name, + 'oldStart' => $this->oldStart, + 'oldEnd' => $this->oldEnd, + 'newStart' => $this->newStart, + 'newEnd' => $this->newEnd, 'eventName' => $this->event->name, ])); } diff --git a/app/Notifications/TaskDeleted.php b/app/Notifications/TaskDeleted.php index 401f2cf..775d88e 100644 --- a/app/Notifications/TaskDeleted.php +++ b/app/Notifications/TaskDeleted.php @@ -39,8 +39,8 @@ class TaskDeleted extends Notification implements ShouldBroadcast public function toDatabase($notifiable): array { return [ - 'message' => "La tâche {$this->task->name} pour l'événement {$this->event->name} a été supprimée. Vous n'y participez donc plus.", - 'task_id' => $this->task->id, + 'message' => "La tâche {$this->task->name} pour l'événement {$this->event->name} a été supprimée. Vous n'y participez donc plus.", + 'task_id' => $this->task->id, 'event_id' => $this->event->id, ]; } @@ -53,11 +53,11 @@ class TaskDeleted extends Notification implements ShouldBroadcast public function toMail($notifiable): void { Mail::to($notifiable->email)->send(new TaskParticipationCancelledMail([ - 'name' => $notifiable->name, - 'lastname' => $notifiable->lastname, - 'taskName' => $this->task->name, - 'start' => $this->event->start, - 'end' => $this->task->end, + 'name' => $notifiable->name, + 'lastname' => $notifiable->lastname, + 'taskName' => $this->task->name, + 'start' => $this->event->start, + 'end' => $this->task->end, 'eventName' => $this->event->name, ])); } diff --git a/app/Notifications/UserRegistered.php b/app/Notifications/UserRegistered.php index a8345ff..f26d558 100644 --- a/app/Notifications/UserRegistered.php +++ b/app/Notifications/UserRegistered.php @@ -49,9 +49,9 @@ class UserRegistered extends Notification implements ShouldBroadcast public function toMail($notifiable): MailMessage { Mail::to($notifiable->email)->send(new RegisterMail([ - 'adminName' => $notifiable->name, + 'adminName' => $notifiable->name, 'adminLastname'=> $notifiable->lastname, - 'userName' => $this->user->name, + 'userName' => $this->user->name, 'userLastname' => $this->user->lastname, ])); diff --git a/app/Notifications/VolunteerAssignedToTask.php b/app/Notifications/VolunteerAssignedToTask.php index a64dd43..42f94b9 100644 --- a/app/Notifications/VolunteerAssignedToTask.php +++ b/app/Notifications/VolunteerAssignedToTask.php @@ -39,8 +39,8 @@ class VolunteerAssignedToTask extends Notification implements ShouldBroadcast public function toDatabase($notifiable): array { return [ - 'message' => "Vous avez été assigné à la tâche {$this->task->name} de l'événement {$this->event->name}.", - 'task_id' => $this->task->id, + 'message' => "Vous avez été assigné à la tâche {$this->task->name} de l'événement {$this->event->name}.", + 'task_id' => $this->task->id, 'event_id' => $this->event->id, ]; } @@ -53,11 +53,11 @@ class VolunteerAssignedToTask extends Notification implements ShouldBroadcast public function toMail($notifiable): void { Mail::to($notifiable->email)->send(new VolunteerAssignToTaskMail([ - 'name' => $notifiable->name, - 'lastname' => $notifiable->lastname, - 'taskName' => $this->task->name, - 'start' => $this->task->start, - 'end' => $this->task->end, + 'name' => $notifiable->name, + 'lastname' => $notifiable->lastname, + 'taskName' => $this->task->name, + 'start' => $this->task->start, + 'end' => $this->task->end, 'eventName' => $this->event->name, ])); } diff --git a/app/Notifications/VolunteerRoleUpdated.php b/app/Notifications/VolunteerRoleUpdated.php index 60bb9f9..060c181 100644 --- a/app/Notifications/VolunteerRoleUpdated.php +++ b/app/Notifications/VolunteerRoleUpdated.php @@ -47,9 +47,9 @@ class VolunteerRoleUpdated extends Notification implements ShouldBroadcast public function toMail($notifiable): void { Mail::to($notifiable->email)->send(new UpdateRoleMail([ - 'name' => $notifiable->name, + 'name' => $notifiable->name, 'lastname' => $notifiable->lastname, - 'role' => $this->role, + 'role' => $this->role, ])); } } diff --git a/app/Notifications/VolunteerUnassignedFromTask.php b/app/Notifications/VolunteerUnassignedFromTask.php index 8f83bb8..45e5af4 100644 --- a/app/Notifications/VolunteerUnassignedFromTask.php +++ b/app/Notifications/VolunteerUnassignedFromTask.php @@ -40,8 +40,8 @@ class VolunteerUnassignedFromTask extends Notification implements ShouldBroadcas public function toDatabase($notifiable): array { return [ - 'message' => "Vous avez été désassigné de la tâche {$this->task->name} de l'événement {$this->event->name}.", - 'task_id' => $this->task->id, + 'message' => "Vous avez été désassigné de la tâche {$this->task->name} de l'événement {$this->event->name}.", + 'task_id' => $this->task->id, 'event_id' => $this->event->id, ]; } @@ -54,11 +54,11 @@ class VolunteerUnassignedFromTask extends Notification implements ShouldBroadcas public function toMail($notifiable): void { Mail::to($notifiable->email)->send(new VolunteerUnassignToTaskMail([ - 'name' => $notifiable->name, - 'lastname' => $notifiable->lastname, - 'taskName' => $this->task->name, - 'start' => $this->task->start, - 'end' => $this->task->end, + 'name' => $notifiable->name, + 'lastname' => $notifiable->lastname, + 'taskName' => $this->task->name, + 'start' => $this->task->start, + 'end' => $this->task->end, 'eventName' => $this->event->name, ])); }