feat: Add force delete and restore actions to Partner and Announcement resources, and apply minor formatting adjustments across several Filament resources and relation managers.
This commit is contained in:
parent
ff54d97d98
commit
b88660b8c8
@ -106,6 +106,7 @@ public function table(Table $table): Table
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
|
||||
@ -152,6 +152,7 @@ public static function configure(Table $table): Table
|
||||
])
|
||||
->recordActions([
|
||||
ViewAction::make(),
|
||||
|
||||
Action::make('accept')
|
||||
->label('Terima')
|
||||
->icon(Heroicon::OutlinedCheck)
|
||||
@ -188,6 +189,7 @@ public static function configure(Table $table): Table
|
||||
|
||||
return $cooperationMedia && $cooperationMedia->status === ApprovalStatus::PENDING;
|
||||
}),
|
||||
|
||||
Action::make('reject')
|
||||
->label('Tolak')
|
||||
->icon(Heroicon::XMark)
|
||||
@ -224,6 +226,7 @@ public static function configure(Table $table): Table
|
||||
|
||||
return $cooperationMedia && $cooperationMedia->status === ApprovalStatus::PENDING;
|
||||
}),
|
||||
|
||||
Action::make('send_proposal')
|
||||
->label('Ajukan Proposal')
|
||||
->icon(Heroicon::DocumentText)
|
||||
@ -301,6 +304,7 @@ public static function configure(Table $table): Table
|
||||
->exists();
|
||||
})
|
||||
->modalWidth(Width::Large),
|
||||
|
||||
Action::make('create_task_assignment')
|
||||
->label('Buat Penugasan')
|
||||
->icon(Heroicon::Plus)
|
||||
@ -366,8 +370,10 @@ public static function configure(Table $table): Table
|
||||
&& $record->status === CooperationStatus::ASSIGNMENT
|
||||
)
|
||||
->modalWidth(Width::Large),
|
||||
|
||||
EditAction::make()
|
||||
->visible(fn() => ! auth()->user()->hasRole('Perusahaan')),
|
||||
|
||||
DeleteAction::make()
|
||||
->visible(fn() => ! auth()->user()->hasRole('Perusahaan')),
|
||||
])
|
||||
|
||||
@ -249,7 +249,9 @@ public static function table(Table $table): Table
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
|
||||
ForceDeleteBulkAction::make(),
|
||||
|
||||
RestoreBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
|
||||
@ -81,30 +81,25 @@ public static function table(Table $table): Table
|
||||
->wrap(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
TrashedFilter::make()
|
||||
->native(false),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make()->native(false),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->modalWidth(Width::Large),
|
||||
EditAction::make()
|
||||
->modalWidth(Width::Large),
|
||||
|
||||
DeleteAction::make(),
|
||||
|
||||
ForceDeleteAction::make(),
|
||||
|
||||
RestoreAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
|
||||
ForceDeleteBulkAction::make(),
|
||||
|
||||
RestoreBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
|
||||
@ -95,9 +95,13 @@ public static function table(Table $table): Table
|
||||
TrashedFilter::make()->native(false),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->modalWidth(Width::Large),
|
||||
EditAction::make()
|
||||
->modalWidth(Width::Large),
|
||||
|
||||
DeleteAction::make(),
|
||||
|
||||
ForceDeleteAction::make(),
|
||||
|
||||
RestoreAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user