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

34 lines
742 B
JavaScript
Raw Normal View History

2022-05-24 10:50:22 +00:00
import ngModule from '../module';
import ModuleMain from 'salix/components/module-main';
export default class Shelving extends ModuleMain {
constructor($element, $) {
super($element, $);
this.filter = {
include: [
{relation: 'parking'}
],
};
}
$onInit() {
console.log(this.$params);
}
exprBuilder(param, value) {
switch (param) {
case 'search':
return {id: {like: `%${value}%`}};
case 'parkingFk':
case 'userFk':
case 'isRecyclable':
return {[param]: value};
}
}
}
ngModule.vnComponent('vnShelving', {
controller: Shelving,
template: require('./index.html')
});