From 8637488fc15ddda3c08aaed76c3e5928746f969d Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 8 May 2024 08:48:19 +0200 Subject: [PATCH] refs #6882 fix pr --- db/versions/11030-salmonCyca/00-firstScript.sql | 2 +- modules/worker/back/methods/worker/createAbsence.js | 2 +- modules/worker/back/models/absence-type.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/versions/11030-salmonCyca/00-firstScript.sql b/db/versions/11030-salmonCyca/00-firstScript.sql index 75c27ef13..72ccc9ae2 100644 --- a/db/versions/11030-salmonCyca/00-firstScript.sql +++ b/db/versions/11030-salmonCyca/00-firstScript.sql @@ -1,7 +1,7 @@ -- Place your SQL code here ALTER TABLE vn.absenceType ADD isFestiveEligible BOOL DEFAULT 1 NOT NULL COMMENT 'Para marcar un tipo de absence'; -UPDATE absenceType +UPDATE vn.absenceType SET isFestiveEligible = 0 WHERE code = 'holiday'; diff --git a/modules/worker/back/methods/worker/createAbsence.js b/modules/worker/back/methods/worker/createAbsence.js index 958e3a73f..cb3811fb6 100644 --- a/modules/worker/back/methods/worker/createAbsence.js +++ b/modules/worker/back/methods/worker/createAbsence.js @@ -95,7 +95,7 @@ module.exports = Self => { const hasHalfHoliday = result.halfHolidayCounter > 0; const isHalfHoliday = absenceType.code === 'halfHoliday'; - const isFestive = absenceType.isFestive; + const isFestive = absenceType.isFestiveEligible; const workCenter = await models.Business.findOne({ where: {id: args.businessFk} diff --git a/modules/worker/back/models/absence-type.json b/modules/worker/back/models/absence-type.json index d540591e2..2f6103367 100644 --- a/modules/worker/back/models/absence-type.json +++ b/modules/worker/back/models/absence-type.json @@ -23,7 +23,7 @@ "holidayEntitlementRate": { "type": "number" }, - "isFestive": { + "isFestiveEligible": { "type": "boolean" } },