Display components priorities in list and views

This commit is contained in:
Francis Lachapelle
2016-04-21 17:02:07 -04:00
parent 6e1369e6b1
commit 0b7485228c
11 changed files with 108 additions and 22 deletions
@@ -179,6 +179,7 @@
vm.addAttendee = addAttendee;
vm.removeAttendee = removeAttendee;
vm.addAttachUrl = addAttachUrl;
vm.priorityLevel = priorityLevel;
vm.cancel = cancel;
vm.save = save;
vm.attendeeConflictError = false;
@@ -243,6 +244,17 @@
vm.showAttendeesEditor = false;
}
function priorityLevel() {
if (vm.component.priority) {
if (vm.component.priority > 5)
return l('low');
else if (vm.component.priority > 4)
return l('normal');
else
return l('high');
}
}
function save(form, options) {
if (form.$valid) {
vm.component.$save(options)