delete plans
This commit is contained in:
+5
-1
@@ -1,5 +1,9 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
actions: {
|
||||
deletePlan(plan) {}
|
||||
deletePlan(id) {
|
||||
return ajax(`/patrons/admin/plans/${id}`, { method: "delete" });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
<td>{{plan.interval}}</td>
|
||||
<td>{{plan.amount}}</td>
|
||||
<td>
|
||||
{{d-button action=(action "deletePlan" plan) icon="trash" class="btn-danger btn no-text btn-icon"}}
|
||||
{{d-button action=(action "deletePlan" plan.id) icon="trash-alt" class="btn-danger btn no-text btn-icon"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
||||
Reference in New Issue
Block a user