@zeniai/client-epic-state 4.19.96-betaSS1 → 4.19.96

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 (105) 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 +0 -11
  18. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
  19. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
  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 +0 -11
  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 -15
  35. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  36. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  37. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  38. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  39. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
  40. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -50
  41. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
  42. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -17
  43. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  44. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  45. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  46. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  47. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  48. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  49. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  50. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  51. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
  52. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  53. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  54. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  55. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  56. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  57. package/lib/index.d.ts +10 -13
  58. package/lib/index.js +32 -42
  59. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  60. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  61. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  62. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  63. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  64. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  65. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
  66. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  67. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  68. package/lib/view/classList/fetchClassListEpic.js +1 -8
  69. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
  70. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -15
  71. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
  72. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  73. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  74. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  75. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  76. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  77. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
  78. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  79. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -50
  80. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
  81. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  82. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -19
  83. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  84. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  85. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  86. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  87. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  88. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  89. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  90. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  91. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  92. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  93. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  94. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
  95. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  96. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  97. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  98. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  99. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  100. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  101. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  102. package/package.json +1 -1
  103. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  104. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  105. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
7
7
  const omit_1 = __importDefault(require("lodash/omit"));
8
- const orderBy_1 = __importDefault(require("lodash/orderBy"));
9
8
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
10
9
  const accountSelector_1 = require("../../../entity/account/accountSelector");
11
10
  const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
@@ -17,42 +16,6 @@ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/
17
16
  const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
18
17
  const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
19
18
  const jeAccountSettingsViewSelector_1 = require("./jeAccountSettingsViewSelector");
20
- function getJEScheduleSortAccessor(sortKey) {
21
- switch (sortKey) {
22
- case 'vendor':
23
- return (s) => s.vendor.name?.toLowerCase();
24
- case 'category':
25
- return (s) => s.jeDebit.account?.accountName?.toLowerCase();
26
- case 'class':
27
- return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
28
- case 'scheduleCategory':
29
- return (s) => s.jeScheduleType;
30
- case 'startMonth':
31
- return (s) => s.startDate?.valueOf();
32
- case 'type':
33
- return (s) => s.baseTransaction.typeOfTransaction;
34
- case 'amortizationPeriod':
35
- return (s) => s.period;
36
- case 'jePostingDate':
37
- return (s) => s.dayOfPostingDate;
38
- case 'remainingMonths':
39
- return (s) => s.period;
40
- case 'runningBalance':
41
- return (s) => s.balanceAsOfToday?.amount;
42
- case 'totalAmount':
43
- return (s) => s.baseTransaction.amount.amount;
44
- case 'transactionDate':
45
- return (s) => s.baseTransaction.date.valueOf();
46
- case 'memo':
47
- return (s) => s.baseTransaction.memo?.toLowerCase();
48
- default:
49
- return (s) => s.startDate?.valueOf();
50
- }
51
- }
52
- function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
53
- const accessor = getJEScheduleSortAccessor(sortKey);
54
- return (0, orderBy_1.default)(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
55
- }
56
19
  function getExpenseAutomationJESchedulesView(state) {
57
20
  const jeScheduledTransaction = [];
58
21
  const failedJeScheduledTransaction = [];
@@ -102,21 +65,13 @@ function getExpenseAutomationJESchedulesView(state) {
102
65
  const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
103
66
  failedJeScheduledTransaction.push(jeScheduleDetails);
104
67
  });
105
- const { sortKey, sortOrder } = uiState;
106
- const draftSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft'), sortKey, sortOrder);
107
- const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
108
- const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
109
- schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
110
- const unsortedResolveSchedules = [];
68
+ const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
69
+ const resolveSchedules = [];
111
70
  failedJeScheduledTransaction.forEach((schedule) => {
112
71
  schedule.scheduledJournalEntry.forEach((journalEntry) => {
113
- unsortedResolveSchedules.push({
114
- ...schedule,
115
- scheduledJournalEntry: journalEntry,
116
- });
72
+ resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
117
73
  });
118
74
  });
