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

34 lines
910 B
JavaScript

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
});