@zeniai/client-epic-state 5.0.92-betaNB2 → 5.0.92-betaNB3
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/accountRecon/accountReconReducer.d.ts +5 -2
- package/lib/entity/accountRecon/accountReconReducer.js +26 -2
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -1
- package/lib/esm/entity/accountRecon/accountReconReducer.js +25 -1
- package/lib/esm/epic.js +2 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.js +31 -0
- package/lib/esm/view/expenseAutomationView/payload/reconciliationPayload.js +42 -39
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +38 -1
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +4 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +39 -34
- package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.d.ts +26 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.js +35 -0
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +13 -8
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +42 -39
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +15 -1
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +40 -2
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +6 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.submitStatementUpdate = exports.updateStatementUpdateLocalData = exports.updateParsedStatementData = exports.resetReparseStatementStatus = exports.reparseStatementFailure = exports.reparseStatementSuccess = exports.reparseStatement = exports.parseStatementFailure = exports.parseStatementSuccess = exports.parseStatement = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.includeAccountInReconciliationFailure = exports.includeAccountInReconciliationSuccess = exports.includeAccountInReconciliation = exports.excludeAccountFromReconciliationFailure = exports.excludeAccountFromReconciliationSuccess = exports.excludeAccountFromReconciliation = exports.deleteAccountStatementFailure = exports.deleteAccountStatementSuccess = exports.deleteAccountStatement = exports.updateAccountReconciliationLocalData = exports.updateReconListScrollPosition = exports.updateSaveReconciliationReviewFetchStatus = exports.saveReconciliationReview = exports.updateReviewTabLocalData = exports.initializeReconciliationReviewTabLocalData = exports.updateReviewTabSortState = exports.updateStatementProcessingFailed = exports.updateSelectedDrawerAccountId = exports.clearExpenseAutomationReconciliationView = exports.initialiseLocalDataForSelectedAccountId = exports.updateBalancesLocalData = exports.updateSelectedTab = exports.saveReconciliationDetailSuccess = exports.updateReconcileTabListScrollState = exports.updateReconcileTabListSortState = exports.updateReconcileTabLocalData = exports.setStatementParseInProgress = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
|
|
5
|
+
exports.updateNodeCollapseState = exports.updateStatementUploadChosen = exports.submitStatementUpdateFailure = exports.submitStatementUpdateSuccess = void 0;
|
|
5
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
7
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
8
|
const accountState_1 = require("../../../entity/account/accountState");
|
|
@@ -399,6 +400,10 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
399
400
|
fetchState: 'Not-Started',
|
|
400
401
|
error: undefined,
|
|
401
402
|
};
|
|
403
|
+
accountRecon.reparseStatementStatus = {
|
|
404
|
+
fetchState: 'Not-Started',
|
|
405
|
+
error: undefined,
|
|
406
|
+
};
|
|
402
407
|
},
|
|
403
408
|
uploadAccountStatementSuccess: (draft, action) => {
|
|
404
409
|
const { accountId, selectedPeriod } = action.payload;
|
|
@@ -461,6 +466,37 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
461
466
|
};
|
|
462
467
|
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId].statementParseInProgress = false;
|
|
463
468
|
},
|
|
469
|
+
reparseStatement: (draft, action) => {
|
|
470
|
+
const { accountId, selectedPeriod } = action.payload;
|
|
471
|
+
const accountRecon = draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId];
|
|
472
|
+
accountRecon.parsedStatementData = undefined;
|
|
473
|
+
accountRecon.reparseStatementStatus = {
|
|
474
|
+
fetchState: 'In-Progress',
|
|
475
|
+
error: undefined,
|
|
476
|
+
};
|
|
477
|
+
},
|
|
478
|
+
reparseStatementSuccess: (draft, action) => {
|
|
479
|
+
const { accountId, selectedPeriod } = action.payload;
|
|
480
|
+
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId].reparseStatementStatus = {
|
|
481
|
+
fetchState: 'Completed',
|
|
482
|
+
error: undefined,
|
|
483
|
+
};
|
|
484
|
+
},
|
|
485
|
+
reparseStatementFailure: (draft, action) => {
|
|
486
|
+
const { accountId, selectedPeriod } = action.payload;
|
|
487
|
+
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId].reparseStatementStatus = {
|
|
488
|
+
fetchState: 'Error',
|
|
489
|
+
error: action.payload.error,
|
|
490
|
+
};
|
|
491
|
+
draft.statementProcessingFailed = true;
|
|
492
|
+
},
|
|
493
|
+
resetReparseStatementStatus: (draft, action) => {
|
|
494
|
+
const { accountId, selectedPeriod } = action.payload;
|
|
495
|
+
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId].reparseStatementStatus = {
|
|
496
|
+
fetchState: 'Not-Started',
|
|
497
|
+
error: undefined,
|
|
498
|
+
};
|
|
499
|
+
},
|
|
464
500
|
updateParsedStatementData: (draft, action) => {
|
|
465
501
|
const { accountId, selectedPeriod, parsedStatementData } = action.payload;
|
|
466
502
|
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId].parsedStatementData =
|
|
@@ -613,7 +649,7 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
613
649
|
},
|
|
614
650
|
});
|
|
615
651
|
// Export actions
|
|
616
|
-
_a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateStatementProcessingFailed = _a.updateStatementProcessingFailed, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.excludeAccountFromReconciliation = _a.excludeAccountFromReconciliation, exports.excludeAccountFromReconciliationSuccess = _a.excludeAccountFromReconciliationSuccess, exports.excludeAccountFromReconciliationFailure = _a.excludeAccountFromReconciliationFailure, exports.includeAccountInReconciliation = _a.includeAccountInReconciliation, exports.includeAccountInReconciliationSuccess = _a.includeAccountInReconciliationSuccess, exports.includeAccountInReconciliationFailure = _a.includeAccountInReconciliationFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.parseStatement = _a.parseStatement, exports.parseStatementSuccess = _a.parseStatementSuccess, exports.parseStatementFailure = _a.parseStatementFailure, exports.updateParsedStatementData = _a.updateParsedStatementData, exports.updateStatementUpdateLocalData = _a.updateStatementUpdateLocalData, exports.submitStatementUpdate = _a.submitStatementUpdate, exports.submitStatementUpdateSuccess = _a.submitStatementUpdateSuccess, exports.submitStatementUpdateFailure = _a.submitStatementUpdateFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen, exports.updateNodeCollapseState = _a.updateNodeCollapseState;
|
|
652
|
+
_a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.setStatementParseInProgress = _a.setStatementParseInProgress, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateStatementProcessingFailed = _a.updateStatementProcessingFailed, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.excludeAccountFromReconciliation = _a.excludeAccountFromReconciliation, exports.excludeAccountFromReconciliationSuccess = _a.excludeAccountFromReconciliationSuccess, exports.excludeAccountFromReconciliationFailure = _a.excludeAccountFromReconciliationFailure, exports.includeAccountInReconciliation = _a.includeAccountInReconciliation, exports.includeAccountInReconciliationSuccess = _a.includeAccountInReconciliationSuccess, exports.includeAccountInReconciliationFailure = _a.includeAccountInReconciliationFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.parseStatement = _a.parseStatement, exports.parseStatementSuccess = _a.parseStatementSuccess, exports.parseStatementFailure = _a.parseStatementFailure, exports.reparseStatement = _a.reparseStatement, exports.reparseStatementSuccess = _a.reparseStatementSuccess, exports.reparseStatementFailure = _a.reparseStatementFailure, exports.resetReparseStatementStatus = _a.resetReparseStatementStatus, exports.updateParsedStatementData = _a.updateParsedStatementData, exports.updateStatementUpdateLocalData = _a.updateStatementUpdateLocalData, exports.submitStatementUpdate = _a.submitStatementUpdate, exports.submitStatementUpdateSuccess = _a.submitStatementUpdateSuccess, exports.submitStatementUpdateFailure = _a.submitStatementUpdateFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen, exports.updateNodeCollapseState = _a.updateNodeCollapseState;
|
|
617
653
|
// Export reducer
|
|
618
654
|
exports.default = expenseAutomationReconciliationView.reducer;
|
|
619
655
|
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground, excludedAccounts, summary) {
|
|
@@ -680,6 +716,7 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
|
|
|
680
716
|
statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
681
717
|
statementParseInProgress: reconciliation.bank_status.code === 'parsing',
|
|
682
718
|
statementParseStatus: { fetchState: 'Not-Started', error: undefined },
|
|
719
|
+
reparseStatementStatus: { fetchState: 'Not-Started', error: undefined },
|
|
683
720
|
localData: {
|
|
684
721
|
accountSource: account?.reconciliation_source != null
|
|
685
722
|
? (0, accountState_1.toReconciliationAccountSource)(account.reconciliation_source)
|
|
@@ -774,6 +811,7 @@ const updateReconciliationByAccountIDOnIncludeAccount = (draft, accountId, recon
|
|
|
774
811
|
statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
775
812
|
statementParseInProgress: reconciliation.bank_status.code === 'parsing',
|
|
776
813
|
statementParseStatus: { fetchState: 'Not-Started', error: undefined },
|
|
814
|
+
reparseStatementStatus: { fetchState: 'Not-Started', error: undefined },
|
|
777
815
|
localData: {},
|
|
778
816
|
accountDetectionReason: undefined,
|
|
779
817
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ID } from '../../../commonStateTypes/common';
|
|
1
2
|
import { ReportIDPlusForecastID } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
3
|
import { RootState } from '../../../reducer';
|
|
3
4
|
import { ExpenseAutomationReconciliationViewSelector } from '../selectorTypes/reconciliationViewSelectorTypes';
|
|
4
5
|
export declare const getExpenseAutomationReconciliationView: (state: RootState) => ExpenseAutomationReconciliationViewSelector;
|
|
6
|
+
export declare const getReparseStatementStatusByAccountId: (state: RootState, accountId: ID) => import("../../../commonStateTypes/common").FetchStateAndError;
|
|
5
7
|
export declare const isAccountReconReport: (reportId: ReportIDPlusForecastID) => boolean;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isAccountReconReport = exports.getExpenseAutomationReconciliationView = void 0;
|
|
6
|
+
exports.isAccountReconReport = exports.getReparseStatementStatusByAccountId = exports.getExpenseAutomationReconciliationView = void 0;
|
|
7
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
8
|
const big_js_1 = __importDefault(require("big.js"));
|
|
9
9
|
const keys_1 = __importDefault(require("lodash/keys"));
|
|
@@ -260,6 +260,8 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
260
260
|
.statementDeleteStatus,
|
|
261
261
|
statementParseStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
|
|
262
262
|
.statementParseStatus,
|
|
263
|
+
reparseStatementStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
|
|
264
|
+
.reparseStatementStatus ?? { fetchState: 'Not-Started' },
|
|
263
265
|
statementUpdateStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
|
|
264
266
|
.statementUpdateStatus,
|
|
265
267
|
statementUploadStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
|
|
@@ -339,6 +341,7 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
339
341
|
statementUploadStatus: { fetchState: 'Not-Started' },
|
|
340
342
|
statementDeleteStatus: { fetchState: 'Not-Started' },
|
|
341
343
|
statementParseStatus: { fetchState: 'Not-Started' },
|
|
344
|
+
reparseStatementStatus: { fetchState: 'Not-Started' },
|
|
342
345
|
localData: {},
|
|
343
346
|
connectionInProgress: false,
|
|
344
347
|
statementParseInProgress: false,
|
|
@@ -451,6 +454,8 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
451
454
|
summary: summaryWithTimeSaved,
|
|
452
455
|
};
|
|
453
456
|
});
|
|
457
|
+
const getReparseStatementStatusByAccountId = (state, accountId) => (0, exports.getExpenseAutomationReconciliationView)(state).accountReconciliationsByAccountID[accountId]?.reparseStatementStatus ?? { fetchState: 'Not-Started' };
|
|
458
|
+
exports.getReparseStatementStatusByAccountId = getReparseStatementStatusByAccountId;
|
|
454
459
|
const isAccountReconReport = (reportId) => {
|
|
455
460
|
return reportId.endsWith('reconciliation');
|
|
456
461
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.92-
|
|
3
|
+
"version": "5.0.92-betaNB3",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|