update plans; assign lifetime;kanban; column sort;
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-04 11:10:05 -08:00
parent 177f122c10
commit 31a80ec4d1
26 changed files with 2984 additions and 672 deletions
@@ -3,6 +3,7 @@
namespace Database\Factories;
use App\Models\Organization;
use App\Models\Plan;
use App\Models\User;
use App\OrganizationRole;
use App\WorkspaceType;
@@ -61,6 +62,20 @@ class OrganizationFactory extends Factory
]);
}
/**
* Give the organization the plan with the given key.
*/
public function withPlan(string $key): static
{
return $this->afterCreating(function (Organization $organization) use ($key): void {
$planId = Plan::query()->where('key', $key)->value('id');
if ($planId !== null) {
$organization->forceFill(['plan_id' => $planId])->save();
}
});
}
/**
* Add the given user to the organization with the given role.
*/