wip countries
This commit is contained in:
1 parent
641b362752
commit
1b9a65b25a
23 files changed
+127755
-27137
No files matched your search
@@ -8,12 +8,15 @@ use App\Models\Country;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Enums\IconSize;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\Filter;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use UnitEnum;
|
||||
|
||||
class CountryResource extends Resource
|
||||
@@ -34,13 +37,14 @@ class CountryResource extends Resource
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')->required()->maxLength(255)->copyable(),
|
||||
TextInput::make('icon')->maxLength(255),
|
||||
TextInput::make('name')->required(),
|
||||
TextInput::make('icon'),
|
||||
TextInput::make('iso2')->maxLength(2),
|
||||
TextInput::make('iso3')->maxLength(2),
|
||||
TextInput::make('cc')->maxLength(2),
|
||||
TextInput::make('numeric')->maxLength(2),
|
||||
TextInput::make('txid')->maxLength(4),
|
||||
TextInput::make('iso3')->maxLength(3),
|
||||
TextInput::make('cc'),
|
||||
TextInput::make('numeric'),
|
||||
TextInput::make('txid'),
|
||||
Toggle::make('other'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -49,6 +53,7 @@ class CountryResource extends Resource
|
||||
return $table
|
||||
->recordTitleAttribute('name')
|
||||
->columns([
|
||||
TextColumn::make('id')->searchable(),
|
||||
IconColumn::make('icon')
|
||||
->sortable()
|
||||
->icon(function ($state): string {
|
||||
@@ -63,12 +68,15 @@ class CountryResource extends Resource
|
||||
TextColumn::make('iso3'),
|
||||
TextColumn::make('cc'),
|
||||
TextColumn::make('numeric'),
|
||||
TextColumn::make('txid'),
|
||||
TextColumn::make('txid')->searchable(),
|
||||
TextColumn::make('other'),
|
||||
|
||||
])
|
||||
->defaultSort('name', direction: 'asc')
|
||||
->filters([
|
||||
//
|
||||
Filter::make('icon')
|
||||
->label('Missing Icons')
|
||||
->query(fn (Builder $query): Builder => $query->whereNull('icon')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
|
||||
@@ -27,6 +27,14 @@ class SupervisorForm
|
||||
])
|
||||
->default('Grapper')
|
||||
->selectablePlaceholder(false),
|
||||
Select::make('filetype')
|
||||
->label('File Type')
|
||||
->options([
|
||||
'json' => 'json',
|
||||
'xml' => 'xml',
|
||||
])
|
||||
->default('json')
|
||||
->selectablePlaceholder(false),
|
||||
Select::make('provider_id')
|
||||
->relationship('provider', 'name')
|
||||
->required()
|
||||
|
||||
@@ -39,6 +39,7 @@ class SupervisorsTable
|
||||
TextColumn::make('runtime'),
|
||||
TextColumn::make('lastcall'),
|
||||
IconColumn::make('is_cron')->boolean()->label('Cron')->falseColor('gray'),
|
||||
TextColumn::make('filetype')->badge()->alignCenter(),
|
||||
TextColumn::make('created_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
|
||||
Reference in new issue
Block a user