feat(Searchbar): You can now filter by a ticket collection #722
|
@ -107,7 +107,12 @@ module.exports = Self => {
|
||||||
arg: 'alertLevel',
|
arg: 'alertLevel',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
description: `The alert level of the tickets`
|
description: `The alert level of the tickets`
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
arg: 'collectionFk',
|
||||||
|
type: 'number',
|
||||||
|
description: `The collection id filter`
|
||||||
|
},
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
type: ['object'],
|
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));
|
stmt.merge(conn.makeWhere(filter.where));
|
||||||
stmts.push(stmt);
|
stmts.push(stmt);
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,11 @@
|
||||||
ng-model="filter.provinceFk"
|
ng-model="filter.provinceFk"
|
||||||
url="Provinces">
|
url="Provinces">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
<vn-textfield
|
||||||
|
vn-one
|
||||||
|
label="Collection"
|
||||||
|
ng-model="filter.collectionFk">
|
||||||
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal class="vn-px-lg">
|
<vn-horizontal class="vn-px-lg">
|
||||||
<vn-check
|
<vn-check
|
||||||
|
|
|
@ -19,3 +19,4 @@ ON_PREPARATION: En preparacion
|
||||||
PACKED: Encajado
|
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
|
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