FIX: show suppressed categories in assign list

FIX: show suppressed categories in assign list

From d58aa482ba316b4ecc52be96f187c9c523741041 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Mon, 23 Jul 2018 17:26:05 +1000
Subject: [PATCH] FIX: show suppressed categories in assign list


diff --git a/assets/javascripts/discourse-assign/routes/user-activity-assigned.js.es6 b/assets/javascripts/discourse-assign/routes/user-activity-assigned.js.es6
index aedf3d2..ef89462 100644
--- a/assets/javascripts/discourse-assign/routes/user-activity-assigned.js.es6
+++ b/assets/javascripts/discourse-assign/routes/user-activity-assigned.js.es6
@@ -5,23 +5,24 @@ export default UserTopicListRoute.extend({
   noContentHelpKey: "discourse_assigns.no_assigns",
 
   model() {
-    return this.store.findFiltered(
-      'topicList',
-      {
-        filter: 'latest',
-        params: { assigned: this.modelFor('user').get('username_lower') }
+    return this.store.findFiltered("topicList", {
+      filter: "latest",
+      params: {
+        assigned: this.modelFor("user").get("username_lower"),
+        // core is a bit odd here and is not sending an array, should be fixed
+        exclude_category_ids: [-1]
       }
-    );
+    });
   },
 
   renderTemplate() {
-    this.render('user-activity-assigned');
-    this.render('user-topics-list', { into: 'user-activity-assigned' });
+    this.render("user-activity-assigned");
+    this.render("user-topics-list", { into: "user-activity-assigned" });
   },
 
   setupController(controller, model) {
     this._super(controller, model);
-    controller.set('model', model);
+    controller.set("model", model);
   },
 
   actions: {

GitHub

1 Like