Merge branch 'main' of https://git.probindo.com/Probindo/database-pertani-web
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Bumdes;
|
||||
|
||||
enum JabatanBumdes: string
|
||||
{
|
||||
case DIREKTUR = 'direktur';
|
||||
case DIREKTUR_KETUA = 'direktur_ketua';
|
||||
case SEKRETARIS = 'sekretaris';
|
||||
case BENDAHARA = 'bendahara';
|
||||
case KEPALA_UNIT_USAHA = 'kepala_unit_usaha';
|
||||
case PENGAWAS = 'pengawas';
|
||||
case PENASIHAT = 'penasihat';
|
||||
case ANGGOTA = 'anggota';
|
||||
case STAF_OPERASIONAL = 'staf_operasional';
|
||||
case LAINNYA = 'lainnya';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::DIREKTUR => 'Direktur/Ketua',
|
||||
self::DIREKTUR_KETUA => 'Direktur/Ketua',
|
||||
self::SEKRETARIS => 'Sekretaris',
|
||||
self::BENDAHARA => 'Bendahara',
|
||||
self::KEPALA_UNIT_USAHA => 'Kepala Unit Usaha',
|
||||
self::PENGAWAS => 'Pengawas',
|
||||
self::PENASIHAT => 'Penasihat',
|
||||
self::ANGGOTA => 'Anggota',
|
||||
self::STAF_OPERASIONAL => 'Staf Operasional',
|
||||
self::LAINNYA => 'Lainnya',
|
||||
};
|
||||
}
|
||||
|
||||
public static function options(): array
|
||||
{
|
||||
return collect([
|
||||
self::DIREKTUR_KETUA,
|
||||
self::SEKRETARIS,
|
||||
self::BENDAHARA,
|
||||
self::LAINNYA,
|
||||
])->map(fn ($case) => [
|
||||
'value' => $case->value,
|
||||
'label' => $case->label(),
|
||||
])->toArray();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user