From 892914d649542b9047308afb555e48f464fc5cf9 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Thu, 11 Nov 2021 17:38:53 +0530 Subject: [PATCH] fixed formatting --- .../create-topic-wizard.js.es6 | 25 +++++++++---------- .../initializers/custom-wizard-edits.js.es6 | 14 ++++++----- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/assets/javascripts/discourse/connectors/category-custom-settings/create-topic-wizard.js.es6 b/assets/javascripts/discourse/connectors/category-custom-settings/create-topic-wizard.js.es6 index 0ff16c29..3abfd4e7 100644 --- a/assets/javascripts/discourse/connectors/category-custom-settings/create-topic-wizard.js.es6 +++ b/assets/javascripts/discourse/connectors/category-custom-settings/create-topic-wizard.js.es6 @@ -1,24 +1,23 @@ -import { ajax } from "discourse/lib/ajax"; import CustomWizard from "../../models/custom-wizard"; import { popupAjaxError } from "discourse/lib/ajax-error"; export default { setupComponent(attrs, component) { CustomWizard.all() - .then(result => { - component.set('wizardList', result); + .then((result) => { + component.set("wizardList", result); }) .catch(popupAjaxError); - component.set( - 'wizardListVal', - attrs.category.custom_fields.create_topic_wizard - ); + component.set( + "wizardListVal", + attrs.category.custom_fields.create_topic_wizard + ); }, actions: { - changeWizard(wizard){ - this.set('wizardListVal', wizard); - this.set('category.custom_fields.create_topic_wizard', wizard); - } - } -} + changeWizard(wizard) { + this.set("wizardListVal", wizard); + this.set("category.custom_fields.create_topic_wizard", wizard); + }, + }, +}; diff --git a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 index d615e5bf..20787b4e 100644 --- a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 +++ b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 @@ -21,18 +21,20 @@ export default { withPluginApi("0.8.7", (api) => { api.modifyClass("component:d-navigation", { - pluginId: 'custom-wizard', + pluginId: "custom-wizard", actions: { - clickCreateTopicButton(){ - let createTopicWizard = this.get('category.custom_fields.create_topic_wizard'); + clickCreateTopicButton() { + let createTopicWizard = this.get( + "category.custom_fields.create_topic_wizard" + ); if (createTopicWizard) { window.location.href = getUrl(`/w/${createTopicWizard}`); } else { this._super(); } - } - } - }) + }, + }, + }); }); }, };