dashboard: show app checklist

This commit is contained in:
Johannes Zellner
2024-04-19 12:40:35 +02:00
parent 16521d5434
commit 49243822af
6 changed files with 49 additions and 8 deletions
+1 -1
View File
@@ -687,7 +687,7 @@ multiselect {
}
.checklist-item-acknowledged {
border-left: 2px solid transparent;
border-left: 2px solid $brand-success;
background-color: transparent;
}
+14 -3
View File
@@ -768,11 +768,22 @@
</div>
</div>
<!-- <div class="text-right" ng-click="info.showDoneChecklist = !info.showDoneChecklist"><a href="">Show App Checklist</a></div> -->
<br/>
<div class="checklist-item" ng-repeat="item in info.checklist">
{{ item.message }}
<button class="btn btn-sm btn-default btn-outline" ng-click="alert('you wish')"><i class="fas fa-check"></i></button>
<div ng-repeat="item in info.checklist">
<div class="checklist-item" ng-hide="item.acknowledged">
{{ item.message }}
<button class="btn btn-sm btn-default btn-outline" ng-click="info.checklistAck(item)"><i class="fas fa-check"></i></button>
</div>
</div>
<div ng-repeat="item in info.checklist" ng-show="info.showDoneChecklist">
<div class="checklist-item checklist-item-acknowledged" ng-show="item.acknowledged">
{{ item.message }}
<button class="btn btn-sm btn-default btn-outline" ng-click="info.checklistAck(item)"><i class="fas fa-check"></i></button>
</div>
</div>
<br/>
+10 -4
View File
@@ -137,6 +137,9 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
};
$scope.info = {
checklist: [],
showDoneChecklist: false,
notes: {
busy: false,
editing: false,
@@ -171,15 +174,18 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
},
show: function () {
$scope.info.notes.busy = false;
$scope.info.checklist = $scope.app.checklist;
$scope.info.notes.content = $scope.app.notes;
$scope.info.notes.editing = false;
$scope.info.checklist = $scope.app.checklist;
$scope.info.notes.busy = false;
},
checklistAck: function () {
checklistAck(item) {
item.acknowledged = !item.acknowledged;
Client.configureApp($scope.app.id, 'checklist', { checklist: $scope.info.checklist }, function (error) {
if (error) return console.error('Failed to save checklist.', error);
});
}
};