From 36f048e4ef7d8af3c48487678fcfc5a3bd655b2a Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 29 Oct 2018 09:39:37 +0100 Subject: [PATCH] Bug #772 Ticket expeditions ha dejado de funcionar --- client/ticket/src/expedition/index.html | 2 +- client/ticket/src/expedition/index.js | 8 ++++---- .../ticket/common/methods/expedition/filter.js | 17 +++++++++-------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/client/ticket/src/expedition/index.html b/client/ticket/src/expedition/index.html index 7583b2595..0ab78f492 100644 --- a/client/ticket/src/expedition/index.html +++ b/client/ticket/src/expedition/index.html @@ -27,7 +27,7 @@ diff --git a/client/ticket/src/expedition/index.js b/client/ticket/src/expedition/index.js index f83d88fcd..eb0188cc8 100644 --- a/client/ticket/src/expedition/index.js +++ b/client/ticket/src/expedition/index.js @@ -30,8 +30,8 @@ class Controller { warehouseFk: ${this.ticket.warehouseFk}, ticketFk: ${this.ticket.id} })`, - tooltip: 'Item diary' - } + tooltip: 'Item diary', + }, }; this.$scope.descriptor.itemFk = itemFk; this.$scope.descriptor.parent = event.target; @@ -49,6 +49,6 @@ ngModule.component('vnTicketExpedition', { template: require('./index.html'), controller: Controller, bindings: { - ticket: '<' - } + ticket: '<', + }, }); diff --git a/services/ticket/common/methods/expedition/filter.js b/services/ticket/common/methods/expedition/filter.js index fa359bf25..a51006ffd 100644 --- a/services/ticket/common/methods/expedition/filter.js +++ b/services/ticket/common/methods/expedition/filter.js @@ -1,6 +1,6 @@ const ParameterizedSQL = require('vn-loopback/node_modules/loopback-connector').ParameterizedSQL; -module.exports = Self => { +module.exports = (Self) => { Self.remoteMethod('filter', { description: 'Find all instances of the model matched by filter from the data source.', accessType: 'READ', @@ -9,22 +9,23 @@ module.exports = Self => { arg: 'filter', type: 'Object', description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', - http: {source: 'query'} - } + http: {source: 'query'}, + }, ], returns: { type: ['Object'], - root: true + root: true, }, http: { path: `/filter`, - verb: 'GET' - } + verb: 'GET', + }, }); - Self.filter = async filter => { - let stmt = new ParameterizedSQL( + Self.filter = async (filter) => { + const stmt = new ParameterizedSQL( `SELECT + e.id, e.ticketFk, e.isBox, i1.name namePackage,