From 7b13605c7bb51f3bd3ca351b65f7f1726b6b64d4 Mon Sep 17 00:00:00 2001 From: Keegan George Date: Wed, 1 Sep 2021 12:46:39 -0700 Subject: [PATCH] FIX: Resolve linting issues --- .../discourse/components/submission-field.js.es6 | 9 ++++----- .../controllers/admin-wizards-submissions-columns.js.es6 | 2 +- .../controllers/admin-wizards-submissions-show.js.es6 | 6 +++--- assets/javascripts/discourse/models/custom-wizard.js.es6 | 5 ++--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/assets/javascripts/discourse/components/submission-field.js.es6 b/assets/javascripts/discourse/components/submission-field.js.es6 index f76376a5..ea9e34cf 100644 --- a/assets/javascripts/discourse/components/submission-field.js.es6 +++ b/assets/javascripts/discourse/components/submission-field.js.es6 @@ -64,21 +64,21 @@ export default Component.extend({ submittedUsers(value) { const isUserSelector = this.get("isUserSelector"); const users = []; - + if (isUserSelector) { const userData = value.value; const usernames = []; - if (userData.indexOf(',')) { + if (userData.indexOf(',')) { usernames.push(...userData.split(',')); usernames.forEach(u => { const user = { username: u, url: `/u/${u}` - } + }; users.push(user); - }) + }); } } return users; @@ -87,7 +87,6 @@ export default Component.extend({ @discourseComputed('value') userProfileUrl(value) { const isUser = this.get("isUser"); - const isUserSelector = this.get("isUserSelector"); if (isUser) { return `/u/${value.username}`; diff --git a/assets/javascripts/discourse/controllers/admin-wizards-submissions-columns.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-submissions-columns.js.es6 index 5627dacf..981d1139 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-submissions-columns.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-submissions-columns.js.es6 @@ -2,7 +2,7 @@ import Controller from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; export default Controller.extend(ModalFunctionality, { - + actions: { save() { this.send("closeModal"); diff --git a/assets/javascripts/discourse/controllers/admin-wizards-submissions-show.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-submissions-show.js.es6 index 2667b6b2..450f7d53 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-submissions-show.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-submissions-show.js.es6 @@ -27,8 +27,8 @@ export default Controller.extend({ this.set("loadingMore", false); }); }, - - + + @discourseComputed('submissions', 'fields.@each.enabled') displaySubmissions(submissions, fields) { let result = []; @@ -56,7 +56,7 @@ export default Controller.extend({ }, showEditColumnsModal() { - const controller = showModal("admin-wizards-submissions-columns", { + return showModal("admin-wizards-submissions-columns", { model: { fields: this.get('fields'), submissions: this.get('submissions') diff --git a/assets/javascripts/discourse/models/custom-wizard.js.es6 b/assets/javascripts/discourse/models/custom-wizard.js.es6 index d9a2bafa..660ba4ee 100644 --- a/assets/javascripts/discourse/models/custom-wizard.js.es6 +++ b/assets/javascripts/discourse/models/custom-wizard.js.es6 @@ -224,7 +224,6 @@ CustomWizard.reopenClass({ }) .then((result) => { if (result.wizard) { - console.log(result); let fields = [{ id: "username", label: "User"}]; let submissions = []; let wizard = result.wizard; @@ -248,8 +247,8 @@ CustomWizard.reopenClass({ let submittedAt = { id: "submitted_at", label: "Submitted At" - } - + }; + fields.push(submittedAt); return {