Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 11:52:54 +01:00
evolve
Dieser Commit ist enthalten in:
Ursprung
bcd6f86fc8
Commit
07bed7ec86
1 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen
|
@ -16,7 +16,7 @@ export default class WizardSubscriptionAuthorize 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) => {
|
||||||
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 +24,8 @@ export default class WizardSubscriptionAuthorize 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`;
|
||||||
|
//window.location.href = `${this.basePath}/authorize?supplier_id=${this.supplierId}&final_landing_path%3D%2Fadmin%2Fwizards%2Fwizard`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -39,8 +40,8 @@ export default class WizardSubscriptionAuthorize 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