- 2.x - scripts

This commit is contained in:
Saeed Vaziry
2024-10-06 20:49:59 +02:00
parent c24b4b7333
commit 8b2338cb41
32 changed files with 936 additions and 79 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace App\Web\Pages\Settings\NotificationChannels\Actions;
use App\Actions\NotificationChannels\EditChannel;
use App\Models\NotificationChannel;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Get;
class Edit
{
public static function form(): array
{
return [
TextInput::make('label')
->rules(fn (Get $get) => EditChannel::rules($get())['label']),
Checkbox::make('global')
->label('Is Global (Accessible in all projects)'),
];
}
public static function action(NotificationChannel $channel, array $data): void
{
app(EditChannel::class)->edit($channel, auth()->user(), $data);
}
}