Adjust checklist item api to support audits trail

This commit is contained in:
Johannes Zellner
2024-06-24 18:39:37 +02:00
parent 8510b12841
commit 20396a8c7d
7 changed files with 41 additions and 16 deletions
+4 -3
View File
@@ -182,11 +182,12 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.info.notes.busy = false;
},
checklistAck(item) {
checklistAck(item, key) {
item.acknowledged = true;
// item.acknowledged = !item.acknowledged;
Client.configureApp($scope.app.id, 'checklist', { checklist: $scope.app.checklist }, function (error) {
if (error) return console.error('Failed to save checklist.', error);
Client.ackAppChecklistItem($scope.app.id, key, item.acknowledged, function (error) {
if (error) return console.error('Failed to ack checklist item.', error);
$scope.info.hasOldChecklist = true;
});
}