Files
streakfit-api/app/Filament/Resources/Streaks/Schemas/StreakInfolist.php
T
2026-07-19 05:09:29 +02:00

45 lines
1.5 KiB
PHP

<?php
namespace App\Filament\Resources\Streaks\Schemas;
use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Schema;
/**
* Fiche de consultation d'un streak (modal "Voir") : calculé par StreakService,
* jamais créé ni modifié à la main depuis le back-office.
*/
class StreakInfolist
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextEntry::make('user.name')
->label('Utilisateur'),
TextEntry::make('current_count')
->label('Streak courant')
->badge()
->color('warning'),
TextEntry::make('longest_count')
->label('Record')
->numeric(),
TextEntry::make('freezes_available')
->label('Freezes disponibles')
->numeric(),
TextEntry::make('last_active_date')
->label('Dernière activité')
->date()
->placeholder('—'),
TextEntry::make('freeze_last_granted_on')
->label('Dernier freeze accordé')
->date()
->placeholder('—'),
TextEntry::make('last_reminded_on')
->label('Dernier rappel envoyé')
->date()
->placeholder('—'),
]);
}
}