@zeniai/client-epic-state 5.1.43-betaRD3 → 5.1.43-betaRD4

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.
@@ -11,9 +11,14 @@ export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe
11
11
  const { period, refreshViewInBackground } = action.payload;
12
12
  const currentTenant = getCurrentTenant(state);
13
13
  const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
14
+ const isClosePeriodTab = state.expenseAutomationJESchedulesViewState.uiState.selectedPageTab ===
15
+ 'schedules';
14
16
  const queryParam = {
15
17
  start_date: toString(period.start),
16
18
  end_date: toString(period.end),
19
+ ...(isClosePeriodTab
20
+ ? { close_period_start_date: toString(period.start) }
21
+ : {}),
17
22
  };
18
23
  return zeniAPI
19
24
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expenses_automation/je_schedules?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
@@ -14,9 +14,14 @@ const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
14
14
  const { period, refreshViewInBackground } = action.payload;
15
15
  const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
16
16
  const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
17
+ const isClosePeriodTab = state.expenseAutomationJESchedulesViewState.uiState.selectedPageTab ===
18
+ 'schedules';
17
19
  const queryParam = {
18
20
  start_date: (0, timePeriod_1.toString)(period.start),
19
21
  end_date: (0, timePeriod_1.toString)(period.end),
22
+ ...(isClosePeriodTab
23
+ ? { close_period_start_date: (0, timePeriod_1.toString)(period.start) }
24
+ : {}),
20
25
  };
21
26
  return zeniAPI
22
27
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expenses_automation/je_schedules?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
@@ -8,6 +8,7 @@ import { JEScheduleLocalData } from '../types/jeSchedulesViewState';
8
8
  export interface ExpenseAutomationJESchedulesQueryPayload {
9
9
  end_date: string;
10
10
  start_date: string;
11
+ close_period_start_date?: string;
11
12
  }
12
13
  interface ExpenseAutomationJESchedulesPayload {
13
14
  failed_je_postings: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.43-betaRD3",
3
+ "version": "5.1.43-betaRD4",
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",