Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public static function getRecordTitle(?Model $record): string
return $record?->getAttribute(static::getRecordTitleAttribute()) ?? __('field.has_unknown_identity');
}

public static function getRecordTitleWithId(?Model $record): string
{
return "#{$record?->getKey()} " . static::getRecordTitle($record);
}

public static function table(Table $table): Table
{
return BeneficiariesTable::configure($table);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ class EditBeneficiary extends EditRecord
{
protected static string $resource = BeneficiaryResource::class;

public function getHeading(): string
{
return __('beneficiary.header.edit') . ' ' . BeneficiaryResource::getRecordTitleWithId($this->getRecord());
}

public function form(Schema $schema): Schema
{
/** @var Beneficiary */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public static function getNavigationLabel(): string
return 'Overview';
}

public function getHeading(): string
{
return BeneficiaryResource::getRecordTitleWithId($this->getRecord());
}

protected function getHeaderActions(): array
{
if ($this->getRecord()->isRegular()) {
Expand Down
1 change: 1 addition & 0 deletions lang/ro/beneficiary.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'id' => 'Date identificare',
'list' => 'Listă beneficiari',
'create' => 'Adăugare beneficiar',
'edit' => 'Editare',
],

'status' => [
Expand Down