#5919 createLocker #2446

Merged
jorgep merged 42 commits from 5919-createLocker into dev 2024-05-13 13:10:40 +00:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 6ceee45b13 - Show all commits

View File

@ -1,7 +1,9 @@
ALTER TABLE vn.worker MODIFY COLUMN locker varchar(10) DEFAULT NULL NULL;
-- Eliminar locker
ALTER TABLE `vn`.`worker` DROP COLUMN `locker`;
CREATE TABLE `vn`.`locker` (
`id` int(100),
`code` varchar(10) DEFAULT NULL,
`gender` varchar(255) DEFAULT NULL,
`workerFk` int(10) unsigned DEFAULT NULL,

View File

@ -117,14 +117,15 @@ module.exports = Self => {
stmt = new ParameterizedSQL(
`SELECT w.id, u.email, p.extension, u.name as userName,
d.name AS department, w.lastName, u.nickname, mu.email
d.name AS department, w.lastName, u.nickname, mu.email, lc.code
FROM worker w
LEFT JOIN workerDepartment wd ON wd.workerFk = w.id
LEFT JOIN department d ON d.id = wd.departmentFk
LEFT JOIN client c ON c.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 account.emailUser mu ON mu.userFk = u.id`
LEFT JOIN account.emailUser mu ON mu.userFk = u.id
LEFT JOIN locker lc ON lc.workerFk = w.id`
);
stmt.merge(conn.makeSuffix(filter));