feat: filament for users
This commit is contained in:
@@ -2,11 +2,24 @@
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum PhysicalActivityLevel: string
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
enum PhysicalActivityLevel: string implements HasLabel
|
||||
{
|
||||
case SEDENTARY = 'sedentary';
|
||||
case LIGHTLY_ACTIVE = 'lightly_active';
|
||||
case MODERATELY_ACTIVE = 'moderately_active';
|
||||
case VERY_ACTIVE = 'very_active';
|
||||
case ATHLETE = 'athlete';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::SEDENTARY => 'Sédentaire',
|
||||
self::LIGHTLY_ACTIVE => 'Légèrement actif',
|
||||
self::MODERATELY_ACTIVE => 'Modérément actif',
|
||||
self::VERY_ACTIVE => 'Très actif',
|
||||
self::ATHLETE => 'Athlète',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user