@zeniai/client-epic-state 4.16.67 → 4.16.69
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/view/aiControllerView/aiControllerViewReducer.js +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +10 -6
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +10 -6
- package/package.json +1 -1
|
@@ -154,8 +154,8 @@ const aiControllerView = (0, toolkit_1.createSlice)({
|
|
|
154
154
|
draft.uiState.currentChatSessionId = sessionId;
|
|
155
155
|
},
|
|
156
156
|
createSessionFailure(draft, action) {
|
|
157
|
-
draft.fetchState = 'Error';
|
|
158
|
-
draft.error = action.payload;
|
|
157
|
+
draft.createSessionState.fetchState = 'Error';
|
|
158
|
+
draft.createSessionState.error = action.payload;
|
|
159
159
|
},
|
|
160
160
|
updateCurrentInput(draft, action) {
|
|
161
161
|
draft.uiState.currentInput = action.payload;
|
|
@@ -99,15 +99,19 @@ const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
99
99
|
}
|
|
100
100
|
}));
|
|
101
101
|
exports.fetchReconciliationViewEpic = fetchReconciliationViewEpic;
|
|
102
|
+
const getMemo = (transaction) => {
|
|
103
|
+
var _a, _b, _c;
|
|
104
|
+
return ((_c = (_b = (_a = transaction.recommended_action.recommended_transactions[0]) === null || _a === void 0 ? void 0 : _a.transaction_memo) !== null && _b !== void 0 ? _b : transaction.transaction_memo) !== null && _c !== void 0 ? _c : '');
|
|
105
|
+
};
|
|
102
106
|
const prepareReviewTabLocalData = (transactionsToReview) => {
|
|
103
107
|
return transactionsToReview.reduce((prev, currentTransaction) => {
|
|
104
|
-
var _a, _b, _c, _d, _e, _f
|
|
108
|
+
var _a, _b, _c, _d, _e, _f;
|
|
105
109
|
const localData = {
|
|
106
|
-
memo: (
|
|
107
|
-
categoryId: (
|
|
108
|
-
classId: (
|
|
109
|
-
vendor: ((
|
|
110
|
-
((
|
|
110
|
+
memo: getMemo(currentTransaction),
|
|
111
|
+
categoryId: (_b = (_a = currentTransaction.recommended_action.recommended_transactions[0]) === null || _a === void 0 ? void 0 : _a.account_id) !== null && _b !== void 0 ? _b : undefined,
|
|
112
|
+
classId: (_d = (_c = currentTransaction.recommended_action.recommended_transactions[0]) === null || _c === void 0 ? void 0 : _c.class_id) !== null && _d !== void 0 ? _d : undefined,
|
|
113
|
+
vendor: ((_e = currentTransaction.recommended_action.recommended_transactions[0]) === null || _e === void 0 ? void 0 : _e.merchant_id) != null &&
|
|
114
|
+
((_f = currentTransaction.recommended_action.recommended_transactions[0]) === null || _f === void 0 ? void 0 : _f.merchant_name) != null
|
|
111
115
|
? {
|
|
112
116
|
id: currentTransaction.recommended_action
|
|
113
117
|
.recommended_transactions[0].merchant_id,
|
|
@@ -26,15 +26,19 @@ const initialiseDataForSelectedAccountIdEpic = (actions$, state$) => actions$.pi
|
|
|
26
26
|
return (0, rxjs_1.from)(actions);
|
|
27
27
|
}));
|
|
28
28
|
exports.initialiseDataForSelectedAccountIdEpic = initialiseDataForSelectedAccountIdEpic;
|
|
29
|
+
const getMemo = (transaction) => {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
return ((_c = (_b = (_a = transaction.recommendedAction.recommendedTransactions[0]) === null || _a === void 0 ? void 0 : _a.memo) !== null && _b !== void 0 ? _b : transaction.memo) !== null && _c !== void 0 ? _c : '');
|
|
32
|
+
};
|
|
29
33
|
const prepareReviewTabLocalData = (transactionsToReview) => {
|
|
30
34
|
return transactionsToReview.reduce((prev, currentTransaction) => {
|
|
31
|
-
var _a, _b, _c, _d, _e, _f
|
|
35
|
+
var _a, _b, _c, _d, _e, _f;
|
|
32
36
|
const localData = {
|
|
33
|
-
memo: (
|
|
34
|
-
categoryId: (
|
|
35
|
-
classId: (
|
|
36
|
-
vendor: ((
|
|
37
|
-
((
|
|
37
|
+
memo: getMemo(currentTransaction),
|
|
38
|
+
categoryId: (_b = (_a = currentTransaction.recommendedAction.recommendedTransactions[0]) === null || _a === void 0 ? void 0 : _a.accountId) !== null && _b !== void 0 ? _b : undefined,
|
|
39
|
+
classId: (_d = (_c = currentTransaction.recommendedAction.recommendedTransactions[0]) === null || _c === void 0 ? void 0 : _c.classId) !== null && _d !== void 0 ? _d : undefined,
|
|
40
|
+
vendor: ((_e = currentTransaction.recommendedAction.recommendedTransactions[0]) === null || _e === void 0 ? void 0 : _e.merchantId) != null &&
|
|
41
|
+
((_f = currentTransaction.recommendedAction.recommendedTransactions[0]) === null || _f === void 0 ? void 0 : _f.merchantName) != null
|
|
38
42
|
? {
|
|
39
43
|
id: currentTransaction.recommendedAction
|
|
40
44
|
.recommendedTransactions[0].merchantId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.69",
|
|
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
|
"types": "lib/index.d.ts",
|