dashboard: improve checklist handling
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user