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-td pad-medium-h style="width:30px;color:#FFA410;">
<vn-icon-button icon="delete"
on-click="$ctrl.deleteExpedition(expedition)"
ng-click="$ctrl.deleteExpedition(expedition)"
vn-tooltip="Delete expedition">
</vn-icon-button>
</vn-td>

View File

@ -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: '<',
},
});

View File

@ -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,