dashboard: show number of pending checklist items

This commit is contained in:
Johannes Zellner
2024-06-25 20:38:24 +02:00
parent 2ad8ee18a0
commit 8748ba1226
3 changed files with 17 additions and 11 deletions

View File

@@ -54,9 +54,9 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat
if (tr['app.states.updateAvailable']) $scope.states[3].label = tr['app.states.updateAvailable'];
});
$scope.hasPendingChecklistItems = function (app) {
if (!app.checklist) return false;
return !!Object.keys(app.checklist).find(function (key) { return !app.checklist[key].acknowledged; });
$scope.pendingChecklistItems = function (app) {
if (!app.checklist) return 0;
return Object.keys(app.checklist).filter(function (key) { return !app.checklist[key].acknowledged; }).length;
};
$scope.setOrderBy = function (by) {