dashboard: show app checklist
This commit is contained in:
@@ -687,7 +687,7 @@ multiselect {
|
||||
}
|
||||
|
||||
.checklist-item-acknowledged {
|
||||
border-left: 2px solid transparent;
|
||||
border-left: 2px solid $brand-success;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
@@ -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/>
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user