feat: disable childs if parent is disabled

This commit is contained in:
Peace
2023-01-28 13:39:17 +01:00
parent 97bd306a09
commit aba515e172
3 changed files with 54 additions and 16 deletions

View File

@@ -734,7 +734,7 @@ let needSetup = false;
await updateMonitorNotification(bean.id, monitor.notificationIDList);
if (bean.active) {
if (bean.isActive()) {
await restartMonitor(socket.userID, bean.id);
}
@@ -1398,7 +1398,7 @@ let needSetup = false;
await updateMonitorNotification(bean.id, notificationIDList);
// If monitor was active start it immediately, otherwise pause it
if (monitorListData[i].active === 1) {
if (monitorListData[i].isActive === 1) {
await startMonitor(socket.userID, bean.id);
} else {
await pauseMonitor(socket.userID, bean.id);