wip
This commit is contained in:
1 parent
fc0f18ba73
commit
558430114a
11 files changed
+98
-135
No files matched your search
+5
-6
@@ -23,33 +23,32 @@ class SofaScoreTasksTable
|
||||
->label('')
|
||||
->grow(false)
|
||||
->width(30)
|
||||
->icon(fn ($record) => $record->sport->icon),
|
||||
->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) {
|
||||
->icon(fn(string $state): string => match ($state) {
|
||||
'0' => 'phosphor-pause-fill',
|
||||
'1' => 'phosphor-check-fat-fill',
|
||||
})
|
||||
->color(fn (string $state): string => match ($state) {
|
||||
->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) {
|
||||
->formatStateUsing(fn(string $state, $record): string => match ($state) {
|
||||
'yesterday' => 'Every yesterday',
|
||||
'date' => $record->day_from,
|
||||
'range' => $record->day_from.' <=> '.$record->day_to,
|
||||
'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_slow')->alignCenter(),
|
||||
ToggleColumn::make('run_repeatedly')->alignCenter(),
|
||||
TextColumn::make('duration'),
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user