From 3a0ba4589d7c01c02c79099ff7d049511d03de1a Mon Sep 17 00:00:00 2001 From: merefield Date: Fri, 8 Sep 2023 19:14:36 +0100 Subject: [PATCH] wip --- .../discourse/components/wizard-subscription-authorize.js | 8 ++++++-- plugin.rb | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-subscription-authorize.js b/assets/javascripts/discourse/components/wizard-subscription-authorize.js index 60627b12..b2ac67a4 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-authorize.js +++ b/assets/javascripts/discourse/components/wizard-subscription-authorize.js @@ -12,14 +12,18 @@ import { ajax } from "discourse/lib/ajax"; export default class WizardSubscriptionAuthorize extends Component { @service siteSettings; @tracked supplierId = null; + @tracked authorized = false; constructor() { super(...arguments); - /admin/plugins/subscription-client/suppliers + ajax("/admin/plugins/subscription-client/suppliers").then((result) => { + this.supplierId = result.suppliers[0].id; + this.authorized = result.suppliers[0].authorized; + }) } @action authorize() { - window.location.href = `/admin/plugins/subscription-client/authorize?supplier_id=${this.supplierId}`; + window.location.href = `/admin/plugins/subscription-client/suppliers/authorize?supplier_id=${this.supplierId}`; } } diff --git a/plugin.rb b/plugin.rb index cf6bc714..57a898a6 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.4.18 +# version: 2.4.21 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech