0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

FIX: Resolve linting issues

Dieser Commit ist enthalten in:
Keegan George 2021-09-01 12:46:39 -07:00
Ursprung 622ab1b2ce
Commit 7b13605c7b
4 geänderte Dateien mit 10 neuen und 12 gelöschten Zeilen

Datei anzeigen

@ -64,21 +64,21 @@ export default Component.extend({
submittedUsers(value) { submittedUsers(value) {
const isUserSelector = this.get("isUserSelector"); const isUserSelector = this.get("isUserSelector");
const users = []; const users = [];
if (isUserSelector) { if (isUserSelector) {
const userData = value.value; const userData = value.value;
const usernames = []; const usernames = [];
if (userData.indexOf(',')) { if (userData.indexOf(',')) {
usernames.push(...userData.split(',')); usernames.push(...userData.split(','));
usernames.forEach(u => { usernames.forEach(u => {
const user = { const user = {
username: u, username: u,
url: `/u/${u}` url: `/u/${u}`
} };
users.push(user); users.push(user);
}) });
} }
} }
return users; return users;
@ -87,7 +87,6 @@ export default Component.extend({
@discourseComputed('value') @discourseComputed('value')
userProfileUrl(value) { userProfileUrl(value) {
const isUser = this.get("isUser"); const isUser = this.get("isUser");
const isUserSelector = this.get("isUserSelector");
if (isUser) { if (isUser) {
return `/u/${value.username}`; return `/u/${value.username}`;

Datei anzeigen

@ -2,7 +2,7 @@ import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
export default Controller.extend(ModalFunctionality, { export default Controller.extend(ModalFunctionality, {
actions: { actions: {
save() { save() {
this.send("closeModal"); this.send("closeModal");

Datei anzeigen

@ -27,8 +27,8 @@ export default Controller.extend({
this.set("loadingMore", false); this.set("loadingMore", false);
}); });
}, },
@discourseComputed('submissions', 'fields.@each.enabled') @discourseComputed('submissions', 'fields.@each.enabled')
displaySubmissions(submissions, fields) { displaySubmissions(submissions, fields) {
let result = []; let result = [];
@ -56,7 +56,7 @@ export default Controller.extend({
}, },
showEditColumnsModal() { showEditColumnsModal() {
const controller = showModal("admin-wizards-submissions-columns", { return showModal("admin-wizards-submissions-columns", {
model: { model: {
fields: this.get('fields'), fields: this.get('fields'),
submissions: this.get('submissions') submissions: this.get('submissions')

Datei anzeigen

@ -224,7 +224,6 @@ CustomWizard.reopenClass({
}) })
.then((result) => { .then((result) => {
if (result.wizard) { if (result.wizard) {
console.log(result);
let fields = [{ id: "username", label: "User"}]; let fields = [{ id: "username", label: "User"}];
let submissions = []; let submissions = [];
let wizard = result.wizard; let wizard = result.wizard;
@ -248,8 +247,8 @@ CustomWizard.reopenClass({
let submittedAt = { let submittedAt = {
id: "submitted_at", id: "submitted_at",
label: "Submitted At" label: "Submitted At"
} };
fields.push(submittedAt); fields.push(submittedAt);
return { return {