@zeniai/client-epic-state 4.19.13 → 4.19.15

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.
@@ -3,7 +3,8 @@ import { AccountListResponse } from './accountListPayload';
3
3
  import { AccountList, AccountListKeyType, AccountListState } from './accountListState';
4
4
  export declare const initialAccountList: AccountList;
5
5
  export declare const initialState: AccountListState;
6
- export declare const fetchAccountList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountListKey: AccountListKeyType, fetchFullResponse?: any, excludeAccountPayableAccounts?: any, excludeAccountReceivableAccounts?: any, isLimitedCategoryEnabled?: any, filterAccountTypes?: ("cash_position" | "fixed_assets" | "bank" | "credit_card" | "expenses" | "cogs" | "income" | "cash_in" | "cash_out" | "other_income" | "other_expense" | "accounts_receivable" | "other_current_assets" | "other_assets" | "accounts_payable" | "other_current_liabilities" | "long_term_liabilities" | "equity" | "current_liabilities" | "current_assets")[] | undefined], {
6
+ export declare const fetchAccountList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountListKey: AccountListKeyType, fetchFullResponse?: any, excludeAccountPayableAccounts?: any, excludeAccountReceivableAccounts?: any, isLimitedCategoryEnabled?: any, filterAccountTypes?: ("cash_position" | "fixed_assets" | "bank" | "credit_card" | "expenses" | "cogs" | "income" | "cash_in" | "cash_out" | "other_income" | "other_expense" | "accounts_receivable" | "other_current_assets" | "other_assets" | "accounts_payable" | "other_current_liabilities" | "long_term_liabilities" | "equity" | "current_liabilities" | "current_assets")[] | undefined, isIncludeDeleted?: boolean | undefined], {
7
+ isIncludeDeleted?: true | undefined;
7
8
  accountListKey: AccountListKeyType;
8
9
  fetchFullResponse: any;
9
10
  excludeAccountPayableAccounts: any;
@@ -45,16 +45,13 @@ const accountList = (0, toolkit_1.createSlice)({
45
45
  const existingData = draft.byReportId[action.payload.accountListKey];
46
46
  draft.byReportId[action.payload.accountListKey] = Object.assign(Object.assign({}, existingData), { fetchState: 'In-Progress', error: undefined });
47
47
  },
48
- prepare(accountListKey, fetchFullResponse = false, excludeAccountPayableAccounts = false, excludeAccountReceivableAccounts = false, isLimitedCategoryEnabled = false, filterAccountTypes) {
48
+ prepare(accountListKey, fetchFullResponse = false, excludeAccountPayableAccounts = false, excludeAccountReceivableAccounts = false, isLimitedCategoryEnabled = false, filterAccountTypes, isIncludeDeleted) {
49
49
  return {
50
- payload: {
51
- accountListKey,
50
+ payload: Object.assign({ accountListKey,
52
51
  fetchFullResponse,
53
52
  excludeAccountPayableAccounts,
54
53
  excludeAccountReceivableAccounts,
55
- isLimitedCategoryEnabled,
56
- filterAccountTypes: filterAccountTypes !== null && filterAccountTypes !== void 0 ? filterAccountTypes : [],
57
- },
54
+ isLimitedCategoryEnabled, filterAccountTypes: filterAccountTypes !== null && filterAccountTypes !== void 0 ? filterAccountTypes : [] }, (isIncludeDeleted === true && { isIncludeDeleted })),
58
55
  };
59
56
  },
60
57
  },
@@ -16,14 +16,9 @@ const getAccountTypes = (isLimitedCategoryEnabled, filterAccountTypes) => {
16
16
  return [];
17
17
  };
18
18
  const fetchAccountListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(accountListReducer_1.fetchAccountList.match), (0, operators_1.mergeMap)((action) => {
19
- const { accountListKey, fetchFullResponse, excludeAccountPayableAccounts, excludeAccountReceivableAccounts, isLimitedCategoryEnabled, filterAccountTypes, } = action.payload;
19
+ const { accountListKey, fetchFullResponse, excludeAccountPayableAccounts, excludeAccountReceivableAccounts, isLimitedCategoryEnabled, filterAccountTypes, isIncludeDeleted, } = action.payload;
20
20
  const accountTypes = getAccountTypes(isLimitedCategoryEnabled, filterAccountTypes);
21
- const queryValue = {
22
- is_bookkeeping_admin: fetchFullResponse,
23
- is_exclude_account_payable_accounts: excludeAccountPayableAccounts,
24
- is_exclude_account_receivable_accounts: excludeAccountReceivableAccounts,
25
- account_types: accountTypes,
26
- };
21
+ const queryValue = Object.assign({ is_bookkeeping_admin: fetchFullResponse, is_exclude_account_payable_accounts: excludeAccountPayableAccounts, is_exclude_account_receivable_accounts: excludeAccountReceivableAccounts, account_types: accountTypes }, (isIncludeDeleted === true && { is_include_deleted: true }));
27
22
  return zeniAPI
28
23
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accounts?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
29
24
  .pipe((0, operators_1.mergeMap)((response) => {
@@ -18,8 +18,8 @@ const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
18
18
  const state = state$.value;
19
19
  const userId = (_b = (_a = state.tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId) !== null && _b !== void 0 ? _b : '';
20
20
  if (cacheOverride) {
21
- remiDetailActions.push((0, accountListReducer_1.fetchAccountList)('reimbursementAccountList', true, true, true, isLimitedCategoryEnabled));
22
- remiDetailActions.push((0, classListReducer_1.fetchClassList)());
21
+ remiDetailActions.push((0, accountListReducer_1.fetchAccountList)('reimbursementAccountList', true, true, true, isLimitedCategoryEnabled, [], true));
22
+ remiDetailActions.push((0, classListReducer_1.fetchClassList)(true));
23
23
  remiDetailActions.push((0, merchantListReducer_1.fetchMerchantList)());
24
24
  remiDetailActions.push((0, reimbursementConfigReducer_1.fetchReimbursementConfig)());
25
25
  remiDetailActions.push((0, userFinancialAccountReducer_1.fetchUserFinancialAccount)(userId, reimbursementId));
@@ -29,14 +29,12 @@ const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
29
29
  }
30
30
  else {
31
31
  const accountList = state.accountListState.byReportId.reimbursementAccountList;
32
- if (accountList.hasValidState() === false &&
33
- accountList.fetchState !== 'In-Progress') {
34
- remiDetailActions.push((0, accountListReducer_1.fetchAccountList)('reimbursementAccountList', true, true, true, isLimitedCategoryEnabled));
32
+ if (accountList.fetchState !== 'In-Progress') {
33
+ remiDetailActions.push((0, accountListReducer_1.fetchAccountList)('reimbursementAccountList', true, true, true, isLimitedCategoryEnabled, [], true));
35
34
  }
36
35
  const classList = state.classListState;
37
- if (classList.hasValidState() === false &&
38
- classList.fetchState !== 'In-Progress') {
39
- remiDetailActions.push((0, classListReducer_1.fetchClassList)());
36
+ if (classList.fetchState !== 'In-Progress') {
37
+ remiDetailActions.push((0, classListReducer_1.fetchClassList)(true));
40
38
  }
41
39
  const merchantList = state.merchantListState;
42
40
  if (merchantList.hasValidState() === false &&
@@ -136,7 +136,7 @@ function preparePayload(transactionState, vendorState, transactionDetailState, t
136
136
  currentSelectedEntity.type === 'vendor') {
137
137
  const vendor = (0, vendorSelector_1.getVendorByVendorId)(vendorState, tranVendorUpdates.qboId);
138
138
  const vendorSource = vendor !== null && vendor !== void 0 ? vendor : tranVendorUpdates;
139
- if (vendorSource) {
139
+ if (vendorSource != null) {
140
140
  vendorUpdates = {
141
141
  id: vendorSource.qboId === vendorSource.name
142
142
  ? ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.13",
3
+ "version": "4.19.15",
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",