toby/app/Domain/Enums/EmploymentForm.php
Adrian Hopek 067b343f24
#20 - vacation requests (#35)
* #20 - wip

* #20 - wip

* #20 - fix

* #20 - wip

* #20 - fix

* #20 - fix
2022-02-03 08:39:09 +01:00

31 lines
689 B
PHP

<?php
declare(strict_types=1);
namespace Toby\Domain\Enums;
enum EmploymentForm: string
{
case EMPLOYMENT_CONTRACT = "employment_contract";
case COMMISSION_CONTRACT = "commission_contract";
case B2B_CONTRACT = "b2b_contract";
case BOARD_MEMBER_CONTRACT = "board_member_contract";
public function label(): string
{
return __($this->value);
}
public static function casesToSelect(): array
{
$cases = collect(EmploymentForm::cases());
return $cases->map(
fn(EmploymentForm $enum) => [
"label" => $enum->label(),
"value" => $enum->value,
],
)->toArray();
}
}