Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-24 02:10:29 +01:00
Merge pull request #295 from paviliondev/update_subscription_support
Update support to client gem version 0.1.6
Dieser Commit ist enthalten in:
Commit
a163ba56ae
2 geänderte Dateien mit 11 neuen und 7 gelöschten Zeilen
|
@ -15,10 +15,12 @@ export default class WizardSubscriptionStatus extends Component {
|
|||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
ajax(`${this.basePath}`)
|
||||
ajax(`${this.basePath}?resource=discourse-custom-wizard`)
|
||||
.then((result) => {
|
||||
if (result.suppliers && result.suppliers.length) {
|
||||
this.supplierId = result.suppliers[0].id;
|
||||
this.authorized = result.suppliers[0].authorized;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.subscription.retrieveSubscriptionStatus();
|
||||
|
@ -41,8 +43,10 @@ export default class WizardSubscriptionStatus extends Component {
|
|||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.supplierId = result.supplier.id;
|
||||
this.authorized = !(result.supplier.authorized_at === null);
|
||||
if (result.success) {
|
||||
this.supplierId = result.supplier_id;
|
||||
this.authorized = false;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.unauthorizing = false;
|
||||
|
|
|
@ -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.8.10
|
||||
# version: 2.8.11
|
||||
# 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
|
||||
|
@ -9,7 +9,7 @@
|
|||
# meta_topic_id: 73345
|
||||
|
||||
gem 'liquid', '5.5.0', require: true
|
||||
gem "discourse_subscription_client", "0.1.2", require_name: "discourse_subscription_client"
|
||||
gem "discourse_subscription_client", "0.1.6", require_name: "discourse_subscription_client"
|
||||
gem 'discourse_plugin_statistics', '0.1.0.pre7', require: true
|
||||
register_asset 'stylesheets/common/admin.scss'
|
||||
register_asset 'stylesheets/common/wizard.scss'
|
||||
|
|
Laden …
In neuem Issue referenzieren