Embed Ladill Queue on role pages and add specialty modules under Settings.
Deploy Ladill Care / deploy (push) Successful in 53s
Deploy Ladill Care / deploy (push) Successful in 53s
Remove the standalone Service Queues nav so call-next/now-serving lives on clinical queue, appointments, pharmacy, lab, and specialty surfaces; Pro orgs can activate dentistry and related modules with branch departments and queue stubs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -122,4 +122,35 @@ class QueueClient
|
||||
|
||||
return (array) ($response->json('data') ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
* Best-effort specialty queue sync. Care integration API is read/console-only today,
|
||||
* so stubs remain Care-side until Queue exposes create-queue for service tokens.
|
||||
*
|
||||
* @param list<array<string, mixed>> $stubs
|
||||
* @return list<array<string, mixed>>
|
||||
*/
|
||||
public function syncSpecialtyQueueStubs(string $owner, array $stubs): array
|
||||
{
|
||||
if (! $this->configured() || $stubs === []) {
|
||||
return $stubs;
|
||||
}
|
||||
|
||||
try {
|
||||
$existing = collect($this->counters($owner))
|
||||
->flatMap(fn ($c) => $c['queues'] ?? [])
|
||||
->map(fn ($q) => strtolower((string) ($q['name'] ?? '')))
|
||||
->filter()
|
||||
->all();
|
||||
} catch (\Throwable) {
|
||||
return $stubs;
|
||||
}
|
||||
|
||||
foreach ($stubs as $i => $stub) {
|
||||
$name = strtolower((string) ($stub['name'] ?? ''));
|
||||
$stubs[$i]['synced'] = $name !== '' && in_array($name, $existing, true);
|
||||
}
|
||||
|
||||
return $stubs;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user