From 4dad65f57842b46bf0e47813fba64fde6cc96d79 Mon Sep 17 00:00:00 2001 From: Chaim Date: Tue, 31 Mar 2026 23:10:22 +0000 Subject: [PATCH] feat: add status endpoint, hide FAB/dashlet when integration disabled --- .../SmartAssistant/Services/SmartAssistantService.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/custom/Espo/Modules/SmartAssistant/Services/SmartAssistantService.php b/files/custom/Espo/Modules/SmartAssistant/Services/SmartAssistantService.php index 7a6c391..351c0df 100644 --- a/files/custom/Espo/Modules/SmartAssistant/Services/SmartAssistantService.php +++ b/files/custom/Espo/Modules/SmartAssistant/Services/SmartAssistantService.php @@ -236,6 +236,16 @@ class SmartAssistantService } } + public function getStatus(): array + { + $webhookUrl = $this->getWebhookUrl(); + + return [ + 'enabled' => $webhookUrl !== null, + 'webhookConfigured' => !empty($webhookUrl), + ]; + } + public function getSummary(): array { $alertCalc = $this->injectableFactory->create(AlertCalculator::class);