119
- const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
120
75
  const allSteps = monthYearPeriodId != null
121
76
  ? (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
122
77
  : [];
@@ -130,9 +85,7 @@ function getExpenseAutomationJESchedulesView(state) {
130
85
  allAccountList: filteredAccounts,
131
86
  accountListNestedAccountHierarchy,
132
87
  allClassList: allClasses,
133
- completedSchedules,
134
88
  draftSchedules,
135
- ongoingSchedules,
136
89
  resolveSchedules: resolveSchedules,
137
90
  accountSettingsView,
138
91
  postStatusById: postStatusById,
@@ -42,7 +42,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
42
42
  transaction.lines.length > 0 &&
43
43
  transaction.lines[0]
44
44
  ?.class != null
45
- ? transaction.lines[0].class?.className.toLowerCase()
45
+ ? transaction.lines[0].class.className.toLowerCase()
46
46
  : null;
47
47
  case 'vendor':
48
48
  default:
@@ -1,21 +1,16 @@
1
1
  import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
2
2
  import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
3
3
  import { Recommendation } from '../../../commonStateTypes/recommendationBase';
4
- import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
5
4
  import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
6
5
  import { AccountBase } from '../../../entity/account/accountState';
7
6
  import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
8
7
  import { VendorBase } from '../../../entity/vendor/vendorState';
9
- export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
10
- export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
11
8
  export interface JESchedulesViewUIState {
12
9
  scrollPosition: {
13
10
  scrollTop: number;
14
11
  scrollLeft?: number;
15
12
  } | undefined;
16
13
  searchString: string;
17
- sortKey: JEScheduleSortKey;
18
- sortOrder: SortOrder;
19
14
  totalCount: number;
20
15
  limit?: number;
21
16
  }
@@ -1,21 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toJEScheduleSortKey = void 0;
4
- const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
- const JE_SCHEDULE_SORT_KEYS = [
6
- 'vendor',
7
- 'category',
8
- 'class',
9
- 'scheduleCategory',
10
- 'startMonth',
11
- 'type',
12
- 'amortizationPeriod',
13
- 'jePostingDate',
14
- 'remainingMonths',
15
- 'runningBalance',
16
- 'totalAmount',
17
- 'transactionDate',
18
- 'memo',
19
- ];
20
- const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
21
- exports.toJEScheduleSortKey = toJEScheduleSortKey;
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
7
7
  export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
8
8
  export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
9
9
  export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
10
- declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "scheduleCategory" | "startMonth" | "accruedExpenseCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "endMonth";
10
+ declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
11
11
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
12
12
  export interface DownloadJEScheduleTabOptions {
13
13
  categoryId: ID;
@@ -424,14 +424,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
424
424
  transactionsWithNoSortKeyValue.push(transaction);
425
425
  }
426
426
  break;
427
- case 'invoiceNumber':
428
- if (transaction.documentId != null) {
429
- transactionsWithSortKeyValue.push(transaction);
430
- }
431
- else {
432
- transactionsWithNoSortKeyValue.push(transaction);
433
- }
434
- break;
435
427
  case 'dueDate':
436
428
  if (currentTab === 'draft') {
437
429
  if (Boolean(transaction.dueDate) === true) {
@@ -534,8 +526,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
534
526
  return transaction.totalAmountInUSD?.amount ?? 0;
535
527
  case 'paymentMethod':
536
528
  return transaction.billPayInfo.billPaymentMethodType.name;
537
- case 'invoiceNumber':
538
- return transaction.documentId;
539
529
  }
540
530
  }, getColumnWiseSortOrder(sortOrder));
541
531
  return [
@@ -37,7 +37,7 @@ declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "sched
37
37
  export type BillTab = ReturnType<typeof toBillTabType>;
38
38
  declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
39
39
  export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
40
- declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceNumber" | "invoiceDate";
40
+ declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceDate";
41
41
  export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
42
42
  export interface BillPayFilters {
43
43
  categories: BillPayFilterCategory[];
@@ -47,7 +47,6 @@ const ALL_BILL_PAY_SORT_KEYS = [
47
47
  'invoiceDate',
48
48
  'name',
49
49
  'paymentMethod',
50
- 'invoiceNumber',
51
50
  ];
52
51
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
53
52
  const toBillPaySortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_BILL_PAY_SORT_KEYS);
@@ -9,7 +9,6 @@ const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchStat
9
9
  const contactSelector_1 = require("../../../../entity/billPay/contact/contactSelector");
10
10
  const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
11
11
  const vendorSelector_1 = require("../../../../entity/vendor/vendorSelector");
12
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
13
12
  const accountListSelector_1 = require("../../../accountList/accountListSelector");
14
13
  const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
15
14
  const depositAccountListSelector_1 = require("../../zeniAccounts/depositAccountList/depositAccountListSelector");
@@ -81,14 +80,11 @@ const getReviewPageBillDetail = (state, billId) => {
81
80
  }
82
81
  }
83
82
  if (sourceBillDetail != null) {
84
- const fetchStateList = [
83
+ sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)([
85
84
  sourceBillDetail.fetchStatus,
86
85
  accountListState.byReportId['billPayAccountList'],
87
- ];
88
- if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
89
- fetchStateList.push(classListState);
90
- }
91
- sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
86
+ classListState,
87
+ ]).fetchState;
92
88
  }
