@zeniai/client-epic-state 4.19.97 → 4.19.99-beta0ND
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.
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/coaBalance/coaBalanceType.d.ts +2 -0
- package/lib/commonStateTypes/coaBalance/coaBalanceType.js +6 -0
- package/lib/commonStateTypes/currencyHelper.d.ts +3 -0
- package/lib/commonStateTypes/currencyHelper.js +6 -1
- package/lib/commonStateTypes/reduceFetchState.d.ts +9 -0
- package/lib/commonStateTypes/reduceFetchState.js +26 -0
- package/lib/entity/account/accountPayload.d.ts +2 -0
- package/lib/entity/account/accountPayload.js +2 -0
- package/lib/entity/account/accountState.d.ts +2 -0
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/customer/customerState.d.ts +0 -2
- package/lib/entity/customer/customerState.js +0 -5
- package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
- package/lib/entity/depositAccount/depositAccount.js +8 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +35 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +44 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +13 -0
- package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -0
- package/lib/entity/reimbursement/reimbursementPayload.js +7 -0
- package/lib/entity/reimbursement/reimbursementState.d.ts +2 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/task/taskPayload.d.ts +1 -0
- package/lib/entity/task/taskPayload.js +1 -0
- package/lib/entity/task/taskState.d.ts +1 -0
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.js +1 -0
- package/lib/entity/tenant/tenantSelector.d.ts +1 -0
- package/lib/entity/tenant/tenantSelector.js +9 -1
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +11 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/entity/userGroups/userGroupsPayload.d.ts +7 -0
- package/lib/entity/userGroups/userGroupsPayload.js +10 -0
- package/lib/entity/userGroups/userGroupsReducer.d.ts +8 -0
- package/lib/entity/userGroups/userGroupsReducer.js +29 -0
- package/lib/entity/userGroups/userGroupsSelector.d.ts +4 -0
- package/lib/entity/userGroups/userGroupsSelector.js +12 -0
- package/lib/entity/userGroups/userGroupsState.d.ts +9 -0
- package/lib/entity/userGroups/userGroupsState.js +2 -0
- package/lib/epic.d.ts +13 -1
- package/lib/epic.js +13 -1
- package/lib/esm/commonStateTypes/coaBalance/coaBalanceType.js +5 -0
- package/lib/esm/commonStateTypes/currencyHelper.js +5 -0
- package/lib/esm/commonStateTypes/reduceFetchState.js +25 -0
- package/lib/esm/entity/account/accountPayload.js +2 -0
- package/lib/esm/entity/customer/customerState.js +1 -4
- package/lib/esm/entity/depositAccount/depositAccount.js +8 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +44 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/esm/entity/reimbursement/reimbursementPayload.js +7 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/entity/task/taskPayload.js +1 -0
- package/lib/esm/entity/tenant/tenantReducer.js +1 -0
- package/lib/esm/entity/tenant/tenantSelector.js +7 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +11 -0
- package/lib/esm/entity/userGroups/userGroupsPayload.js +7 -0
- package/lib/esm/entity/userGroups/userGroupsReducer.js +25 -0
- package/lib/esm/entity/userGroups/userGroupsSelector.js +8 -0
- package/lib/esm/entity/userGroups/userGroupsState.js +1 -0
- package/lib/esm/epic.js +13 -1
- package/lib/esm/index.js +25 -16
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
- package/lib/esm/view/arAgingView/arAgingReport/arAgingReducer.js +1 -1
- package/lib/esm/view/arAgingView/arAgingReport/arAgingSelector.js +1 -1
- package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +10 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +29 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +49 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +40 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +47 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +61 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +33 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +56 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +77 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +79 -0
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +24 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +189 -1
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +17 -1
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +433 -2
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +23 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +50 -3
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +245 -2
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +17 -1
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +44 -0
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +2 -1
- package/lib/esm/view/financeStatement/financeStatementReducer.js +11 -8
- package/lib/esm/view/financeStatement/financeStatementSelector.js +24 -9
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +322 -0
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +9 -0
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -1
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
- package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +201 -0
- package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +9 -7
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
- package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +3 -1
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +65 -0
- package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +16 -0
- package/lib/esm/view/userGroupListView/userGroupListViewState.js +1 -0
- package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +11 -0
- package/lib/esm/zeniAPI.js +0 -2
- package/lib/index.d.ts +31 -21
- package/lib/index.js +102 -34
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
- package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +18 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
- package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +2 -2
- package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +5 -5
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +8 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
- package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +10 -0
- package/lib/view/expenseAutomationView/bulkUploadTiming.js +13 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +18 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +33 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +53 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +44 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +51 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +65 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +37 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +61 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +14 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +81 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +25 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +85 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +28 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +118 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +201 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +18 -2
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +76 -3
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +434 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +11 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +24 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +69 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +50 -3
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +244 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +5 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +19 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +142 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +54 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +2 -1
- package/lib/view/financeStatement/financeStatementReducer.js +11 -8
- package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
- package/lib/view/financeStatement/financeStatementSelector.js +24 -9
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +13 -0
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +326 -0
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +111 -0
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +13 -0
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +4 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +7 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -29
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +4 -0
- package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +7 -5
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +6 -0
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +204 -0
- package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +8 -6
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +1 -0
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +2 -0
- package/lib/view/taskManager/taskListView/taskListSelector.js +3 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
- package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +23 -0
- package/lib/view/userGroupListView/userGroupListViewReducer.js +69 -0
- package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +7 -0
- package/lib/view/userGroupListView/userGroupListViewSelector.js +20 -0
- package/lib/view/userGroupListView/userGroupListViewState.d.ts +8 -0
- package/lib/view/userGroupListView/userGroupListViewState.js +2 -0
- package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +3 -1
- package/lib/view/userListView/fetchUserListByTypeEpic.js +11 -0
- package/lib/view/userListView/userListViewPayload.d.ts +2 -0
- package/lib/zeniAPI.js +0 -2
- package/package.json +2 -2
|
@@ -416,6 +416,14 @@ 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;
|
|
419
427
|
case 'dueDate':
|
|
420
428
|
if (currentTab === 'draft') {
|
|
421
429
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -518,6 +526,8 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
518
526
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
519
527
|
case 'paymentMethod':
|
|
520
528
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
529
|
+
case 'invoiceNumber':
|
|
530
|
+
return transaction.documentId;
|
|
521
531
|
}
|
|
522
532
|
}, getColumnWiseSortOrder(sortOrder));
|
|
523
533
|
return [
|
|
@@ -2,6 +2,7 @@ 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';
|
|
5
6
|
import { getVendorByVendorId } from '../../../../entity/vendor/vendorSelector';
|
|
6
7
|
import { getAccountList } from '../../../accountList/accountListSelector';
|
|
7
8
|
import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
|
|
@@ -73,11 +74,14 @@ export const getReviewPageBillDetail = (state, billId) => {
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
if (sourceBillDetail != null) {
|
|
76
|
-
|
|
77
|
+
const fetchStateList = [
|
|
77
78
|
sourceBillDetail.fetchStatus,
|
|
78
79
|
accountListState.byReportId['billPayAccountList'],
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
];
|
|
81
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
82
|
+
fetchStateList.push(classListState);
|
|
83
|
+
}
|
|
84
|
+
sourceBillDetailFetchState = reduceFetchState(fetchStateList).fetchState;
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
else {
|
|
@@ -3,6 +3,7 @@ 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';
|
|
6
7
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
7
8
|
import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
|
|
8
9
|
export const getBillPaySetupApproverView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
|
|
@@ -44,7 +45,7 @@ export const getBillPaySetupApproverView = createSelector((state) => state.billP
|
|
|
44
45
|
newApprovalRuleId,
|
|
45
46
|
};
|
|
46
47
|
});
|
|
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) => {
|
|
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) => {
|
|
48
49
|
const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
|
|
49
50
|
const { approverIds, attributes } = approverListState;
|
|
50
51
|
const allApprovalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
|
|
@@ -92,10 +93,9 @@ export const getBillPaySetupApproverUpdateDataView = createSelector((state) => s
|
|
|
92
93
|
allAttributes,
|
|
93
94
|
filteredAttributes,
|
|
94
95
|
billPaySetupApproverViewUpdateData,
|
|
95
|
-
approverListFetchStatus:
|
|
96
|
-
approverListState.fetchStatus,
|
|
97
|
-
|
|
98
|
-
]),
|
|
96
|
+
approverListFetchStatus: isAccountingClassesEnabled
|
|
97
|
+
? reduceAllFetchState([approverListState.fetchStatus, classListState])
|
|
98
|
+
: approverListState.fetchStatus,
|
|
99
99
|
fetchState,
|
|
100
100
|
allAccountingClasses,
|
|
101
101
|
error,
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import { concat, from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { getIsAccountingClassesEnabled } from '../../../../../entity/tenant/tenantSelector';
|
|
3
4
|
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
4
5
|
import { fetchBillPayApproversDetails, fetchBillPayApproversList, } from '../billPaySetupApproverViewReducer';
|
|
5
6
|
export const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe(filter(fetchBillPayApproversDetails.match), mergeMap((action) => {
|
|
6
7
|
const { cacheOverride, includeUserRoles } = action.payload;
|
|
7
8
|
const { billPaySetupApproverViewState, classListState } = state$.value;
|
|
8
9
|
const { approverListState } = billPaySetupApproverViewState;
|
|
10
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state$.value);
|
|
9
11
|
const actions = [];
|
|
10
12
|
if (cacheOverride === true) {
|
|
11
13
|
actions.push(fetchBillPayApproversList(cacheOverride, includeUserRoles));
|
|
12
|
-
|
|
14
|
+
if (isAccountingClassesEnabled) {
|
|
15
|
+
actions.push(fetchClassList());
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
else {
|
|
15
19
|
if (billPaySetupApproverViewState.hasValidState() === false &&
|
|
16
20
|
approverListState.fetchStatus.fetchState !== 'In-Progress') {
|
|
17
21
|
actions.push(fetchBillPayApproversList(true, includeUserRoles));
|
|
18
22
|
}
|
|
19
|
-
if (
|
|
23
|
+
if (isAccountingClassesEnabled &&
|
|
24
|
+
classListState.hasValidState() === false &&
|
|
20
25
|
classListState.fetchState !== 'In-Progress') {
|
|
21
26
|
actions.push(fetchClassList());
|
|
22
27
|
}
|
|
@@ -7,6 +7,7 @@ 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';
|
|
10
11
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
11
12
|
import { getVendorByQboId, getVendorByVendorId, } from '../../../../entity/vendor/vendorSelector';
|
|
12
13
|
import { dateNow } from '../../../../zeniDayJS';
|
|
@@ -172,12 +173,15 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
|
|
|
172
173
|
isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
|
|
173
174
|
billStage = billPayInfo?.stage.code ?? 'draft';
|
|
174
175
|
if (billViewState != null) {
|
|
175
|
-
|
|
176
|
+
const fetchStateList = [
|
|
176
177
|
sourceBillDetail.fetchStatus,
|
|
177
178
|
accountListState.byReportId.billPayAccountList,
|
|
178
|
-
classListState,
|
|
179
179
|
billPaySetupApproverViewState,
|
|
180
|
-
]
|
|
180
|
+
];
|
|
181
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
182
|
+
fetchStateList.push(classListState);
|
|
183
|
+
}
|
|
184
|
+
fetchState = reduceFetchState(fetchStateList).fetchState;
|
|
181
185
|
deleteStatus = billViewState.deleteStatus;
|
|
182
186
|
billActivities = getBillActivities(state, billId, billPayInfo?.stage.code);
|
|
183
187
|
}
|
|
@@ -191,11 +195,14 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
|
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
197
|
else {
|
|
194
|
-
|
|
198
|
+
const newBillFetchStateList = [
|
|
195
199
|
accountListState.byReportId.billPayAccountList,
|
|
196
|
-
classListState,
|
|
197
200
|
billPaySetupApproverViewState,
|
|
198
|
-
]
|
|
201
|
+
];
|
|
202
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
203
|
+
newBillFetchStateList.push(classListState);
|
|
204
|
+
}
|
|
205
|
+
fetchState = reduceFetchState(newBillFetchStateList).fetchState;
|
|
199
206
|
}
|
|
200
207
|
if (sourceBillDetail != null && fetchState == 'Completed') {
|
|
201
208
|
const updatedRecord = sourceBillDetail.billDetailLocalData;
|
|
@@ -219,6 +219,8 @@ 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';
|
|
222
224
|
case 'status':
|
|
223
225
|
return card.status.code;
|
|
224
226
|
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 } from '../../../../entity/tenant/tenantSelector';
|
|
5
|
+
import { getCurrentTenant, getIsAccountingClassesEnabled, } 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,13 +63,16 @@ export const getEditRemiDetail = (state, reimbursementId) => {
|
|
|
63
63
|
paymentTo: reimbursementInfo?.toAccount.billAccountId,
|
|
64
64
|
};
|
|
65
65
|
if (sourceRemiDetail != null) {
|
|
66
|
-
|
|
66
|
+
const fetchStateList = [
|
|
67
67
|
sourceRemiDetail.fetchStatus,
|
|
68
68
|
accountListState.byReportId.reimbursementAccountList,
|
|
69
|
-
classListState,
|
|
70
69
|
merchantListState,
|
|
71
70
|
reimbursementConfigState,
|
|
72
|
-
]
|
|
71
|
+
];
|
|
72
|
+
if (getIsAccountingClassesEnabled(state)) {
|
|
73
|
+
fetchStateList.push(classListState);
|
|
74
|
+
}
|
|
75
|
+
fetchState = reduceFetchState(fetchStateList).fetchState;
|
|
73
76
|
remiStage = reimbursementInfo?.stage.code ?? 'draft';
|
|
74
77
|
createdBy = getUserByUserId(userState, reimbursement?.createdBy ?? '');
|
|
75
78
|
createTime = reimbursement?.createTime;
|
|
@@ -45,6 +45,7 @@ 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),
|
|
48
49
|
approvers: approvers,
|
|
49
50
|
};
|
|
50
51
|
});
|
|
@@ -415,6 +416,14 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
415
416
|
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
416
417
|
}
|
|
417
418
|
break;
|
|
419
|
+
case 'createdBy':
|
|
420
|
+
if (reimbursement.createdByUser != null) {
|
|
421
|
+
reimbursementsWithSortKeyValue.push(reimbursement);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
425
|
+
}
|
|
426
|
+
break;
|
|
418
427
|
}
|
|
419
428
|
});
|
|
420
429
|
const getColumnWiseSortOrder = (sortOrder) => {
|
|
@@ -422,6 +431,7 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
422
431
|
case 'reportName':
|
|
423
432
|
case 'type':
|
|
424
433
|
case 'status':
|
|
434
|
+
case 'createdBy':
|
|
425
435
|
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
426
436
|
default:
|
|
427
437
|
return sortOrder === 'ascending' ? 'desc' : 'asc';
|
|
@@ -441,6 +451,8 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
441
451
|
return getStatusPerTab(reimbursement);
|
|
442
452
|
case 'amount':
|
|
443
453
|
return reimbursement.amount.amount ?? 0;
|
|
454
|
+
case 'createdBy':
|
|
455
|
+
return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
|
|
444
456
|
}
|
|
445
457
|
}, getColumnWiseSortOrder(sortOrder));
|
|
446
458
|
return [
|
|
@@ -91,11 +91,11 @@ export const allTaskStatus = [
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
code: 'done',
|
|
94
|
-
name: '
|
|
94
|
+
name: 'In Review',
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
code: 'resolved',
|
|
98
|
-
name: '
|
|
98
|
+
name: 'Complete',
|
|
99
99
|
},
|
|
100
100
|
];
|
|
101
101
|
export const allTaskPriority = [
|
|
@@ -109,7 +109,7 @@ export const allTaskPriority = [
|
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
code: 'medium',
|
|
112
|
-
name: '
|
|
112
|
+
name: 'Medium',
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
code: 'low',
|
|
@@ -70,6 +70,7 @@ const toTaskPayload = (state, task) => {
|
|
|
70
70
|
name: task.name,
|
|
71
71
|
assignees: task.assignees,
|
|
72
72
|
description: task.description,
|
|
73
|
+
group_assignees: task.groupAssignees,
|
|
73
74
|
due_date: task.dueDate != null ? task.dueDate.format(DEFAULT_DATE_FORMAT) : null,
|
|
74
75
|
priority: task.priority.code,
|
|
75
76
|
status: task.status.code,
|
|
@@ -11,6 +11,7 @@ import { getTaskGroupTemplateByIds } from '../../../entity/taskGroupTemplate/tas
|
|
|
11
11
|
import { getUserName, getUsersByUserIds, } from '../../../entity/user/userSelector';
|
|
12
12
|
import { getUserAndUserRole, } from '../../companyView/types/userAndRole';
|
|
13
13
|
import { applyAdvancedFiltersOnList } from '../../spendManagement/spendManagementFilterHelpers';
|
|
14
|
+
import { getUserGroupList } from '../../userGroupListView/userGroupListViewSelector';
|
|
14
15
|
import { getUserList, } from '../../userListView/userListViewSelector';
|
|
15
16
|
import { allTaskPriority, allTaskStatus, } from '../taskDetailView/taskDetailSelector';
|
|
16
17
|
import { DUE_DATE_GROUP_KEYS, } from './taskList';
|
|
@@ -308,7 +309,7 @@ const getTaskGroupsWithTaskList = ({ taskListState, taskState, userState, userRo
|
|
|
308
309
|
tagState,
|
|
309
310
|
});
|
|
310
311
|
};
|
|
311
|
-
export const getAllTasks = createSelector((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, isTaskTemplatesEnabled) => {
|
|
312
|
+
export const getAllTasks = createSelector((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (state) => state.userGroupsState, (state) => state.userGroupListViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, userGroupsState, userGroupListViewState, isTaskTemplatesEnabled) => {
|
|
312
313
|
const { localData } = taskListState;
|
|
313
314
|
const taskGroupsWithTasksList = getTaskGroupsWithTaskList({
|
|
314
315
|
taskListState,
|
|
@@ -336,6 +337,7 @@ export const getAllTasks = createSelector((state) => state.taskListState, (state
|
|
|
336
337
|
taskGroupTemplates,
|
|
337
338
|
fetchState: fetchState,
|
|
338
339
|
userList: getUserList(userState, userRoleState, userListViewState, 'taskManagerCandidate'),
|
|
340
|
+
userGroupList: getUserGroupList(userGroupsState, userGroupListViewState, 'taskManagerCandidate'),
|
|
339
341
|
error: error,
|
|
340
342
|
version: 0,
|
|
341
343
|
taskGroupsWithTasksList,
|
|
@@ -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
|
-
|
|
79
|
-
lineItem.class?.qboId !== accountLine.class
|
|
78
|
+
(lineItem.class?.qboId != null || accountLine.class?.qboId != null) &&
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
688
|
+
if (Boolean(record.class?.qboId) === false &&
|
|
689
689
|
Boolean(recommendedClass?.qboId) !== false) {
|
|
690
690
|
record.class = recommendedClass;
|
|
691
691
|
}
|
|
@@ -806,7 +806,9 @@ 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
|
|
809
|
+
(accountLineLocal.class?.qboId != null ||
|
|
810
|
+
accountLine.class?.qboId != null) &&
|
|
811
|
+
accountLineLocal.class?.qboId !== accountLine.class?.qboId;
|
|
810
812
|
}
|
|
811
813
|
hasDescriptionChanged =
|
|
812
814
|
transactionLocalData.lineItemById[lineId] != null
|
|
@@ -944,10 +946,10 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
944
946
|
record.isRecommendedClassSelected = false;
|
|
945
947
|
record.recommendedClass = recommendedClass;
|
|
946
948
|
record.isClassUpdateSelected = false;
|
|
947
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
949
|
+
if (recommendedClass?.qboId !== accountLine.class?.qboId &&
|
|
948
950
|
Boolean(recommendedClass?.qboId)) {
|
|
949
951
|
if (accountLine.isClassMiscategorized &&
|
|
950
|
-
Boolean(accountLine.class
|
|
952
|
+
Boolean(accountLine.class?.qboId) &&
|
|
951
953
|
Boolean(isVendorOrCustomerPresent)) {
|
|
952
954
|
record.retainedClass = accountLine.class;
|
|
953
955
|
record.isRetainedClassSelected = false;
|
|
@@ -960,7 +962,7 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
960
962
|
record.recommendedClass = recommendedClass;
|
|
961
963
|
record.isClassUpdateSelected = false;
|
|
962
964
|
if (accountLine.isClassMiscategorized &&
|
|
963
|
-
Boolean(accountLine.class
|
|
965
|
+
Boolean(accountLine.class?.qboId) &&
|
|
964
966
|
Boolean(isVendorOrCustomerPresent)) {
|
|
965
967
|
record.retainedClass = recommendedClass;
|
|
966
968
|
record.isRetainedClassSelected = false;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
const initialUserGroupList = {
|
|
3
|
+
ids: [],
|
|
4
|
+
fetchState: 'Not-Started',
|
|
5
|
+
error: undefined,
|
|
6
|
+
hasValidState() {
|
|
7
|
+
return this.fetchState == 'Completed';
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export const initialState = {
|
|
11
|
+
userGroupListByType: {
|
|
12
|
+
taskManagerCandidate: initialUserGroupList,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
const userGroupListView = createSlice({
|
|
16
|
+
name: 'userGroupListView',
|
|
17
|
+
initialState,
|
|
18
|
+
reducers: {
|
|
19
|
+
fetchUserGroupListByType: {
|
|
20
|
+
reducer(draft, action) {
|
|
21
|
+
const { userGroupType } = action.payload;
|
|
22
|
+
draft.userGroupListByType[userGroupType].fetchState = 'In-Progress';
|
|
23
|
+
draft.userGroupListByType[userGroupType].error = undefined;
|
|
24
|
+
},
|
|
25
|
+
prepare(userGroupType, cacheOverride = false) {
|
|
26
|
+
return {
|
|
27
|
+
payload: {
|
|
28
|
+
userGroupType,
|
|
29
|
+
cacheOverride,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
updateUserGroupIds(draft, action) {
|
|
35
|
+
const { userGroupType, userGroupsPayload } = action.payload;
|
|
36
|
+
draft.userGroupListByType[userGroupType].fetchState = 'Completed';
|
|
37
|
+
draft.userGroupListByType[userGroupType].error = undefined;
|
|
38
|
+
draft.userGroupListByType[userGroupType].ids = userGroupsPayload.map((userGroup) => userGroup.id);
|
|
39
|
+
},
|
|
40
|
+
addUserGroupId(draft, action) {
|
|
41
|
+
const { userGroupType, id } = action.payload;
|
|
42
|
+
const index = draft.userGroupListByType[userGroupType].ids.indexOf(id);
|
|
43
|
+
if (index < 0) {
|
|
44
|
+
draft.userGroupListByType[userGroupType].ids.push(id);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
removeUserGroupId(draft, action) {
|
|
48
|
+
const { userGroupType, id } = action.payload;
|
|
49
|
+
const index = draft.userGroupListByType[userGroupType].ids.indexOf(id);
|
|
50
|
+
if (index > -1) {
|
|
51
|
+
draft.userGroupListByType[userGroupType].ids.splice(index, 1);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
updateUserGroupListFetchFailure(draft, action) {
|
|
55
|
+
const { userGroupType, status } = action.payload;
|
|
56
|
+
draft.userGroupListByType[userGroupType].fetchState = 'Error';
|
|
57
|
+
draft.userGroupListByType[userGroupType].error = status;
|
|
58
|
+
},
|
|
59
|
+
clearUserGroupListView(draft) {
|
|
60
|
+
Object.assign(draft, initialState);
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
export const { fetchUserGroupListByType, updateUserGroupIds, addUserGroupId, removeUserGroupId, updateUserGroupListFetchFailure, clearUserGroupListView, } = userGroupListView.actions;
|
|
65
|
+
export default userGroupListView.reducer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getUserGroupByUserGroupId } from '../../entity/userGroups/userGroupsSelector';
|
|
2
|
+
export const getUserGroupList = (userGroupsState, userGroupListViewState, userGroupType) => {
|
|
3
|
+
const listState = userGroupListViewState.userGroupListByType[userGroupType];
|
|
4
|
+
return {
|
|
5
|
+
userGroups: getUserGroupListByIds(userGroupsState, userGroupListViewState, userGroupType),
|
|
6
|
+
fetchState: listState?.fetchState,
|
|
7
|
+
error: listState?.error,
|
|
8
|
+
version: 0,
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
function getUserGroupListByIds(userGroupsState, userGroupListViewState, type) {
|
|
12
|
+
const userGroupIds = userGroupListViewState.userGroupListByType[type].ids;
|
|
13
|
+
return userGroupIds
|
|
14
|
+
.map((id) => getUserGroupByUserGroupId(userGroupsState, id))
|
|
15
|
+
.filter((value) => value != null);
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,9 +3,11 @@ import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
|
3
3
|
import { updateAddresses } from '../../entity/address/addressReducer';
|
|
4
4
|
import { getCurrentTenant, isZeniDomainTenant, } from '../../entity/tenant/tenantSelector';
|
|
5
5
|
import { updateAllUsers } from '../../entity/user/userReducer';
|
|
6
|
+
import { updateAllUserGroups } from '../../entity/userGroups/userGroupsReducer';
|
|
6
7
|
import { updateUserRoles } from '../../entity/userRole/userRoleReducer';
|
|
7
8
|
import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
|
|
8
9
|
import { updateChargeCardCount, updateDebitCardCount, } from '../spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer';
|
|
10
|
+
import { updateUserGroupIds } from '../userGroupListView/userGroupListViewReducer';
|
|
9
11
|
import { fetchUserListByType, updateUserIds, updateUserListFetchFailure, } from './userListViewReducer';
|
|
10
12
|
export const fetchUserListByTypeEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchUserListByType.match), mergeMap((action) => {
|
|
11
13
|
const { userType, cacheOverride } = action.payload;
|
|
@@ -29,6 +31,15 @@ export const fetchUserListByTypeEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
29
31
|
usersPayload: response.data?.users ?? [],
|
|
30
32
|
}),
|
|
31
33
|
];
|
|
34
|
+
if (response.data?.user_groups != null) {
|
|
35
|
+
userListAction.push(updateAllUserGroups({ userGroups: response.data.user_groups }));
|
|
36
|
+
if (userType === 'taskManagerCandidate') {
|
|
37
|
+
userListAction.push(updateUserGroupIds({
|
|
38
|
+
userGroupType: userType,
|
|
39
|
+
userGroupsPayload: response.data.user_groups,
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
32
43
|
if (userType === 'cardHolderCandidate') {
|
|
33
44
|
userListAction.push(updateChargeCardCount(response.data?.cards_count_by_user_id ?? []));
|
|
34
45
|
userListAction.push(updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}));
|
package/lib/esm/zeniAPI.js
CHANGED
|
@@ -79,8 +79,6 @@ export class ZeniAPIClient {
|
|
|
79
79
|
return from(promise);
|
|
80
80
|
}
|
|
81
81
|
postFormData(restEndPoint, formData, signal) {
|
|
82
|
-
// Use apiHeaders for auth headers, then remove Content-Type
|
|
83
|
-
// so the browser sets multipart/form-data with the correct boundary
|
|
84
82
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
85
83
|
const { 'Content-Type': _contentType, ...headers } = this.apiHeaders();
|
|
86
84
|
const promise = fetch(restEndPoint, {
|