translate base
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\EmployeeDocuments;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\EmployeeDocuments\Pages\CreateEmployeeDocument;
|
||||
use App\Filament\Resources\EmployeeDocuments\Pages\EditEmployeeDocument;
|
||||
use App\Filament\Resources\EmployeeDocuments\Pages\ListEmployeeDocuments;
|
||||
@@ -27,7 +28,7 @@ class EmployeeDocumentResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedDocument;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Records';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Records;
|
||||
|
||||
protected static ?int $navigationSort = 5;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class EmployeeDocumentForm
|
||||
->required()
|
||||
->maxLength(255),
|
||||
HrForm::fileUpload('file_path')
|
||||
->label('Document')
|
||||
->label(__('hr.fields.document'))
|
||||
->required()
|
||||
->acceptedFileTypes(['application/pdf', 'image/*', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'])
|
||||
->maxSize(15360),
|
||||
|
||||
@@ -13,7 +13,7 @@ class EmployeeDocumentInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('document_type')
|
||||
->badge(),
|
||||
TextEntry::make('title'),
|
||||
|
||||
@@ -24,11 +24,11 @@ class EmployeeDocumentsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('document_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->badge()
|
||||
->color(fn (DocumentType $state): string => $state->color())
|
||||
->formatStateUsing(fn (DocumentType $state): string => $state->label())
|
||||
@@ -56,13 +56,13 @@ class EmployeeDocumentsTable
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('document_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->options(DocumentType::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('download')
|
||||
->label('Download')
|
||||
->label(__('hr.actions.download'))
|
||||
->icon('heroicon-o-arrow-down-tray')
|
||||
->visible(fn (EmployeeDocument $record): bool => filled($record->file_path))
|
||||
->action(function (EmployeeDocument $record) {
|
||||
|
||||
Reference in New Issue
Block a user