@zeniai/client-epic-state 5.0.36-betaRR02 → 5.0.36-betaRR03
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/lib/esm/view/common/recurringViewHelper.js +11 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +3 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/common/recurringViewHelper.js +11 -1
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +3 -3
- package/package.json +1 -1
|
@@ -54,9 +54,19 @@ const getRecurringEndDateFromCount = (startDate, frequency, recurringCount) => {
|
|
|
54
54
|
break;
|
|
55
55
|
case 'weekly':
|
|
56
56
|
case 'biweekly':
|
|
57
|
-
case 'semi_weekly':
|
|
58
57
|
endDate = startDate.add((0, exports.getRecurringFrequencyInDays)(frequency) * (recurringCount - 1), 'day');
|
|
59
58
|
break;
|
|
59
|
+
case 'semi_weekly': {
|
|
60
|
+
// Two semi-weekly occurrences span exactly 7 days regardless of which
|
|
61
|
+
// two weekdays are picked (since gap1 + gap2 = 7). So odd counts are
|
|
62
|
+
// exact; even counts use the conservative half-week step (4 days).
|
|
63
|
+
const stepsRemaining = recurringCount - 1;
|
|
64
|
+
const fullWeekPairs = Math.floor(stepsRemaining / 2);
|
|
65
|
+
const hasOddTailStep = stepsRemaining % 2 === 1;
|
|
66
|
+
const days = fullWeekPairs * 7 + (hasOddTailStep ? 4 : 0);
|
|
67
|
+
endDate = startDate.add(days, 'day');
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
60
70
|
case 'monthly':
|
|
61
71
|
endDate = startDate.add(recurringCount - 1, 'month');
|
|
62
72
|
break;
|
|
@@ -95,10 +95,10 @@ const prepareTaskPayload = (state, taskId, taskGroupId) => {
|
|
|
95
95
|
recurring_start_date: localData.type.code === 'recurring'
|
|
96
96
|
? (localData.recurringStartDate?.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT) ?? null)
|
|
97
97
|
: null,
|
|
98
|
-
|
|
98
|
+
recurring_days_of_week: localData.type.code === 'recurring' &&
|
|
99
99
|
localData.recurringFrequency === 'semi_weekly'
|
|
100
|
-
?
|
|
101
|
-
:
|
|
100
|
+
? (localData.recurringDaysOfWeek ?? [])
|
|
101
|
+
: null,
|
|
102
102
|
sync_token: syncToken,
|
|
103
103
|
task_group_ids: taskGroupId != null ? [taskGroupId] : [],
|
|
104
104
|
time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(localData.timeSpent),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.36-
|
|
3
|
+
"version": "5.0.36-betaRR03",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|