diff --git a/app/issues/filters/issue-status-icon-filter.es6 b/app/issues/filters/issue-status-icon-filter.es6 new file mode 100644 index 0000000..c571c8f --- /dev/null +++ b/app/issues/filters/issue-status-icon-filter.es6 @@ -0,0 +1,45 @@ +(function () { + 'use strict'; + + /** + * @ngdoc filter + * @name issues.filter:issueStatusIcon + * + * @description + * + * @param {Array} input The array to filter + * @returns {Array} The filtered array + * + */ + angular + .module('issues') + .filter('issueStatusIcon', issueStatusIcon); + + function issueStatusIcon() { + return (status) => { + switch (status) { + case 1: + return 'fire'; + break; + case 2: + return 'hourglass-alt'; + break; + case 3: + return 'flag'; + break; + case 4: + return 'thumb-up'; + break; + case 5: + return 'spinner'; + break; + case 6: + return 'check'; + break; + case 7: + return 'thumb-down'; + break; + } + }; + } +}()); diff --git a/app/issues/filters/issue-status-icon-filter_test.es6 b/app/issues/filters/issue-status-icon-filter_test.es6 new file mode 100644 index 0000000..c247001 --- /dev/null +++ b/app/issues/filters/issue-status-icon-filter_test.es6 @@ -0,0 +1,10 @@ +/* global describe, beforeEach, it, expect, inject, module */ +'use strict'; + +describe.skip('issueStatusIcon', () => { + beforeEach(module('issues')); + + it('should filter our numbers not greater than 3', inject(($filter) => { + expect($filter('issueStatusIcon')([1, 2, 3, 4])).to.include.members([4]); + })); +}); diff --git a/app/issues/views/issues.less b/app/issues/views/issues.less index 6b20377..9dc8fc5 100644 --- a/app/issues/views/issues.less +++ b/app/issues/views/issues.less @@ -15,25 +15,45 @@ //immediate &-\-priority-7 { background: darkred; + + .indicator { + background: darken(#8B0000, 20%); + } } //urgent &-\-priority-6 { background: red; + + .indicator { + background: darken(#FF0000, 20%); + } } //high &-\-priority-5 { background: yellow; + + .indicator { + background: darken(#FFFF00, 20%); + } } //normal &-\-priority-4 { background: cornflowerblue; + + .indicator { + background: darken(#6495ED, 20%); + } } //low &-\-priority-3 { background: green; + + .indicator { + background: darken(#008000, 20%); + } } } diff --git a/app/issues/views/issues.tpl.html b/app/issues/views/issues.tpl.html index e2060f1..d88e566 100644 --- a/app/issues/views/issues.tpl.html +++ b/app/issues/views/issues.tpl.html @@ -1,15 +1,16 @@
- -
- +