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
No known key found for this signature in database
GPG Key ID: 4B811FB264021800
3 changed files with 13 additions and 5 deletions

View File

@ -10,6 +10,6 @@ export default Component.extend({
actions: {
clickPlan(plan) {
this.set("selectedPlan", plan.id);
},
},
}
}
});

View File

@ -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 });

View File

@ -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"