Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/Domain/TimesheetPerUserSheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use PhpOffice\PhpSpreadsheet\Style\Fill;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Toby\Enums\VacationType;
use Toby\Models\Holiday;
use Toby\Models\User;
use Toby\Models\Vacation;
Expand Down Expand Up @@ -121,7 +120,7 @@ public function generator(): Generator
$workedThisDay ? static::HOURS_PER_DAY : null,
];

foreach (VacationType::cases() as $type) {
foreach ($this->types as $type) {
$row[] = $vacationsForDay->has($type->value) ? static::HOURS_PER_DAY : null;
}

Expand Down
2 changes: 1 addition & 1 deletion app/Enums/VacationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
enum VacationType: string
{
case RemoteWork = "remote_work";
case Absence = "absence";
case Vacation = "vacation";
case Sick = "sick_vacation";
case Special = "special_vacation";
Expand All @@ -20,6 +19,7 @@ enum VacationType: string
case Training = "training_vacation";
case Childcare = "childcare_vacation";
case Volunteering = "volunteering_vacation";
case Absence = "absence";

public static function casesToSelect(): array
{
Expand Down