use formatDate method

This commit is contained in:
2026-03-18 16:30:27 +01:00
parent 2ca3100b3c
commit 400d70ff7e
9 changed files with 18 additions and 10 deletions
+2
View File
@@ -158,6 +158,8 @@ class TasksController extends Controller
'name' => $user->name,
'lastname' => $user->lastname,
'taskName' => $task->name,
'start' => $event->start,
'end' => $task->end,
];
Mail::to($user->email)->send(new TaskParticipationCancelledMail($data));
}
+3 -2
View File
@@ -2,6 +2,7 @@
namespace App\Mail;
use App\Services\FormatDate;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
@@ -43,8 +44,8 @@ class EventParticipationCancelledMail extends Mailable
'name' => $this->data['name'],
'lastname' => $this->data['lastname'],
'eventName' => $this->data['eventName'],
'start' => $this->data['start'],
'end' => $this->data['end'],
'start' => FormatDate::formatDate($this->data['start']),
'end' => FormatDate::formatDate($this->data['end']),
]
);
}
@@ -2,6 +2,7 @@
namespace App\Mail;
use App\Services\FormatDate;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
@@ -43,6 +44,8 @@ class TaskParticipationCancelledMail extends Mailable
'name' => $this->data['name'],
'lastname' => $this->data['lastname'],
'taskName' => $this->data['taskName'],
'end' => FormatDate::formatDate($this->data['end']),
'start' => FormatDate::formatDate($this->data['start']),
]
);
}
+3 -2
View File
@@ -2,6 +2,7 @@
namespace App\Mail;
use App\Services\FormatDate;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
@@ -43,8 +44,8 @@ class VolunteerAssignToTaskMail extends Mailable
'name' => $this->data['name'],
'lastname' => $this->data['lastname'],
'taskName' => $this->data['taskName'],
'start' => $this->data['start'],
'end' => $this->data['end'],
'start' => FormatDate::formatDate($this->data['start']),
'end' => FormatDate::formatDate($this->data['end']),
]
);
}
+3 -2
View File
@@ -8,6 +8,7 @@ use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use App\Services\FormatDate;
class VolunteerUnassignToTaskMail extends Mailable
{
@@ -43,8 +44,8 @@ class VolunteerUnassignToTaskMail extends Mailable
'name' => $this->data['name'],
'lastname' => $this->data['lastname'],
'taskName' => $this->data['taskName'],
'start' => $this->data['start'],
'end' => $this->data['end'],
'start' => FormatDate::formatDate($this->data['start']),
'end' => FormatDate::formatDate($this->data['end']),
]
);
}
@@ -11,7 +11,7 @@
<p>
L’événement {{ $eventName }} a été supprimé par un administrateur.
Vous ny participez donc plus. Cet événement avait lieu de {{ $start }} à {{ $end }}.
Vous ny participez donc plus. Cet événement avait lieu du {{ $start }} au {{ $end }}.
</p>
<p>
@@ -11,7 +11,7 @@
<p>
La tâche {{ $taskName }} a été supprimé par un administrateur.
Vous ny participez donc plus.
Vous ny participez donc plus. Cette tâche avait lieu du {{ $start }} au {{ $end }}.
</p>
<p>
@@ -11,7 +11,7 @@
<p>
Vous avez été assigné à la tâche {{ $taskName }} par un administrateur.
Cette tâche aura lieu de {{ $start }} à {{ $end }}.
Cette tâche aura lieu du {{ $start }} au {{ $end }}.
</p>
<p>
@@ -11,7 +11,7 @@
<p>
Vous avez été désassigné de la tâche {{ $taskName }} par un administrateur.
Vous n'y participez donc plus. Cette tâche avait lieu de {{ $start }} à {{ $end }}.
Vous n'y participez donc plus. Cette tâche avait lieu du {{ $start }} au {{ $end }}.
</p>
<p>