salix/modules/entry/front/card/index.js

34 lines
910 B
JavaScript
Raw Normal View History

2020-01-10 10:52:35 +00:00
import ngModule from '../module';
import ModuleCard from 'salix/components/module-card';
class Controller extends ModuleCard {
reload() {
let filter = {
include: [
{
relation: 'company',
scope: {
fields: ['id', 'code']
}
}, {
relation: 'travel'
}, {
relation: 'supplier',
scope: {
fields: ['id', 'name']
}
}, {
relation: 'currency'
}
]
};
this.$http.get(`Entries/${this.$params.id}`, {filter})
.then(response => this.entry = response.data);
}
}
ngModule.component('vnEntry Card', {
template: require('./index.html'),
controller: Controller
});