From c9286dec500936013591ba926af269f4132a6a71 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Thu, 25 Jul 2024 12:00:39 +0000 Subject: [PATCH] Bug fixes for team --- app/Filament/App/Pages/CreateTeam.php | 10 ++-------- app/Filament/App/Pages/EditTeam.php | 9 ++++----- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/Filament/App/Pages/CreateTeam.php b/app/Filament/App/Pages/CreateTeam.php index 84b12475..312570d7 100644 --- a/app/Filament/App/Pages/CreateTeam.php +++ b/app/Filament/App/Pages/CreateTeam.php @@ -5,17 +5,16 @@ use App\Models\User; use Filament\Facades\Filament; use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Checkbox; use Filament\Forms\Form; use Filament\Pages\Tenancy\RegisterTenant; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Auth; +use App\Services\SubscriptionService; class CreateTeam extends RegisterTenant { - use Filament\Forms\Components\Checkbox; - use App\Services\SubscriptionService; - public function form(Form $form): Form { return $form @@ -42,11 +41,6 @@ protected function handleRegistration(array $data): Model return $team; } - protected function handleRegistration(array $data): Model - { - return app(\App\Actions\Jetstream\CreateTeam::class)->create(auth()->user(), $data); - } - // public function getBreadcrumbs(): array // { // return [ diff --git a/app/Filament/App/Pages/EditTeam.php b/app/Filament/App/Pages/EditTeam.php index 4834db40..fe334558 100644 --- a/app/Filament/App/Pages/EditTeam.php +++ b/app/Filament/App/Pages/EditTeam.php @@ -7,6 +7,10 @@ use Filament\Facades\Filament; use Filament\Forms\Components\TextInput; use Filament\Pages\Tenancy\EditTenantProfile; +use Filament\Forms\Components\Section; +use Filament\Forms\Components\Placeholder; +use Filament\Forms\Form; +use App\Services\SubscriptionService; class EditTeam extends EditTenantProfile { @@ -17,15 +21,10 @@ public static function getLabel(): string return 'Edit Team'; } - use Filament\Forms\Components\Section; - use Filament\Forms\Components\Placeholder; - use App\Services\SubscriptionService; - public function form(Form $form): Form { $team = Filament::getTenant(); $subscriptionService = app(SubscriptionService::class); - return $form ->schema([ Section::make('Subscription')