1
0
mirror of synced 2026-08-06 07:06:54 +00:00

FIX: Properly show information on saved plans

This commit is contained in:
Justin DiRose
2020-07-28 11:56:58 -05:00
parent 0a244111bc
commit 954beeb094
3 changed files with 13 additions and 5 deletions
@@ -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"