@zeniai/client-epic-state 4.18.0 → 4.18.3
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/commonPayloadTypes/recommendationPayload.d.ts +19 -0
- package/lib/entity/account/accountPayload.d.ts +3 -2
- package/lib/entity/account/accountPayload.js +10 -1
- package/lib/entity/class/classPayload.d.ts +3 -2
- package/lib/entity/class/classPayload.js +9 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -2
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +51 -1
- package/lib/entity/transaction/transactionHelper.d.ts +1 -0
- package/lib/entity/transaction/transactionHelper.js +13 -0
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -1
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/view/commonVendorView/vendorView/epics/saveVendorEpic.js +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +3 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +3 -3
- package/lib/view/recommendation/fetchEntityRecommendationsByTransactionIdEpic.js +11 -6
- package/lib/view/recommendation/recommendationHelper.d.ts +5 -3
- package/lib/view/recommendation/recommendationHelper.js +31 -1
- package/lib/view/recommendation/recommendationPayload.d.ts +5 -1
- package/lib/view/recommendation/recommendationReducer.d.ts +2 -1
- package/lib/view/recommendation/recommendationReducer.js +2 -1
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.d.ts +2 -1
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +7 -0
- package/lib/view/spendManagement/treasury/treasuryStatementList/fetchTreasuryStatementListEpic.js +2 -1
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/fetchTreasuryTaxLetterListEpic.d.ts +7 -0
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/fetchTreasuryTaxLetterListEpic.js +42 -0
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListReducer.d.ts +15 -0
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListReducer.js +57 -0
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListSelector.d.ts +7 -0
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListSelector.js +18 -0
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListState.d.ts +6 -0
- package/lib/view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListState.js +11 -0
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.d.ts +3 -3
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +1 -4
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +3 -3
- package/lib/view/transactionDetail/transactionDetailReducer.js +4 -4
- package/package.json +1 -1
|
@@ -530,11 +530,8 @@ const toSetAllLineItemsLocalDataIsUpdateAllChecked = (transaction, transactionDe
|
|
|
530
530
|
return newLocalData;
|
|
531
531
|
};
|
|
532
532
|
exports.toSetAllLineItemsLocalDataIsUpdateAllChecked = toSetAllLineItemsLocalDataIsUpdateAllChecked;
|
|
533
|
-
const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDetailLocalData, entity, recommendationLineIds, uncategorizedIncomeExpense,
|
|
533
|
+
const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDetailLocalData, entity, recommendationLineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId) => {
|
|
534
534
|
const newLineItems = {};
|
|
535
|
-
const recommendationWithCOTByLineId = recommendationByLineId != null
|
|
536
|
-
? (0, transactionHelper_1.convertRecommendationByLineIdToCOT)(recommendationByLineId, (0, transactionHelper_1.getTransactionWithCOT)(transaction))
|
|
537
|
-
: undefined;
|
|
538
535
|
let matchingEntityLineId = undefined;
|
|
539
536
|
const checkIfNotJEAndDeposit = (0, vendorTransaction_1.isVendorTransaction)(transaction) === true ||
|
|
540
537
|
(0, customerTransaction_1.isCustomerTransaction)(transaction) === true;
|
|
@@ -3,7 +3,7 @@ import { COTTransactionTracking, Recommendation } from '../../commonStateTypes/r
|
|
|
3
3
|
import { AccountBase } from '../../entity/account/accountState';
|
|
4
4
|
import { ClassBase } from '../../entity/class/classState';
|
|
5
5
|
import { Entity } from '../../entity/genericEntity/entity';
|
|
6
|
-
import {
|
|
6
|
+
import { RecommendationWithCOTByLineId, TransactionID } from '../../entity/transaction/stateTypes/transaction';
|
|
7
7
|
import { SupportedTransaction, SupportedTransactionPayload } from '../../entity/transaction/transactionState';
|
|
8
8
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
9
9
|
import { UncategorizedAccounts } from '../accountList/accountListSelector';
|
|
@@ -105,13 +105,13 @@ export declare const downloadAccountingProviderAttachment: import("@reduxjs/tool
|
|
|
105
105
|
transaction: SupportedTransaction;
|
|
106
106
|
isUpdateAll: boolean;
|
|
107
107
|
entity: Entity | undefined;
|
|
108
|
-
}, "transactionDetail/setAllLineItemsLocalDataIsUpdateAllChecked", never, never>, setEntityRecommendationForLineIdsForTransactionDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineIds: string[], entity: Entity, amount: number,
|
|
108
|
+
}, "transactionDetail/setAllLineItemsLocalDataIsUpdateAllChecked", never, never>, setEntityRecommendationForLineIdsForTransactionDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineIds: string[], entity: Entity, amount: number, recommendationWithCOTByLineId: RecommendationWithCOTByLineId, uncategorizedIncomeExpense: UncategorizedAccounts], {
|
|
109
109
|
transactionId: TransactionID;
|
|
110
110
|
transaction: SupportedTransaction;
|
|
111
111
|
lineIds: string[];
|
|
112
112
|
entity: Entity;
|
|
113
113
|
amount: number;
|
|
114
|
-
|
|
114
|
+
recommendationWithCOTByLineId: RecommendationWithCOTByLineId;
|
|
115
115
|
uncategorizedIncomeExpense: UncategorizedAccounts;
|
|
116
116
|
}, "transactionDetail/setEntityRecommendationForLineIdsForTransactionDetail", never, never>, removeEntityRecommendationForLineIdForTransactionDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineId: string], {
|
|
117
117
|
transactionId: TransactionID;
|
|
@@ -299,15 +299,15 @@ const transactionDetail = (0, toolkit_1.createSlice)({
|
|
|
299
299
|
setEntityRecommendationForLineIdsForTransactionDetail: {
|
|
300
300
|
// ToDo: Add a reducer test case to handle this part for JE tran as well - where we only update for targeted line
|
|
301
301
|
reducer(draft, action) {
|
|
302
|
-
const { transaction, lineIds,
|
|
302
|
+
const { transaction, lineIds, recommendationWithCOTByLineId, uncategorizedIncomeExpense, } = action.payload;
|
|
303
303
|
const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
|
|
304
304
|
const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
|
|
305
305
|
if (detail != null) {
|
|
306
|
-
const newLocalData = (0, transactionDetailLocalDataHelper_1.setEntityRecommendationForLineIdInLocalData)(transaction, detail.transactionDetailLocalData, action.payload.entity, lineIds, uncategorizedIncomeExpense,
|
|
306
|
+
const newLocalData = (0, transactionDetailLocalDataHelper_1.setEntityRecommendationForLineIdInLocalData)(transaction, detail.transactionDetailLocalData, action.payload.entity, lineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId);
|
|
307
307
|
draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: newLocalData });
|
|
308
308
|
}
|
|
309
309
|
},
|
|
310
|
-
prepare(transactionId, transaction, lineIds, entity, amount,
|
|
310
|
+
prepare(transactionId, transaction, lineIds, entity, amount, recommendationWithCOTByLineId, uncategorizedIncomeExpense) {
|
|
311
311
|
return {
|
|
312
312
|
payload: {
|
|
313
313
|
transactionId,
|
|
@@ -315,7 +315,7 @@ const transactionDetail = (0, toolkit_1.createSlice)({
|
|
|
315
315
|
lineIds,
|
|
316
316
|
entity,
|
|
317
317
|
amount,
|
|
318
|
-
|
|
318
|
+
recommendationWithCOTByLineId,
|
|
319
319
|
uncategorizedIncomeExpense,
|
|
320
320
|
},
|
|
321
321
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.3",
|
|
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",
|