Add industry packages that provision workflow stages on onboarding.
Deploy Ladill Queue / deploy (push) Successful in 1m39s

Queue Core stays generic; selecting Healthcare, Banking, Restaurant, and other industries installs departments, stages (queues), service points, workflows, terminology, and announcement profiles without code changes per vertical. Care-linked orgs skip stage materialization so Care remains the clinical provisioner.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 18:00:31 +00:00
co-authored by Cursor
parent 0854b431bc
commit a4d8775a82
15 changed files with 2302 additions and 65 deletions
+11 -11
View File
@@ -3,10 +3,11 @@
namespace App\Services\Qms;
use App\Models\Branch;
use App\Models\Department;
use App\Models\Member;
use App\Models\Organization;
use App\Models\User;
use App\Services\Qms\Industry\IndustryPackageInstaller;
use App\Services\Qms\Industry\IndustryPackageRegistry;
use Illuminate\Support\Str;
class OrganizationResolver
@@ -69,6 +70,8 @@ class OrganizationResolver
public function completeOnboarding(User $user, array $data): Organization
{
$ref = $user->ownerRef();
$registry = app(IndustryPackageRegistry::class);
$industry = $registry->resolveKey($data['industry'] ?? 'custom');
$organization = Organization::create([
'owner_ref' => $ref,
@@ -77,7 +80,7 @@ class OrganizationResolver
'timezone' => $data['timezone'] ?? config('app.timezone', 'UTC'),
'settings' => [
'onboarded' => true,
'industry' => $data['industry'] ?? 'custom',
'industry' => $industry,
'appointment_mode' => $data['appointment_mode'] ?? 'hybrid',
],
]);
@@ -93,18 +96,15 @@ class OrganizationResolver
'is_active' => true,
]);
Department::create([
'owner_ref' => $ref,
'branch_id' => $branch->id,
'name' => 'General Reception',
'type' => 'reception',
'is_active' => true,
]);
AuditLogger::record($ref, 'organization.created', $organization->id, $ref, Organization::class, $organization->id);
AuditLogger::record($ref, 'branch.created', $organization->id, $ref, Branch::class, $branch->id);
return $organization;
app(IndustryPackageInstaller::class)->install($organization->fresh(), $branch, $industry, [
'actor_ref' => $ref,
'include_optional' => true,
]);
return $organization->fresh();
}
public function branchScope(?Member $member): ?int