Sync Care queue integration flag with Ladill Queue on enable.
Deploy Ladill Care / deploy (push) Successful in 42s

Provision alone left care_enabled false on Queue; settings re-save and
service queue pages now recover when integration is out of sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-05 22:06:03 +00:00
co-authored by Cursor
parent eba408197c
commit 527244948c
3 changed files with 25 additions and 4 deletions
+14 -2
View File
@@ -46,11 +46,23 @@ class QueueClient
*/
public function enable(string $owner, string $organizationName, ?string $branchName = null): array
{
$response = $this->http($owner)->post($this->base().'/integrations/provision', array_filter([
$this->http($owner)->post($this->base().'/integrations/provision', array_filter([
'organization_name' => $organizationName,
'branch_name' => $branchName,
'industry' => 'healthcare',
]));
]))->throw();
return $this->syncIntegration($owner, true);
}
/**
* @return array<string, mixed>
*/
public function syncIntegration(string $owner, bool $enabled = true): array
{
$response = $this->http($owner)->patch($this->base().'/integrations', [
'care_enabled' => $enabled,
]);
$response->throw();
return (array) ($response->json('data') ?? []);