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

30 lines
848 B
JavaScript
Raw Permalink Normal View History

2022-05-24 10:50:22 +00:00
import ngModule from '../module';
import ModuleCard from 'salix/components/module-card';
class Controller extends ModuleCard {
reload() {
const filter = {
include: [
{relation: 'worker',
scope: {
2023-08-30 10:48:57 +00:00
fields: ['id'],
2022-05-24 10:50:22 +00:00
include: {
relation: 'user',
scope: {
fields: ['nickname']
}
}
}},
{relation: 'parking'}
]
};
this.$http.get(`Shelvings/${this.$params.id}`, {filter})
.then(res => this.shelving = res.data);
}
}
ngModule.vnComponent('vnShelvingCard', {
template: require('./index.html'),
controller: Controller
});