feat(Searchbar): You can now filter by a ticket collection #722
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue