hino / app / controllers / employee-information / index.js
index.js
Raw
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';

export default Controller.extend({
  travelApplicationSearchModal : service(),

  queryParams: ['page', 'perPage', 'sort', 'filter'],
  page: 1,
  perPage: 5,
  filter: null,
  init() {
    this._super(...arguments);
    this.table = {
      mode: "list",
      model: "employee-information",
      columns: [
        {
          name: 'Name',
          key: 'name',
          uri: "employee-information.detail"
        },
      ]
    };
  },
  delete() {
    confirm('Are you sure want to delete this data?');
  },
  edit(params) {
    this.transitionToRoute('employee-information.edit', params.id);
  },
  actions: {
    openModal() {
      this.travelApplicationSearchModal.show();
    }
  }
});