diff --git a/modules/travel/back/methods/travel/extraCommunityFilter.js b/modules/travel/back/methods/travel/extraCommunityFilter.js index dfefec877..af6e1ec0a 100644 --- a/modules/travel/back/methods/travel/extraCommunityFilter.js +++ b/modules/travel/back/methods/travel/extraCommunityFilter.js @@ -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); diff --git a/modules/travel/front/extra-community/index.html b/modules/travel/front/extra-community/index.html index 6c56e7424..0b94c6c1e 100644 --- a/modules/travel/front/extra-community/index.html +++ b/modules/travel/front/extra-community/index.html @@ -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"> diff --git a/modules/travel/front/extra-community/index.js b/modules/travel/front/extra-community/index.js index 44527d45e..d78561ddf 100644 --- a/modules/travel/front/extra-community/index.js +++ b/modules/travel/front/extra-community/index.js @@ -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) { diff --git a/modules/travel/front/extra-community/style.scss b/modules/travel/front/extra-community/style.scss index 41544242d..f903f94ea 100644 --- a/modules/travel/front/extra-community/style.scss +++ b/modules/travel/front/extra-community/style.scss @@ -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; diff --git a/print/templates/reports/extra-community/extra-community.js b/print/templates/reports/extra-community/extra-community.js index c9d2fb2f3..5c8960c12 100755 --- a/print/templates/reports/extra-community/extra-community.js +++ b/print/templates/reports/extra-community/extra-community.js @@ -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' ] };