(fix): filter repaired
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-03-28 11:57:19 +02:00
parent ad7bcd7cc2
commit 1e587be2ed
5 changed files with 13 additions and 6 deletions

View File

@ -148,6 +148,7 @@ module.exports = Self => {
stmt.merge(conn.makeWhere(filter.where));
stmt.merge(conn.makeGroupBy('t.id'));
stmt.merge(conn.makeOrderBy(filter.order));
stmt.merge(conn.makeLimit(filter));
stmts.push(stmt);

View File

@ -2,7 +2,7 @@
vn-id="model"
url="Travels/extraCommunityFilter"
data="travels"
order="landed ASC, shipped ASC, travelFk, loadPriority, agencyModeFk, evaNotes"
order="shipped ASC, landed ASC, travelFk, loadPriority, agencyModeFk, evaNotes"
limit="20"
auto-load="true">
</vn-crud-model>

View File

@ -36,8 +36,10 @@ class Controller extends Section {
const userParams = this.$.model.userParams;
const hasLanded = userParams.landedFrom || userParams.landedTo;
const hasShipped = userParams.shippedFrom || userParams.shippedTo;
const hasContinent = userParams.continent;
const hasWarehouseOut = userParams.warehouseOutFk;
return hasLanded || hasShipped;
return hasLanded || hasShipped || hasContinent || hasWarehouseOut;
}
findDraggable($event) {

View File

@ -9,8 +9,8 @@ vn-travel-extra-community {
padding-bottom: 7px;
padding-bottom: 4px;
font-weight: lighter;
background-color: #fde6ca;
color: $color-font-light;
background-color: $color-bg;
color: white;
border-bottom: 1px solid #f7931e;
white-space: nowrap;
overflow: hidden;

View File

@ -12,7 +12,8 @@ module.exports = {
landedTo: this.landedEnd,
shippedFrom: this.shippedStart,
shippedTo: this.shippedEnd,
continent: this.continent
continent: this.continent,
warehouseOutFk: this.warehouseOutFk
};
const travels = await this.fetchTravels(args);
@ -73,6 +74,8 @@ module.exports = {
return `t.landed <= ${value}`;
case 'continent':
return `cnt.code = ${value}`;
case 'warehouseOutFk':
return `wo.id = ${value}`;
}
});
@ -96,6 +99,7 @@ module.exports = {
'landedTo',
'shippedFrom',
'shippedTo',
'continent'
'continent',
'warehouseOutFk'
]
};