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() {
|
constructor() {
|
||||||
super(...arguments);
|
super(...arguments);
|
||||||
ajax(`${this.basePath}`)
|
ajax(`${this.basePath}?resource=discourse-custom-wizard`)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
|
if (result.suppliers && result.suppliers.length) {
|
||||||
this.supplierId = result.suppliers[0].id;
|
this.supplierId = result.suppliers[0].id;
|
||||||
this.authorized = result.suppliers[0].authorized;
|
this.authorized = result.suppliers[0].authorized;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.subscription.retrieveSubscriptionStatus();
|
this.subscription.retrieveSubscriptionStatus();
|
||||||
|
@ -41,8 +43,10 @@ export default class WizardSubscriptionStatus extends Component {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.supplierId = result.supplier.id;
|
if (result.success) {
|
||||||
this.authorized = !(result.supplier.authorized_at === null);
|
this.supplierId = result.supplier_id;
|
||||||
|
this.authorized = false;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.unauthorizing = false;
|
this.unauthorizing = false;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
# name: discourse-custom-wizard
|
# name: discourse-custom-wizard
|
||||||
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
|
# 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
|
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
|
||||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||||
# contact_emails: development@pavilion.tech
|
# contact_emails: development@pavilion.tech
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
# meta_topic_id: 73345
|
# meta_topic_id: 73345
|
||||||
|
|
||||||
gem 'liquid', '5.5.0', require: true
|
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
|
gem 'discourse_plugin_statistics', '0.1.0.pre7', require: true
|
||||||
register_asset 'stylesheets/common/admin.scss'
|
register_asset 'stylesheets/common/admin.scss'
|
||||||
register_asset 'stylesheets/common/wizard.scss'
|
register_asset 'stylesheets/common/wizard.scss'
|
||||||
|
|
Laden …
In neuem Issue referenzieren