Skip to content

Commit 992d66d

Browse files
committed
Fix wall of love admin
1 parent 4d340f1 commit 992d66d

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

app/Filament/Resources/WallOfLoveSubmissionResource.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,6 @@ public static function form(Form $form): Form
4949
->maxLength(1000)
5050
->rows(4),
5151
]),
52-
53-
Forms\Components\Section::make('Review Information')
54-
->schema([
55-
Forms\Components\Select::make('user_id')
56-
->relationship('user', 'name')
57-
->required()
58-
->disabled(),
59-
60-
Forms\Components\DateTimePicker::make('approved_at')
61-
->label('Approved At'),
62-
63-
Forms\Components\Select::make('approved_by')
64-
->relationship('approvedBy', 'name')
65-
->label('Approved By'),
66-
67-
Forms\Components\Placeholder::make('created_at')
68-
->label('Submitted At')
69-
->content(fn (WallOfLoveSubmission $record): ?string => $record->created_at?->diffForHumans()),
70-
]),
7152
]);
7253
}
7354

app/Filament/Resources/WallOfLoveSubmissionResource/Pages/EditWallOfLoveSubmission.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Filament\Resources\WallOfLoveSubmissionResource\Pages;
44

5+
use App\Filament\Resources\UserResource;
56
use App\Filament\Resources\WallOfLoveSubmissionResource;
67
use Filament\Actions;
78
use Filament\Resources\Pages\EditRecord;
@@ -14,6 +15,11 @@ protected function getHeaderActions(): array
1415
{
1516
return [
1617
Actions\DeleteAction::make(),
18+
Actions\Action::make('user')
19+
->icon('heroicon-s-user')
20+
->action(function ($record) {
21+
return redirect(UserResource::getUrl('edit', ['record' => $record]));
22+
}),
1723
];
1824
}
1925
}

0 commit comments

Comments
 (0)