feat(Searchbar): You can now filter by a ticket collection
gitea/salix/pipeline/head This commit looks good Details

Refs: 3068
This commit is contained in:
Joan Sanchez 2021-09-01 11:27:24 +02:00
parent 559d27e835
commit 0370cbf207
3 changed files with 22 additions and 2 deletions

View File

@ -107,7 +107,12 @@ module.exports = Self => {
arg: 'alertLevel',
type: 'number',
description: `The alert level of the tickets`
}
},
{
arg: 'collectionFk',
type: 'number',
description: `The collection id filter`
},
],
returns: {
type: ['object'],
@ -269,6 +274,15 @@ module.exports = Self => {
});
}
if (args.collectionFk) {
stmt.merge({
sql: `
JOIN collection cll ON cll.id = ?
JOIN ticketCollection tc ON tc.collectionFk = cll.id AND tc.ticketFk = t.id`,
params: [args.collectionFk]
});
}
stmt.merge(conn.makeWhere(filter.where));
stmts.push(stmt);

View File

@ -110,6 +110,11 @@
ng-model="filter.provinceFk"
url="Provinces">
</vn-autocomplete>
<vn-textfield
vn-one
label="Collection"
ng-model="filter.collectionFk">
</vn-textfield>
</vn-horizontal>
<vn-horizontal class="vn-px-lg">
<vn-check

View File

@ -18,4 +18,5 @@ DELIVERED: Servido
ON_PREPARATION: En preparacion
PACKED: Encajado
Cannot choose a range of dates and days onward at the same time: No se puede selecionar un rango de fechas y días en adelante a la vez
Or: O
Or: O
Collection: Colección