Merge remote-tracking branch 'origin/#126-vacation-request-reminders' into #126-vacation-request-reminders

This commit is contained in:
EwelinaLasowy 2022-04-27 15:12:24 +02:00
commit 2727f4c69f

View File

@ -9,7 +9,6 @@ use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Toby\Eloquent\Models\User;
use Toby\Infrastructure\Slack\Elements\SlackMessage;
use Toby\Infrastructure\Slack\Elements\VacationRequestsAttachment;
@ -34,7 +33,7 @@ class VacationRequestsSummaryNotification extends Notification
->withAttachment(new VacationRequestsAttachment($this->vacationRequests));
}
public function toMail($notifiable): MailMessage
public function toMail(Notifiable $notifiable): MailMessage
{
$url = route(
"vacation.requests.indexForApprovers",
@ -46,9 +45,9 @@ class VacationRequestsSummaryNotification extends Notification
return $this->buildMailMessage($notifiable, $url);
}
protected function buildMailMessage(User $user, string $url): MailMessage
protected function buildMailMessage(Notifiable $notifiable, string $url): MailMessage
{
$user = $user->profile->first_name;
$user = $notifiable->profile->first_name;
$message = (new MailMessage())
->greeting(