Ausstehenden Erstimport von veraltetem Kalender unterscheiden
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m41s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m41s
This commit is contained in:
1 parent
0be1cfcdb8
commit
e5a083ce71
4 files changed
+35
-2
No files matched your search
@@ -42,8 +42,21 @@ public static function configure(Table $table, ?Property $owner = null): Table
|
||||
TextColumn::make('name')->label('Portal')->weight('bold')->searchable()->sortable()->wrap()->extraAttributes(['style' => 'overflow-wrap:anywhere']),
|
||||
TextColumn::make('property.name')->label('Wohnung')->visible($owner === null)->searchable()->color('gray')->wrap(),
|
||||
TextColumn::make('channel_state')->label('Status')->badge()->wrap()
|
||||
->state(fn (Channel $record): string => $record->importsOccupations() && $record->last_error !== null ? 'Importfehler' : ($record->importsOccupations() && $record->isStale() ? 'Import veraltet' : $record->status->getLabel()))
|
||||
->color(fn (Channel $record): string => $record->importsOccupations() && ($record->last_error !== null || $record->isStale()) ? 'danger' : ($record->is_active ? 'success' : 'gray'))
|
||||
->state(fn (Channel $record): string => match (true) {
|
||||
! $record->importsOccupations() => $record->status->getLabel(),
|
||||
$record->last_error !== null => 'Importfehler',
|
||||
$record->last_success_at === null => 'Erster Import ausstehend',
|
||||
$record->isStale() => 'Import veraltet',
|
||||
default => $record->status->getLabel(),
|
||||
})
|
||||
->color(fn (Channel $record): string => match (true) {
|
||||
! $record->is_active => 'gray',
|
||||
! $record->importsOccupations() => 'success',
|
||||
$record->last_error !== null => 'danger',
|
||||
$record->last_success_at === null => 'warning',
|
||||
$record->isStale() => 'danger',
|
||||
default => 'success',
|
||||
})
|
||||
->description(fn (Channel $record): ?string => $record->review_count || count($record->sync_warnings ?? []) ? 'Prüffälle: '.$record->review_count.' · Hinweise: '.count($record->sync_warnings ?? []) : null)
|
||||
->tooltip(fn (Channel $record): ?string => $record->last_error),
|
||||
TextColumn::make('directions')->label('Richtungen')->color('gray')->wrap()
|
||||
|
||||
Reference in new issue
Block a user