Feat: Bringin Privacy to Filament v4, the managers and resources were built with filament v3
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace Modules\Core\Privacy\RelationManagers;
|
||||
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Infolists\Components\RepeatableEntry;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Tables\Actions\Action;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Modules\Core\Customer\RelationManagers\UserRelationManager as CoreUserRelationManager;
|
||||
@@ -31,7 +31,7 @@ class UserRelationManager extends CoreUserRelationManager
|
||||
{
|
||||
$table = parent::getDefaultTable($table);
|
||||
|
||||
return $table->actions([
|
||||
return $table->recordActions([
|
||||
...$table->getActions(),
|
||||
Action::make('privacyRequests')
|
||||
->label('Privacy Requests')
|
||||
@@ -39,14 +39,14 @@ class UserRelationManager extends CoreUserRelationManager
|
||||
->modalHeading(fn (Model $record) => "Privacy requests for {$record->name}")
|
||||
->modalSubmitAction(false)
|
||||
->modalCancelActionLabel('Close')
|
||||
->infolist(fn (Model $record) => $this->requestsInfolist($record)),
|
||||
->schema(fn (Model $record) => $this->requestsInfolist($record)),
|
||||
Action::make('requestErasure')
|
||||
->label('Request Erasure')
|
||||
->icon('heroicon-o-shield-exclamation')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
->modalDescription('Opens a cancellable grace-period erasure request for this individual — deactivates their login and detaches them from every linked Customer account once it completes. No Customer account\'s own data is affected.')
|
||||
->form([
|
||||
->schema([
|
||||
Checkbox::make('immediate')
|
||||
->label('Erase immediately (skip the 30-day grace period)')
|
||||
->helperText('Staff-only, for a formal legal request or regulator inquiry that genuinely requires urgency — not a routine deletion. Runs synchronously, cannot be cancelled once submitted.')
|
||||
|
||||
Reference in New Issue
Block a user