Neuordnung des SuperAdminBackends
This commit is contained in:
@@ -2,33 +2,38 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use App\Filament\Clusters\WeeklyOps\WeeklyOpsCluster;
|
||||
use App\Filament\Resources\TaskResource\Pages;
|
||||
use App\Models\Task;
|
||||
use Filament\Forms\Components\KeyValue;
|
||||
use BackedEnum;
|
||||
use Filament\Actions;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Forms\Components\MarkdownEditor;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Components\Tabs as SchemaTabs;
|
||||
use Filament\Schemas\Components\Tabs\Tab as SchemaTab;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Actions;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
|
||||
class TaskResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Task::class;
|
||||
|
||||
protected static ?string $cluster = WeeklyOpsCluster::class;
|
||||
|
||||
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-clipboard-document-check';
|
||||
|
||||
protected static UnitEnum|string|null $navigationGroup = null;
|
||||
|
||||
protected static ?int $navigationSort = 30;
|
||||
|
||||
public static function getNavigationGroup(): UnitEnum|string|null
|
||||
{
|
||||
return __('admin.nav.tasks_emotions');
|
||||
return __('admin.nav.curation');
|
||||
}
|
||||
|
||||
public static function getNavigationLabel(): string
|
||||
@@ -106,8 +111,10 @@ class TaskResource extends Resource
|
||||
$value = $record->title;
|
||||
if (is_array($value)) {
|
||||
$loc = app()->getLocale();
|
||||
|
||||
return $value[$loc] ?? ($value['de'] ?? ($value['en'] ?? ''));
|
||||
}
|
||||
|
||||
return (string) $value;
|
||||
})
|
||||
->limit(60)
|
||||
@@ -119,8 +126,10 @@ class TaskResource extends Resource
|
||||
$value = optional($record->emotion)->name;
|
||||
if (is_array($value)) {
|
||||
$loc = app()->getLocale();
|
||||
|
||||
return $value[$loc] ?? ($value['de'] ?? ($value['en'] ?? ''));
|
||||
}
|
||||
|
||||
return (string) ($value ?? '');
|
||||
})
|
||||
->sortable()
|
||||
@@ -132,8 +141,10 @@ class TaskResource extends Resource
|
||||
$value = optional($record->eventType)->name;
|
||||
if (is_array($value)) {
|
||||
$loc = app()->getLocale();
|
||||
|
||||
return $value[$loc] ?? ($value['de'] ?? ($value['en'] ?? ''));
|
||||
}
|
||||
|
||||
return (string) ($value ?? '');
|
||||
})
|
||||
->toggleable(),
|
||||
|
||||
Reference in New Issue
Block a user