#6274 workerTimeControl #1858
|
@ -329,5 +329,6 @@
|
|||
"The amount cannot be less than the minimum": "La cantidad no puede ser menor que la cantidad mínima",
|
||||
"quantityLessThanMin": "La cantidad no puede ser menor que la cantidad mínima",
|
||||
"Cannot past travels with entries": "No se pueden pasar envíos con entradas",
|
||||
"It was not able to remove the next expeditions:": "No se pudo eliminar las siguientes expediciones: {{expeditions}}"
|
||||
"It was not able to remove the next expeditions:": "No se pudo eliminar las siguientes expediciones: {{expeditions}}",
|
||||
"Incorrect pin.": "Pin incorrecto."
|
||||
}
|
|
@ -36,9 +36,9 @@ module.exports = Self => {
|
|||
Object.assign(myOptions, options);
|
||||
|
||||
const query = 'CALL vn.workerTimeControl_clockIn(?, ?, ?)';
|
||||
const [response] = await Self.rawSql(query, [workerFk, timed, direction], myOptions);
|
||||
if (response[0] && response[0].error)
|
||||
throw new UserError(response[0].error);
|
||||
const [[response]] = await Self.rawSql(query, [workerFk, timed, direction], myOptions);
|
||||
if (response && response.error)
|
||||
throw new UserError(response.error);
|
||||
|
||||
return response;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ module.exports = Self => {
|
|||
{
|
||||
arg: 'pin',
|
||||
type: 'string',
|
||||
required: true,
|
||||
required: true
|
||||
},
|
||||
],
|
||||
returns: {
|
||||
|
@ -27,9 +27,8 @@ module.exports = Self => {
|
|||
Object.assign(myOptions, options);
|
||||
|
||||
const query = `CALL vn.workerTimeControl_login(?)`;
|
||||
const user = await Self.rawSql(query, [pin], myOptions);
|
||||
|
||||
if (!user) throw new UserError('Indique el pin.');
|
||||
return user[0][0];
|
||||
const [[user]] = await Self.rawSql(query, [pin], myOptions);
|
||||
if (!user) throw new UserError('Incorrect pin.');
|
||||
return user;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue