@zeniai/client-epic-state 4.20.2-betaRD2 → 4.20.2

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.
Files changed (128) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
  3. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  4. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
  5. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  6. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
  7. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  8. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
  9. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  10. package/lib/entity/tenant/tenantReducer.js +0 -1
  11. package/lib/entity/tenant/tenantSelector.d.ts +0 -1
  12. package/lib/entity/tenant/tenantSelector.js +1 -9
  13. package/lib/entity/tenant/tenantState.d.ts +0 -1
  14. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
  15. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  16. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
  17. package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  18. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
  19. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
  20. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  21. package/lib/epic.d.ts +1 -2
  22. package/lib/epic.js +1 -2
  23. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  24. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  25. package/lib/esm/entity/tenant/tenantReducer.js +0 -1
  26. package/lib/esm/entity/tenant/tenantSelector.js +0 -7
  27. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  28. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -17
  29. package/lib/esm/epic.js +1 -2
  30. package/lib/esm/index.js +7 -8
  31. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
  32. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
  33. package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
  34. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  35. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  36. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  37. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  38. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
  39. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  40. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  41. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  42. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
  43. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  44. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  45. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
  46. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  47. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -12
  48. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
  49. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
  50. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  51. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  52. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  53. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  54. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  55. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  56. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  57. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  58. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
  59. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  60. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  61. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  62. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  63. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  64. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -9
  65. package/lib/index.d.ts +10 -13
  66. package/lib/index.js +32 -42
  67. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  68. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  69. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  70. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  71. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  72. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  73. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -15
  74. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  75. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  76. package/lib/view/classList/fetchClassListEpic.js +1 -8
  77. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
  78. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  79. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
  80. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  81. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  82. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
  83. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
  84. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  85. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  86. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  87. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  88. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  89. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
  90. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  91. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  92. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  93. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
  94. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
  95. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -11
  96. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  97. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
  98. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  99. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
  100. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  101. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  102. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  103. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  104. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  105. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  106. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  107. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  108. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  109. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  110. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  111. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  112. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
  113. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  114. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  115. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  116. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  117. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  118. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  119. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  120. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -1
  121. package/lib/view/transactionDetail/transactionDetailSelector.js +2 -9
  122. package/package.json +1 -1
  123. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +0 -19
  124. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -2
  125. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -1
  126. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  127. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  128. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
@@ -13,7 +13,7 @@ import { getAccountList, getNestedAccountListHierarchy, } from '../../accountLis
13
13
  import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
14
14
  import { initialActionFetchState, initialReconciliationTabsState, initialState, } from '../reducers/reconciliationViewReducer';
15
15
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
16
- export const getExpenseAutomationReconciliationView = createSelector((state) => state, (state) => getCurrentTenant(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state) => state.monthEndCloseChecksViewState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState, monthEndCloseChecksViewState) => {
16
+ export const getExpenseAutomationReconciliationView = createSelector((state) => state, (state) => getCurrentTenant(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState) => {
17
17
  const { selectedPeriodByTenantId } = expenseAutomationViewState;
18
18
  const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
19
19
  const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
@@ -35,13 +35,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
35
35
  }
36
36
  return acc;
37
37
  }, []);
