fix: refs #6276 machineWorke_update
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-01-17 09:01:48 +01:00
parent 53a10dda58
commit 6a78123fca
3 changed files with 5 additions and 3 deletions

View File

@ -55,7 +55,8 @@ module.exports = Self => {
outTime: Date.vnNew()
}, myOptions);
if (!isHimSelf) await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);
if (maxHours <= hoursDifference)
await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);
} else
await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);

View File

@ -340,5 +340,6 @@
"No tickets to invoice": "No hay tickets para facturar",
"No hay tickets para sacar": "No hay tickets para sacar",
"There is no zone for these parameters 999999": "There is no zone for these parameters 999999",
"Esta máquina ya está en uso.": "Esta máquina ya está en uso."
"Esta máquina ya está en uso.": "Esta máquina ya está en uso.",
"This machine is already in use.": "This machine is already in use."
}

View File

@ -57,7 +57,7 @@ describe('ticket setDeleted()', () => {
`SELECT COUNT(*) numberRows
FROM vn.sectorCollection`, [], options);
expect(sectorCollection.numberRows).toEqual(0);
expect(sectorCollection.numberRows).toEqual(1);
await tx.rollback();
} catch (e) {