Bug #772 Ticket expeditions ha dejado de funcionar

This commit is contained in:
Gerard 2018-10-29 09:39:37 +01:00
parent 44da0312e6
commit 36f048e4ef
3 changed files with 14 additions and 13 deletions

View File

@ -27,7 +27,7 @@
<vn-tr ng-repeat="expedition in expeditions"> <vn-tr ng-repeat="expedition in expeditions">
<vn-td pad-medium-h style="width:30px;color:#FFA410;"> <vn-td pad-medium-h style="width:30px;color:#FFA410;">
<vn-icon-button icon="delete" <vn-icon-button icon="delete"
on-click="$ctrl.deleteExpedition(expedition)" ng-click="$ctrl.deleteExpedition(expedition)"
vn-tooltip="Delete expedition"> vn-tooltip="Delete expedition">
</vn-icon-button> </vn-icon-button>
</vn-td> </vn-td>

View File

@ -30,8 +30,8 @@ class Controller {
warehouseFk: ${this.ticket.warehouseFk}, warehouseFk: ${this.ticket.warehouseFk},
ticketFk: ${this.ticket.id} ticketFk: ${this.ticket.id}
})`, })`,
tooltip: 'Item diary' tooltip: 'Item diary',
} },
}; };
this.$scope.descriptor.itemFk = itemFk; this.$scope.descriptor.itemFk = itemFk;
this.$scope.descriptor.parent = event.target; this.$scope.descriptor.parent = event.target;
@ -49,6 +49,6 @@ ngModule.component('vnTicketExpedition', {
template: require('./index.html'), template: require('./index.html'),
controller: Controller, controller: Controller,
bindings: { bindings: {
ticket: '<' ticket: '<',
} },
}); });

View File

@ -1,6 +1,6 @@
const ParameterizedSQL = require('vn-loopback/node_modules/loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('vn-loopback/node_modules/loopback-connector').ParameterizedSQL;
module.exports = Self => { module.exports = (Self) => {
Self.remoteMethod('filter', { Self.remoteMethod('filter', {
description: 'Find all instances of the model matched by filter from the data source.', description: 'Find all instances of the model matched by filter from the data source.',
accessType: 'READ', accessType: 'READ',
@ -9,22 +9,23 @@ module.exports = Self => {
arg: 'filter', arg: 'filter',
type: 'Object', type: 'Object',
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
http: {source: 'query'} http: {source: 'query'},
} },
], ],
returns: { returns: {
type: ['Object'], type: ['Object'],
root: true root: true,
}, },
http: { http: {
path: `/filter`, path: `/filter`,
verb: 'GET' verb: 'GET',
} },
}); });
Self.filter = async filter => { Self.filter = async (filter) => {
let stmt = new ParameterizedSQL( const stmt = new ParameterizedSQL(
`SELECT `SELECT
e.id,
e.ticketFk, e.ticketFk,
e.isBox, e.isBox,
i1.name namePackage, i1.name namePackage,