Refactor navigation icon declarations in various resources for consistency; enhance Group model with new relationships and fillable properties; update Hotel and Pilgrim models with fillable attributes; improve table configurations across resources.
This commit is contained in:
51
app/Filament/Resources/Programs/Schemas/ProgramForm.php
Normal file
51
app/Filament/Resources/Programs/Schemas/ProgramForm.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Programs\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Repeater;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\TimePicker;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class ProgramForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('group_id')
|
||||
->relationship('group', 'name')
|
||||
->label('Topar')
|
||||
->required(),
|
||||
Repeater::make('days')
|
||||
->label('Günler')
|
||||
->itemLabel(fn (array $state): ?string => ($state['day_number'] ?? '').'-nji gün')
|
||||
->schema([
|
||||
TextInput::make('day_number')
|
||||
->numeric()
|
||||
->required()
|
||||
->label('Günüň belgisi'),
|
||||
Repeater::make('actions')
|
||||
->label('Actionlar')
|
||||
->schema([
|
||||
TextInput::make('title')
|
||||
->label('Ady')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Textarea::make('description')
|
||||
->label('Düşündirişi')
|
||||
->columnSpanFull(),
|
||||
TimePicker::make('time')
|
||||
->label('Wagty'),
|
||||
TextInput::make('icon')
|
||||
->label('Ikony')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
])
|
||||
->columns(2),
|
||||
])->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
21
app/Filament/Resources/Programs/Schemas/ProgramInfolist.php
Normal file
21
app/Filament/Resources/Programs/Schemas/ProgramInfolist.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Programs\Schemas;
|
||||
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class ProgramInfolist
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('group.id'),
|
||||
TextEntry::make('created_at')
|
||||
->dateTime(),
|
||||
TextEntry::make('updated_at')
|
||||
->dateTime(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user