import ngModule from '../module'; import ModuleCard from 'salix/components/module-card'; class Controller extends ModuleCard { reload() { let filter = { include: [ { relation: 'worker', scope: { fields: ['userFk'], include: { relation: 'user', scope: { fields: ['name'] } } } }, { relation: 'ticket', scope: { fields: ['agencyModeFk'], include: { relation: 'agencyMode' } } }, { relation: 'claimState', scope: { fields: ['id', 'description'] } }, { relation: 'client', scope: { fields: ['salesPersonFk', 'name', 'email'], include: { relation: 'salesPersonUser' } } } ] }; this.$http.get(`Claims/${this.$params.id}`, {filter}) .then(res => this.claim = res.data); } } ngModule.vnComponent('vnClaimCard', { template: require('./index.html'), controller: Controller });