feat(item): add filterParams in main
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2021-11-17 09:11:26 +01:00
parent 26815ad5a3
commit b59cabe41a
2 changed files with 14 additions and 3 deletions

View File

@ -1,16 +1,19 @@
<vn-crud-model
vn-id="model"
url="Items/filter"
user-params="::$ctrl.filterParams"
limit="12"
order="isActive DESC, name, id"
data="items">
data="items"
auto-load="true">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
vn-focus
panel="vn-item-search-panel"
info="Search items by id, name or barcode"
suggested-filter="{isActive: true}"
suggested-filter="$ctrl.filterParams"
filter="$ctrl.filterParams"
model="model">
</vn-searchbar>
</vn-portal>

View File

@ -1,7 +1,15 @@
import ngModule from '../module';
import ModuleMain from 'salix/components/module-main';
export default class Items extends ModuleMain {
constructor($element, $) {
super($element, $);
export default class Items extends ModuleMain {}
this.filterParams = {
isActive: true,
isFloramondo: false
};
}
}
ngModule.vnComponent('vnItems', {
controller: Items,