@zeniai/client-epic-state 5.0.4-betaJK1 → 5.0.4
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/accountReconState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconState.js +0 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +9 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +16 -1
- package/lib/esm/entity/accountRecon/accountReconState.js +0 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +16 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +0 -2
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +0 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +2 -29
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +1 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +0 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +0 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +2 -29
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +1 -2
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -4
- package/package.json +1 -1
|
@@ -5,7 +5,6 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
7
7
|
const accountReducer_1 = require("../../../../entity/account/accountReducer");
|
|
8
|
-
const accountReconState_1 = require("../../../../entity/accountRecon/accountReconState");
|
|
9
8
|
const accountReconReducer_1 = require("../../../../entity/accountRecon/accountReconReducer");
|
|
10
9
|
const accountReconSelector_1 = require("../../../../entity/accountRecon/accountReconSelector");
|
|
11
10
|
const fileReducer_1 = require("../../../../entity/file/fileReducer");
|
|
@@ -121,7 +120,6 @@ const prepareReviewTabLocalData = (transactionsToReview) => {
|
|
|
121
120
|
.recommended_transactions[0].merchant_name,
|
|
122
121
|
}
|
|
123
122
|
: undefined,
|
|
124
|
-
recommendedActionType: (0, accountReconState_1.toRecommendedActionCodeType)(currentTransaction.recommended_action.recommended_actions),
|
|
125
123
|
};
|
|
126
124
|
return {
|
|
127
125
|
...prev,
|
|
@@ -33,10 +33,8 @@ const saveReconciliationReviewEpic = (actions$, state$, zeniAPI) => actions$.pip
|
|
|
33
33
|
reconciliationId = reconciliationData?.reconciliationId;
|
|
34
34
|
updatedTransaction = reconciliationData?.transactionsToReview.find((transaction) => transaction.transactionId === transactionId);
|
|
35
35
|
}
|
|
36
|
-
const reviewAction = localData?.recommendedActionType ??
|
|
37
|
-
updatedTransaction?.recommendedAction.action;
|
|
38
36
|
const queryParam = {
|
|
39
|
-
review_action:
|
|
37
|
+
review_action: updatedTransaction?.recommendedAction.action,
|
|
40
38
|
reconciliation_id: reconciliationId ?? '',
|
|
41
39
|
ref_account_id: selectedAccountId,
|
|
42
40
|
ref_account_name: reconciliationData?.account.accountName,
|
|
@@ -46,7 +44,7 @@ const saveReconciliationReviewEpic = (actions$, state$, zeniAPI) => actions$.pip
|
|
|
46
44
|
if (reconciliationData != null &&
|
|
47
45
|
updatedTransaction != null &&
|
|
48
46
|
localData != null) {
|
|
49
|
-
switch (
|
|
47
|
+
switch (updatedTransaction.recommendedAction.action) {
|
|
50
48
|
case 'record_expense':
|
|
51
49
|
payload = getPayloadForExpenseRecord(updatedTransaction, localData);
|
|
52
50
|
break;
|
|
@@ -68,9 +66,6 @@ const saveReconciliationReviewEpic = (actions$, state$, zeniAPI) => actions$.pip
|
|
|
68
66
|
case 'record_deposit':
|
|
69
67
|
payload = getPayloadForDeposit(updatedTransaction, localData, entityState);
|
|
70
68
|
break;
|
|
71
|
-
case 'record_journal_entry':
|
|
72
|
-
payload = getPayloadForJournalEntry(updatedTransaction, localData);
|
|
73
|
-
break;
|
|
74
69
|
}
|
|
75
70
|
}
|
|
76
71
|
payload = {
|
|
@@ -229,28 +224,6 @@ const getPayloadForBillPayment = (updatedTransaction, linkedTransaction, localDa
|
|
|
229
224
|
vendor_name: linkedTransaction?.merchantName,
|
|
230
225
|
};
|
|
231
226
|
};
|
|
232
|
-
function getPayloadForJournalEntry(updatedTransaction, localData) {
|
|
233
|
-
return {
|
|
234
|
-
transaction_id: updatedTransaction.transactionId,
|
|
235
|
-
transaction_date: updatedTransaction.transactionDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT),
|
|
236
|
-
transaction_memo: updatedTransaction.memo,
|
|
237
|
-
amount: updatedTransaction.amount.amount,
|
|
238
|
-
currency_code: updatedTransaction.amount.currencyCode,
|
|
239
|
-
transaction_direction: updatedTransaction.transactionDirection,
|
|
240
|
-
lines: [
|
|
241
|
-
{
|
|
242
|
-
class_id: localData.jeDebitClassId,
|
|
243
|
-
posting_type: 'Debit',
|
|
244
|
-
amount: updatedTransaction.amount.amount,
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
class_id: localData.jeCreditClassId,
|
|
248
|
-
posting_type: 'Credit',
|
|
249
|
-
amount: updatedTransaction.amount.amount,
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
227
|
const getToastMessageSection = (updatedTransaction) => {
|
|
255
228
|
if (updatedTransaction?.recommendedAction.action === 'record_bill_payment') {
|
|
256
229
|
return 'recon_transaction_match';
|
|
@@ -10,4 +10,4 @@ export interface AuthParamsPayload {
|
|
|
10
10
|
zeni_tenant_id: string;
|
|
11
11
|
zeni_user_id: string;
|
|
12
12
|
}
|
|
13
|
-
export default function uploadAccountStatementIntoDocumentAI(accountType: AccountType, fileBlob: Blob, authParams: AuthParams
|
|
13
|
+
export default function uploadAccountStatementIntoDocumentAI(accountType: AccountType, fileBlob: Blob, authParams: AuthParams): Promise<UploadStatementDocumentAIPayload | undefined>;
|
package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.default = uploadAccountStatementIntoDocumentAI;
|
|
7
7
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
8
8
|
const init_1 = require("../../../../init");
|
|
9
|
-
async function uploadAccountStatementIntoDocumentAI(accountType, fileBlob, authParams
|
|
9
|
+
async function uploadAccountStatementIntoDocumentAI(accountType, fileBlob, authParams) {
|
|
10
10
|
let statementUpload;
|
|
11
11
|
const urlEndPoint = `${init_1.zeniAPI.apiEndPoints.documentAIMicroServiceBaseUrl}/1.0/processors/statement`;
|
|
12
12
|
const data = new FormData();
|
|
@@ -16,7 +16,6 @@ async function uploadAccountStatementIntoDocumentAI(accountType, fileBlob, authP
|
|
|
16
16
|
? 'reconciliation_card_statement_upload'
|
|
17
17
|
: 'reconciliation_bank_statement_upload',
|
|
18
18
|
purpose_id: 'reconciliation',
|
|
19
|
-
...(accountName != null && { account_name: accountName }),
|
|
20
19
|
});
|
|
21
20
|
data.append('attachment_json_0', attachment_json);
|
|
22
21
|
try {
|
|
@@ -3,7 +3,7 @@ import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
|
3
3
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
4
4
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
5
5
|
import { ReconciliationAccountSourceType } from '../../../entity/account/accountState';
|
|
6
|
-
import { BankStatusCodeType
|
|
6
|
+
import { BankStatusCodeType } from '../../../entity/accountRecon/accountReconState';
|
|
7
7
|
import { CustomerBase } from '../../../entity/customer/customerState';
|
|
8
8
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
9
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
@@ -71,10 +71,7 @@ export interface ReconciliationReviewTabLocalData {
|
|
|
71
71
|
classId?: ID;
|
|
72
72
|
creditCardId?: ID;
|
|
73
73
|
customer?: CustomerBase;
|
|
74
|
-
jeCreditClassId?: ID;
|
|
75
|
-
jeDebitClassId?: ID;
|
|
76
74
|
matchedTransactionId?: ID;
|
|
77
|
-
recommendedActionType?: RecommendedActionCodeType;
|
|
78
75
|
vendor?: VendorBase;
|
|
79
76
|
}
|
|
80
77
|
export interface ExcludeAccountFromReconciliationPayload {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.4
|
|
3
|
+
"version": "5.0.4",
|
|
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",
|