investira.sdk 2.4.21 → 2.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/utils/dates.js +6 -4
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/lib/utils/dates.js
CHANGED
|
@@ -1082,11 +1082,13 @@ const dates = {
|
|
|
1082
1082
|
xNextDate = dates.scheduleToDate({ ...pSchedule, type: 'W' }, xNextDate);
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
+
//Ajusta data para o próximo dia util
|
|
1085
1086
|
if (pSchedule?.workingDay) {
|
|
1086
|
-
|
|
1087
|
-
//
|
|
1088
|
-
if (pSchedule?.nextDay) {
|
|
1089
|
-
|
|
1087
|
+
//Se não for dia útil, ajusta para o próximo dia útil
|
|
1088
|
+
//A opção nextDay força para que o próxima data não precise ser dia util, desde que a data atual seja dia útil
|
|
1089
|
+
if (!pSchedule?.nextDay || !dates.isWorkingDay(xCurrentDate)) {
|
|
1090
|
+
//Garante que seja dia útil se próxima data ainda não for
|
|
1091
|
+
xNextDate = dates.addWorkingDays(xNextDate, 0);
|
|
1090
1092
|
}
|
|
1091
1093
|
}
|
|
1092
1094
|
return xNextDate;
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "investira.sdk",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.23",
|
|
4
4
|
"author": "Investira",
|
|
5
5
|
"description": "Investira SDK",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"registry": true,
|
|
9
|
-
"raw": "investira.sdk@2.4.
|
|
9
|
+
"raw": "investira.sdk@2.4.23",
|
|
10
10
|
"escapedName": "investira.sdk",
|
|
11
|
-
"rawSpec": "2.4.
|
|
11
|
+
"rawSpec": "2.4.23",
|
|
12
12
|
"saveSpec": null,
|
|
13
|
-
"fetchSpec": "2.4.
|
|
13
|
+
"fetchSpec": "2.4.23",
|
|
14
14
|
"homepage": "https://investira.com.br/",
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=11.11.0 <=18.12",
|