38
- const monthYearPeriodId = selectedPeriod != null ? toMonthYearPeriodId(selectedPeriod) : null;
39
- const monthEndFetchState = monthYearPeriodId != null
40
- ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
41
- fetchState: 'Not-Started',
42
- error: undefined,
43
- })
44
- : { fetchState: 'Not-Started', error: undefined };
45
38
  if (accountReconForMonthYearPeriod == null) {
46
39
  return {
47
40
  bankAccounts: [],
@@ -51,13 +44,10 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
51
44
  classListNestedAccountHierarchy: [],
52
45
  allAccountList: [],
53
46
  allClassList: [],
54
- fetchStatus: reduceAnyFetchState([
55
- {
56
- fetchState: reconciliationViewState.fetchState,
57
- error: reconciliationViewState.error,
58
- },
59
- monthEndFetchState,
60
- ]),
47
+ fetchStatus: {
48
+ fetchState: reconciliationViewState.fetchState,
49
+ error: reconciliationViewState.error,
50
+ },
61
51
  plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
62
52
  .plaidConnectionDetails,
63
53
  completionStatus: 'incomplete',
@@ -280,13 +270,10 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
280
270
  bankAccounts: uniqueBankAccounts,
281
271
  creditCards: uniqueCreditCards,
282
272
  accountReconciliationsByAccountID: reconList,
283
- fetchStatus: reduceAnyFetchState([
284
- {
285
- fetchState: reconciliationViewState.fetchState,
286
- error: reconciliationViewState.error,
287
- },
288
- monthEndFetchState,
289
- ]),
273
+ fetchStatus: {
274
+ fetchState: reconciliationViewState.fetchState,
275
+ error: reconciliationViewState.error,
276
+ },
290
277
  plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
291
278
  .plaidConnectionDetails,
292
279
  reconciliationTabsState: reconciliationViewState.reconTabsState,
@@ -1,5 +1,5 @@
1
1
  import omit from 'lodash/omit';
2
- import { reduceAllFetchState, reduceAnyFetchState, } from '../../../commonStateTypes/reduceFetchState';
2
+ import { reduceAllFetchState } from '../../../commonStateTypes/reduceFetchState';
3
3
  import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
4
  import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
5
5
  import { getTransactionWithCOT } from '../../../entity/transaction/transactionHelper';
@@ -8,7 +8,7 @@ import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts
8
8
  import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
9
9
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
10
10
  export function getExpenseAutomationTransactionView(state) {
11
- const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
11
+ const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
12
12
  const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
13
13
  const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
14
14
  const uncategorizedIncomeExpense = getUncategorizedAccounts(accountState, accountListState, 'accountList');
@@ -41,16 +41,10 @@ export function getExpenseAutomationTransactionView(state) {
41
41
  .filter((transaction) => transaction != null);
42
42
  const transactions = getSupportedTransactionsByIds(transactionState, transactionIds);
43
43
  const transactionsWithCOT = transactions.map((transaction) => getTransactionWithCOT(transaction));
44
- const monthEndFetchState = monthYearPeriodId != null
45
- ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
46
- : { fetchState: 'Not-Started', error: undefined };
47
- const fetchStatus = reduceAnyFetchState([
48
- reduceAllFetchState([
49
- accountList,
50
- classList,
51
- expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
52
- ]),
53
- monthEndFetchState,
44
+ const fetchStatus = reduceAllFetchState([
45
+ accountList,
46
+ classList,
47
+ expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
54
48
  ]);
55
49
  const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
56
50
  .uiState.totalCount;
@@ -1,18 +1 @@
1
- import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
2
- const JE_SCHEDULE_SORT_KEYS = [
3
- 'vendor',
4
- 'category',
5
- 'class',
6
- 'depCategory',
7
- 'scheduleCategory',
8
- 'startMonth',
9
- 'type',
10
- 'amortizationPeriod',
11
- 'jePostingDate',
12
- 'remainingMonths',
13
- 'runningBalance',
14
- 'totalAmount',
15
- 'transactionDate',
16
- 'memo',
17
- ];
18
- export const toJEScheduleSortKey = (v) => stringToUnion(v, JE_SCHEDULE_SORT_KEYS);
1
+ export {};
@@ -3,7 +3,6 @@ import { getSummationFreeRangeTotalBalance } from '../../commonStateTypes/coaBal
3
3
  import { defaultCustomerCurrency } from '../../commonStateTypes/currencyHelper';
4
4
  import { reduceFetchStateParallelTimeframes } from '../../commonStateTypes/reduceFetchState';
5
5
  import { getSectionClassesViewReport } from '../../entity/sectionClassesViewV2/sectionClassesViewSelector';
6
- import { HORIZONTAL_CLASS_TOTAL_BALANCE_ID, } from './profitAndLossClassesByClassHorizontalSelectorTypes';
7
6
  import { enrichProfitAndLossByClassHorizontalReport } from './profitAndLossHorizontalEnrichment';
8
7
  export const profitAndLossHorizontalIdsInOrder = [
9
8
  'income',
@@ -304,7 +303,6 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
304
303
  startDate,
305
304
  type: 'default',
306
305
  label: col.className,
307
- id: col.classId,
308
306
  }));
309
307
  // Add a "Total" column
310
308
  balances.push({
@@ -314,7 +312,6 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
314
312
  startDate,
315
313
  type: 'default',
316
314
  label: 'Total',
317
- id: HORIZONTAL_CLASS_TOTAL_BALANCE_ID,
318
315
  });
319
316
  return balances;
320
317
  }
@@ -416,14 +416,6 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
416
416
  transactionsWithNoSortKeyValue.push(transaction);
417
417
  }
418
418
  break;
419
- case 'invoiceNumber':
420
- if (transaction.documentId != null) {
421
- transactionsWithSortKeyValue.push(transaction);
422
- }
423
- else {
424
- transactionsWithNoSortKeyValue.push(transaction);
425
- }
426
- break;
427
419
  case 'dueDate':
428
420
  if (currentTab === 'draft') {
429
421
  if (Boolean(transaction.dueDate) === true) {
@@ -526,8 +518,6 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
526
518
  return transaction.totalAmountInUSD?.amount ?? 0;
527
519
  case 'paymentMethod':
528
520
  return transaction.billPayInfo.billPaymentMethodType.name;
529
- case 'invoiceNumber':
530
- return transaction.documentId;
531
521
  }
532
522
  }, getColumnWiseSortOrder(sortOrder));
533
523
  return [
@@ -43,7 +43,6 @@ const ALL_BILL_PAY_SORT_KEYS = [
43
43
  'invoiceDate',
44
44
  'name',
45
45
  'paymentMethod',
46
- 'invoiceNumber',
47
46
  ];
48
47
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
49
48
  const toBillPaySortKeyType = (v) => stringToUnion(v, ALL_BILL_PAY_SORT_KEYS);
@@ -2,7 +2,6 @@ import recordGet from 'lodash/get';
2
2
  import { reduceFetchState } from '../../../../commonStateTypes/reduceFetchState';
3
3
  import { getContactsByIds } from '../../../../entity/billPay/contact/contactSelector';
4
4
  import { getPaymentAccountsByPaymentAccountIds } from '../../../../entity/paymentAccount/paymentAccountSelector';
5
- import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
6
5
  import { getVendorByVendorId } from '../../../../entity/vendor/vendorSelector';
7
6
  import { getAccountList } from '../../../accountList/accountListSelector';
8
7
  import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
@@ -74,14 +73,11 @@ export const getReviewPageBillDetail = (state, billId) => {
74
73
  }
75
74
  }
76
75
  if (sourceBillDetail != null) {
77
- const fetchStateList = [
76
+ sourceBillDetailFetchState = reduceFetchState([
78
77
  sourceBillDetail.fetchStatus,
79
78
  accountListState.byReportId['billPayAccountList'],
80
- ];
81
- if (getIsAccountingClassesEnabled(state)) {
82
- fetchStateList.push(classListState);
83
- }
84
- sourceBillDetailFetchState = reduceFetchState(fetchStateList).fetchState;
79
+ classListState,
80
+ ]).fetchState;
85
81
  }
86
82
  }
