* #2 - wip * #2 - wip * #2 - ui fixes to login page * #2 - fix * #2 - fix * #4- wip * #4 - wip * #4 - wip * #4 - wip * #4- wip * #4 - wip * #4 - wip * #4 - tests * #4 - ecs fix * #4 - fix * #4 - wip * #4 - fix * #4 - fix * #4 - fix composer * #4 - cr fix Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
		
							
								
								
									
										30
									
								
								app/Enums/EmploymentForm.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								app/Enums/EmploymentForm.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| <?php | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Toby\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(); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user