change vacation request name

This commit is contained in:
Adrian Hopek
2022-03-17 13:32:38 +01:00
parent dc77292278
commit 4f6883b451
6 changed files with 11 additions and 42 deletions

View File

@@ -32,8 +32,10 @@ class SendVacationRequestDaysToGoogleCalendar implements ShouldQueue
$ranges = $this->prepareRanges($days);
foreach ($ranges as $range) {
$text = "{$this->vacationRequest->type->label()} - {$this->vacationRequest->user->fullName} [{$this->vacationRequest->name}]";
$event = Event::create([
"name" => "{$this->vacationRequest->type->label()} - {$this->vacationRequest->user->fullName}",
"name" => $text,
"startDate" => Carbon::create($range["from"]),
"endDate" => Carbon::create($range["to"])->addDay(),
]);