From c2ffa7699bfda95fb20ea248cedc642e6af45f6b Mon Sep 17 00:00:00 2001 From: merefield Date: Fri, 8 Sep 2023 10:54:41 +0100 Subject: [PATCH] wip --- .../discourse/components/wizard-subscription-authorize.js | 7 ++++--- assets/javascripts/discourse/templates/admin-wizards.hbs | 1 - .../templates/components/wizard-subscription-authorize.hbs | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-subscription-authorize.js b/assets/javascripts/discourse/components/wizard-subscription-authorize.js index 4422288c..60627b12 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-authorize.js +++ b/assets/javascripts/discourse/components/wizard-subscription-authorize.js @@ -6,19 +6,20 @@ import { action, set } from "@ember/object"; import { inject as service } from "@ember/service"; import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; +import { ajax } from "discourse/lib/ajax"; // import I18n from "I18n"; export default class WizardSubscriptionAuthorize extends Component { @service siteSettings; - @tracked supplierId = 1; + @tracked supplierId = null; constructor() { super(...arguments); - + /admin/plugins/subscription-client/suppliers } @action authorize() { - window.location.href = `${basePath}/authorize?supplier_id=${this.supplierId}`; + window.location.href = `/admin/plugins/subscription-client/authorize?supplier_id=${this.supplierId}`; } } diff --git a/assets/javascripts/discourse/templates/admin-wizards.hbs b/assets/javascripts/discourse/templates/admin-wizards.hbs index 6d6bad5b..ef57db7d 100644 --- a/assets/javascripts/discourse/templates/admin-wizards.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards.hbs @@ -19,7 +19,6 @@
{{wizard-subscription-authorize}} - {{wizard-subscription-badge}} {{wizard-subscription-cta}}
{{/admin-nav}} diff --git a/assets/javascripts/discourse/templates/components/wizard-subscription-authorize.hbs b/assets/javascripts/discourse/templates/components/wizard-subscription-authorize.hbs index 996f8865..e15d078f 100644 --- a/assets/javascripts/discourse/templates/components/wizard-subscription-authorize.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-subscription-authorize.hbs @@ -12,4 +12,5 @@ title="admin.wizard.subscription.authorize" action=(action "authorize")}} {{/if}} + {{wizard-subscription-badge}} \ No newline at end of file