salix/modules/client/front/sample/index/index.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

2018-07-31 09:08:22 +00:00
import ngModule from '../../module';
2020-03-17 10:17:50 +00:00
import Section from 'salix/components/section';
2018-07-31 09:08:22 +00:00
2020-03-17 10:17:50 +00:00
class Controller extends Section {
constructor($element, $) {
super($element, $);
2018-07-31 09:08:22 +00:00
this.filter = {
include: [
{
relation: 'type',
2018-07-31 09:08:22 +00:00
scope: {
fields: ['code', 'description']
2018-07-31 09:08:22 +00:00
}
}, {
relation: 'worker',
2018-07-31 09:08:22 +00:00
scope: {
fields: ['userFk'],
include: {
relation: 'user',
scope: {
2020-09-03 13:11:16 +00:00
fields: ['name']
}
}
2018-07-31 09:08:22 +00:00
}
}, {
relation: 'company',
2018-07-31 09:08:22 +00:00
scope: {
fields: ['code']
2018-07-31 09:08:22 +00:00
}
}
]
};
}
}
ngModule.vnComponent('vnClientSampleIndex', {
2018-07-31 09:08:22 +00:00
template: require('./index.html'),
controller: Controller
});