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() {
|
||||
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.authorized = result.suppliers[0].authorized;
|
||||
})
|
||||
|
@ -24,7 +24,8 @@ export default class WizardSubscriptionAuthorize extends Component {
|
|||
|
||||
@action
|
||||
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
|
||||
|
@ -39,8 +40,8 @@ export default class WizardSubscriptionAuthorize extends Component {
|
|||
})
|
||||
.then((result) => {
|
||||
console.log(result);
|
||||
this.supplierId = result.suppliers[0].id;
|
||||
this.authorized = result.suppliers[0].authorized;
|
||||
this.supplierId = result.supplier.id;
|
||||
this.authorized = !(result.supplier.authorized_at === null);
|
||||
})
|
||||
.finally(() => {
|
||||
this.unauthorizing = false;
|
||||
|
|
Laden …
In neuem Issue referenzieren