Add Turkmen localization and update Filament resources; configure timezone and locale settings
This commit is contained in:
10
app/Filament/Pages/Dashboard.php
Normal file
10
app/Filament/Pages/Dashboard.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use Filament\Pages\Dashboard as BaseDashboard;
|
||||
|
||||
class Dashboard extends BaseDashboard
|
||||
{
|
||||
protected static ?string $navigationLabel = 'Dolandyryş paneli';
|
||||
}
|
||||
@@ -20,6 +20,12 @@ class DocumentResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $navigationLabel = 'Resminamalar';
|
||||
|
||||
protected static ?string $pluralLabel = 'Resminamalar';
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return DocumentForm::configure($schema);
|
||||
|
||||
@@ -14,6 +14,7 @@ use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
|
||||
class GroupResource extends Resource
|
||||
{
|
||||
@@ -21,7 +22,18 @@ class GroupResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'namenamenamname';
|
||||
protected static ?string $navigationLabel = 'Toparlar';
|
||||
|
||||
protected static ?string $pluralLabel = 'Toparlar';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
public static function getNavigationIcon(): string | BackedEnum | Htmlable | null
|
||||
{
|
||||
return 'heroicon-o-user-group';
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
|
||||
@@ -13,7 +13,8 @@ class ListGroups extends ListRecords
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
CreateAction::make()
|
||||
->label('Täze topar'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Filament\Resources\Groups\Schemas;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class GroupForm
|
||||
@@ -12,8 +14,13 @@ class GroupForm
|
||||
return $schema
|
||||
->components([
|
||||
DatePicker::make('start_date')
|
||||
->required(),
|
||||
->label('Başlanýan senesi')
|
||||
->required()
|
||||
->live()
|
||||
->afterStateUpdated(fn(Set $set, ?string $state) => $set('end_date', $state ? Carbon::parse($state)->addDays(14)->format('Y-m-d') : null)),
|
||||
|
||||
DatePicker::make('end_date')
|
||||
->label('Gutarýan senesi')
|
||||
->required(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -15,15 +15,20 @@ class GroupsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('start_date')
|
||||
->label('Başlanýan senesi')
|
||||
->date()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('end_date')
|
||||
->label('Gutarýan senesi')
|
||||
->date()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('created_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
|
||||
TextColumn::make('updated_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
|
||||
@@ -21,6 +21,12 @@ class PilgrimResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $navigationLabel = 'Zyýaratçylar';
|
||||
|
||||
protected static ?string $pluralLabel = 'Zyýaratçylar';
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return PilgrimForm::configure($schema);
|
||||
|
||||
Reference in New Issue
Block a user