2019-10-24 10:49:18 +00:00
|
|
|
import ngModule from '../module';
|
2019-11-10 10:08:44 +00:00
|
|
|
import ModuleCard from 'salix/components/module-card';
|
2019-10-24 10:49:18 +00:00
|
|
|
|
2019-11-10 10:08:44 +00:00
|
|
|
class Controller extends ModuleCard {
|
|
|
|
reload() {
|
|
|
|
let filter = {
|
2019-10-24 10:49:18 +00:00
|
|
|
include: [
|
|
|
|
{
|
|
|
|
relation: 'warehouseIn',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'name']
|
|
|
|
}
|
2019-11-10 10:08:44 +00:00
|
|
|
}, {
|
2019-10-24 10:49:18 +00:00
|
|
|
relation: 'warehouseOut',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'name']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
2019-11-10 10:08:44 +00:00
|
|
|
this.$http.get(`Travels/${this.$params.id}`, {filter})
|
|
|
|
.then(response => this.travel = response.data);
|
2019-10-24 10:49:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.component('vnTravelCard', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|
|
|
|
|