FIX: Properly show information on saved plans
This commit is contained in:
parent
0a244111bc
commit
954beeb094
|
@ -10,6 +10,6 @@ export default Component.extend({
|
|||
actions: {
|
||||
clickPlan(plan) {
|
||||
this.set("selectedPlan", plan.id);
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -22,8 +22,11 @@ export default Route.extend({
|
|||
product: product.get("id")
|
||||
});
|
||||
} else {
|
||||
plan = AdminPlan.find(id);
|
||||
plan.isRecurring = plan.type === "recurring";
|
||||
plan = AdminPlan.find(id).then(result => {
|
||||
result.isRecurring = result.type === "recurring";
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
const groups = Group.findAll({ ignore_automatic: true });
|
||||
|
|
|
@ -44,7 +44,12 @@
|
|||
{{i18n 'discourse_subscriptions.admin.plans.plan.recurring'}}
|
||||
</label>
|
||||
{{#if planFieldDisabled}}
|
||||
{{input disabled=true value=model.plan.isRecurring}}
|
||||
{{input
|
||||
type="checkbox"
|
||||
name="recurring"
|
||||
checked=model.plan.isRecurring
|
||||
disabled=true
|
||||
}}
|
||||
{{else}}
|
||||
{{input
|
||||
type="checkbox"
|
||||
|
|
Loading…
Reference in New Issue