import ngModule from '../module'; import ModuleCard from 'salix/components/module-card'; class Controller extends ModuleCard { reload() { let filter = { include: [ { relation: 'province', scope: { fields: ['id', 'name'] } }, { relation: 'country', scope: { fields: ['id', 'name', 'code'] } }, { relation: 'payMethod', scope: { fields: ['id', 'name'] } }, { relation: 'payDem', scope: { fields: ['id', 'payDem'] } }, { relation: 'client', scope: { fields: ['id', 'fi'] } } ] }; return this.$http.get(`Suppliers/${this.$params.id}`, {filter}) .then(response => this.supplier = response.data); } } ngModule.vnComponent('vnSupplierCard', { template: require('./index.html'), controller: Controller });