Added trial and blocking to billing contract, fixed bug in running time tracker command

This commit is contained in:
Constantin Graf
2024-07-29 18:04:45 +02:00
committed by Constantin Graf
parent 7c593f8f87
commit 5b7df869ad
33 changed files with 629 additions and 187 deletions

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Actions\Jetstream;
use App\Enums\Role;
use App\Events\AfterCreateOrganization;
use App\Models\Organization;
use App\Models\User;
use Illuminate\Auth\Access\AuthorizationException;
@@ -12,7 +13,6 @@ use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
use Laravel\Jetstream\Contracts\CreatesTeams;
use Laravel\Jetstream\Events\AddingTeam;
use Laravel\Jetstream\Jetstream;
class CreateOrganization implements CreatesTeams
@@ -33,8 +33,6 @@ class CreateOrganization implements CreatesTeams
'name' => ['required', 'string', 'max:255'],
])->validateWithBag('createTeam');
AddingTeam::dispatch($user);
$organization = new Organization();
$organization->name = $input['name'];
$organization->personal_team = false;
@@ -51,6 +49,8 @@ class CreateOrganization implements CreatesTeams
$user->switchTeam($organization);
AfterCreateOrganization::dispatch($organization);
return $organization;
}
}