Feat: Updating the Privacy Providers, moving them into the appropriate Modules, Updating Privacy views
This commit is contained in:
@@ -5,9 +5,11 @@ namespace Modules\Core\Privacy\Filament\Resources;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Actions\ViewAction;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Infolists\Components\KeyValueEntry;
|
||||
use Filament\Infolists\Components\RepeatableEntry;
|
||||
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Modules\Core\Privacy\Enums\ErasureOutcome;
|
||||
use Modules\Core\Privacy\Filament\Resources\DataErasureRequestResource\Pages\ListDataErasureRequests;
|
||||
use Modules\Core\Privacy\Filament\Resources\DataErasureRequestResource\Pages\ViewDataErasureRequest;
|
||||
use Filament\Resources\Resource;
|
||||
@@ -112,12 +114,32 @@ class DataErasureRequestResource extends Resource
|
||||
]),
|
||||
|
||||
Section::make('Outcome')
|
||||
->description('Each provider\'s outcome once the erasure completed — see docs/privacy.md.')
|
||||
->description('What happened to each data category once the erasure ran. "Retained"/"Pseudonymized" usually means the data is kept in an anonymized form for legal or accounting reasons.')
|
||||
->icon('heroicon-o-document-check')
|
||||
->visible(fn (DataErasureRequest $record) => $record->report !== null)
|
||||
->components([
|
||||
KeyValueEntry::make('report')
|
||||
->label(''),
|
||||
RepeatableEntry::make('report')
|
||||
->hiddenLabel()
|
||||
->table([
|
||||
TableColumn::make('Data category'),
|
||||
TableColumn::make('Outcome'),
|
||||
TableColumn::make('Reason'),
|
||||
])
|
||||
->components([
|
||||
TextEntry::make('provider'),
|
||||
TextEntry::make('outcome')
|
||||
->badge()
|
||||
->formatStateUsing(fn (string $state) => ucfirst($state))
|
||||
->color(fn (string $state) => match ($state) {
|
||||
ErasureOutcome::Erased->value => 'success',
|
||||
ErasureOutcome::Pseudonymized->value, ErasureOutcome::Retained->value => 'info',
|
||||
ErasureOutcome::Skipped->value => 'gray',
|
||||
ErasureOutcome::Failed->value => 'danger',
|
||||
default => 'gray',
|
||||
}),
|
||||
TextEntry::make('reason')
|
||||
->placeholder('—'),
|
||||
]),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user