Skip to content

Commit

Permalink
add images
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Nov 18, 2024
1 parent 8c3a713 commit 4b968fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/Filament/Resources/PointResource/Pages/ViewMapPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\Group;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\SpatieMediaLibraryFileUpload;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
Expand All @@ -21,6 +22,7 @@
use Filament\Infolists\Components\Actions\Action as InfolistAction;
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\Section;
use Filament\Infolists\Components\SpatieMediaLibraryImageEntry;
use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Infolist;
use Filament\Notifications\Notification;
Expand Down Expand Up @@ -246,6 +248,9 @@ public function infolist(Infolist $infolist): Infolist
->inlineLabel()
->label(__('map_points.fields.free_of_charge')),

SpatieMediaLibraryImageEntry::make('images')
->label(__('map_points.fields.images')),

])
->columns(3)
->columnSpan(12)
Expand Down Expand Up @@ -309,6 +314,7 @@ public function infolist(Infolist $infolist): Infolist

Textarea::make('observations')
->label(__('map_points.fields.observations')),

Group::make(
[
Toggle::make('offers_transport')
Expand All @@ -326,6 +332,12 @@ public function infolist(Infolist $infolist): Infolist
]
)->columns(4),

SpatieMediaLibraryFileUpload::make('images')
->previewable()
->collection('default')
->label(__('map_points.fields.images'))
->multiple(),

]
)->label(__('map_points.buttons.edit_details'))
->action(fn (array $data) => $this->record->update($data)),
Expand Down
1 change: 1 addition & 0 deletions lang/ro/map_points.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
'offers_money' => 'Oferǎ bani',
'offers_vouchers' => 'Ofera vouchere',
'free_of_charge' => 'Oferă servicii gratuite',
'images' => 'Imagini',
'business_name' => 'Nume business',

],
Expand Down

0 comments on commit 4b968fc

Please sign in to comment.