fix: refs #7028 fix confirm deny #3290

Merged
carlossa merged 23 commits from 7028-itemRequestConfDeny into dev 2024-12-16 10:59:56 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit efcf4d225b - Show all commits

View File

@ -392,6 +392,7 @@
"The raid information is not correct": "La información de la redada no es correcta",
"There are tickets to be invoiced": "Hay tickets para esta zona, borralos primero",
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles"
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
"Worker not found": "Trabajador no encontrado"
}

View File

@ -42,7 +42,7 @@ module.exports = Self => {
try {
const userId = ctx.req.accessToken.userId;
const worker = await models.Worker.findOne({where: {id: userId}}, myOptions);
const worker = await models.Worker.findById({where: {id: userId}}, myOptions);
carlossa marked this conversation as resolved Outdated
Outdated
Review

findById

findById
if (!worker) throw new Error('Worker not found');
carlossa marked this conversation as resolved Outdated
Outdated
Review

Traducir

Traducir
Outdated
Review

(userId, {fields: ...}, myOptions);

`(userId, {fields: ...}, myOptions);`
const params = {
@ -76,7 +76,7 @@ module.exports = Self => {
observation: params.response
});
await models.Chat.sendCheckingPresence(ctx, requesterId, message);
await models.Chat.sendCheckingPresence(ctx, requesterId, message, myOptions);
carlossa marked this conversation as resolved Outdated
Outdated
Review

, myOptions);

, myOptions);
await request.updateAttributes(params, myOptions);
if (tx) await tx.commit();