import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; export default Controller.extend({ teamOrganizationData : service(), router: service(), queryParams: ['page', 'perPage', 'sort', 'filter'], page: 1, perPage: 10, filter: null, init() { this._super(...arguments); this.table = { mode: "list", model: "team-organization", columns: [ { name: 'Team Organization', key: 'teamOrganization', uri: "team-organization.detail", editUri: "team-organization.edit" }, { name: 'Team Organization Code', key: 'teamOrganizationCode', }, ] }; }, actions : { deleteRow(data) { let result = confirm('Are you sure want to delete this data?'); if (result) { if (data != null) { this.teamOrganizationData.delete(data).then(() => { this.router.transitionTo('team-organization.index'); }); } } }, }, });