fix: añadidos await y actualizado condicional permissionRate
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4b60aacbbe
commit
7368b572a0
|
@ -165,9 +165,8 @@ module.exports = Self => {
|
|||
|
||||
for (let day of days[index]) {
|
||||
workerFk = day.workerFk;
|
||||
console.log(day);
|
||||
if (day.timeWorkDecimal > 0 && day.timeWorkedDecimal == null
|
||||
&& (day.permissionRate ? day.permissionRate : true)) {
|
||||
&& (day.permissionRate == null ? true : day.permissionRate)) {
|
||||
if (day.timeTable == null) {
|
||||
const timed = new Date(day.dated);
|
||||
await models.WorkerTimeControl.create({
|
||||
|
@ -314,7 +313,7 @@ module.exports = Self => {
|
|||
}, myOptions);
|
||||
|
||||
if (firstWorkerTimeControl)
|
||||
firstWorkerTimeControl.updateAttribute('direction', 'in', myOptions);
|
||||
await firstWorkerTimeControl.updateAttribute('direction', 'in', myOptions);
|
||||
|
||||
const lastWorkerTimeControl = await models.WorkerTimeControl.findOne({
|
||||
where: {
|
||||
|
@ -325,7 +324,7 @@ module.exports = Self => {
|
|||
}, myOptions);
|
||||
|
||||
if (lastWorkerTimeControl)
|
||||
lastWorkerTimeControl.updateAttribute('direction', 'out', myOptions);
|
||||
await lastWorkerTimeControl.updateAttribute('direction', 'out', myOptions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ const {Email} = require('vn-print');
|
|||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('weeklyHourRecordEmail', {
|
||||
description: 'Sends the buyer waste email',
|
||||
description: 'Sends the weekly hour record',
|
||||
accessType: 'WRITE',
|
||||
accepts: [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue