@zeniai/client-epic-state 4.20.2-betaJK3 → 4.20.2-betaJK4

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.
@@ -54,7 +54,7 @@ export const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => action
54
54
  if (isSuccessResponse(response) && response.data != null) {
55
55
  const updateActions = [];
56
56
  const allTransactionsPerRecon = getAllReviewTransactionsFromReconcilePayload(response.data.reconciliation);
57
- updateActions.push(updateAccounts(response.data.accounts, 'account_reconciliation'), updateAccounts(response.data.excluded_accounts, 'excluded_account_reconciliation'), updateAllUsers({
57
+ updateActions.push(updateAccounts(response.data.accounts, 'account_reconciliation'), updateAccounts(response.data.excluded_accounts ?? [], 'excluded_account_reconciliation'), updateAllUsers({
58
58
  users: response.data.users ?? [],
59
59
  updateType: 'merge',
60
60
  }), updateFiles({ files: response.data.files ?? [] }), updateMultipleReconcileTransactions(allTransactionsPerRecon, 'merge'), updateAccountRecon(selectedPeriod, response.data.reconciliation));
@@ -142,7 +142,7 @@ const expenseAutomationReconciliationView = createSlice({
142
142
  fetchReconciliationSuccess: {
143
143
  reducer(draft, action) {
144
144
  if (action.payload.accountId == null) {
145
- updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts);
145
+ updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts ?? []);
146
146
  }
147
147
  else if (action.payload.reconciliation.reconciliation.length > 0 &&
148
148
  action.payload.reconciliation.accounts.length > 0) {
@@ -57,7 +57,7 @@ const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe
57
57
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
58
58
  const updateActions = [];
59
59
  const allTransactionsPerRecon = (0, reconciliationHelpers_1.getAllReviewTransactionsFromReconcilePayload)(response.data.reconciliation);
60
- updateActions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, 'account_reconciliation'), (0, accountReducer_1.updateAccounts)(response.data.excluded_accounts, 'excluded_account_reconciliation'), (0, userReducer_1.updateAllUsers)({
60
+ updateActions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, 'account_reconciliation'), (0, accountReducer_1.updateAccounts)(response.data.excluded_accounts ?? [], 'excluded_account_reconciliation'), (0, userReducer_1.updateAllUsers)({
61
61
  users: response.data.users ?? [],
62
62
  updateType: 'merge',
63
63
  }), (0, fileReducer_1.updateFiles)({ files: response.data.files ?? [] }), (0, transactionReducer_1.updateMultipleReconcileTransactions)(allTransactionsPerRecon, 'merge'), (0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, response.data.reconciliation));
@@ -23,10 +23,10 @@ export interface ExcludedAccountPayload extends AccountAndPaymentAccountPayload
23
23
  }
24
24
  export interface ReconciliationPayload {
25
25
  accounts: AccountAndPaymentAccountPayload[];
26
- excluded_accounts: ExcludedAccountPayload[];
27
26
  files: FilePayload[];
28
27
  reconciliation: ReconciliationDataPayload[];
29
28
  users: UserPayload[];
29
+ excluded_accounts?: ExcludedAccountPayload[];
30
30
  }
31
31
  export type ReconciliationResponse = ZeniAPIResponse<ReconciliationPayload>;
32
32
  export interface SaveReconciliationReviewPayload {
@@ -146,7 +146,7 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
146
146
  fetchReconciliationSuccess: {
147
147
  reducer(draft, action) {
148
148
  if (action.payload.accountId == null) {
149
- updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts);
149
+ updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts ?? []);
150
150
  }
151
151
  else if (action.payload.reconciliation.reconciliation.length > 0 &&
152
152
  action.payload.reconciliation.accounts.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.20.2-betaJK3",
3
+ "version": "4.20.2-betaJK4",
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",