From 078252d41599f9fa8621937ccb34e26d60bf8dad Mon Sep 17 00:00:00 2001 From: Alex Popa Date: Fri, 27 Dec 2024 18:27:44 +0200 Subject: [PATCH] Close file - beneficiary identity --- .../Pages/CloseFile/ViewCloseFile.php | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php index f1747a18..6296a447 100644 --- a/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php +++ b/app/Filament/Organizations/Resources/BeneficiaryResource/Pages/CloseFile/ViewCloseFile.php @@ -7,12 +7,13 @@ use App\Actions\BackAction; use App\Enums\CloseMethod; use App\Filament\Organizations\Resources\BeneficiaryResource; -use App\Filament\Organizations\Resources\BeneficiaryResource\Pages\ViewBeneficiaryIdentity; use App\Infolists\Components\Actions\Edit; use App\Infolists\Components\DateEntry; +use App\Infolists\Components\Notice; use App\Models\Beneficiary; use App\Services\Breadcrumb\BeneficiaryBreadcrumb; use Filament\Actions\DeleteAction; +use Filament\Infolists\Components\Actions\Action; use Filament\Infolists\Components\Section; use Filament\Infolists\Components\Tabs; use Filament\Infolists\Components\TextEntry; @@ -95,7 +96,33 @@ public function infolist(Infolist $infolist): Infolist ]), Tabs\Tab::make(__('beneficiary.section.identity.tab.beneficiary')) ->maxWidth('3xl') - ->schema(ViewBeneficiaryIdentity::identitySchemaForOtherPage($this->getRecord())), + ->schema([ + Section::make() + ->maxWidth('3xl') + ->columns() + ->schema([ + Notice::make('identity') + ->icon('heroicon-s-information-circle') + ->state(__('beneficiary.section.identity.heading_description')) + ->color('primary') + ->action( + Action::make('view') + ->label(__('beneficiary.section.identity.title')) + ->url(self::$resource::getUrl('view_identity', ['record' => $this->getRecord()])) + ->link(), + ), + + TextEntry::make('last_name') + ->label(__('field.last_name')), + + TextEntry::make('first_name') + ->label(__('field.first_name')), + + TextEntry::make('cnp') + ->label(__('field.cnp')), + ]), + + ]), Tabs\Tab::make(__('beneficiary.section.close_file.headings.general_details')) ->maxWidth('3xl') ->schema([