34 lines
742 B
JavaScript
34 lines
742 B
JavaScript
|
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')
|
||
|
});
|