FIX: Admins unable to cancel a subscription for a user (#220)
This commit is contained in:
@@ -25,7 +25,11 @@ export default class AdminCancelSubscription extends Component {
|
||||
@label="yes_value"
|
||||
@action={{fn
|
||||
@model.cancelSubscription
|
||||
(hash [email protected] refund=this.refund)
|
||||
(hash
|
||||
[email protected]
|
||||
refund=this.refund
|
||||
closeModal=@closeModal
|
||||
)
|
||||
}}
|
||||
@icon="times"
|
||||
@isLoading={{@model.subscription.loading}}
|
||||
|
||||
+3
@@ -40,6 +40,8 @@ export default Controller.extend({
|
||||
cancelSubscription(model) {
|
||||
const subscription = model.subscription;
|
||||
const refund = model.refund;
|
||||
const closeModal = model.closeModal;
|
||||
|
||||
subscription.set("loading", true);
|
||||
subscription
|
||||
.destroy(refund)
|
||||
@@ -52,6 +54,7 @@ export default Controller.extend({
|
||||
)
|
||||
.finally(() => {
|
||||
subscription.set("loading", false);
|
||||
closeModal();
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user