FEATURE: filter admin reports via user group

This commit is contained in:
Arpit Jalan
2016-02-03 07:59:51 +05:30
parent 7d992cb4c5
commit eec8436cfe
12 changed files with 90 additions and 31 deletions
@@ -131,12 +131,13 @@ const Report = Discourse.Model.extend({
Report.reopenClass({
find(type, startDate, endDate, categoryId) {
find(type, startDate, endDate, categoryId, groupId) {
return Discourse.ajax("/admin/reports/" + type, {
data: {
start_date: startDate,
end_date: endDate,
category_id: categoryId
category_id: categoryId,
group_id: groupId
}
}).then(json => {
// Add a percent field to each tuple