@zeniai/client-epic-state 4.8.37 → 4.8.38

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.
@@ -128,9 +128,7 @@ const getTotalPayments = (startDate, endDate, frequency, currentInstance) => {
128
128
  switch (frequency) {
129
129
  case 'weekly':
130
130
  case 'biweekly':
131
- totalPayments =
132
- endDate.diff(currentStartDate, 'day') /
133
- getRecurringFrequencyInDays(frequency);
131
+ totalPayments = endDate.diff(currentStartDate, 'day') / getRecurringFrequencyInDays(frequency);
134
132
  break;
135
133
  case 'monthly':
136
134
  totalPayments = endDate.diff(currentStartDate, 'month');
@@ -170,15 +168,9 @@ function getRecurringBillInstances(startDate, frequency, totalPayments, currentI
170
168
  const getRecurringFrequencyWithOffset = (frequency) => {
171
169
  switch (frequency) {
172
170
  case 'weekly':
173
- return {
174
- offSetValue: getRecurringFrequencyInDays(frequency),
175
- offSetUnit: 'day',
176
- };
171
+ return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
177
172
  case 'biweekly':
178
- return {
179
- offSetValue: getRecurringFrequencyInDays(frequency),
180
- offSetUnit: 'day',
181
- };
173
+ return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
182
174
  case 'monthly':
183
175
  return { offSetValue: 1, offSetUnit: 'month' };
184
176
  case 'quarterly':
@@ -189,6 +181,7 @@ function getRecurringBillInstances(startDate, frequency, totalPayments, currentI
189
181
  for (let i = 0; i < totalPayments; i++) {
190
182
  updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue, offSetUnit))));
191
183
  }
184
+ ;
192
185
  return updatedInstances;
193
186
  }
194
187
  function getRecurringFrequencyInDays(frequency) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.8.37",
3
+ "version": "4.8.38",
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",