translate base
This commit is contained in:
@@ -25,7 +25,7 @@ class ActivityLogsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('created_at')
|
||||
->label('Date')
|
||||
->label(__('hr.fields.date'))
|
||||
->dateTime()
|
||||
->sortable(),
|
||||
TextColumn::make('description')
|
||||
@@ -36,15 +36,15 @@ class ActivityLogsTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('subject_type')
|
||||
->label('Subject Type')
|
||||
->label(__('hr.fields.subject_type'))
|
||||
->formatStateUsing(fn (?string $state): string => $state ? class_basename($state) : '—')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('subject_id')
|
||||
->label('Subject ID')
|
||||
->label(__('hr.fields.subject_id'))
|
||||
->sortable(),
|
||||
TextColumn::make('causer.name')
|
||||
->label('Causer')
|
||||
->label(__('hr.fields.causer'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('log_name')
|
||||
@@ -53,14 +53,14 @@ class ActivityLogsTable
|
||||
->defaultSort('created_at', 'desc')
|
||||
->filters([
|
||||
SelectFilter::make('subject_type')
|
||||
->label('Subject Type')
|
||||
->label(__('hr.fields.subject_type'))
|
||||
->options([
|
||||
Employee::class => 'Employee',
|
||||
Vacation::class => 'Vacation',
|
||||
Bonus::class => 'Bonus',
|
||||
DisciplinaryReport::class => 'Disciplinary Report',
|
||||
Department::class => 'Department',
|
||||
User::class => 'User',
|
||||
Employee::class => __('hr.audit.employee'),
|
||||
Vacation::class => __('hr.audit.vacation'),
|
||||
Bonus::class => __('hr.audit.bonus'),
|
||||
DisciplinaryReport::class => __('hr.audit.disciplinary_report'),
|
||||
Department::class => __('hr.audit.department'),
|
||||
User::class => __('hr.audit.user'),
|
||||
]),
|
||||
SelectFilter::make('event')
|
||||
->options(fn (): array => \Spatie\Activitylog\Models\Activity::query()
|
||||
@@ -69,16 +69,16 @@ class ActivityLogsTable
|
||||
->pluck('event', 'event')
|
||||
->all()),
|
||||
SelectFilter::make('causer')
|
||||
->label('Causer')
|
||||
->label(__('hr.fields.causer'))
|
||||
->relationship('causer', 'name')
|
||||
->searchable()
|
||||
->preload(),
|
||||
Filter::make('created_at')
|
||||
->schema([
|
||||
DatePicker::make('from')
|
||||
->label('From'),
|
||||
->label(__('hr.fields.from')),
|
||||
DatePicker::make('until')
|
||||
->label('Until'),
|
||||
->label(__('hr.fields.until')),
|
||||
])
|
||||
->query(function (Builder $query, array $data): Builder {
|
||||
return $query
|
||||
|
||||
Reference in New Issue
Block a user