diff --git a/app/assets/javascripts/discourse/app/controllers/review-index.js b/app/assets/javascripts/discourse/app/controllers/review-index.js index a910f5aa33e..8e9825857cf 100644 --- a/app/assets/javascripts/discourse/app/controllers/review-index.js +++ b/app/assets/javascripts/discourse/app/controllers/review-index.js @@ -19,6 +19,7 @@ export default class ReviewIndexController extends Controller { "to_date", "sort_order", "additional_filters", + "flagged_by", ]; type = null; @@ -30,6 +31,7 @@ export default class ReviewIndexController extends Controller { filtersExpanded = this.site.desktopView; username = ""; reviewed_by = ""; + flagged_by = ""; from_date = null; to_date = null; sort_order = null; @@ -161,6 +163,7 @@ export default class ReviewIndexController extends Controller { category_id: this.filterCategoryId, username: this.filterUsername, reviewed_by: this.filterReviewedBy, + flagged_by: this.filterFlaggedBy, from_date: isPresent(this.filterFromDate) ? this.filterFromDate.toISOString(true).split("T")[0] : null, @@ -189,6 +192,11 @@ export default class ReviewIndexController extends Controller { this.set("filterReviewedBy", selected.firstObject); } + @action + updateFilterFlaggedBy(selected) { + this.set("filterFlaggedBy", selected.firstObject); + } + @action updateFilterUsername(selected) { this.set("filterUsername", selected.firstObject); diff --git a/app/assets/javascripts/discourse/app/routes/review-index.js b/app/assets/javascripts/discourse/app/routes/review-index.js index f3cbe350bdf..81c27cb951d 100644 --- a/app/assets/javascripts/discourse/app/routes/review-index.js +++ b/app/assets/javascripts/discourse/app/routes/review-index.js @@ -41,6 +41,7 @@ export default class ReviewIndex extends DiscourseRoute { reviewableTypes: meta.reviewable_types, filterUsername: meta.username, filterReviewedBy: meta.reviewed_by, + filterFlaggedBy: meta.flagged_by, filterFromDate: isPresent(meta.from_date) ? moment(meta.from_date) : null, filterToDate: isPresent(meta.to_date) ? moment(meta.to_date) : null, filterSortOrder: meta.sort_order, diff --git a/app/assets/javascripts/discourse/app/templates/review-index.hbs b/app/assets/javascripts/discourse/app/templates/review-index.hbs index d74e4babcba..368efefc7d1 100644 --- a/app/assets/javascripts/discourse/app/templates/review-index.hbs +++ b/app/assets/javascripts/discourse/app/templates/review-index.hbs @@ -75,6 +75,21 @@ /> +
+ + +
+