feat: filament for users

This commit is contained in:
2026-05-21 14:53:44 +02:00
parent 646f5a1ea8
commit f24999d7fb
8 changed files with 365 additions and 37 deletions
+12 -1
View File
@@ -2,9 +2,20 @@
namespace App\Enums;
enum PacePreference: string
use Filament\Support\Contracts\HasLabel;
enum PacePreference: string implements HasLabel
{
case SLOW = 'slow';
case NORMAL = 'normal';
case FAST = 'fast';
public function getLabel(): string
{
return match ($this) {
self::SLOW => 'Lent',
self::NORMAL => 'Normal',
self::FAST => 'Rapide',
};
}
}
+14 -1
View File
@@ -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',
};
}
}
+13 -1
View File
@@ -2,10 +2,22 @@
namespace App\Enums;
enum UserSex: string
use Filament\Support\Contracts\HasLabel;
enum UserSex: string implements HasLabel
{
case MAN = 'man';
case WOMAN = 'woman';
case OTHER = 'other';
case UNKNOWN = 'unknown';
public function getLabel(): string
{
return match ($this) {
self::MAN => 'Homme',
self::WOMAN => 'Femme',
self::OTHER => 'Autre',
self::UNKNOWN => 'Non renseigné',
};
}
}
+12 -1
View File
@@ -2,9 +2,20 @@
namespace App\Enums;
enum WeightGoal: string
use Filament\Support\Contracts\HasLabel;
enum WeightGoal: string implements HasLabel
{
case LOSE_WEIGHT = 'lose_weight';
case MAINTAIN_WEIGHT = 'maintain_weight';
case GAIN_WEIGHT = 'gain_weight';
public function getLabel(): string
{
return match ($this) {
self::LOSE_WEIGHT => 'Perdre du poids',
self::MAINTAIN_WEIGHT => 'Maintenir le poids',
self::GAIN_WEIGHT => 'Prendre du poids',
};
}
}