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([
|
->recordActions([
|
||||||
EditAction::make(),
|
EditAction::make(),
|
||||||
|
|
||||||
DeleteAction::make(),
|
DeleteAction::make(),
|
||||||
])
|
])
|
||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
|
|||||||
@ -152,6 +152,7 @@ public static function configure(Table $table): Table
|
|||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
ViewAction::make(),
|
ViewAction::make(),
|
||||||
|
|
||||||
Action::make('accept')
|
Action::make('accept')
|
||||||
->label('Terima')
|
->label('Terima')
|
||||||
->icon(Heroicon::OutlinedCheck)
|
->icon(Heroicon::OutlinedCheck)
|
||||||
@ -188,6 +189,7 @@ public static function configure(Table $table): Table
|
|||||||
|
|
||||||
return $cooperationMedia && $cooperationMedia->status === ApprovalStatus::PENDING;
|
return $cooperationMedia && $cooperationMedia->status === ApprovalStatus::PENDING;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Action::make('reject')
|
Action::make('reject')
|
||||||
->label('Tolak')
|
->label('Tolak')
|
||||||
->icon(Heroicon::XMark)
|
->icon(Heroicon::XMark)
|
||||||
@ -224,6 +226,7 @@ public static function configure(Table $table): Table
|
|||||||
|
|
||||||
return $cooperationMedia && $cooperationMedia->status === ApprovalStatus::PENDING;
|
return $cooperationMedia && $cooperationMedia->status === ApprovalStatus::PENDING;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Action::make('send_proposal')
|
Action::make('send_proposal')
|
||||||
->label('Ajukan Proposal')
|
->label('Ajukan Proposal')
|
||||||
->icon(Heroicon::DocumentText)
|
->icon(Heroicon::DocumentText)
|
||||||
@ -301,6 +304,7 @@ public static function configure(Table $table): Table
|
|||||||
->exists();
|
->exists();
|
||||||
})
|
})
|
||||||
->modalWidth(Width::Large),
|
->modalWidth(Width::Large),
|
||||||
|
|
||||||
Action::make('create_task_assignment')
|
Action::make('create_task_assignment')
|
||||||
->label('Buat Penugasan')
|
->label('Buat Penugasan')
|
||||||
->icon(Heroicon::Plus)
|
->icon(Heroicon::Plus)
|
||||||
@ -366,8 +370,10 @@ public static function configure(Table $table): Table
|
|||||||
&& $record->status === CooperationStatus::ASSIGNMENT
|
&& $record->status === CooperationStatus::ASSIGNMENT
|
||||||
)
|
)
|
||||||
->modalWidth(Width::Large),
|
->modalWidth(Width::Large),
|
||||||
|
|
||||||
EditAction::make()
|
EditAction::make()
|
||||||
->visible(fn() => ! auth()->user()->hasRole('Perusahaan')),
|
->visible(fn() => ! auth()->user()->hasRole('Perusahaan')),
|
||||||
|
|
||||||
DeleteAction::make()
|
DeleteAction::make()
|
||||||
->visible(fn() => ! auth()->user()->hasRole('Perusahaan')),
|
->visible(fn() => ! auth()->user()->hasRole('Perusahaan')),
|
||||||
])
|
])
|
||||||
|
|||||||
@ -249,7 +249,9 @@ public static function table(Table $table): Table
|
|||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
BulkActionGroup::make([
|
BulkActionGroup::make([
|
||||||
DeleteBulkAction::make(),
|
DeleteBulkAction::make(),
|
||||||
|
|
||||||
ForceDeleteBulkAction::make(),
|
ForceDeleteBulkAction::make(),
|
||||||
|
|
||||||
RestoreBulkAction::make(),
|
RestoreBulkAction::make(),
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
|
|||||||
@ -81,30 +81,25 @@ public static function table(Table $table): Table
|
|||||||
->wrap(),
|
->wrap(),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
//
|
TrashedFilter::make()
|
||||||
|
->native(false),
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make(),
|
EditAction::make()
|
||||||
DeleteAction::make(),
|
->modalWidth(Width::Large),
|
||||||
])
|
|
||||||
->toolbarActions([
|
|
||||||
BulkActionGroup::make([
|
|
||||||
DeleteBulkAction::make(),
|
|
||||||
]),
|
|
||||||
])
|
|
||||||
->filters([
|
|
||||||
TrashedFilter::make()->native(false),
|
|
||||||
])
|
|
||||||
->recordActions([
|
|
||||||
EditAction::make()->modalWidth(Width::Large),
|
|
||||||
DeleteAction::make(),
|
DeleteAction::make(),
|
||||||
|
|
||||||
ForceDeleteAction::make(),
|
ForceDeleteAction::make(),
|
||||||
|
|
||||||
RestoreAction::make(),
|
RestoreAction::make(),
|
||||||
])
|
])
|
||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
BulkActionGroup::make([
|
BulkActionGroup::make([
|
||||||
DeleteBulkAction::make(),
|
DeleteBulkAction::make(),
|
||||||
|
|
||||||
ForceDeleteBulkAction::make(),
|
ForceDeleteBulkAction::make(),
|
||||||
|
|
||||||
RestoreBulkAction::make(),
|
RestoreBulkAction::make(),
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
|
|||||||
@ -95,9 +95,13 @@ public static function table(Table $table): Table
|
|||||||
TrashedFilter::make()->native(false),
|
TrashedFilter::make()->native(false),
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make()->modalWidth(Width::Large),
|
EditAction::make()
|
||||||
|
->modalWidth(Width::Large),
|
||||||
|
|
||||||
DeleteAction::make(),
|
DeleteAction::make(),
|
||||||
|
|
||||||
ForceDeleteAction::make(),
|
ForceDeleteAction::make(),
|
||||||
|
|
||||||
RestoreAction::make(),
|
RestoreAction::make(),
|
||||||
])
|
])
|
||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user