translate base
This commit is contained in:
@@ -11,10 +11,13 @@ use Filament\Widgets\TableWidget;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
class UpcomingBirthdaysWidget extends TableWidget
|
||||
{
|
||||
protected static ?string $heading = 'Upcoming Birthdays (30 Days)';
|
||||
|
||||
protected int | string | array $columnSpan = 1;
|
||||
|
||||
public function getHeading(): ?string
|
||||
{
|
||||
return __('hr.widgets.upcoming_birthdays');
|
||||
}
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
@@ -25,13 +28,13 @@ class UpcomingBirthdaysWidget extends TableWidget
|
||||
)
|
||||
->columns([
|
||||
TextColumn::make('full_name')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextColumn::make('birth_date')
|
||||
->label('Birthday')
|
||||
->label(__('hr.fields.birthday'))
|
||||
->date()
|
||||
->formatStateUsing(fn (Employee $record): string => $record->birth_date?->format('M d') ?? '—'),
|
||||
TextColumn::make('department.name')
|
||||
->label('Department'),
|
||||
->label(__('hr.fields.department')),
|
||||
])
|
||||
->paginated(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user