Build & Deploy / build (push) Successful in 19s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.5 KiB
PHP
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('—'),
|
|
]);
|
|
}
|
|
}
|