Skip to content

Commit

Permalink
Webhook updates (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
notAreYouScared authored Oct 27, 2024
1 parent 86c369d commit 291b514
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
25 changes: 12 additions & 13 deletions app/Filament/Resources/WebhookResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

use App\Filament\Resources\WebhookResource\Pages;
use App\Models\WebhookConfiguration;
use Filament\Forms;
use Filament\Forms\Components\CheckboxList;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;

class WebhookResource extends Resource
Expand All @@ -16,17 +18,21 @@ class WebhookResource extends Resource

protected static ?string $navigationIcon = 'tabler-webhook';

protected static ?string $navigationGroup = 'Advanced';

protected static ?string $label = 'Webhooks';

public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('endpoint')->activeUrl()->required(),
Forms\Components\TextInput::make('description')->nullable(),
Forms\Components\CheckboxList::make('events')->lazy()->options(
TextInput::make('endpoint')->activeUrl()->required(),
TextInput::make('description')->nullable(),
CheckboxList::make('events')->lazy()->options(
fn () => WebhookConfiguration::filamentCheckboxList()
)
->searchable()
->bulkToggleable()
->columns(3)
->columnSpanFull()
->gridDirection('row')
Expand All @@ -38,18 +44,11 @@ public static function table(Table $table): Table
{
return $table
->columns([
//
])
->filters([
//
TextColumn::make('description'),
TextColumn::make('endpoint'),
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}

Expand Down
15 changes: 0 additions & 15 deletions app/Traits/Services/HasWebhookPayload.php

This file was deleted.

0 comments on commit 291b514

Please sign in to comment.