Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #246 from marklise/master
Browse files Browse the repository at this point in the history
NOBUG: Activities tweaks.
  • Loading branch information
marklise authored Sep 5, 2017
2 parents c6bdc4c + 8b59b34 commit 3a4f85b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 43 deletions.
38 changes: 0 additions & 38 deletions modules/recent-activity/client/config/recent-activity.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,6 @@ angular.module('recent-activity').config(['$stateProvider', function ($stateProv
item.code = proj ? proj.code : '';
item.projectName = proj ? proj.name : '';
}
switch(item.priority) {
case 0:
item.priorityDesc = 'Critical';
break;
case 1:
item.priorityDesc = 'Top';
break;
case 2:
item.priorityDesc = 'Normal';
break;
case 4:
item.priorityDesc = 'Low';
break;
default:
item.priorityDesc = '';
break;
}
item.activeDesc = item.active ? 'Active' : 'Inactive';
});
return data;
Expand All @@ -76,17 +59,13 @@ angular.module('recent-activity').config(['$stateProvider', function ($stateProv

var s = this;
s.typeArray = [];
s.priorityDescArray = [];
s.activeDescArray = [];
s.busy = false;

var items = _(angular.copy(recentActivity)).chain().flatten();
items.pluck('type').unique().value().map( function(item) {
s.typeArray.push({id: item, title: item});
});
items.pluck('priorityDesc').unique().value().map( function (item) {
s.priorityDescArray.push({id: item, title: item});
});
items.pluck('activeDesc').unique().value().map( function(item) {
var id = 'Active' === item ? true : false;
s.activeDescArray.push({id: id, title: item});
Expand Down Expand Up @@ -166,23 +145,6 @@ angular.module('recent-activity').config(['$stateProvider', function ($stateProv
item.code = proj ? proj.code : '';
item.projectName = proj ? proj.name : '';
}
switch(item.priority) {
case 0:
item.priorityDesc = 'Critical';
break;
case 1:
item.priorityDesc = 'Top';
break;
case 2:
item.priorityDesc = 'Normal';
break;
case 4:
item.priorityDesc = 'Low';
break;
default:
item.priorityDesc = '';
break;
}
item.activeDesc = item.active ? 'Active' : 'Inactive';
});
return data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ <h1>Create/Edit Activity & Update</h1>
name="priority"
ng-model="recentActivity.priority"
ng-init="recentActivity.priority = recentActivity.priority" convert-to-number>
<option value="1">Top</option>
<option value="2">Normal</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ <h1>Activities & Updates</h1>
<td class="priority-col"
header-class="'priority-col'"
data-title="'Priority'"
filter="{priorityDesc:'select'}"
filter-data="s.priorityDescArray"
sortable="'priorityDesc'" >{{o.priorityDesc}}</td>
sortable="'priority'" >{{o.priority}}</td>
<td class="status-col"
header-class="'status-col'"
data-title="'Status'"
Expand All @@ -81,6 +79,11 @@ <h1>Activities & Updates</h1>
x-ok-args="o">
<span class="glyphicon glyphicon-trash"></span>
</button>
<button class="btn icon-btn disabled"
title="Activity/Update must be inactive before you can delete."
ng-if="application.userCan.createNews && o.active">
<span class="glyphicon glyphicon-trash"></span>
</button>
</td>
</tr><!-- / NEWS ROW ITEM TEMPLATE -->

Expand Down

0 comments on commit 3a4f85b

Please sign in to comment.