#6321 - Negative tickets #1945

Open
jsegarra wants to merge 93 commits from 6321_negative_tickets into dev
1 changed files with 12 additions and 1 deletions
Showing only changes of commit e76e2a15f2 - Show all commits

View File

@ -10,6 +10,12 @@ module.exports = Self => {
type: 'number', type: 'number',
description: 'The item id', description: 'The item id',
}, },
{
arg: 'filter',
type: 'object',
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
http: {source: 'query'}
}
], ],
returns: [ returns: [
{ {
@ -24,7 +30,7 @@ module.exports = Self => {
}, },
}); });
Self.itemLackDetail = async(itemFk, options) => { Self.itemLackDetail = async(itemFk, filter, options) => {
const conn = Self.dataSource.connector; const conn = Self.dataSource.connector;
const myOptions = {}; const myOptions = {};
@ -80,6 +86,11 @@ module.exports = Self => {
`, `,
[itemFk, 2]); [itemFk, 2]);
// if (filter.where.alertLevel) {
// stmt.merge({
// sql: `AND ts.alertLevel=?`, params: ['FREE']});
// }
// stmt.merge(conn.makeWhere(filter));
const sql = ParameterizedSQL.join([stmt], ';'); const sql = ParameterizedSQL.join([stmt], ';');
const result = await conn.executeStmt(sql, myOptions); const result = await conn.executeStmt(sql, myOptions);
return result; return result;