Compare commits

...

17 Commits

Author SHA1 Message Date
Pako Natek 3cc31b7779 Merge branch 'dev' into 8075-itemShelvingMoving
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-07 06:41:45 +00:00
Jorge Penadés 6d973fd4ff Merge pull request '#7323 worker/filter' (!2978) from 7323-fineTunningWorker into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #2978
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-10-07 06:41:31 +00:00
Jorge Penadés 4fb0936399 Merge branch 'dev' into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-07 06:39:11 +00:00
Jorge Penadés c799a9d894 Merge branch 'dev' into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-04 11:32:30 +00:00
Jorge Penadés c4faac7446 Merge branch 'dev' into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-10-04 07:47:38 +00:00
Jorge Penadés 1930bc450f Merge branch 'dev' into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-03 07:59:06 +00:00
Jorge Penadés 0311069f00 Merge branch 'dev' into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-10-03 07:16:55 +00:00
Jorge Penadés 5e56034105 fix: refs #7323 rollback
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-26 09:48:07 +02:00
Jorge Penadés f62d11dab2 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-26 09:17:14 +02:00
Jorge Penadés 78b500e452 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-09-24 10:15:25 +02:00
Jorge Penadés 8ff0dc06fe Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-23 09:29:51 +02:00
Jorge Penadés c0c8548216 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-18 09:41:40 +02:00
Jorge Penadés 75b7e603c9 fix: refs #7323 drop acl
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 16:08:51 +02:00
Jorge Penadés eb430ea5c4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 15:44:19 +02:00
Jorge Penadés 24780c4511 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7323-fineTunningWorker
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-17 13:27:11 +02:00
Jorge Penadés e293dff7c9 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7323-fineTunningWorker 2024-09-17 09:47:43 +02:00
Jorge Penadés 4d0bb81632 fix: refs #7323 worker/filter
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-09-16 16:33:22 +02:00
2 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,3 @@
DELETE FROM salix.ACL
WHERE model = 'WorkerLog'
AND property = '*';

View File

@ -67,6 +67,12 @@ module.exports = Self => {
type: 'String', type: 'String',
description: 'The worker user name', description: 'The worker user name',
http: {source: 'query'} http: {source: 'query'}
},
{
arg: 'email',
type: 'String',
description: 'The user email',
http: {source: 'query'}
} }
], ],
returns: { returns: {
@ -99,6 +105,8 @@ module.exports = Self => {
return {'w.firstName': {like: `%${value}%`}}; return {'w.firstName': {like: `%${value}%`}};
case 'lastName': case 'lastName':
return {'w.lastName': {like: `%${value}%`}}; return {'w.lastName': {like: `%${value}%`}};
case 'nickname':
return {'u.nickname': {like: `%${value}%`}};
case 'extension': case 'extension':
return {'p.extension': value}; return {'p.extension': value};
case 'fi': case 'fi':
@ -107,6 +115,8 @@ module.exports = Self => {
return {'d.id': value}; return {'d.id': value};
case 'userName': case 'userName':
return {'u.name': {like: `%${value}%`}}; return {'u.name': {like: `%${value}%`}};
case 'email':
return {'eu.email': {like: `%${value}%`}};
} }
}); });
@ -116,15 +126,23 @@ module.exports = Self => {
let stmt; let stmt;
stmt = new ParameterizedSQL( stmt = new ParameterizedSQL(
`SELECT w.id, u.email, p.extension, u.name as userName, `SELECT w.id,
d.name AS department, w.lastName, u.nickname, mu.email w.lastName,
w.firstName,
u.email,
u.nickname,
p.extension,
u.name as userName,
d.name AS department,
eu.email,
c.fi
FROM worker w FROM worker w
LEFT JOIN workerDepartment wd ON wd.workerFk = w.id LEFT JOIN workerDepartment wd ON wd.workerFk = w.id
LEFT JOIN department d ON d.id = wd.departmentFk LEFT JOIN department d ON d.id = wd.departmentFk
LEFT JOIN client c ON c.id = w.id LEFT JOIN client c ON c.id = w.id
LEFT JOIN account.user u ON u.id = w.id LEFT JOIN account.user u ON u.id = w.id
LEFT JOIN pbx.sip p ON p.user_id = u.id LEFT JOIN pbx.sip p ON p.user_id = u.id
LEFT JOIN account.emailUser mu ON mu.userFk = u.id` LEFT JOIN account.emailUser eu ON eu.userFk = u.id`
); );
stmt.merge(conn.makeSuffix(filter)); stmt.merge(conn.makeSuffix(filter));