parfum/app/Enums/UserStatus.php
Yoga Pangestu 637b35c63f fix(user): menghapus status suspend
- menyesuaikan logika resign date
- memperbaiki select data untuk resign date dan view nya
2025-11-13 13:27:54 +07:00

39 lines
783 B
PHP

<?php
namespace App\Enums;
use App\Traits\WithCommentEnum;
use App\Traits\WithValueEnum;
enum UserStatus: int
{
use WithCommentEnum, WithValueEnum;
case ACTIVE = 1;
case INACTIVE = 2;
public function label()
{
return match ($this) {
self::ACTIVE => 'Aktif',
self::INACTIVE => 'Tidak Aktif',
};
}
public function color()
{
return match ($this) {
self::ACTIVE => 'emerald',
self::INACTIVE => 'yellow',
};
}
public function gradient(): string
{
return match ($this) {
self::ACTIVE => 'bg-gradient-to-b from-emerald-800 to-emerald-400',
self::INACTIVE => 'bg-gradient-to-b from-yellow-800 to-yellow-400',
};
}
}