@zeniai/client-epic-state 5.0.36-betaRR01 → 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/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +4 -3
- package/lib/esm/view/taskManager/taskDetailView/taskDetail.js +1 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/common/recurringViewHelper.js +11 -1
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +4 -3
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +1 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.js +1 -0
- package/package.json +1 -1
|
@@ -46,9 +46,19 @@ export const getRecurringEndDateFromCount = (startDate, frequency, recurringCoun
|
|
|
46
46
|
break;
|
|
47
47
|
case 'weekly':
|
|
48
48
|
case 'biweekly':
|
|
49
|
-
case 'semi_weekly':
|
|
50
49
|
endDate = startDate.add(getRecurringFrequencyInDays(frequency) * (recurringCount - 1), 'day');
|
|
51
50
|
break;
|
|
51
|
+
case 'semi_weekly': {
|
|
52
|
+
// Two semi-weekly occurrences span exactly 7 days regardless of which
|
|
53
|
+
// two weekdays are picked (since gap1 + gap2 = 7). So odd counts are
|
|
54
|
+
// exact; even counts use the conservative half-week step (4 days).
|
|
55
|
+
const stepsRemaining = recurringCount - 1;
|
|
56
|
+
const fullWeekPairs = Math.floor(stepsRemaining / 2);
|
|
57
|
+
const hasOddTailStep = stepsRemaining % 2 === 1;
|
|
58
|
+
const days = fullWeekPairs * 7 + (hasOddTailStep ? 4 : 0);
|
|
59
|
+
endDate = startDate.add(days, 'day');
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
52
62
|
case 'monthly':
|
|
53
63
|
endDate = startDate.add(recurringCount - 1, 'month');
|
|
54
64
|
break;
|
|
@@ -12,6 +12,7 @@ export const initializeTaskToLocalStoreEpic = (actions$, state$) => actions$.pip
|
|
|
12
12
|
description: task.description,
|
|
13
13
|
status: task.status.code,
|
|
14
14
|
assignee: task.assignees,
|
|
15
|
+
groupAssignees: task.groupAssignees,
|
|
15
16
|
dueDate: task.dueDate,
|
|
16
17
|
priority: task.priority.code,
|
|
17
18
|
tagIds: task.tagIds,
|
|
@@ -91,13 +91,14 @@ const prepareTaskPayload = (state, taskId, taskGroupId) => {
|
|
|
91
91
|
recurring_start_date: localData.type.code === 'recurring'
|
|
92
92
|
? (localData.recurringStartDate?.format(DEFAULT_DATE_FORMAT) ?? null)
|
|
93
93
|
: null,
|
|
94
|
-
|
|
94
|
+
recurring_days_of_week: localData.type.code === 'recurring' &&
|
|
95
95
|
localData.recurringFrequency === 'semi_weekly'
|
|
96
|
-
?
|
|
97
|
-
:
|
|
96
|
+
? (localData.recurringDaysOfWeek ?? [])
|
|
97
|
+
: null,
|
|
98
98
|
sync_token: syncToken,
|
|
99
99
|
task_group_ids: taskGroupId != null ? [taskGroupId] : [],
|
|
100
100
|
time_spent: convertHHMMStrToMinutes(localData.timeSpent),
|
|
101
|
+
group_assignees: localData.groupAssignees,
|
|
101
102
|
...(taskId == null ? { is_private: localData.isPrivate ?? false } : {}),
|
|
102
103
|
};
|
|
103
104
|
};
|