Merge branch 'use_subscription_gem' of github.com:paviliondev/discourse-custom-wizard into use_subscription_gem
Dieser Commit ist enthalten in:
Commit
76288932c8
1 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen
|
@ -16,7 +16,8 @@ export default class WizardSubscriptionStatus extends Component {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(...arguments);
|
super(...arguments);
|
||||||
ajax("/admin/plugins/subscription-client/suppliers?final_landing_path%3D%2Fadmin%2Fwizards%2Fwizard").then((result) => {
|
ajax("/admin/plugins/subscription-client/suppliers").then((result) => {
|
||||||
|
console.log(result)
|
||||||
this.supplierId = result.suppliers[0].id;
|
this.supplierId = result.suppliers[0].id;
|
||||||
this.authorized = result.suppliers[0].authorized;
|
this.authorized = result.suppliers[0].authorized;
|
||||||
})
|
})
|
||||||
|
@ -24,7 +25,7 @@ export default class WizardSubscriptionStatus extends Component {
|
||||||
|
|
||||||
@action
|
@action
|
||||||
authorize() {
|
authorize() {
|
||||||
window.location.href = `${this.basePath}/authorize?supplier_id=${this.supplierId}`;
|
window.location.href = `${this.basePath}/authorize?supplier_id=${this.supplierId}&final_landing_path=/admin/wizards/wizard`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -39,8 +40,8 @@ export default class WizardSubscriptionStatus extends Component {
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
this.supplierId = result.suppliers[0].id;
|
this.supplierId = result.supplier.id;
|
||||||
this.authorized = result.suppliers[0].authorized;
|
this.authorized = !(result.supplier.authorized_at === null);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.unauthorizing = false;
|
this.unauthorizing = false;
|
||||||
|
|
Laden …
In neuem Issue referenzieren