93
89
  }
94
90
  else {
@@ -9,7 +9,6 @@ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
9
9
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
10
10
  const approvalRuleSelector_1 = require("../../../../entity/approvalRule/approvalRuleSelector");
11
11
  const classSelector_1 = require("../../../../entity/class/classSelector");
12
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
13
12
  const userSelector_1 = require("../../../../entity/user/userSelector");
14
13
  const userRoleSelector_1 = require("../../../../entity/userRole/userRoleSelector");
15
14
  exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
@@ -51,7 +50,7 @@ exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => s
51
50
  newApprovalRuleId,
52
51
  };
53
52
  });
54
- exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (state) => (0, tenantSelector_1.getIsAccountingClassesEnabled)(state), (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState, isAccountingClassesEnabled) => {
53
+ exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.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) => {
55
54
  const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
56
55
  const { approverIds, attributes } = approverListState;
57
56
  const allApprovalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, approvalRuleIds);
@@ -99,9 +98,10 @@ exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((s
99
98
  allAttributes,
100
99
  filteredAttributes,
101
100
  billPaySetupApproverViewUpdateData,
102
- approverListFetchStatus: isAccountingClassesEnabled
103
- ? (0, reduceFetchState_1.reduceAllFetchState)([approverListState.fetchStatus, classListState])
104
- : approverListState.fetchStatus,
101
+ approverListFetchStatus: (0, reduceFetchState_1.reduceAllFetchState)([
102
+ approverListState.fetchStatus,
103
+ classListState,
104
+ ]),
105
105
  fetchState,
106
106
  allAccountingClasses,
107
107
  error,
@@ -3,28 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchBillPayApproversDetailsEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
- const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
7
6
  const classListReducer_1 = require("../../../../classList/classListReducer");
8
7
  const billPaySetupApproverViewReducer_1 = require("../billPaySetupApproverViewReducer");
9
8
  const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(billPaySetupApproverViewReducer_1.fetchBillPayApproversDetails.match), (0, operators_1.mergeMap)((action) => {
10
9
  const { cacheOverride, includeUserRoles } = action.payload;
11
10
  const { billPaySetupApproverViewState, classListState } = state$.value;
12
11
  const { approverListState } = billPaySetupApproverViewState;
13
- const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
14
12
  const actions = [];
15
13
  if (cacheOverride === true) {
16
14
  actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(cacheOverride, includeUserRoles));
17
- if (isAccountingClassesEnabled) {
18
- actions.push((0, classListReducer_1.fetchClassList)());
19
- }
15
+ actions.push((0, classListReducer_1.fetchClassList)());
20
16
  }
21
17
  else {
22
18
  if (billPaySetupApproverViewState.hasValidState() === false &&
23
19
  approverListState.fetchStatus.fetchState !== 'In-Progress') {
24
20
  actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(true, includeUserRoles));
25
21
  }
26
- if (isAccountingClassesEnabled &&
27
- classListState.hasValidState() === false &&
22
+ if (classListState.hasValidState() === false &&
28
23
  classListState.fetchState !== 'In-Progress') {
29
24
  actions.push((0, classListReducer_1.fetchClassList)());
30
25
  }
@@ -33,7 +33,6 @@ const billPayConfigPayload_1 = require("../billPayConfig/billPayConfigPayload");
33
33
  const billPayConfigSelector_1 = require("../billPayConfig/billPayConfigSelector");
34
34
  const billPayConfigState_1 = require("../billPayConfig/billPayConfigState");
35
35
  const billPayReviewSelector_1 = require("../billPayReview/billPayReviewSelector");
36
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
37
36
  const billPaySetupApproverViewSelector_1 = require("../billPaySetupApproverView/billPaySetupApproverViewSelector");
38
37
  const previousBillsSelector_1 = require("../previousBills/previousBillsSelector");
39
38
  const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAccountsEnabled, billId) => {
@@ -182,15 +181,12 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
182
181
  isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
183
182
  billStage = billPayInfo?.stage.code ?? 'draft';
184
183
  if (billViewState != null) {
185
- const fetchStateList = [
184
+ fetchState = (0, reduceFetchState_1.reduceFetchState)([
186
185
  sourceBillDetail.fetchStatus,
187
186
  accountListState.byReportId.billPayAccountList,
187
+ classListState,
188
188
  billPaySetupApproverViewState,
189
- ];
190
- if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
191
- fetchStateList.push(classListState);
192
- }
193
- fetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
189
+ ]).fetchState;
194
190
  deleteStatus = billViewState.deleteStatus;
195
191
  billActivities = (0, billDetailViewSelector_1.getBillActivities)(state, billId, billPayInfo?.stage.code);
196
192
  }
@@ -204,14 +200,11 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
204
200
  }
205
201
  }
206
202
  else {
207
- const newBillFetchStateList = [
203
+ fetchState = (0, reduceFetchState_1.reduceFetchState)([
208
204
  accountListState.byReportId.billPayAccountList,
205
+ classListState,
209
206
  billPaySetupApproverViewState,
210
- ];
211
- if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
212
- newBillFetchStateList.push(classListState);
213
- }
214
- fetchState = (0, reduceFetchState_1.reduceFetchState)(newBillFetchStateList).fetchState;
207
+ ]).fetchState;
215
208
  }
