Skip to content

Commit

Permalink
Page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Jan 9, 2025
1 parent bdb7cb8 commit 83af9d9
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ protected function getRedirectUrl(): ?string

public function getTitle(): string|Htmlable
{
return $this->getRecord()->organizationServiceIntervention->serviceInterventionWithoutStatusCondition->name;
return __('intervention_plan.headings.edit_page', [
'service_name' => strtolower($this->getRecord()->organizationServiceIntervention->serviceInterventionWithoutStatusCondition->name),
]);
}

protected function getHeaderActions(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function table(Table $table): Table
->actions([
EditAction::make()
->form($this->getBenefitSchema())
->modalHeading(__('intervention_plan.headings.edit_benefit'))
->extraModalFooterActions([
DeleteAction::make()
->label(__('intervention_plan.actions.delete_benefit'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace App\Filament\Organizations\Resources\InterventionServiceResource\Pages;

use App\Actions\BackAction;

use App\Concerns\PreventSubmitFormOnEnter;
use App\Enums\AllowancePerson;
use App\Enums\CounselingSheet;
Expand Down Expand Up @@ -54,7 +53,13 @@ class EditCounselingSheet extends EditRecord

public function getTitle(): string|Htmlable
{
return __('intervention_plan.headings.edit_counseling_sheet');
return __('intervention_plan.headings.edit_counseling_sheet', [
'counseling_sheet_name' => strtolower($this->getRecord()
->organizationServiceWithoutStatusCondition
->serviceWithoutStatusCondition
->counseling_sheet
->getLabel()),
]);
}

protected function getRedirectUrl(): ?string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getBreadcrumbs(): array
public function getTitle(): string|Htmlable
{
return __('intervention_plan.headings.edit_page', [
'service_name' => $this->getRecord()->organizationService?->serviceWithoutStatusCondition->name,
'service_name' => strtolower($this->getRecord()->organizationService->serviceWithoutStatusCondition->name),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function getRedirectUrl(): ?string

public function getTitle(): string|Htmlable
{
return __('service.headings.edit_page', ['name' => $this->getRecord()->serviceWithoutStatusCondition?->name]);
return __('service.headings.edit_page', ['name' => strtolower($this->getRecord()->serviceWithoutStatusCondition->name)]);
}

public function getBreadcrumbs(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ViewService extends ViewRecord

public function getTitle(): string|Htmlable
{
return $this->getRecord()->serviceWithoutStatusCondition->name;
return __('service.headings.view_service_page', ['service_name' => strtolower($this->getRecord()->serviceWithoutStatusCondition->name)]);
}

public function getBreadcrumbs(): array
Expand Down
7 changes: 6 additions & 1 deletion app/Filament/Organizations/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,13 @@ public static function getSchema(): array

Placeholder::make('last_login_at')
->label(__('user.labels.last_login_at_date_time'))
->content(fn (User $record) => $record->last_login_at !== '-' ? $record->last_login_at->format('d.m.Y H:i:s') : $record->last_login_at),
->content(
fn (User $record) => $record->last_login_at && $record->last_login_at !== '-' ?
$record->last_login_at->format('d.m.Y H:i:s') :
'-'
),
]),

Section::make()
->columns()
->maxWidth('3xl')
Expand Down
2 changes: 1 addition & 1 deletion lang/ro/beneficiary.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
'title' => 'Evaluare inițială',
],
'edit_evaluation_details' => [
'title' => 'Editează detaliile evaluării',
'title' => 'Editează detalii evaluare',
],
'edit_violence' => [
'title' => 'Editează violența',
Expand Down
3 changes: 2 additions & 1 deletion lang/ro/intervention_plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
'delete_benefit_modal' => 'Șterge beneficiu social',
'delete_beneficiary_intervention_modal' => 'Șterge intervenția',
'empty_state_table_without_intervetntions' => 'Nici o interventie adăugată în planul de intervenție',
'edit_counseling_sheet' => 'Editează fișă consiliere',
'edit_counseling_sheet' => 'Editează fișă consiliere :counseling_sheet_name',
'results_table' => 'Rezultate realizate',
'empty_state_result_table' => 'Nici un rezultat adăugat',
'empty_state_monthly_plan_table' => 'Nici un plan lunar adăugat',
Expand Down Expand Up @@ -251,6 +251,7 @@
'edit_monthly_plan_title' => 'Editează plan lunar',
'edit_monthly_plan_services_and_interventions_title' => 'Editează servicii si intervenții',
'delete_monthly_plan_modal' => 'Șterge plan lunar',
'edit_benefit' => 'Modifică beneficiu social',
],

'actions' => [
Expand Down
1 change: 1 addition & 0 deletions lang/ro/service.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
'edit_page' => 'Modifică serviciu :name',
'interventions' => 'Intervenții asociate serviciului',
'inactivate_modal' => 'Inactivează serviciul în nomenclator',
'view_service_page' => 'Serviciu :service_name',
],

'helper_texts' => [
Expand Down

0 comments on commit 83af9d9

Please sign in to comment.