mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-10 08:03:27 +00:00
filter by deleted
This commit is contained in:
parent
d4afe93a5d
commit
9d982307d5
@ -1,6 +1,12 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import computed from "ember-addons/ember-computed-decorators";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
@computed("model.plans")
|
||||
plans(plans) {
|
||||
return plans.filter(plan => !plan.deleted);
|
||||
},
|
||||
|
||||
actions: {
|
||||
deletePlan(id) {
|
||||
return ajax(`/patrons/admin/plans/${id}`, { method: "delete" });
|
||||
|
@ -8,7 +8,7 @@
|
||||
<th>{{i18n 'discourse_patrons.admin.plans.plan.interval'}}</th>
|
||||
<th>{{i18n 'discourse_patrons.admin.plans.plan.amount'}}</th>
|
||||
</thead>
|
||||
{{#each model.plans as |plan|}}
|
||||
{{#each plans as |plan|}}
|
||||
<tr>
|
||||
<td>{{plan.id}}</td>
|
||||
<td>{{plan.nickname}}</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user