Skip to content

Commit 27cf59e

Browse files
wip
1 parent 80c5c4e commit 27cf59e

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

app/Filament/Resources/MaterialCategoryResource.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public static function table(Table $table): Table
9898
->filters([
9999
//
100100
])
101+
->reorderable('position')
101102
->actions([
102103
Tables\Actions\EditAction::make(),
103104
])

app/Filament/Resources/PointResource.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ public static function table(Table $table): Table
8383
Tables\Actions\ViewAction::make()
8484
->label(__('map_points.buttons.details'))
8585
->icon('heroicon-m-eye'),
86+
Tables\Actions\Action::make('view_point_on_map')
87+
->label(__('map_points.buttons.view_on_map'))
88+
->url(fn (Point $record) => route('front.map.redirect', $record) )
89+
->openUrlInNewTab()
90+
->icon('heroicon-m-map-pin'),
8691
])
8792
->headerActions(
8893
[

app/Filament/Resources/PointResource/Pages/ViewMapPoint.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ public function mount(int|string $record): void
4444
protected function getHeaderActions(): array
4545
{
4646
return [
47+
48+
Action::make('view_point_on_map')
49+
->label(__('map_points.buttons.view_on_map'))
50+
->icon('heroicon-m-map')
51+
->url(fn () => route('front.map.redirect', $this->record))
52+
->openUrlInNewTab(),
4753
Action::make('changeStatus')
4854
->label(__('map_points.buttons.change_status'))
4955
->icon('heroicon-m-arrows-right-left')

0 commit comments

Comments
 (0)