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: {
|
actions: {
|
||||||
clickPlan(plan) {
|
clickPlan(plan) {
|
||||||
this.set("selectedPlan", plan.id);
|
this.set("selectedPlan", plan.id);
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,8 +22,11 @@ export default Route.extend({
|
||||||
product: product.get("id")
|
product: product.get("id")
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
plan = AdminPlan.find(id);
|
plan = AdminPlan.find(id).then(result => {
|
||||||
plan.isRecurring = plan.type === "recurring";
|
result.isRecurring = result.type === "recurring";
|
||||||
|
|
||||||
|
return result;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const groups = Group.findAll({ ignore_automatic: true });
|
const groups = Group.findAll({ ignore_automatic: true });
|
||||||
|
|
|
@ -44,7 +44,12 @@
|
||||||
{{i18n 'discourse_subscriptions.admin.plans.plan.recurring'}}
|
{{i18n 'discourse_subscriptions.admin.plans.plan.recurring'}}
|
||||||
</label>
|
</label>
|
||||||
{{#if planFieldDisabled}}
|
{{#if planFieldDisabled}}
|
||||||
{{input disabled=true value=model.plan.isRecurring}}
|
{{input
|
||||||
|
type="checkbox"
|
||||||
|
name="recurring"
|
||||||
|
checked=model.plan.isRecurring
|
||||||
|
disabled=true
|
||||||
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{input
|
{{input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
Loading…
Reference in New Issue