Notifications refactor and #242 📩

This commit is contained in:
Jokob-sk
2023-12-17 22:43:50 +11:00
parent 911c897b00
commit 8e0eb6a480
11 changed files with 296 additions and 91 deletions

View File

@@ -327,7 +327,7 @@ function filterDataByStatus(data, status) {
case 'new':
return item.dev_NewDevice === 1;
case 'down':
return item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown === 1;
return item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0;
case 'archived':
return item.dev_Archived === 1;
default:
@@ -343,7 +343,7 @@ function getDeviceStatus(item)
{
return 'On-line';
}
else if(item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown === 1)
else if(item.dev_PresentLastScan === 0 && item.dev_AlertDeviceDown !== 0)
{
return 'Down';
}