Skip to content

Commit

Permalink
view beneficiary - no documents
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Jun 10, 2024
1 parent 41d76e1 commit f0bc023
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,19 +304,43 @@ private function team(): Section
Livewire::make(ListTeam::class),
]);
}
private function documents(): Section
{

private function documents(): Section
{
return Section::make(__('beneficiary.section.documents.title.page'))
->columnSpan(1)
->headerActions([
Action::make('edit')
->label(__('general.action.view_details'))
->url(fn ($record) => BeneficiaryResource::getUrl('view_documents', ['record' => $record]))
->link(),
->link()
->visible(fn ($record) => $record->documents->count()),
])
->schema([
Livewire::make(\App\Livewire\Beneficiary\ListDocuments::class),
Livewire::make(\App\Livewire\Beneficiary\ListDocuments::class)
->visible(fn ($record) => $record->documents->count()),
Group::make()
->visible(fn ($record) => ! $record->documents->count())
->schema([
TextEntry::make('description')
->hiddenLabel()
->default(__('beneficiary.helper_text.documents'))
->alignCenter()
->size(TextEntry\TextEntrySize::Large),
TextEntry::make('description')
->hiddenLabel()
->default(__('beneficiary.helper_text.documents_2'))
->alignCenter()
->size(TextEntry\TextEntrySize::Medium),
Actions::make([
Action::make('edit')
->label(__('beneficiary.section.documents.actions.add'))
->url(fn ($record) => BeneficiaryResource::getUrl('view_documents', ['record' => $record]))
->badge()
->size(ActionSize::ExtraLarge),
])
->alignCenter(),
]),
]);
}
}
10 changes: 6 additions & 4 deletions lang/ro/beneficiary.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
'description_of_situation' => 'A se include și situația juridică - acțiuni în instanță, situația socio-familială, situația medicală actuală):',
],
],

'detailed_evaluation' => [
'labels' => [
'specialists' => 'Specialisti care au colaborat la realizarea evaluarii',
Expand Down Expand Up @@ -213,7 +213,7 @@
'recommendation_services' => 'Servicii recomandate',
],
],

'specialists' => [
'title' => 'Echipă caz ',
'add_action' => 'Adaugă specialist',
Expand All @@ -227,8 +227,8 @@
'role' => 'Rol',
'status' => 'Status',
],
],
],

'documents' => [
'actions' => [
'add' => 'Încarcă document',
Expand Down Expand Up @@ -312,5 +312,7 @@
'detailed_evaluation' => 'Evaluarea multidiciplinară',
'detailed_evaluation_2' => 'Pentru informarea planului de intervenție',
'document_file' => 'Fișierele acceptate sunt de tip .pdf, .doc/docx, .xls, .csv, .png, .tiff, .jpg. Dimensiunea maxima nu poate depăși 25 Mb',
'documents' => 'Niciun document încărcat',
'documents_2' => 'Încarcă un prim document în fișa beneficiarei',
],
];

0 comments on commit f0bc023

Please sign in to comment.