216
209
  if (sourceBillDetail != null && fetchState == 'Completed') {
217
210
  const updatedRecord = sourceBillDetail.billDetailLocalData;
@@ -61,7 +61,7 @@ export declare const initialCreditAcc: CreditAccount;
61
61
  export declare const initialDebitCardSummaries: DebitCardSummaries;
62
62
  export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite;
63
63
  export declare const initialCreditAccountRepayment: CreditAccountRepayment;
64
- export declare const toChargeCardSortKeyType: (v: string) => "status" | "accountType" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
64
+ export declare const toChargeCardSortKeyType: (v: string) => "status" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
65
65
  export declare type ChargeCardViewSortKey = ReturnType<typeof toChargeCardSortKeyType>;
66
66
  export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"];
67
67
  export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback";
@@ -78,7 +78,6 @@ const ALL_CHARGE_CARD_SORT_KEYS = [
78
78
  'cardName',
79
79
  'department',
80
80
  'cardType',
81
- 'accountType',
82
81
  'status',
83
82
  'utilisation',
84
83
  'limit',
@@ -233,8 +233,6 @@ const getCardsBySortKey = (card, sortKey) => {
233
233
  return card.cardName.toLowerCase();
234
234
  case 'cardType':
235
235
  return card.type.code;
236
- case 'accountType':
237
- return card.type.code.includes('credit') ? 'credit' : 'debit';
238
236
  case 'status':
239
237
  return card.status.code;
240
238
  case 'utilisation':
@@ -69,16 +69,13 @@ const getEditRemiDetail = (state, reimbursementId) => {
69
69
  paymentTo: reimbursementInfo?.toAccount.billAccountId,
70
70
  };
71
71
  if (sourceRemiDetail != null) {
72
- const fetchStateList = [
72
+ fetchState = (0, reduceFetchState_1.reduceFetchState)([
73
73
  sourceRemiDetail.fetchStatus,
74
74
  accountListState.byReportId.reimbursementAccountList,
75
+ classListState,
75
76
  merchantListState,
76
77
  reimbursementConfigState,
77
- ];
78
- if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
79
- fetchStateList.push(classListState);
80
- }
81
- fetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
78
+ ]).fetchState;
82
79
  remiStage = reimbursementInfo?.stage.code ?? 'draft';
83
80
  createdBy = (0, userSelector_1.getUserByUserId)(userState, reimbursement?.createdBy ?? '');
84
81
  createTime = reimbursement?.createTime;
@@ -42,7 +42,6 @@ export interface ReimbursementView extends Reimbursement {
42
42
  approvers: Approvers;
43
43
  submittedBy: User | undefined;
44
44
  bulkSelectInfo?: RemiBulkSelectInfo;
45
- createdByUser?: User;
46
45
  }
47
46
  export declare const getRemiList: (state: RootState, currentTimePeriod: TimePeriod, isBulkActionFeatureEnabled: boolean) => RemiListReport;
48
47
  export declare const getApproversOrRejectors: (reimbursement: Reimbursement, entityApprovalStatusState: EntityApprovalStatusState, userState: UserState) => Approvers;
@@ -51,7 +51,6 @@ const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
51
51
  return {
52
52
  ...reimbursement,
53
53
  submittedBy: (0, userSelector_1.getUserByUserId)(userState, reimbursement.reimburseeUserId),
54
- createdByUser: (0, userSelector_1.getUserByUserId)(userState, reimbursement.createdBy),
55
54
  approvers: approvers,
56
55
  };
57
56
  });
@@ -424,14 +423,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
424
423
  reimbursementsWithNoSortKeyValue.push(reimbursement);
425
424
  }