87
83
  else {
@@ -3,7 +3,6 @@ import cloneDeep from 'lodash/cloneDeep';
3
3
  import { reduceAllFetchState, reduceAnyFetchState, } from '../../../../commonStateTypes/reduceFetchState';
4
4
  import { getApprovalRulesByIds } from '../../../../entity/approvalRule/approvalRuleSelector';
5
5
  import { getClassesByIds } from '../../../../entity/class/classSelector';
6
- import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
7
6
  import { getUserByUserId } from '../../../../entity/user/userSelector';
8
7
  import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
9
8
  export const getBillPaySetupApproverView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
@@ -45,7 +44,7 @@ export const getBillPaySetupApproverView = createSelector((state) => state.billP
45
44
  newApprovalRuleId,
46
45
  };
47
46
  });
48
- export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (state) => getIsAccountingClassesEnabled(state), (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState, isAccountingClassesEnabled) => {
47
+ export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
49
48
  const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
50
49
  const { approverIds, attributes } = approverListState;
51
50
  const allApprovalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
@@ -93,9 +92,10 @@ export const getBillPaySetupApproverUpdateDataView = createSelector((state) => s
93
92
  allAttributes,
94
93
  filteredAttributes,
95
94
  billPaySetupApproverViewUpdateData,
96
- approverListFetchStatus: isAccountingClassesEnabled
97
- ? reduceAllFetchState([approverListState.fetchStatus, classListState])
98
- : approverListState.fetchStatus,
95
+ approverListFetchStatus: reduceAllFetchState([
96
+ approverListState.fetchStatus,
97
+ classListState,
98
+ ]),
99
99
  fetchState,
100
100
  allAccountingClasses,
101
101
  error,
@@ -1,27 +1,22 @@
1
1
  import { concat, from } from 'rxjs';
2
2
  import { filter, mergeMap } from 'rxjs/operators';
3
- import { getIsAccountingClassesEnabled } from '../../../../../entity/tenant/tenantSelector';
4
3
  import { fetchClassList } from '../../../../classList/classListReducer';
5
4
  import { fetchBillPayApproversDetails, fetchBillPayApproversList, } from '../billPaySetupApproverViewReducer';
6
5
  export const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe(filter(fetchBillPayApproversDetails.match), mergeMap((action) => {
7
6
  const { cacheOverride, includeUserRoles } = action.payload;
8
7
  const { billPaySetupApproverViewState, classListState } = state$.value;
9
8
  const { approverListState } = billPaySetupApproverViewState;
10
- const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state$.value);
11
9
  const actions = [];
12
10
  if (cacheOverride === true) {
13
11
  actions.push(fetchBillPayApproversList(cacheOverride, includeUserRoles));
14
- if (isAccountingClassesEnabled) {
15
- actions.push(fetchClassList());
16
- }
12
+ actions.push(fetchClassList());
17
13
  }
18
14
  else {
19
15
  if (billPaySetupApproverViewState.hasValidState() === false &&
20
16
  approverListState.fetchStatus.fetchState !== 'In-Progress') {
21
17
  actions.push(fetchBillPayApproversList(true, includeUserRoles));
22
18
  }
23
- if (isAccountingClassesEnabled &&
24
- classListState.hasValidState() === false &&
19
+ if (classListState.hasValidState() === false &&
25
20
  classListState.fetchState !== 'In-Progress') {
26
21
  actions.push(fetchClassList());
27
22
  }
@@ -7,7 +7,6 @@ import { getCompanyByCompanyId } from '../../../../entity/company/companySelecto
7
7
  import { getDepositAccountByDepositAccountId } from '../../../../entity/depositAccount/depositAccountSelector';
8
8
  import { getPaymentAccountByPaymentAccountId, getPaymentAccountsByPaymentAccountIds, } from '../../../../entity/paymentAccount/paymentAccountSelector';
9
9
  import { getPaymentInstrumentById, getPaymentInstrumentsByIds, } from '../../../../entity/paymentInstrument/paymentInstrumentSelector';
10
- import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
11
10
  import { getUserByUserId } from '../../../../entity/user/userSelector';
12
11
  import { getVendorByQboId, getVendorByVendorId, } from '../../../../entity/vendor/vendorSelector';
13
12
  import { dateNow } from '../../../../zeniDayJS';
@@ -173,15 +172,12 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
173
172
  isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
174
173
  billStage = billPayInfo?.stage.code ?? 'draft';
175
174
  if (billViewState != null) {
176
- const fetchStateList = [
175
+ fetchState = reduceFetchState([
177
176
  sourceBillDetail.fetchStatus,
178
177
  accountListState.byReportId.billPayAccountList,
178
+ classListState,
179
179
  billPaySetupApproverViewState,
180
- ];
181
- if (getIsAccountingClassesEnabled(state)) {
182
- fetchStateList.push(classListState);
183
- }
184
- fetchState = reduceFetchState(fetchStateList).fetchState;
180
+ ]).fetchState;
185
181
  deleteStatus = billViewState.deleteStatus;
186
182
  billActivities = getBillActivities(state, billId, billPayInfo?.stage.code);
187
183
  }
@@ -195,14 +191,11 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
195
191
  }
196
192
  }
197
193
  else {
198
- const newBillFetchStateList = [
194
+ fetchState = reduceFetchState([
199
195
  accountListState.byReportId.billPayAccountList,
196
+ classListState,
200
197
  billPaySetupApproverViewState,
201
- ];
202
- if (getIsAccountingClassesEnabled(state)) {
203
- newBillFetchStateList.push(classListState);
204
- }
205
- fetchState = reduceFetchState(newBillFetchStateList).fetchState;
198
+ ]).fetchState;
206
199
  }
207
200
  if (sourceBillDetail != null && fetchState == 'Completed') {
208
201
  const updatedRecord = sourceBillDetail.billDetailLocalData;
@@ -75,7 +75,6 @@ const ALL_CHARGE_CARD_SORT_KEYS = [
75
75
  'cardName',
76
76
  'department',
77
77
  'cardType',
78
- 'accountType',
79
78
  'status',
80
79
  'utilisation',
81
80
  'limit',
@@ -219,8 +219,6 @@ const getCardsBySortKey = (card, sortKey) => {
219
219
  return card.cardName.toLowerCase();
220
220
  case 'cardType':
221
221
  return card.type.code;
222
- case 'accountType':
223
- return card.type.code.includes('credit') ? 'credit' : 'debit';
224
222
  case 'status':
225
223
  return card.status.code;
226
224
  case 'utilisation':
@@ -2,7 +2,7 @@ import recordGet from 'lodash/get';
2
2
  import { reduceFetchState } from '../../../../commonStateTypes/reduceFetchState';
3
3
  import { getBankAccountByBankAccountId } from '../../../../entity/bankAccount/bankAccountSelector';
4
4
  import { getAllCurrencies } from '../../../../entity/currency/currencySelector';
5
- import { getCurrentTenant, getIsAccountingClassesEnabled, } from '../../../../entity/tenant/tenantSelector';
5
+ import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
6
6
  import { getUserByUserId } from '../../../../entity/user/userSelector';
7
7
  import { getAccountList, getNestedAccountListHierarchy, } from '../../../accountList/accountListSelector';
8
8
  import { getBankAccount, } from '../../../bankAccountView/bankAccountViewSelector';
@@ -63,16 +63,13 @@ export const getEditRemiDetail = (state, reimbursementId) => {
63
63
  paymentTo: reimbursementInfo?.toAccount.billAccountId,
64
64
  };
65
65
  if (sourceRemiDetail != null) {
66
- const fetchStateList = [
66
+ fetchState = reduceFetchState([
67
67
  sourceRemiDetail.fetchStatus,
68
68
  accountListState.byReportId.reimbursementAccountList,
69
+ classListState,
69
70
  merchantListState,
70
71
  reimbursementConfigState,
71
- ];
72
- if (getIsAccountingClassesEnabled(state)) {
73
- fetchStateList.push(classListState);
74
- }
75
- fetchState = reduceFetchState(fetchStateList).fetchState;
72
+ ]).fetchState;
76
73
  remiStage = reimbursementInfo?.stage.code ?? 'draft';
77
74
  createdBy = getUserByUserId(userState, reimbursement?.createdBy ?? '');
78
75
  createTime = reimbursement?.createTime;
@@ -45,7 +45,6 @@ export const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled
45
45
  return {
46
46
  ...reimbursement,
47
47
  submittedBy: getUserByUserId(userState, reimbursement.reimburseeUserId),
48
- createdByUser: getUserByUserId(userState, reimbursement.createdBy),
49
48
  approvers: approvers,
50
49
  };
51
50
  });
@@ -416,14 +415,6 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
416
415
  reimbursementsWithNoSortKeyValue.push(reimbursement);
417
416
  }
418
417
  break;
419
- case 'createdBy':
420
- if (reimbursement.createdByUser != null) {
421
- reimbursementsWithSortKeyValue.push(reimbursement);
422
- }
423
- else {
424
- reimbursementsWithNoSortKeyValue.push(reimbursement);
425
- }
426
- break;
427
418
  }
428
419
  });
429
420
  const getColumnWiseSortOrder = (sortOrder) => {
@@ -431,7 +422,6 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
431
422
  case 'reportName':
432
423
  case 'type':
433
424
  case 'status':
434
- case 'createdBy':
435
425
  return sortOrder === 'ascending' ? 'asc' : 'desc';
436
426
  default:
437
427
  return sortOrder === 'ascending' ? 'desc' : 'asc';
@@ -451,8 +441,6 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
451
441
  return getStatusPerTab(reimbursement);
452
442
  case 'amount':
453
443
  return reimbursement.amount.amount ?? 0;
454
- case 'createdBy':
455
- return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
456
444
  }
457
445
  }, getColumnWiseSortOrder(sortOrder));
