|
4 | 4 |
|
5 | 5 | namespace App\Filament\Resources\UserResource\Pages\Nurse; |
6 | 6 |
|
7 | | -use App\Forms\Components\FileList; |
8 | | -use App\Forms\Components\Location; |
9 | | -use App\Forms\Components\Subsection; |
10 | | -use App\Forms\Components\Value; |
11 | | -use Filament\Forms\Form; |
| 7 | +use App\Filament\Resources\ProfileResource\Schemas\GeneralInfolist; |
| 8 | +use Filament\Infolists\Infolist; |
12 | 9 |
|
13 | 10 | class ViewGeneral extends ViewRecord |
14 | 11 | { |
15 | | - public function form(Form $form): Form |
| 12 | + public function infolist(Infolist $infolist): Infolist |
16 | 13 | { |
17 | | - return $form |
18 | | - ->columns(1) |
19 | | - ->schema([ |
20 | | - Subsection::make() |
21 | | - ->icon('heroicon-o-user') |
22 | | - ->columns(2) |
23 | | - ->schema([ |
24 | | - Value::make('first_name') |
25 | | - ->label(__('field.first_name')), |
26 | | - |
27 | | - Value::make('last_name') |
28 | | - ->label(__('field.last_name')), |
29 | | - |
30 | | - Value::make('date_of_birth') |
31 | | - ->label(__('field.date_of_birth')), |
32 | | - |
33 | | - Value::make('gender') |
34 | | - ->label(__('field.gender')), |
35 | | - |
36 | | - Value::make('cnp') |
37 | | - ->label(__('field.cnp')), |
38 | | - ]), |
39 | | - |
40 | | - Subsection::make() |
41 | | - ->icon('heroicon-o-map-pin') |
42 | | - ->columns(2) |
43 | | - ->schema([ |
44 | | - Location::make(), |
45 | | - Value::make('email') |
46 | | - ->label(__('field.email')), |
47 | | - |
48 | | - Value::make('phone') |
49 | | - ->label(__('field.phone')), |
50 | | - ]), |
51 | | - |
52 | | - Subsection::make() |
53 | | - ->icon('heroicon-o-document') |
54 | | - ->columns(2) |
55 | | - ->schema([ |
56 | | - Value::make('accreditation_number') |
57 | | - ->label(__('field.accreditation_number')), |
58 | | - |
59 | | - Value::make('accreditation_date') |
60 | | - ->label(__('field.accreditation_date')), |
61 | | - |
62 | | - FileList::make('accreditation_document') |
63 | | - ->label(__('field.accreditation_document')) |
64 | | - ->collection('accreditation_document') |
65 | | - ->columnSpanFull(), |
66 | | - ]), |
67 | | - ]); |
| 14 | + return $infolist |
| 15 | + ->schema(GeneralInfolist::getSchema()); |
68 | 16 | } |
69 | 17 |
|
70 | 18 | public function getRelationManagers(): array |
|
0 commit comments