426
425
  break;
427
- case 'createdBy':
428
- if (reimbursement.createdByUser != null) {
429
- reimbursementsWithSortKeyValue.push(reimbursement);
430
- }
431
- else {
432
- reimbursementsWithNoSortKeyValue.push(reimbursement);
433
- }
434
- break;
435
426
  }
436
427
  });
437
428
  const getColumnWiseSortOrder = (sortOrder) => {
@@ -439,7 +430,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
439
430
  case 'reportName':
440
431
  case 'type':
441
432
  case 'status':
442
- case 'createdBy':
443
433
  return sortOrder === 'ascending' ? 'asc' : 'desc';
444
434
  default:
445
435
  return sortOrder === 'ascending' ? 'desc' : 'asc';
@@ -459,8 +449,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
459
449
  return getStatusPerTab(reimbursement);
460
450
  case 'amount':
461
451
  return reimbursement.amount.amount ?? 0;
462
- case 'createdBy':
463
- return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
464
452
  }
465
453
  }, getColumnWiseSortOrder(sortOrder));
466
454
  return [
@@ -38,7 +38,7 @@ export declare const toRemiSubTabTypeStrict: (v: string) => "rejected" | "failed
38
38
  export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
39
39
  export declare const toRemiSubTabUnderScoreType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
40
40
  export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
41
- declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "createdBy" | "submittedOn" | "reportName";
41
+ declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "submittedOn" | "reportName";
42
42
  export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
43
43
  export interface ReimbursementFilters {
44
44
  categories: ReimbursementFilterCategory[];
@@ -64,7 +64,6 @@ exports.toRemiSubTabUnderScoreType = toRemiSubTabUnderScoreType;
64
64
  const ALL_REIMBURSEMENT_SORT_KEYS = [
65
65
  'reportName',
66
66
  'submittedOn',
67
- 'createdBy',
68
67
  'type',
69
68
  'status',
70
69
  'amount',
@@ -98,11 +98,11 @@ exports.allTaskStatus = [
98
98
  },
99
99
  {
100
100
  code: 'done',
101
- name: 'In Review',
101
+ name: 'Done',
102
102
  },
103
103
  {
104
104
  code: 'resolved',
105
- name: 'Complete',
105
+ name: 'Resolved',
106
106
  },
107
107
  ];
108
108
  exports.allTaskPriority = [
@@ -78,8 +78,8 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
78
78
  lineItem.account?.qboId !== accountLine.account.qboId &&
79
79
  Boolean(lineItem.account?.qboId);
80
80
  hasClassChanged =
81
- (lineItem.class?.qboId != null || accountLine.class?.qboId != null) &&
82
- lineItem.class?.qboId !== accountLine.class?.qboId;
81
+ Boolean(lineItem.class?.qboId) &&
82
+ lineItem.class?.qboId !== accountLine.class.qboId;
83
83
  const recommendedAccountBase = (0, exports.toRecommendedAccountBase)(lineItem.amount.amount, lineItem.account);
84
84
  const recommendedClassBase = (0, exports.toRecommendedClassBase)(lineItem.amount.amount, lineItem.class);
85
85
  const latestRecommendedCategory = lineItem.recommendedAccount;
@@ -144,13 +144,13 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
144
144
  record.isRetainedCategorySelected = false;
145
145
  }
146
146
  if (Boolean(recommendedClass?.qboId) &&
147
- recommendedClass?.qboId !== accountLine.class?.qboId) {
147
+ recommendedClass?.qboId !== accountLine.class.qboId) {
148
148
  record.isRecommendedClassSelected = false;
149
149
  record.recommendedClass = recommendedClass;
150
150
  record.isClassUpdateSelected = false;
151
151
  }
152
152
  if (accountLine.isClassMiscategorized &&
153
- Boolean(accountLine.class?.qboId) &&
153
+ Boolean(accountLine.class.qboId) &&
154
154
  Boolean(isVendorOrCustomerPresent)) {
155
155
  record.retainedClass = accountLine.class;
156
156
  record.isRetainedClassSelected = false;
@@ -342,14 +342,14 @@ const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionDetailLo
342
342
  }
343
343
  };
344
344
  const updateClass = () => {
345
- if (recommendedClass?.qboId !== accountLine.class?.qboId &&
345
+ if (recommendedClass?.qboId !== accountLine.class.qboId &&
346
346
  Boolean(recommendedClass?.qboId)) {
347
347
  record.class = accountLine.class;
348
348
  record.isRecommendedClassSelected = false;
349
349
  record.recommendedClass = recommendedClass;
350
350
  record.isClassUpdateSelected = false;
351
351
  if (accountLine.isClassMiscategorized &&
352
- Boolean(accountLine.class?.qboId) &&
352
+ Boolean(accountLine.class.qboId) &&
353
353
  Boolean(isVendorOrCustomerPresent)) {
354
354
  record.retainedClass = accountLine.class;
355
355
  record.isRetainedClassSelected = false;
@@ -362,7 +362,7 @@ const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionDetailLo
362
362
  record.recommendedClass = recommendedClass;
363
363
  record.isClassUpdateSelected = false;
364
364
  if (accountLine.isClassMiscategorized &&
365
- Boolean(accountLine.class?.qboId) &&
365
+ Boolean(accountLine.class.qboId) &&
366
366
  Boolean(isVendorOrCustomerPresent)) {
367
367
  record.retainedClass = recommendedClass;
368
368
  record.isRetainedClassSelected = false;
@@ -659,13 +659,13 @@ const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDet
659
659
  record.isRetainedCategorySelected = false;
660
660
  }
661
661
  }
662
- if (recommendedClass?.qboId !== accountLine.class?.qboId &&
662
+ if (recommendedClass?.qboId !== accountLine.class.qboId &&
663
663
  Boolean(recommendedClass?.qboId)) {
664
664
  record.isRecommendedClassSelected = false;
665
665
  record.recommendedClass = recommendedClass;
666
666
  record.isClassUpdateSelected = false;
667
667
  if (accountLine.isClassMiscategorized &&
668
- Boolean(accountLine.class?.qboId)) {
668
+ Boolean(accountLine.class.qboId)) {
669
669
  record.retainedClass = accountLine.class;
670
670
  record.isRetainedClassSelected = false;
671
671
  }
@@ -673,12 +673,12 @@ const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDet
673
673
  else {
674
674
  record.isRecommendedClassSelected = false;
675
675
  record.recommendedClass = recommendedClass;
676
- if (recommendedClass?.qboId === accountLine.class?.qboId) {
676
+ if (recommendedClass?.qboId === accountLine.class.qboId) {
677
677
  record.recommendedClass = undefined;
678
678
  }
679
679
  record.isClassUpdateSelected = false;
680
680
  if (accountLine.isClassMiscategorized &&
681
- Boolean(accountLine.class?.qboId)) {
681
+ Boolean(accountLine.class.qboId)) {
682
682
  record.retainedClass = recommendedClass;
683
683
  record.isRetainedClassSelected = false;
684
684
  }
@@ -694,7 +694,7 @@ const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDet
694
694
  Boolean(recommendedAccount?.qboId) !== false) {
695
695
  record.account = recommendedAccount;
696
696
  }
697
- if (Boolean(record.class?.qboId) === false &&
697
+ if (Boolean(record.class.qboId) === false &&
698
698
  Boolean(recommendedClass?.qboId) !== false) {
699
699
  record.class = recommendedClass;
700
700
  }
@@ -817,9 +817,7 @@ const getChangedLineItemCountFromLocalData = (transaction, transactionLocalData)
817
817
  accountLineLocal.account?.qboId !== accountLine.account.qboId &&
818
818
  accountLineLocal.account?.accountId !== accountLine.account.accountId;
819
819
  hasClassChanged =
820
- (accountLineLocal.class?.qboId != null ||
821
- accountLine.class?.qboId != null) &&
822
- accountLineLocal.class?.qboId !== accountLine.class?.qboId;
820
+ accountLineLocal.class?.qboId !== accountLine.class.qboId;
823
821
  }
824
822
  hasDescriptionChanged =
825
823
  transactionLocalData.lineItemById[lineId] != null
@@ -959,10 +957,10 @@ const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetailLocalDa
959
957
  record.isRecommendedClassSelected = false;
960
958
  record.recommendedClass = recommendedClass;
961
959
  record.isClassUpdateSelected = false;
962
- if (recommendedClass?.qboId !== accountLine.class?.qboId &&
960
+ if (recommendedClass?.qboId !== accountLine.class.qboId &&
963
961
  Boolean(recommendedClass?.qboId)) {
964
962
  if (accountLine.isClassMiscategorized &&
965
- Boolean(accountLine.class?.qboId) &&
963
+ Boolean(accountLine.class.qboId) &&
966
964
  Boolean(isVendorOrCustomerPresent)) {
967
965
  record.retainedClass = accountLine.class;
968
966
  record.isRetainedClassSelected = false;
@@ -975,7 +973,7 @@ const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetailLocalDa
975
973
  record.recommendedClass = recommendedClass;
976
974
  record.isClassUpdateSelected = false;
977
975
  if (accountLine.isClassMiscategorized &&
978
- Boolean(accountLine.class?.qboId) &&
976
+ Boolean(accountLine.class.qboId) &&
979
977
  Boolean(isVendorOrCustomerPresent)) {
980
978
  record.retainedClass = recommendedClass;
981
979
  record.isRetainedClassSelected = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.96-betaSS1",
3
+ "version": "4.19.96",
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",