This commit is contained in:
salam committed 2026-07-18 17:01:00 +02:00
1 parent 2be791d63b
commit 9e6f7e1c06
4 files changed
+8 -69

No files matched your search

@@ -23,32 +23,13 @@ class SofaScoreTasksTable
->width(30)
->icon(fn($record) => $record->sport->icon),
TextColumn::make('sport.name'),
IconColumn::make('compleated')
->width('1rem')
->label('Status')
->alignCenter()
->icon(fn(string $state): string => match ($state) {
'0' => 'phosphor-pause-fill',
'1' => 'phosphor-check-fat-fill',
})
->color(fn(string $state): string => match ($state) {
'0' => 'gray',
'1' => 'success',
}),
TextColumn::make('mode')
->label('Grapping dates')
->formatStateUsing(fn(string $state, $record): string => match ($state) {
'auto_updater' => 'Last 3 days',
'auto_updater' => 'Yesterday',
'date' => $record->day_from,
'range' => $record->day_from . ' <=> ' . $record->day_to,
}),
ToggleColumn::make('is_active')
->alignCenter()
->afterStateUpdated(function ($record) {
SofaScoreTask::where('id', $record->id)->update(['compleated' => 0]);
}),
ToggleColumn::make('run_repeatedly')->alignCenter(),
TextColumn::make('duration'),
])
->filters([
//