feat(Searchbar): You can now filter by a ticket collection #722

Merged
carlosjr merged 3 commits from 3068-ticket_colletion into dev 2021-09-02 13:20:33 +00:00
3 changed files with 22 additions and 2 deletions
Showing only changes of commit 0370cbf207 - Show all commits

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