@zeniai/client-epic-state 4.19.86-betaSS2 → 4.19.86

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 (40) hide show
  1. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -35
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -44
  3. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -2
  4. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  5. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -13
  6. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -44
  7. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  8. package/lib/esm/index.js +3 -4
  9. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
  10. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -46
  11. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -15
  12. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  13. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  14. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  15. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  16. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  17. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  18. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  19. package/lib/index.d.ts +5 -6
  20. package/lib/index.js +31 -34
  21. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  22. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  23. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
  24. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  25. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -46
  26. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  27. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -17
  28. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  29. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  30. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  31. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  32. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  33. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  34. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  35. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  36. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  37. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  38. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  39. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  40. package/package.json +1 -1
@@ -13,39 +13,6 @@ export interface JEScheduleOtherAttributesPayload {
13
13
  asset_id?: string | null;
14
14
  starting_balance?: number | null;
15
15
  }
16
- export interface JEScheduleAISummaryFieldPayload {
17
- confidence: number;
18
- reasoning: string;
19
- predicted_value?: number | string;
20
- }
21
- export interface JEScheduleAISummariesPayload {
22
- credit_account?: JEScheduleAISummaryFieldPayload;
23
- credit_accounting_class?: JEScheduleAISummaryFieldPayload;
24
- debit_account?: JEScheduleAISummaryFieldPayload;
25
- debit_accounting_class?: JEScheduleAISummaryFieldPayload;
26
- period?: JEScheduleAISummaryFieldPayload;
27
- posting_date?: JEScheduleAISummaryFieldPayload;
28
- }
29
- export interface JEScheduleRecommendationsPayload {
30
- amortization_days?: number | null;
31
- amortization_months_estimate?: number | null;
32
- credit_account_confidence?: number;
33
- credit_account_id?: string | null;
34
- credit_accounting_class_id?: string | null;
35
- credit_class_confidence?: number;
36
- debit_account_confidence?: number;
37
- debit_account_id?: string | null;
38
- debit_accounting_class_id?: string | null;
39
- debit_class_confidence?: number;
40
- end_date?: string | null;
41
- je_schedule_type?: string | null;
42
- period?: number | null;
43
- period_confidence?: number;
44
- posting_date?: string | null;
45
- similar_transactions?: unknown[];
46
- start_date?: string | null;
47
- starting_month?: string | null;
48
- }
49
16
  export interface JEScheduledTransactionPayload {
50
17
  balance: number | null;
51
18
  base_transaction: ScheduleTransactionPayload;
@@ -68,9 +35,7 @@ export interface JEScheduledTransactionPayload {
68
35
  status: StatusCodeWithLabelPayload;
69
36
  updated_by: UserPayload;
70
37
  vendor: VendorPayload;
71
- ai_summaries?: JEScheduleAISummariesPayload;
72
38
  end_date?: string | null;
73
- recommendations?: JEScheduleRecommendationsPayload;
74
39
  updated_at?: string | null;
75
40
  }
76
41
  export interface JEAccruedScheduledTransactionPayload extends Omit<JEScheduledTransactionPayload, 'base_transaction' | 'je_schedule_id' | 'je_schedule_type'> {
@@ -144,49 +144,6 @@ function toJEScheduleOtherAttributes(payload) {
144
144
  assetId: payload.asset_id ?? undefined,
145
145
  };
146
146
  }
147
- function toJEScheduleAIRecommendations(payload) {
148
- if (payload == null) {
149
- return undefined;
150
- }
151
- const result = {};
152
- if (payload.debit_account != null) {
153
- result.debitAccount = {
154
- confidence: payload.debit_account.confidence,
155
- reasoning: payload.debit_account.reasoning,
156
- };
157
- }
158
- if (payload.credit_account != null) {
159
- result.creditAccount = {
160
- confidence: payload.credit_account.confidence,
161
- reasoning: payload.credit_account.reasoning,
162
- };
163
- }
164
- if (payload.debit_accounting_class != null) {
165
- result.debitClass = {
166
- confidence: payload.debit_accounting_class.confidence,
167
- reasoning: payload.debit_accounting_class.reasoning,
168
- };
169
- }
170
- if (payload.credit_accounting_class != null) {
171
- result.creditClass = {
172
- confidence: payload.credit_accounting_class.confidence,
173
- reasoning: payload.credit_accounting_class.reasoning,
174
- };
175
- }
176
- if (payload.period != null) {
177
- result.period = {
178
- confidence: payload.period.confidence,
179
- reasoning: payload.period.reasoning,
180
- };
181
- }
182
- if (payload.posting_date != null) {
183
- result.postingDate = {
184
- confidence: payload.posting_date.confidence,
185
- reasoning: payload.posting_date.reasoning,
186
- };
187
- }
188
- return Object.keys(result).length > 0 ? result : undefined;
189
- }
190
147
  function toJEScheduledTransaction(payload) {
191
148
  return {
192
149
  jeScheduleId: payload.je_schedule_id ?? undefined,
@@ -228,7 +185,6 @@ function toJEScheduledTransaction(payload) {
228
185
  ? toJEScheduleOtherAttributes(payload.other_attributes)
229
186
  : {},
230
187
  scheduledJournalEntry: [],
231
- aiRecommendations: toJEScheduleAIRecommendations(payload.ai_summaries),
232
188
  };
233
189
  }
234
190
  function toJEAccruedScheduledTransaction(payload) {
@@ -9,7 +9,7 @@ import { ScheduleTransaction } from '../transaction/stateTypes/scheduleTransacti
9
9
  import { TransactionID } from '../transaction/stateTypes/transaction';
10
10
  import { User } from '../user/userState';
11
11
  import { Vendor } from '../vendor/vendorState';
12
- import { JEScheduleAIRecommendations, JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
12
+ import { JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
13
13
  import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleTypes } from './jeSchedulesTypes';
14
14
  export interface ScheduledJournalEntry {
15
15
  error: JournalEntryErrorCodeType[];
@@ -59,7 +59,6 @@ export interface JEScheduledTransaction {
59
59
  scheduledJournalEntry: ScheduledJournalEntry[];
60
60
  status: ScheduleStatus;
61
61
  vendor: Vendor;
62
- aiRecommendations?: JEScheduleAIRecommendations;
63
62
  balanceAsOfToday?: Amount;
64
63
  dayOfPostingDate?: ScheduleDaysOfMonth;
65
64
  endDate?: ZeniDate;
@@ -77,7 +77,7 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
77
77
  const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
78
78
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
79
79
  const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
80
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiRecommendations, } = jeScheduleTransactionState;
80
+ const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
81
81
  const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
82
82
  if (vendorDetails == null) {
83
83
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
@@ -134,7 +134,6 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
134
134
  account: accountDebit,
135
135
  },
136
136
  scheduledJournalEntry,
137
- aiRecommendations,
138
137
  };
139
138
  };
140
139
  exports.getJEScheduledTransactionByJEScheduleTransactionKey = getJEScheduledTransactionByJEScheduleTransactionKey;
@@ -13,18 +13,6 @@ export interface ScheduleJournalStatusCode {
13
13
  code: ScheduleJournalEntryStatusCodeType;
14
14
  label: string;
15
15
  }
16
- export interface JEScheduleFieldRecommendation {
17
- confidence: number;
18
- reasoning: string;
19
- }
20
- export interface JEScheduleAIRecommendations {
21
- creditAccount?: JEScheduleFieldRecommendation;
22
- creditClass?: JEScheduleFieldRecommendation;
23
- debitAccount?: JEScheduleFieldRecommendation;
24
- debitClass?: JEScheduleFieldRecommendation;
25
- period?: JEScheduleFieldRecommendation;
26
- postingDate?: JEScheduleFieldRecommendation;
27
- }
28
16
  export interface JEScheduleOtherAttributes {
29
17
  assetId?: string;
30
18
  startingBalance?: Amount;
@@ -69,7 +57,6 @@ export interface JEScheduledTransactionState {
69
57
  scheduledJournalEntry: ScheduledJournalEntryState[];
70
58
  status: ScheduleStatus;
71
59
  vendorId: ID;
72
- aiRecommendations?: JEScheduleAIRecommendations;
73
60
  balanceAsOfToday?: number;
74
61
  dayOfPostingDate?: ScheduleDaysOfMonth;
75
62
  endDate?: ZeniDate;
@@ -134,49 +134,6 @@ function toJEScheduleOtherAttributes(payload) {
134
134
  assetId: payload.asset_id ?? undefined,
135
135
  };
136
136
  }
137
- function toJEScheduleAIRecommendations(payload) {
138
- if (payload == null) {
139
- return undefined;
140
- }
141
- const result = {};
142
- if (payload.debit_account != null) {
143
- result.debitAccount = {
144
- confidence: payload.debit_account.confidence,
145
- reasoning: payload.debit_account.reasoning,
146
- };
147
- }
148
- if (payload.credit_account != null) {
149
- result.creditAccount = {
150
- confidence: payload.credit_account.confidence,
151
- reasoning: payload.credit_account.reasoning,
152
- };
153
- }
154
- if (payload.debit_accounting_class != null) {
155
- result.debitClass = {
156
- confidence: payload.debit_accounting_class.confidence,
157
- reasoning: payload.debit_accounting_class.reasoning,
158
- };
159
- }
160
- if (payload.credit_accounting_class != null) {
161
- result.creditClass = {
162
- confidence: payload.credit_accounting_class.confidence,
163
- reasoning: payload.credit_accounting_class.reasoning,
164
- };
165
- }
166
- if (payload.period != null) {
167
- result.period = {
168
- confidence: payload.period.confidence,
169
- reasoning: payload.period.reasoning,
170
- };
171
- }
172
- if (payload.posting_date != null) {
173
- result.postingDate = {
174
- confidence: payload.posting_date.confidence,
175
- reasoning: payload.posting_date.reasoning,
176
- };
177
- }
178
- return Object.keys(result).length > 0 ? result : undefined;
179
- }
180
137
  export function toJEScheduledTransaction(payload) {
181
138
  return {
182
139
  jeScheduleId: payload.je_schedule_id ?? undefined,
@@ -218,7 +175,6 @@ export function toJEScheduledTransaction(payload) {
218
175
  ? toJEScheduleOtherAttributes(payload.other_attributes)
219
176
  : {},
220
177
  scheduledJournalEntry: [],
221
- aiRecommendations: toJEScheduleAIRecommendations(payload.ai_summaries),
222
178
  };
223
179
  }
224
180
  export function toJEAccruedScheduledTransaction(payload) {
@@ -70,7 +70,7 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
70
70
  export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
71
71
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
72
72
  const jeScheduleTransactionState = recordGet(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
73
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiRecommendations, } = jeScheduleTransactionState;
73
+ const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
74
74
  const vendorDetails = getVendorByVendorId(vendorState, vendorId);
75
75
  if (vendorDetails == null) {
76
76
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
@@ -127,6 +127,5 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
127
127
  account: accountDebit,
128
128
  },
129
129
  scheduledJournalEntry,
130
- aiRecommendations,
131
130
  };
132
131
  };
package/lib/esm/index.js CHANGED
@@ -162,14 +162,13 @@ import { toExpenseAutomationViewType, } from './view/expenseAutomationView/expen
162
162
  import { isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardCreditType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, } from './view/expenseAutomationView/helpers/reconciliationHelpers';
163
163
  import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, } from './view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper';
164
164
  import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFluxAnalysisView, updateFluxAnalysisViewPageMetaData, updateFluxAnalysisViewUIState, updateOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
165
- import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
165
+ import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
166
166
  import { fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
167
167
  import { deleteAccountStatement, fetchReconciliation as fetchReconciliationView, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
168
168
  import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
169
169
  import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
170
170
  import { getExpenseAutomationReconciliationView, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
171
171
  import { getExpenseAutomationTransactionView } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
172
- import { toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, } from './view/expenseAutomationView/types/jeSchedulesViewState';
173
172
  import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
174
173
  import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
175
174
  import { toTransactionsTabKey as toExpenseAutomationTransactionsTabKey, toTransactionsSortKey, } from './view/expenseAutomationView/types/transactionsViewState';
@@ -416,7 +415,7 @@ export { newBalancesFilterClassesView };
416
415
  export { toCOABalanceTypeStrict, toCOABalanceType as toCOABlanaceType, isCalculatedBalanceType, };
417
416
  export { stringToUnion, stringToUnionStrict };
418
417
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
419
- export { toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
418
+ export { getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
420
419
  export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
421
420
  export { TOP_EX_TIME_PERIODS };
422
421
  export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
@@ -572,7 +571,7 @@ export { updateChargeCardTransactionAttachments, attachmentFilePathToAttachment,
572
571
  export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
573
572
  export { fetchApAging, getApAgingReport, updateApAgingUIState, };
574
573
  export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
575
- export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
574
+ export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
576
575
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
577
576
  export { ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
578
577
  export { toVendorFirstReviewViewColumnKeyType, getGlobalMerchantAutoCompleteResults, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, };
@@ -46,8 +46,6 @@ export const initialState = {
46
46
  uiState: {
47
47
  searchString: '',
48
48
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
49
- sortKey: 'startMonth',
50
- sortOrder: 'descending',
51
49
  totalCount: 0,
52
50
  limit: 10,
53
51
  },
@@ -375,26 +373,12 @@ const expenseAutomationJESchedulesView = createSlice({
375
373
  clearJeAccountSettingsLocalData(draft) {
376
374
  draft.accountSettings.localData = accountSettingsInitialState.localData;
377
375
  },
378
- updateJESchedulesUIState(draft, action) {
379
- if (action.payload.sortKey != null) {
380
- draft.uiState.sortKey = action.payload.sortKey;
381
- }
382
- if (action.payload.sortOrder != null) {
383
- draft.uiState.sortOrder = action.payload.sortOrder;
384
- }
385
- if (action.payload.searchString != null) {
386
- draft.uiState.searchString = action.payload.searchString;
387
- }
388
- if (action.payload.scrollPosition != null) {
389
- draft.uiState.scrollPosition = action.payload.scrollPosition;
390
- }
391
- },
392
376
  clearExpenseAutomationJESchedulesView(draft) {
393
377
  Object.assign(draft, initialState);
394
378
  },
395
379
  },
396
380
  });
397
- export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
381
+ export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
398
382
  export default expenseAutomationJESchedulesView.reducer;
399
383
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
400
384
  const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = mapAccountTypeRecommendationPayloadToAccountRecommendationByType(payload);
@@ -1,5 +1,4 @@
1
1
  import omit from 'lodash/omit';
2
- import orderBy from 'lodash/orderBy';
3
2
  import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
3
  import { getAccountIdsForTypes } from '../../../entity/account/accountSelector';
5
4
  import { getJEScheduledTransactionByJEScheduleTransactionKey, } from '../../../entity/jeSchedules/jeSchedulesSelector';
@@ -11,38 +10,6 @@ import { filterNestedAccountHierarchyById } from '../../scheduleView/scheduleDet
11
10
  import { getAccountLabelForScheduleType, getAccountsTypesForScheduleList, } from '../../scheduleView/scheduleListView/scheduleListHelper';
12
11
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
13
12
  import { getJEAccountSettingsView } from './jeAccountSettingsViewSelector';
14
- function getJEScheduleSortAccessor(sortKey) {
15
- switch (sortKey) {
16
- case 'vendor':
17
- return (s) => s.vendor.name?.toLowerCase();
18
- case 'category':
19
- return (s) => s.jeDebit.account?.accountName?.toLowerCase();
20
- case 'class':
21
- return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
22
- case 'scheduleCategory':
23
- return (s) => s.jeScheduleType;
24
- case 'startMonth':
25
- return (s) => s.startDate?.valueOf();
26
- case 'type':
27
- return (s) => s.baseTransaction.typeOfTransaction;
28
- case 'amortizationPeriod':
29
- return (s) => s.period;
30
- case 'jePostingDate':
31
- return (s) => s.dayOfPostingDate;
32
- case 'remainingMonths':
33
- return (s) => s.period;
34
- case 'runningBalance':
35
- return (s) => s.balanceAsOfToday?.amount;
36
- case 'totalAmount':
37
- return (s) => s.baseTransaction.amount.amount;
38
- default:
39
- return (s) => s.startDate?.valueOf();
40
- }
41
- }
42
- function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
43
- const accessor = getJEScheduleSortAccessor(sortKey);
44
- return orderBy(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
45
- }
46
13
  export function getExpenseAutomationJESchedulesView(state) {
47
14
  const jeScheduledTransaction = [];
48
15
  const failedJeScheduledTransaction = [];
@@ -92,21 +59,13 @@ export function getExpenseAutomationJESchedulesView(state) {
92
59
  const jeScheduleDetails = getJEScheduledTransactionByJEScheduleTransactionKey(jeScheduleKey, state);
93
60
  failedJeScheduledTransaction.push(jeScheduleDetails);
94
61
  });
95
- const { sortKey, sortOrder } = uiState;
96
- const draftSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft'), sortKey, sortOrder);
97
- const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
98
- const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
99
- schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
100
- const unsortedResolveSchedules = [];
62
+ const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
63
+ const resolveSchedules = [];
101
64
  failedJeScheduledTransaction.forEach((schedule) => {
102
65
  schedule.scheduledJournalEntry.forEach((journalEntry) => {
103
- unsortedResolveSchedules.push({
104
- ...schedule,
105
- scheduledJournalEntry: journalEntry,
106
- });
66
+ resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
107
67
  });
108
68
  });
109
- const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
110
69
  const allSteps = monthYearPeriodId != null
111
70
  ? getAllSteps(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
112
71
  : [];
@@ -120,9 +79,7 @@ export function getExpenseAutomationJESchedulesView(state) {
120
79
  allAccountList: filteredAccounts,
121
80
  accountListNestedAccountHierarchy,
122
81
  allClassList: allClasses,
123
- completedSchedules,
124
82
  draftSchedules,
125
- ongoingSchedules,
126
83
  resolveSchedules: resolveSchedules,
127
84
  accountSettingsView,
128
85
  postStatusById: postStatusById,
@@ -1,15 +1 @@
1
- import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
2
- const JE_SCHEDULE_SORT_KEYS = [
3
- 'vendor',
4
- 'category',
5
- 'class',
6
- 'scheduleCategory',
7
- 'startMonth',
8
- 'type',
9
- 'amortizationPeriod',
10
- 'jePostingDate',
11
- 'remainingMonths',
12
- 'runningBalance',
13
- 'totalAmount',
14
- ];
15
- export const toJEScheduleSortKey = (v) => stringToUnion(v, JE_SCHEDULE_SORT_KEYS);
1
+ export {};
@@ -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);
@@ -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':
@@ -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 = [