added roles and organizations
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-15 20:59:32 -07:00
parent 2ca3860557
commit 177f122c10
57 changed files with 6378 additions and 247 deletions
@@ -4,6 +4,7 @@ use App\Models\Organization;
use App\Models\Setting;
use Flux\Flux;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Gate;
use Livewire\Attributes\Computed;
use Livewire\Attributes\Title;
use Livewire\Component;
@@ -12,9 +13,7 @@ new #[Title('Plan pricing')] class extends Component
{
public function mount(): void
{
if (! auth()->user()->isAdmin()) {
abort(403);
}
Gate::authorize('accessAdmin');
$this->amounts = $this->plans()
->mapWithKeys(fn (array $plan): array => [
@@ -61,6 +60,8 @@ new #[Title('Plan pricing')] class extends Component
public function saveAmounts(): void
{
Gate::authorize('accessAdmin');
$validated = $this->validate([
'amounts' => ['required', 'array'],
'amounts.*' => ['required', 'numeric', 'min:0', 'decimal:0,2'],