#1069 activeWrokersWithRole now returns the nickname

This commit is contained in:
Carlos Jimenez Ruiz 2019-01-30 14:27:35 +01:00
parent b64609f3a5
commit a48fa07cad
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ module.exports = Self => {
return {or: [
{'w.firstName': {like: `%${value}%`}},
{'w.name': {like: `%${value}%`}},
{'u.name': {like: `%${value}%`}}
{'u.nickname': {like: `%${value}%`}}
]};
case 'id':
return {'w.id': value};
@ -54,7 +54,7 @@ module.exports = Self => {
myFilter = mergeFilters(myFilter, clientFilter);
let stmt = new ParameterizedSQL(
`SELECT DISTINCT w.id, w.firstName, w.name
`SELECT DISTINCT w.id, w.firstName, w.name, u.nickname
FROM worker w
JOIN account.user u ON u.id = w.userFk
JOIN account.roleRole i ON i.role = u.role