@zeniai/client-epic-state 4.8.11 → 4.8.12

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.
@@ -197,7 +197,9 @@ const countStatusForDuration = (statusCode) => {
197
197
  const getDurationOfMonthOutTotalMonth = (jeSchedule) => {
198
198
  let totalDurationCompleted = 0;
199
199
  const scheduledEntries = jeSchedule.scheduledJournalEntry;
200
- if (jeSchedule.status.code === 'ongoing' && scheduledEntries.length > 0) {
200
+ const allowedJEScheduleStatus = ['ongoing', 'completed'];
201
+ if (allowedJEScheduleStatus.includes(jeSchedule.status.code) === true &&
202
+ scheduledEntries.length > 0) {
201
203
  totalDurationCompleted = scheduledEntries.filter((scheduledEntry) => countStatusForDuration(scheduledEntry.status.code)).length;
202
204
  }
203
205
  return totalDurationCompleted;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.8.11",
3
+ "version": "4.8.12",
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
  "types": "lib/index.d.ts",