dashboard: improve checklist handling

This commit is contained in:
Johannes Zellner
2024-05-11 11:26:46 +02:00
parent bbefa38355
commit dee60e9958
3 changed files with 24 additions and 19 deletions
+3
View File
@@ -138,6 +138,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.info = {
showDoneChecklist: false,
hasOldChecklist: false,
notes: {
busy: false,
@@ -173,6 +174,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
},
show: function () {
$scope.info.hasOldChecklist = !!Object.keys($scope.app.checklist).find((k) => { return $scope.app.checklist[k].acknowledged; });
$scope.info.notes.content = $scope.app.notes;
$scope.info.notes.editing = false;
$scope.info.notes.busy = false;
@@ -183,6 +185,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
Client.configureApp($scope.app.id, 'checklist', { checklist: $scope.app.checklist }, function (error) {
if (error) return console.error('Failed to save checklist.', error);
$scope.info.hasOldChecklist = true;
});
}
};