mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-28 08:04:45 +02:00

* Update Subuser Adds user deleted notification, Adds logger for creating subusers. * Update Tasks * ... * Update Schedule * Update Files * Update Database * Move `reinstall` to proper array * Add `:action` to deleted task log * Updates * Fix CreateSchedule * Fix Editing/Saving --------- Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com>
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Server\Resources\ScheduleResource\Pages;
|
|
|
|
use App\Facades\Activity;
|
|
use App\Filament\Server\Resources\ScheduleResource;
|
|
use App\Models\Schedule;
|
|
use Filament\Actions;
|
|
use Filament\Resources\Pages\EditRecord;
|
|
|
|
class EditSchedule extends EditRecord
|
|
{
|
|
protected static string $resource = ScheduleResource::class;
|
|
|
|
protected function afterSave(): void
|
|
{
|
|
/** @var Schedule $schedule */
|
|
$schedule = $this->record;
|
|
|
|
Activity::event('server:schedule.update')
|
|
->property('name', $schedule->name)
|
|
->log();
|
|
}
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
Actions\DeleteAction::make()
|
|
->after(function ($record) {
|
|
Activity::event('server:schedule.delete')
|
|
->property('name', $record->name)
|
|
->log();
|
|
}),
|
|
$this->getSaveFormAction()->formId('form')->label('Save'),
|
|
$this->getCancelFormAction()->formId('form'),
|
|
];
|
|
}
|
|
|
|
public function getBreadcrumbs(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
protected function getFormActions(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|