#108 - types of vacation request (#110)

* #108 - wip

* #108 - add icon to absence

* #108 - wip

* #108 - fix

* #108 - fix title

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-04-06 15:13:54 +02:00
committed by GitHub
parent fa244b96cd
commit 6af4380fe6
22 changed files with 208 additions and 48 deletions

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Toby\Domain\Enums;
use Illuminate\Support\Collection;
enum VacationType: string
{
case Vacation = "vacation";
@@ -15,6 +17,7 @@ enum VacationType: string
case Volunteering = "volunteering_vacation";
case TimeInLieu = "time_in_lieu";
case Sick = "sick_vacation";
case Absence = "absence";
public function label(): string
{
@@ -23,7 +26,7 @@ enum VacationType: string
public static function casesToSelect(): array
{
$cases = collect(VacationType::cases());
$cases = VacationType::all();
return $cases->map(
fn(VacationType $enum) => [
@@ -32,4 +35,9 @@ enum VacationType: string
],
)->toArray();
}
public static function all(): Collection
{
return new Collection(VacationType::cases());
}
}