Updated Service Notification

This commit is contained in:
Tola Leng
2025-05-23 20:39:43 +08:00
parent 280c5dcc86
commit 0d8b88d9a1
@@ -39,10 +39,12 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro
// Update alert configs when data is loaded
useEffect(() => {
if (alertConfigsData) {
setAlertConfigs(alertConfigsData);
// Only show enabled channels
const enabledChannels = alertConfigsData.filter(config => config.enabled);
setAlertConfigs(enabledChannels);
// Debug log to check what alert configs are loaded
console.log("Loaded alert configurations:", alertConfigsData);
console.log("Loaded alert configurations:", enabledChannels);
}
}, [alertConfigsData]);
@@ -136,4 +138,4 @@ export function ServiceNotificationFields({ form }: ServiceNotificationFieldsPro
/>
</>
);
}
}