@zeniai/client-epic-state 4.14.13 → 4.14.14
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/entity/billPay/billTransaction/billTransactionPayload.d.ts +0 -1
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +0 -3
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +3 -6
- package/lib/entity/billPay/billTransaction/billTransactionState.js +1 -18
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -4
- package/lib/entity/tenant/epic/signInUserEpic.js +7 -13
- package/lib/entity/tenant/tenantReducer.d.ts +0 -1
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/index.d.ts +13 -14
- package/lib/index.js +15 -26
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/bankAccountView/bankAccountViewReducer.d.ts +2 -2
- package/lib/view/billPayCard/fetchBillPayCardEpic.js +0 -1
- package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/dashboard/dashboardEpic.js +8 -7
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +4 -7
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +1 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +1 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +3 -3
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscatgorizedEpic.js +27 -76
- package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +3 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +12 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +12 -13
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -0
- package/lib/view/expenseAutomationView/helpers/helpers.d.ts +0 -3
- package/lib/view/expenseAutomationView/helpers/helpers.js +1 -4
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +10 -12
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -6
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -5
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +65 -102
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +11 -20
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -4
- package/lib/view/financeStatement/financeStatementEpic.d.ts +4 -4
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +5 -4
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/recommendation/fetchEntityRecommendationsByTransactionIdEpic.js +1 -1
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +2 -9
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +8 -35
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +2 -3
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +18 -55
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +2 -7
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.js +6 -18
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +0 -6
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +4 -9
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +4 -18
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +1 -2
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +0 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +4 -8
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +5 -27
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +2 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +2 -33
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +1 -6
- package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +5 -16
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +13 -27
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +3 -7
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +28 -48
- package/lib/view/spendManagement/billPay/magicLinkView/magicLinkViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/helpers.d.ts +0 -2
- package/lib/view/spendManagement/helpers.js +1 -9
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.d.ts +1 -6
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.js +2 -12
- package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
- package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.d.ts +1 -1
- package/package.json +1 -1
- package/lib/commonStateTypes/reimbursementTypeCode.d.ts +0 -2
- package/lib/commonStateTypes/reimbursementTypeCode.js +0 -5
|
@@ -10,9 +10,9 @@ const transactionCategorizationLocalDataHelper_1 = require("../../helpers/transa
|
|
|
10
10
|
const initializeTransactionCategorizationViewLocalDataEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(transactionsViewReducer_1.initializeTransactionCategorizationViewLocalData.match), (0, operators_1.mergeMap)((action) => {
|
|
11
11
|
const { transactionIds, selectedPeriod, keepExistingListItems, selectedTab, pageToken, totalCount, refreshViewInBackground, } = action.payload;
|
|
12
12
|
const fetchActions = [];
|
|
13
|
-
const { transactionState, expenseAutomationTransactionsViewState } = state$.value;
|
|
14
|
-
const { selectedTransactionCategorizationTab } =
|
|
15
|
-
const { transactionReviewLocalDataById } = expenseAutomationTransactionsViewState
|
|
13
|
+
const { transactionState, expenseAutomationTransactionsViewState, expenseAutomationViewState, } = state$.value;
|
|
14
|
+
const { selectedTransactionCategorizationTab } = expenseAutomationViewState;
|
|
15
|
+
const { transactionReviewLocalDataById } = expenseAutomationTransactionsViewState[selectedTransactionCategorizationTab];
|
|
16
16
|
const transactionLocalData = Object.assign({}, transactionReviewLocalDataById);
|
|
17
17
|
const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
|
|
18
18
|
transactions.forEach((transaction) => {
|
|
@@ -10,83 +10,48 @@ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer")
|
|
|
10
10
|
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
11
11
|
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
12
12
|
const monthEndCloseChecksViewReducer_1 = require("../../../monthEndCloseChecksView/monthEndCloseChecksViewReducer");
|
|
13
|
-
const
|
|
13
|
+
const TRANSACTION_COUNT_VARIABLE_NAME = '_transactions_count_';
|
|
14
14
|
const markTransactionAsNotMiscategorizedEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transactionsViewReducer_1.markTransactionAsNotMiscategorized.match), (0, operators_1.mergeMap)((action) => {
|
|
15
15
|
const { expenseAutomationViewState, expenseAutomationTransactionsViewState, } = state$.value;
|
|
16
16
|
const transactionsInReview = action.payload.transactionsInReview;
|
|
17
|
-
const transactionsSuccess = transactionsInReview.transactions_update_success;
|
|
18
|
-
const transactionsFailed = transactionsInReview.transactions_update_failed;
|
|
19
17
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state$.value);
|
|
20
18
|
const selectedPeriod = expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
|
|
21
19
|
const { selectedTab } = action.payload;
|
|
22
|
-
const { uiState } = expenseAutomationTransactionsViewState
|
|
23
|
-
|
|
24
|
-
const actions = [];
|
|
25
|
-
if (transactionsFailed.length > 0 && transactionsSuccess.length === 0) {
|
|
26
|
-
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
27
|
-
messageSection: transactionsFailed.length > 1
|
|
28
|
-
? 'transactions_reviewed'
|
|
29
|
-
: 'transaction_reviewed',
|
|
30
|
-
messageText: 'failed',
|
|
31
|
-
type: 'error',
|
|
32
|
-
variables: [
|
|
33
|
-
{
|
|
34
|
-
variableName: helpers_1.TRANSACTION_COUNT_VARIABLE_NAME,
|
|
35
|
-
variableValue: transactionsIdsFailed.length.toString(),
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
if (transactionsSuccess.length > 0) {
|
|
20
|
+
const { uiState } = expenseAutomationTransactionsViewState[selectedTab];
|
|
21
|
+
if (transactionsInReview.length > 0) {
|
|
41
22
|
return zeniAPI
|
|
42
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/mark-as-reviewed`, { transactions_reviewed:
|
|
23
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/mark-as-reviewed`, { transactions_reviewed: transactionsInReview })
|
|
43
24
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
44
25
|
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
45
|
-
const
|
|
26
|
+
const transactionIds = transactionsInReview.map((transaction) => transaction.transaction_id);
|
|
46
27
|
const totalCountByPeriod = uiState.totalCount[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)];
|
|
47
|
-
const updatedTotalCount =
|
|
28
|
+
const updatedTotalCount = transactionIds.length === 0
|
|
48
29
|
? totalCountByPeriod
|
|
49
|
-
: totalCountByPeriod -
|
|
50
|
-
actions
|
|
51
|
-
|
|
30
|
+
: totalCountByPeriod - transactionIds.length;
|
|
31
|
+
const actions = [];
|
|
32
|
+
actions.push((0, transactionsViewReducer_1.updateStatusForTransactionNotMiscategorizedUpdate)(action.payload.selectedTab, transactionIds, selectedPeriod, 'Completed'), (0, transactionReducer_1.removeTransactionCategorization)({
|
|
33
|
+
transactionIds: transactionIds,
|
|
52
34
|
}), (0, transactionsViewReducer_1.updateTotalCountForTransactionCategorization)({
|
|
53
35
|
selectedPeriod,
|
|
54
36
|
selectedTab,
|
|
55
37
|
totalCount: updatedTotalCount,
|
|
38
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
39
|
+
messageSection: 'transactions_reviewed',
|
|
40
|
+
messageText: 'success',
|
|
41
|
+
type: 'success',
|
|
42
|
+
variables: [
|
|
43
|
+
{
|
|
44
|
+
variableName: TRANSACTION_COUNT_VARIABLE_NAME,
|
|
45
|
+
variableValue: transactionIds.length.toString(),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
variableName: '_transaction_',
|
|
49
|
+
variableValue: transactionIds.length === 1
|
|
50
|
+
? 'Transaction'
|
|
51
|
+
: 'Transactions',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
56
54
|
}));
|
|
57
|
-
if (transactionIdsSuccess.length > 0 &&
|
|
58
|
-
transactionsIdsFailed.length > 0) {
|
|
59
|
-
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
60
|
-
messageSection: getTransactionReviewMessageSection(transactionIdsSuccess.length, transactionsIdsFailed.length),
|
|
61
|
-
messageText: 'notification',
|
|
62
|
-
type: 'info',
|
|
63
|
-
variables: [
|
|
64
|
-
{
|
|
65
|
-
variableName: helpers_1.TRANSACTION_COUNT_VARIABLE_NAME,
|
|
66
|
-
variableValue: transactionIdsSuccess.length.toString(),
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
variableName: helpers_1.TRANSACTION_FAILED_COUNT_VARIABLE_NAME,
|
|
70
|
-
variableValue: transactionsIdsFailed.length.toString(),
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
77
|
-
messageSection: transactionIdsSuccess.length > 1
|
|
78
|
-
? 'transactions_reviewed'
|
|
79
|
-
: 'transaction_reviewed',
|
|
80
|
-
messageText: 'success',
|
|
81
|
-
type: 'success',
|
|
82
|
-
variables: [
|
|
83
|
-
{
|
|
84
|
-
variableName: helpers_1.TRANSACTION_COUNT_VARIABLE_NAME,
|
|
85
|
-
variableValue: transactionIdsSuccess.length.toString(),
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
55
|
if (currentTenant != null) {
|
|
91
56
|
actions.push((0, monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks)({
|
|
92
57
|
tenantId: currentTenant.tenantId,
|
|
@@ -102,21 +67,7 @@ const markTransactionAsNotMiscategorizedEpic = (actions$, state$, zeniAPI) => ac
|
|
|
102
67
|
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, transactionsViewReducer_1.updateStatusForTransactionNotMiscategorizedUpdate)(action.payload.selectedTab, [], selectedPeriod, 'Error', (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Transaction mark miscategorized as correct REST API call errored out ${JSON.stringify(error)}`)))));
|
|
103
68
|
}
|
|
104
69
|
else {
|
|
105
|
-
return (0, rxjs_1.from)(
|
|
70
|
+
return (0, rxjs_1.from)([]);
|
|
106
71
|
}
|
|
107
72
|
}));
|
|
108
73
|
exports.markTransactionAsNotMiscategorizedEpic = markTransactionAsNotMiscategorizedEpic;
|
|
109
|
-
const getTransactionReviewMessageSection = (successCount, failedCount) => {
|
|
110
|
-
if (successCount > 1 && failedCount > 1) {
|
|
111
|
-
return 'transactions_reviewed';
|
|
112
|
-
}
|
|
113
|
-
else if (successCount > 1 && failedCount === 1) {
|
|
114
|
-
return 'transactions_reviewed_failed';
|
|
115
|
-
}
|
|
116
|
-
else if (successCount === 1 && failedCount > 1) {
|
|
117
|
-
return 'transaction_reviewed_failed';
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
return 'transaction_reviewed';
|
|
121
|
-
}
|
|
122
|
-
};
|
|
@@ -18,7 +18,8 @@ const saveTransactionCategorizationEpic = (actions$, state$) => actions$.pipe((0
|
|
|
18
18
|
const transactionSaveUpdates = [];
|
|
19
19
|
const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
|
|
20
20
|
transactions.forEach((transaction) => {
|
|
21
|
-
const detail = (0, get_1.default)(expenseAutomationTransactionsViewState
|
|
21
|
+
const detail = (0, get_1.default)(expenseAutomationTransactionsViewState[selectedTab]
|
|
22
|
+
.transactionReviewLocalDataById, transaction.id, undefined);
|
|
22
23
|
const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(state$.value.accountState, state$.value.accountListState, 'accountList');
|
|
23
24
|
const localData = detail === null || detail === void 0 ? void 0 : detail.transactionReviewLocalData;
|
|
24
25
|
if (localData != null) {
|
|
@@ -28,7 +28,7 @@ const updateTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actio
|
|
|
28
28
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions/categorize`, { transactions: payloadArray })
|
|
29
29
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
30
30
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
31
|
-
const transactionsInReview = response.data;
|
|
31
|
+
const transactionsInReview = response.data.transactions_update_success;
|
|
32
32
|
const actions = [];
|
|
33
33
|
actions.push((0, transactionsViewReducer_1.markTransactionAsNotMiscategorized)(selectedTab, transactionsInReview), (0, transactionsViewReducer_1.updateTransactionCategorizationSaveStatus)(selectedTab, 'Completed', (0, responsePayload_1.createZeniAPIStatus)('Completed', 'Transaction categorization updated successfully')));
|
|
34
34
|
return (0, rxjs_1.from)(actions);
|
|
@@ -42,8 +42,7 @@ exports.updateTransactionCategorizationEpic = updateTransactionCategorizationEpi
|
|
|
42
42
|
function prepareTransactionPayload(selectedTab, transactionState, vendorState, transactionsViewState, transactionId, saveUpdates) {
|
|
43
43
|
var _a;
|
|
44
44
|
const detail = (0, transactionSelector_1.getSupportedTransactionById)(transactionState, transactionId);
|
|
45
|
-
const tranDetail = (0, get_1.default)(transactionsViewState
|
|
46
|
-
.transactionReviewLocalDataById, transactionId, undefined);
|
|
45
|
+
const tranDetail = (0, get_1.default)(transactionsViewState[selectedTab].transactionReviewLocalDataById, transactionId, undefined);
|
|
47
46
|
const tranVendorUpdates = (_a = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionReviewLocalData) === null || _a === void 0 ? void 0 : _a.vendorUpdates;
|
|
48
47
|
let vendorUpdates = undefined;
|
|
49
48
|
if ((tranVendorUpdates === null || tranVendorUpdates === void 0 ? void 0 : tranVendorUpdates.qboId) != null) {
|
|
@@ -12,6 +12,8 @@ export declare const fetchAllExpenseAutomationTabs: import("@reduxjs/toolkit").A
|
|
|
12
12
|
newSelectedView: "transaction_categorization" | "je_schedules" | "account_recon" | "missing_receipts" | "flux_analysis" | "month_end_insights";
|
|
13
13
|
}, string, never, never>, clearExpenseAutomationView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, initializeSelectedPeriodForTenants: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
14
14
|
selectedPeriodByTenantId: Record<ID, MonthYearPeriod>;
|
|
15
|
-
}, string>, refreshExpenseAutomationCurrentTab: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string
|
|
15
|
+
}, string>, refreshExpenseAutomationCurrentTab: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
|
|
16
|
+
newSelectedTab: "review" | "autoCategorized";
|
|
17
|
+
}, string, never, never>;
|
|
16
18
|
declare const _default: import("@reduxjs/toolkit").Reducer<ExpenseAutomationViewState, import("@reduxjs/toolkit").AnyAction>;
|
|
17
19
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.refreshExpenseAutomationCurrentTab = exports.initializeSelectedPeriodForTenants = exports.clearExpenseAutomationView = exports.updateCurrentSelectedView = exports.updateCurrentSelectedPeriod = exports.fetchAllExpenseAutomationTabs = exports.initialState = void 0;
|
|
4
|
+
exports.updateCurrentSelectedTransactionCategorizationTab = exports.refreshExpenseAutomationCurrentTab = exports.initializeSelectedPeriodForTenants = exports.clearExpenseAutomationView = exports.updateCurrentSelectedView = exports.updateCurrentSelectedPeriod = exports.fetchAllExpenseAutomationTabs = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
exports.initialState = {
|
|
7
7
|
saveStatus: { fetchState: 'Not-Started', error: undefined },
|
|
@@ -13,6 +13,7 @@ exports.initialState = {
|
|
|
13
13
|
hasValidState() {
|
|
14
14
|
return this.fetchState == 'Completed';
|
|
15
15
|
},
|
|
16
|
+
selectedTransactionCategorizationTab: 'review',
|
|
16
17
|
};
|
|
17
18
|
const expenseAutomationView = (0, toolkit_1.createSlice)({
|
|
18
19
|
name: 'expenseAutomationView',
|
|
@@ -62,10 +63,19 @@ const expenseAutomationView = (0, toolkit_1.createSlice)({
|
|
|
62
63
|
return { payload: { newSelectedPeriod, tenantId } };
|
|
63
64
|
},
|
|
64
65
|
},
|
|
66
|
+
updateCurrentSelectedTransactionCategorizationTab: {
|
|
67
|
+
reducer(draft, action) {
|
|
68
|
+
draft.selectedTransactionCategorizationTab =
|
|
69
|
+
action.payload.newSelectedTab;
|
|
70
|
+
},
|
|
71
|
+
prepare(newSelectedTab) {
|
|
72
|
+
return { payload: { newSelectedTab } };
|
|
73
|
+
},
|
|
74
|
+
},
|
|
65
75
|
clearExpenseAutomationView(draft) {
|
|
66
76
|
Object.assign(draft, exports.initialState);
|
|
67
77
|
},
|
|
68
78
|
},
|
|
69
79
|
});
|
|
70
|
-
_a = expenseAutomationView.actions, exports.fetchAllExpenseAutomationTabs = _a.fetchAllExpenseAutomationTabs, exports.updateCurrentSelectedPeriod = _a.updateCurrentSelectedPeriod, exports.updateCurrentSelectedView = _a.updateCurrentSelectedView, exports.clearExpenseAutomationView = _a.clearExpenseAutomationView, exports.initializeSelectedPeriodForTenants = _a.initializeSelectedPeriodForTenants, exports.refreshExpenseAutomationCurrentTab = _a.refreshExpenseAutomationCurrentTab;
|
|
80
|
+
_a = expenseAutomationView.actions, exports.fetchAllExpenseAutomationTabs = _a.fetchAllExpenseAutomationTabs, exports.updateCurrentSelectedPeriod = _a.updateCurrentSelectedPeriod, exports.updateCurrentSelectedView = _a.updateCurrentSelectedView, exports.clearExpenseAutomationView = _a.clearExpenseAutomationView, exports.initializeSelectedPeriodForTenants = _a.initializeSelectedPeriodForTenants, exports.refreshExpenseAutomationCurrentTab = _a.refreshExpenseAutomationCurrentTab, exports.updateCurrentSelectedTransactionCategorizationTab = _a.updateCurrentSelectedTransactionCategorizationTab;
|
|
71
81
|
exports.default = expenseAutomationView.reducer;
|
|
@@ -24,11 +24,10 @@ const isPreviousStepDisabled = (selectedTransactionCategorizationTab, allSteps,
|
|
|
24
24
|
};
|
|
25
25
|
function getExpenseAutomationView(state) {
|
|
26
26
|
var _a, _b, _c;
|
|
27
|
-
const { expenseAutomationViewState, tenantState, expenseAutomationMissingReceiptsViewState, expenseAutomationJESchedulesViewState,
|
|
27
|
+
const { expenseAutomationViewState, tenantState, expenseAutomationMissingReceiptsViewState, expenseAutomationJESchedulesViewState, monthEndCloseChecksState, companyState, } = state;
|
|
28
28
|
const { loggedInUser, currentTenantId } = tenantState;
|
|
29
29
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
30
|
-
const { currentSelectedView, selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
31
|
-
const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
|
|
30
|
+
const { currentSelectedView, selectedPeriodByTenantId, selectedTransactionCategorizationTab, } = expenseAutomationViewState;
|
|
32
31
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
33
32
|
let currentSelectedViewFetchState = {
|
|
34
33
|
fetchState: 'Not-Started',
|
|
@@ -42,7 +41,7 @@ function getExpenseAutomationView(state) {
|
|
|
42
41
|
const missingReceipts = (0, missingReceiptsSelector_1.getExpenseAutomationMissingReceiptsView)(state);
|
|
43
42
|
const fluxAnalysis = (0, fluxAnalysisViewSelector_1.getExpenseAutomationFluxAnalysisView)(state);
|
|
44
43
|
const monthEndInsights = (0, companyMonthEndReportViewSelector_1.getCompanyMonthEndReportSelectorView)(state, currentTenant.companyId, loggedInUser);
|
|
45
|
-
const
|
|
44
|
+
const expenseAutomationTransactionsViewState = (0, transactionCategorizationSelector_1.getExpenseAutomationTransactionView)(state, selectedTransactionCategorizationTab);
|
|
46
45
|
const jeSchedules = (0, jeSchedulesViewSelector_1.getExpenseAutomationJESchedulesView)(state);
|
|
47
46
|
switch (currentSelectedView) {
|
|
48
47
|
case 'flux_analysis':
|
|
@@ -68,11 +67,11 @@ function getExpenseAutomationView(state) {
|
|
|
68
67
|
break;
|
|
69
68
|
case 'transaction_categorization':
|
|
70
69
|
currentSelectedViewFetchState = {
|
|
71
|
-
fetchState:
|
|
72
|
-
error:
|
|
70
|
+
fetchState: expenseAutomationTransactionsViewState.fetchState,
|
|
71
|
+
error: expenseAutomationTransactionsViewState.error,
|
|
73
72
|
};
|
|
74
73
|
currentSelectedViewBackgroundRefreshFetchState =
|
|
75
|
-
|
|
74
|
+
expenseAutomationTransactionsViewState.refreshStatus;
|
|
76
75
|
break;
|
|
77
76
|
case 'month_end_insights':
|
|
78
77
|
currentSelectedViewFetchState = {
|
|
@@ -89,7 +88,7 @@ function getExpenseAutomationView(state) {
|
|
|
89
88
|
expenseAutomationMissingReceiptsViewState,
|
|
90
89
|
expenseAutomationJESchedulesViewState,
|
|
91
90
|
monthEndCloseChecksView,
|
|
92
|
-
|
|
91
|
+
expenseAutomationTransactionsViewState,
|
|
93
92
|
];
|
|
94
93
|
let allSteps = [];
|
|
95
94
|
let auditSummary = undefined;
|
|
@@ -109,7 +108,7 @@ function getExpenseAutomationView(state) {
|
|
|
109
108
|
allSteps.forEach((stepDetail, index, allStepsOriginal) => {
|
|
110
109
|
switch (stepDetail.step) {
|
|
111
110
|
case 'transaction_categorization':
|
|
112
|
-
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus:
|
|
111
|
+
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus: expenseAutomationTransactionsViewState.completionStatus });
|
|
113
112
|
return;
|
|
114
113
|
case 'je_schedules':
|
|
115
114
|
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus: jeSchedules.completionStatus });
|
|
@@ -136,15 +135,15 @@ function getExpenseAutomationView(state) {
|
|
|
136
135
|
}
|
|
137
136
|
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)(fetchStateVariables); // Add more states
|
|
138
137
|
const reducedSaveStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
expenseAutomationTransactionsViewState.saveStatus,
|
|
139
|
+
expenseAutomationTransactionsViewState.markAsNotMiscategorizedStatus,
|
|
141
140
|
]);
|
|
142
141
|
const reducedUpdateStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
143
|
-
|
|
142
|
+
expenseAutomationTransactionsViewState.saveStatus, // TODO - Anjali add more states
|
|
144
143
|
]);
|
|
145
144
|
return {
|
|
146
145
|
jeSchedules,
|
|
147
|
-
transactionView:
|
|
146
|
+
transactionView: expenseAutomationTransactionsViewState,
|
|
148
147
|
missingReceipts,
|
|
149
148
|
currentSelectedViewFetchState,
|
|
150
149
|
currentSelectedViewBackgroundRefreshFetchState,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FetchedState, FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
2
|
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
3
|
+
import { TransactionsTab } from './types/transactionsViewState';
|
|
3
4
|
export declare const EXPENSE_AUTOMATION_VIEW_TYPES: readonly ["transaction_categorization", "je_schedules", "account_recon", "missing_receipts", "flux_analysis", "month_end_insights"];
|
|
4
5
|
export declare const toExpenseAutomationViewType: (v: string) => "transaction_categorization" | "je_schedules" | "account_recon" | "missing_receipts" | "flux_analysis" | "month_end_insights";
|
|
5
6
|
export declare type ExpenseAutomationViewType = ReturnType<typeof toExpenseAutomationViewType>;
|
|
@@ -8,4 +9,5 @@ export interface ExpenseAutomationViewState extends FetchedState {
|
|
|
8
9
|
updateStatus: FetchStateAndError;
|
|
9
10
|
currentSelectedView: ExpenseAutomationViewType;
|
|
10
11
|
selectedPeriodByTenantId: Record<ID, MonthYearPeriod>;
|
|
12
|
+
selectedTransactionCategorizationTab: TransactionsTab;
|
|
11
13
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { FluxAnalysisActionQueryType, FluxAnalysisQuerySortKey, MonthBalancePayload } from '../payload/fluxAnalysisPayload';
|
|
2
2
|
import { FluxAnalysisActionType, FluxAnalysisReviewStatus, FluxAnalysisSortKey, FluxBalancesByMonth } from '../types/fluxAnalysisViewState';
|
|
3
3
|
import { CurrencyPayload } from '../../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
4
|
-
export declare const TRANSACTION_VARIABLE_NAME = "_transaction_";
|
|
5
|
-
export declare const TRANSACTION_COUNT_VARIABLE_NAME = "_transactions_count_";
|
|
6
|
-
export declare const TRANSACTION_FAILED_COUNT_VARIABLE_NAME = "_transactions_failed_count_";
|
|
7
4
|
export declare const toBalancesByMonthFromPayload: (month1: MonthBalancePayload, month2: MonthBalancePayload, currency: CurrencyPayload) => FluxBalancesByMonth;
|
|
8
5
|
export declare const toVendorFluxAnalysisSortKeyPayload: (sortKey: FluxAnalysisSortKey) => FluxAnalysisQuerySortKey;
|
|
9
6
|
export declare const toVendorFluxAnalysisReviewActionPayload: (actionType: FluxAnalysisActionType) => FluxAnalysisActionQueryType;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toVendorFluxAnalysisStatusFromPayload = exports.toVendorFluxAnalysisReviewActionPayload = exports.toVendorFluxAnalysisSortKeyPayload = exports.toBalancesByMonthFromPayload =
|
|
3
|
+
exports.toVendorFluxAnalysisStatusFromPayload = exports.toVendorFluxAnalysisReviewActionPayload = exports.toVendorFluxAnalysisSortKeyPayload = exports.toBalancesByMonthFromPayload = void 0;
|
|
4
4
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
5
|
-
exports.TRANSACTION_VARIABLE_NAME = '_transaction_';
|
|
6
|
-
exports.TRANSACTION_COUNT_VARIABLE_NAME = '_transactions_count_';
|
|
7
|
-
exports.TRANSACTION_FAILED_COUNT_VARIABLE_NAME = '_transactions_failed_count_';
|
|
8
5
|
const toBalancesByMonthFromPayload = (month1, month2, currency) => {
|
|
9
6
|
var _a, _b, _c, _d;
|
|
10
7
|
return {
|
|
@@ -36,7 +36,7 @@ export interface UpdateTransactionCategorization {
|
|
|
36
36
|
transaction_id: string;
|
|
37
37
|
line_ids: string[];
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
interface UpdateTransactionCategorizationResponsePayload {
|
|
40
40
|
transactions_update_failed: UpdateTransactionCategorization[];
|
|
41
41
|
transactions_update_success: UpdateTransactionCategorization[];
|
|
42
42
|
}
|
|
@@ -45,3 +45,4 @@ export interface MarkAsReviewTransactionCategorizationPayload {
|
|
|
45
45
|
transactions_reviewed: UpdateTransactionCategorization[];
|
|
46
46
|
}
|
|
47
47
|
export declare type MarkAsReviewTransactionCategorizationPayloadResponse = ZeniAPIResponse<MarkAsReviewTransactionCategorizationPayload>;
|
|
48
|
+
export {};
|
|
@@ -5,38 +5,36 @@ import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedule
|
|
|
5
5
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
6
6
|
import { JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
|
|
7
7
|
export declare const initialState: JESchedulesViewState;
|
|
8
|
-
export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>,
|
|
8
|
+
export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
|
|
9
9
|
period: TimePeriod;
|
|
10
10
|
refreshViewInBackground: any;
|
|
11
11
|
}, string, never, never>, fetchJeSchedulesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
12
12
|
selectedPeriod: MonthYearPeriod;
|
|
13
13
|
status: ZeniAPIStatus;
|
|
14
|
-
}, string>,
|
|
15
|
-
period: TimePeriod;
|
|
16
|
-
refreshViewInBackground: any;
|
|
17
|
-
}, string, never, never>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
14
|
+
}, string>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
18
15
|
jeSchedules: JEScheduledTransactionPayload[];
|
|
19
16
|
failedJeSchedules: JEScheduledTransactionPayload[];
|
|
20
17
|
selectedPeriod: MonthYearPeriod;
|
|
21
18
|
refreshViewInBackground: boolean;
|
|
22
|
-
}, string>,
|
|
19
|
+
}, string>, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
|
|
20
|
+
period: TimePeriod;
|
|
21
|
+
refreshViewInBackground: any;
|
|
22
|
+
}, string, never, never>, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
|
|
23
23
|
jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
24
24
|
scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
25
25
|
}, string, never, never>, ignoreRecommendedJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
26
26
|
jeScheduleTransactionKey: JEScheduleTransactionKey;
|
|
27
27
|
status: ZeniAPIStatus;
|
|
28
|
-
}, string>, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
|
|
28
|
+
}, string>, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
|
|
29
29
|
jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
30
30
|
}, string, never, never>, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
|
|
31
31
|
jeScheduleTransactionKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
|
|
32
|
+
}, string, never, never>, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
|
|
33
|
+
jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
34
|
+
selectedPeriod: MonthYearPeriod;
|
|
32
35
|
}, string, never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
|
|
33
36
|
failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
34
37
|
selectedPeriod: MonthYearPeriod;
|
|
35
|
-
}, string, never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
36
|
-
scheduledJournalEntryID: ID;
|
|
37
|
-
}, string>, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
|
|
38
|
-
jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
39
|
-
selectedPeriod: MonthYearPeriod;
|
|
40
38
|
}, string, never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
41
39
|
scheduledJournalEntryID: ID;
|
|
42
40
|
jeScheduleTransactionKey: JEScheduleTransactionKey;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.
|
|
4
|
+
exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeFailedJeScheduleTransactionKey = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.ignoreRecommendedJeScheduleSuccess = exports.clearJeScheduleLocalData = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.clearExpenseAutomationJESchedulesView = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
7
|
const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
|
|
@@ -252,14 +252,10 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
252
252
|
const prevLocalDataById = draft.jeScheduleLocalDataById[scheduledJournalEntryID];
|
|
253
253
|
draft.jeScheduleLocalDataById = Object.assign(Object.assign({}, prevData), { [scheduledJournalEntryID]: Object.assign(Object.assign({}, prevLocalDataById), localData) });
|
|
254
254
|
},
|
|
255
|
-
removeJeScheduleLocalDataById(draft, action) {
|
|
256
|
-
const { scheduledJournalEntryID } = action.payload;
|
|
257
|
-
delete draft.jeScheduleLocalDataById[scheduledJournalEntryID];
|
|
258
|
-
},
|
|
259
255
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
260
256
|
Object.assign(draft, exports.initialState);
|
|
261
257
|
},
|
|
262
258
|
},
|
|
263
259
|
});
|
|
264
|
-
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.
|
|
260
|
+
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys;
|
|
265
261
|
exports.default = expenseAutomationJESchedulesView.reducer;
|
|
@@ -9,7 +9,7 @@ import { ClassBase } from '../../../entity/class/classState';
|
|
|
9
9
|
import { Entity } from '../../../entity/genericEntity/entity';
|
|
10
10
|
import { SupportedTransaction } from '../../../entity/transaction/transactionState';
|
|
11
11
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
12
|
-
import {
|
|
12
|
+
import { UpdateTransactionCategorization } from '../payload/transactionCategorizationPayload';
|
|
13
13
|
import { RecommendationByLineId, TransactionID } from '../../../entity/transaction/stateTypes/transaction';
|
|
14
14
|
export declare const initialTransactionTabViewState: TransactionsTabViewState;
|
|
15
15
|
export declare const initialState: TransactionsViewState;
|
|
@@ -53,15 +53,13 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
|
|
|
53
53
|
selectedTab: "review" | "autoCategorized";
|
|
54
54
|
transactionIds: string[];
|
|
55
55
|
transactionSaveUpdates: TransactionSaveUpdates[];
|
|
56
|
-
}, string, never, never>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
|
|
57
|
-
newSelectedTab: "review" | "autoCategorized";
|
|
58
56
|
}, string, never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
|
|
59
57
|
selectedTab: "review" | "autoCategorized";
|
|
60
58
|
fetchState: FetchState;
|
|
61
59
|
error: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
62
|
-
}, string, never, never>, markTransactionAsNotMiscategorized: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionsInReview:
|
|
60
|
+
}, string, never, never>, markTransactionAsNotMiscategorized: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionsInReview: UpdateTransactionCategorization[]], {
|
|
63
61
|
selectedTab: "review" | "autoCategorized";
|
|
64
|
-
transactionsInReview:
|
|
62
|
+
transactionsInReview: UpdateTransactionCategorization[];
|
|
65
63
|
}, string, never, never>, updateStatusForTransactionNotMiscategorizedUpdate: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionIds: string[], selectedPeriod: MonthYearPeriod, fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
|
|
66
64
|
selectedPeriod: MonthYearPeriod;
|
|
67
65
|
transactionIds: string[];
|