Wire Queue demo seeder to shared DemoWorld
Deploy Ladill Queue / deploy (push) Successful in 1m3s

Org name, branches, ticket customers, and staff Members now come from
DemoWorld so Queue continuity matches Care/Frontdesk across the suite.
Also resolve organization by owner_ref when metadata.queue.organization_id
is missing, and skip reseed-on-login for DemoWorld staff emails.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 13:35:17 +00:00
co-authored by Cursor
parent ef7ceb076f
commit 8ff100a55b
5 changed files with 705 additions and 31 deletions
+6 -1
View File
@@ -3,6 +3,7 @@
namespace App\Services\Qms;
use App\Models\Member;
use App\Models\Organization;
use App\Models\User;
use App\Services\Identity\IdentityTeamClient;
@@ -35,7 +36,11 @@ class TeamMemberProvisioner
}
$meta = (array) data_get($grant, 'metadata.queue', []);
$ownerRef = (string) ($grant['account'] ?? '');
$organizationId = (int) ($meta['organization_id'] ?? 0);
if ($organizationId <= 0 && $ownerRef !== '') {
$organizationId = (int) Organization::query()->where('owner_ref', $ownerRef)->value('id');
}
if ($organizationId <= 0) {
continue;
}
@@ -46,7 +51,7 @@ class TeamMemberProvisioner
'user_ref' => $user->ownerRef(),
],
[
'owner_ref' => (string) ($grant['account'] ?? $user->ownerRef()),
'owner_ref' => $ownerRef !== '' ? $ownerRef : $user->ownerRef(),
'role' => (string) ($meta['role'] ?? 'member'),
'branch_id' => $meta['branch_id'] ?? null,
],