translate base

This commit is contained in:
Mekan1206
2026-07-31 18:08:08 +05:00
parent a794dacd39
commit 581cb8241c
413 changed files with 9087 additions and 428 deletions

View File

@@ -20,16 +20,16 @@ class VacationForm
->options(VacationType::class)
->required()
->native(false),
HrForm::leaveDatePicker('start_date', 'Start Date'),
HrForm::leaveDatePicker('end_date', 'End Date'),
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
DatePicker::make('return_date')
->label('Return Date'),
->label(__('hr.fields.return_date')),
HrForm::leaveDaysDisplay(),
Textarea::make('reason')
->rows(3)
->columnSpanFull(),
HrForm::fileUpload('attachment_path')
->label('Attachment')
->label(__('hr.fields.attachment'))
->acceptedFileTypes(['application/pdf', 'image/*'])
->maxSize(10240),
]);

View File

@@ -13,7 +13,7 @@ class VacationInfolist
return $schema
->components([
TextEntry::make('employee.id')
->label('Employee'),
->label(__('hr.fields.employee')),
TextEntry::make('type')
->badge(),
TextEntry::make('start_date')

View File

@@ -30,7 +30,7 @@ class VacationsTable
return $table
->columns([
TextColumn::make('employee.full_name')
->label('Employee')
->label(__('hr.fields.employee'))
->searchable()
->sortable(),
TextColumn::make('type')
@@ -55,7 +55,7 @@ class VacationsTable
->searchable()
->sortable(),
TextColumn::make('approver.name')
->label('Approved By')
->label(__('hr.fields.approved_by'))
->toggleable(isToggledHiddenByDefault: true),
TextColumn::make('approved_at')
->dateTime()
@@ -80,12 +80,12 @@ class VacationsTable
SelectFilter::make('type')
->options(VacationType::class),
Filter::make('date_range')
->label('Date Range')
->label(__('hr.fields.date_range'))
->schema([
DatePicker::make('start_from')
->label('Start from'),
->label(__('hr.fields.start_from')),
DatePicker::make('start_until')
->label('Start until'),
->label(__('hr.fields.start_until')),
])
->query(function (Builder $query, array $data): Builder {
return $query
@@ -102,7 +102,7 @@ class VacationsTable
])
->recordActions([
Action::make('approve')
->label('Approve')
->label(__('hr.actions.approve'))
->icon('heroicon-o-check-badge')
->color('success')
->requiresConfirmation()
@@ -111,7 +111,7 @@ class VacationsTable
$vacationService->approve($record, Auth::user());
}),
Action::make('reject')
->label('Reject')
->label(__('hr.actions.reject'))
->icon('heroicon-o-x-mark')
->color('danger')
->requiresConfirmation()

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Filament\Resources\Vacations;
use App\Enums\NavigationGroup;
use App\Filament\Resources\Vacations\Pages\CreateVacation;
use App\Filament\Resources\Vacations\Pages\EditVacation;
use App\Filament\Resources\Vacations\Pages\ListVacations;
@@ -27,7 +28,7 @@ class VacationResource extends Resource
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedSun;
protected static string | UnitEnum | null $navigationGroup = 'Leave Management';
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::LeaveManagement;
protected static ?int $navigationSort = 1;