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
No known key found for this signature in database
GPG key ID: 0EF6B46E172B739F
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);