Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 01:10:28 +01:00
prettier
Dieser Commit ist enthalten in:
Ursprung
baf533a8f4
Commit
437709446e
2 geänderte Dateien mit 16 neuen und 9 gelöschten Zeilen
|
@ -19,7 +19,7 @@ export default class WizardSubscriptionStatus extends Component {
|
||||||
ajax("/admin/plugins/subscription-client/suppliers").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;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -32,11 +32,11 @@ export default class WizardSubscriptionStatus extends Component {
|
||||||
this.unauthorizing = true;
|
this.unauthorizing = true;
|
||||||
|
|
||||||
ajax(`${this.basePath}/authorize`, {
|
ajax(`${this.basePath}/authorize`, {
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
data: {
|
data: {
|
||||||
supplier_id: this.supplierId,
|
supplier_id: this.supplierId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.supplierId = result.supplier.id;
|
this.supplierId = result.supplier.id;
|
||||||
this.authorized = !(result.supplier.authorized_at === null);
|
this.authorized = !(result.supplier.authorized_at === null);
|
||||||
|
@ -46,5 +46,5 @@ export default class WizardSubscriptionStatus extends Component {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
})
|
})
|
||||||
.catch(popupAjaxError);
|
.catch(popupAjaxError);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
<div class="supplier-authorize">
|
<div class="supplier-authorize">
|
||||||
{{#if authorized}}
|
{{#if authorized}}
|
||||||
{{conditional-loading-spinner size="small" condition=unauthorizing}}
|
{{conditional-loading-spinner size="small" condition=unauthorizing}}
|
||||||
<a {{action "deauthorize"}} class="deauthorize" title={{i18n "admin.subscription_client.supplier.deauthorize"}} role="button" disabled={{unauthorizing}}>
|
<a
|
||||||
|
{{action "deauthorize"}}
|
||||||
|
class="deauthorize"
|
||||||
|
title={{i18n "admin.subscription_client.supplier.deauthorize"}}
|
||||||
|
role="button"
|
||||||
|
disabled={{unauthorizing}}
|
||||||
|
>
|
||||||
{{i18n "admin.wizard.subscription.deauthorize"}}
|
{{i18n "admin.wizard.subscription.deauthorize"}}
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -10,7 +16,8 @@
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
label="admin.wizard.subscription.authorize"
|
label="admin.wizard.subscription.authorize"
|
||||||
title="admin.wizard.subscription.authorize"
|
title="admin.wizard.subscription.authorize"
|
||||||
action=(action "authorize")}}
|
action=(action "authorize")
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<WizardSubscriptionBadge />
|
<WizardSubscriptionBadge />
|
||||||
<WizardSubscriptionCta />
|
<WizardSubscriptionCta />
|
||||||
|
|
Laden …
In neuem Issue referenzieren