translate base
This commit is contained in:
@@ -32,7 +32,10 @@ class VacationsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'vacations';
|
||||
|
||||
protected static ?string $title = 'Vacations';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.vacations");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -42,16 +45,16 @@ class VacationsRelationManager extends RelationManager
|
||||
->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),
|
||||
]);
|
||||
@@ -82,7 +85,7 @@ class VacationsRelationManager extends RelationManager
|
||||
->formatStateUsing(fn (ApprovalStatus $state): string => $state->label())
|
||||
->sortable(),
|
||||
TextColumn::make('approver.name')
|
||||
->label('Approved By')
|
||||
->label(__('hr.fields.approved_by'))
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
])
|
||||
->filters([
|
||||
@@ -97,7 +100,7 @@ class VacationsRelationManager extends RelationManager
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('approve')
|
||||
->label('Approve')
|
||||
->label(__('hr.actions.approve'))
|
||||
->icon('heroicon-o-check-badge')
|
||||
->color('success')
|
||||
->requiresConfirmation()
|
||||
@@ -106,7 +109,7 @@ class VacationsRelationManager extends RelationManager
|
||||
$vacationService->approve($record, Auth::user());
|
||||
}),
|
||||
Action::make('reject')
|
||||
->label('Reject')
|
||||
->label(__('hr.actions.reject'))
|
||||
->icon('heroicon-o-x-mark')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
|
||||
Reference in New Issue
Block a user