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', 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);

View File

@ -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

View File

@ -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