Sync Care queue integration flag with Ladill Queue on enable.
Deploy Ladill Care / deploy (push) Successful in 42s
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:
@@ -29,7 +29,16 @@ class ServiceQueueController extends Controller
|
||||
try {
|
||||
$counters = $queue->counters($owner);
|
||||
} catch (RequestException $e) {
|
||||
return redirect()->route('care.settings')->with('error', 'Could not reach Ladill Queue. Check API keys and enable integration in Queue settings.');
|
||||
if ($queue->configured() && $e->response?->status() === 403) {
|
||||
try {
|
||||
$queue->syncIntegration($owner, true);
|
||||
$counters = $queue->counters($owner);
|
||||
} catch (RequestException) {
|
||||
return redirect()->route('care.settings')->with('error', 'Ladill Queue integration is not enabled. Save settings with Queue integration checked, and enable Care in Queue settings.');
|
||||
}
|
||||
} else {
|
||||
return redirect()->route('care.settings')->with('error', 'Could not reach Ladill Queue. Check API keys and enable integration in Queue settings.');
|
||||
}
|
||||
}
|
||||
|
||||
return view('care.service-queues.index', compact('counters', 'organization'));
|
||||
|
||||
Reference in New Issue
Block a user