Sync Frontdesk queue integration flag with Ladill Queue on enable.
Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Mirror Care fix so provision and settings keep frontdesk_enabled in sync. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -28,8 +28,17 @@ class ServiceQueueController extends Controller
|
||||
|
||||
try {
|
||||
$counters = $queue->counters($owner);
|
||||
} catch (RequestException) {
|
||||
return redirect()->route('frontdesk.settings')->with('error', 'Could not reach Ladill Queue. Enable Frontdesk integration in Queue settings and verify API keys.');
|
||||
} catch (RequestException $e) {
|
||||
if ($queue->configured() && $e->response?->status() === 403) {
|
||||
try {
|
||||
$queue->syncIntegration($owner, true);
|
||||
$counters = $queue->counters($owner);
|
||||
} catch (RequestException) {
|
||||
return redirect()->route('frontdesk.settings')->with('error', 'Ladill Queue integration is not enabled. Save settings with Queue integration checked, and enable Frontdesk in Queue settings.');
|
||||
}
|
||||
} else {
|
||||
return redirect()->route('frontdesk.settings')->with('error', 'Could not reach Ladill Queue. Enable Frontdesk integration in Queue settings and verify API keys.');
|
||||
}
|
||||
}
|
||||
|
||||
return view('frontdesk.service-queues.index', compact('counters', 'organization'));
|
||||
|
||||
Reference in New Issue
Block a user