458
446
  return [
@@ -55,7 +55,6 @@ export const toRemiSubTabUnderScoreType = (v) => stringToUnion(v, REMI_SUB_TAB_U
55
55
  const ALL_REIMBURSEMENT_SORT_KEYS = [
56
56
  'reportName',
57
57
  'submittedOn',
58
- 'createdBy',
59
58
  'type',
60
59
  'status',
61
60
  'amount',
@@ -91,11 +91,11 @@ export const allTaskStatus = [
91
91
  },
92
92
  {
93
93
  code: 'done',
94
- name: 'In Review',
94
+ name: 'Done',
95
95
  },
96
96
  {
97
97
  code: 'resolved',
98
- name: 'Complete',
98
+ name: 'Resolved',
99
99
  },
100
100
  ];
101
101
  export const allTaskPriority = [
@@ -75,8 +75,8 @@ export const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDe
75
75
  lineItem.account?.qboId !== accountLine.account.qboId &&
76
76
  Boolean(lineItem.account?.qboId);
77
77
  hasClassChanged =
78
- (lineItem.class?.qboId != null || accountLine.class?.qboId != null) &&
79
- lineItem.class?.qboId !== accountLine.class?.qboId;
78
+ Boolean(lineItem.class?.qboId) &&
79
+ lineItem.class?.qboId !== accountLine.class.qboId;
80
80
  const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
81
81
  const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
82
82
  const latestRecommendedCategory = lineItem.recommendedAccount;
@@ -140,13 +140,13 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
140
140
  record.isRetainedCategorySelected = false;
141
141
  }
142
142
  if (Boolean(recommendedClass?.qboId) &&
143
- recommendedClass?.qboId !== accountLine.class?.qboId) {
143
+ recommendedClass?.qboId !== accountLine.class.qboId) {
144
144
  record.isRecommendedClassSelected = false;
145
145
  record.recommendedClass = recommendedClass;
146
146
  record.isClassUpdateSelected = false;
147
147
  }
148
148
  if (accountLine.isClassMiscategorized &&
149
- Boolean(accountLine.class?.qboId) &&
149
+ Boolean(accountLine.class.qboId) &&
150
150
  Boolean(isVendorOrCustomerPresent)) {
151
151
  record.retainedClass = accountLine.class;
152
152
  record.isRetainedClassSelected = false;
@@ -336,14 +336,14 @@ export const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionD
336
336
  }
337
337
  };
338
338
  const updateClass = () => {
339
- if (recommendedClass?.qboId !== accountLine.class?.qboId &&
339
+ if (recommendedClass?.qboId !== accountLine.class.qboId &&
340
340
  Boolean(recommendedClass?.qboId)) {
341
341
  record.class = accountLine.class;
342
342
  record.isRecommendedClassSelected = false;
343
343
  record.recommendedClass = recommendedClass;
344
344
  record.isClassUpdateSelected = false;
345
345
  if (accountLine.isClassMiscategorized &&
346
- Boolean(accountLine.class?.qboId) &&
346
+ Boolean(accountLine.class.qboId) &&
347
347
  Boolean(isVendorOrCustomerPresent)) {
348
348
  record.retainedClass = accountLine.class;
349
349
  record.isRetainedClassSelected = false;
@@ -356,7 +356,7 @@ export const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionD
356
356
  record.recommendedClass = recommendedClass;
357
357
  record.isClassUpdateSelected = false;
358
358
  if (accountLine.isClassMiscategorized &&
359
- Boolean(accountLine.class?.qboId) &&
359
+ Boolean(accountLine.class.qboId) &&
360
360
  Boolean(isVendorOrCustomerPresent)) {
361
361
  record.retainedClass = recommendedClass;
362
362
  record.isRetainedClassSelected = false;
@@ -650,13 +650,13 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
650
650
  record.isRetainedCategorySelected = false;
651
651
  }
652
652
  }
653
- if (recommendedClass?.qboId !== accountLine.class?.qboId &&
653
+ if (recommendedClass?.qboId !== accountLine.class.qboId &&
654
654
  Boolean(recommendedClass?.qboId)) {
655
655
  record.isRecommendedClassSelected = false;
656
656
  record.recommendedClass = recommendedClass;
657
657
  record.isClassUpdateSelected = false;
658
658
  if (accountLine.isClassMiscategorized &&
659
- Boolean(accountLine.class?.qboId)) {
659
+ Boolean(accountLine.class.qboId)) {
660
660
  record.retainedClass = accountLine.class;
661
661
  record.isRetainedClassSelected = false;
662
662
  }
@@ -664,12 +664,12 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
664
664
  else {
665
665
  record.isRecommendedClassSelected = false;
666
666
  record.recommendedClass = recommendedClass;
667
- if (recommendedClass?.qboId === accountLine.class?.qboId) {
667
+ if (recommendedClass?.qboId === accountLine.class.qboId) {
668
668
  record.recommendedClass = undefined;
669
669
  }
670
670
  record.isClassUpdateSelected = false;
671
671
  if (accountLine.isClassMiscategorized &&
672
- Boolean(accountLine.class?.qboId)) {
672
+ Boolean(accountLine.class.qboId)) {
673
673
  record.retainedClass = recommendedClass;
674
674
  record.isRetainedClassSelected = false;
675
675
  }
@@ -685,7 +685,7 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
685
685
  Boolean(recommendedAccount?.qboId) !== false) {
686
686
  record.account = recommendedAccount;
687
687
  }
688
- if (Boolean(record.class?.qboId) === false &&
688
+ if (Boolean(record.class.qboId) === false &&
689
689
  Boolean(recommendedClass?.qboId) !== false) {
690
690
  record.class = recommendedClass;
691
691
  }
@@ -806,9 +806,7 @@ export const getChangedLineItemCountFromLocalData = (transaction, transactionLoc
806
806
  accountLineLocal.account?.qboId !== accountLine.account.qboId &&
807
807
  accountLineLocal.account?.accountId !== accountLine.account.accountId;
808
808
  hasClassChanged =
809
- (accountLineLocal.class?.qboId != null ||
810
- accountLine.class?.qboId != null) &&
811
- accountLineLocal.class?.qboId !== accountLine.class?.qboId;
809
+ accountLineLocal.class?.qboId !== accountLine.class.qboId;
812
810
  }
813
811
  hasDescriptionChanged =
814
812
  transactionLocalData.lineItemById[lineId] != null
@@ -946,10 +944,10 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
946
944
  record.isRecommendedClassSelected = false;
947
945
  record.recommendedClass = recommendedClass;
948
946
  record.isClassUpdateSelected = false;
949
- if (recommendedClass?.qboId !== accountLine.class?.qboId &&
947
+ if (recommendedClass?.qboId !== accountLine.class.qboId &&
950
948
  Boolean(recommendedClass?.qboId)) {
951
949
  if (accountLine.isClassMiscategorized &&
952
- Boolean(accountLine.class?.qboId) &&
950
+ Boolean(accountLine.class.qboId) &&
953
951
  Boolean(isVendorOrCustomerPresent)) {
954
952
  record.retainedClass = accountLine.class;
955
953
  record.isRetainedClassSelected = false;
@@ -962,7 +960,7 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
962
960
  record.recommendedClass = recommendedClass;
963
961
  record.isClassUpdateSelected = false;
964
962
  if (accountLine.isClassMiscategorized &&
965
- Boolean(accountLine.class?.qboId) &&
963
+ Boolean(accountLine.class.qboId) &&
966
964
  Boolean(isVendorOrCustomerPresent)) {
967
965
  record.retainedClass = recommendedClass;
968
966
  record.isRetainedClassSelected = false;
@@ -1,6 +1,5 @@
1
1
  import recordGet from 'lodash/get';
2
2
  import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
3
- import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
4
3
  import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
5
4
  import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
6
5
  import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
@@ -52,14 +51,9 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
52
51
  }
53
52
  }
54
53
  const accountsList = getAccountList(accountState, accountListState, 'accountList');
55
- const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
56
- const classList = isAccountingClassesEnabled
57
- ? getClassList(classState, classListState)
58
- : { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
54
+ const classList = getClassList(classState, classListState);
59
55
  const accountsHierarchyList = getNestedAccountListHierarchy(accountListState, 'accountList');
60
- const classHierarchyList = isAccountingClassesEnabled
61
- ? getNestedClassListHierarchy(classListState)
62
- : [];
56
+ const classHierarchyList = getNestedClassListHierarchy(classListState);
63
57
  const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
64
58
  const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
65
59
  return {
@@ -77,7 +71,6 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
77
71
  classHierarchyList,
78
72
  accountsHierarchyList,
79
73
  classList: classList,
80
- isAccountingClassesEnabled,
81
74
  isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
82
75
  transactionDetailLocalData: transactionDetail?.transactionDetailLocalData ??
83
76
  initialSupportedTransactionDetail.transactionDetailLocalData,