i18n(permission-overrides): wrap DENY option + explicit CreateAction labels

- 'DENY — interzice dreptul' select option was missing __() wrap
- CreateAction/EditAction now have explicit label/modalHeading so
  the modal shows 'Добавить исключение прав' instead of
  'Создать User Permission Override' (auto-generated from class name)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-18 11:11:37 +00:00
parent 3d60e1d368
commit af0327d27d
3 changed files with 12 additions and 2 deletions
@@ -39,7 +39,7 @@ class PermissionOverridesRelationManager extends RelationManager
->columnSpanFull(),
Forms\Components\Select::make('mode')
->required()
->options(['grant' => __('GRANT — adaugă dreptul'), 'deny' => 'DENY — interzice dreptul'])
->options(['grant' => __('GRANT — adaugă dreptul'), 'deny' => __('DENY — interzice dreptul')])
->default('grant'),
Forms\Components\DatePicker::make('expires_at')
->label(__('Expiră la (opțional)'))
@@ -81,13 +81,15 @@ class PermissionOverridesRelationManager extends RelationManager
])
->headerActions([
Actions\CreateAction::make()
->label(__('Adaugă excepție'))
->modalHeading(__('Adaugă excepție de drept'))
->mutateDataUsing(fn (array $data) => array_merge($data, [
'granted_at' => now(),
'granted_by_id' => auth()->id(),
])),
])
->actions([
Actions\EditAction::make(),
Actions\EditAction::make()->modalHeading(__('Editează excepția')),
Actions\DeleteAction::make(),
])
->defaultSort('granted_at', 'desc');