@zeniai/client-epic-state 5.0.65-betaML1 → 5.0.65-betaML2
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/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +10 -0
- package/lib/esm/view/transactionDetail/transactionDetailReducer.js +16 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +10 -0
- package/lib/view/transactionDetail/transactionDetailReducer.js +16 -0
- package/package.json +1 -1
|
@@ -42,6 +42,16 @@ export const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, ze
|
|
|
42
42
|
const startAction = flowType === 'categorization' && selectedTab != null
|
|
43
43
|
? markCategoryClassRecommendationsInProgressForCategorization(selectedTab, transactionId, lineIds)
|
|
44
44
|
: markCategoryClassRecommendationsInProgressForTransactionDetail(transactionId, lineIds);
|
|
45
|
+
// TEMP-LOG[JE-skeleton]: epic dispatch payload — confirms the
|
|
46
|
+
// targeted-fetch fired with the expected flowType / txnId / lineIds.
|
|
47
|
+
// eslint-disable-next-line no-console
|
|
48
|
+
console.log('[JE-skeleton][epic] dispatch start arm', {
|
|
49
|
+
flowType,
|
|
50
|
+
selectedTab,
|
|
51
|
+
transactionId,
|
|
52
|
+
lineIds,
|
|
53
|
+
transactionType: transaction?.type,
|
|
54
|
+
});
|
|
45
55
|
const url = buildRecommendationUrl(zeniAPI.apiEndPoints.accountMicroServiceBaseUrl, entity, amount, transactionDetails, isFetchCOT === true);
|
|
46
56
|
const httpStream$ = zeniAPI
|
|
47
57
|
.getJSON(url)
|
|
@@ -408,6 +408,22 @@ const transactionDetail = createSlice({
|
|
|
408
408
|
const { transactionId, lineIds } = action.payload;
|
|
409
409
|
const key = getTransactionDetailKey(transactionId);
|
|
410
410
|
const detail = recordGet(draft.transactionDetailById, key, undefined);
|
|
411
|
+
// TEMP-LOG[JE-skeleton]: reducer entry — confirms the action reached
|
|
412
|
+
// the slice and shows whether incoming lineIds match the redux keys.
|
|
413
|
+
// eslint-disable-next-line no-console
|
|
414
|
+
console.log('[JE-skeleton][reducer] markInProgress detail', {
|
|
415
|
+
transactionId,
|
|
416
|
+
incomingLineIds: lineIds,
|
|
417
|
+
existingLineItemKeys: detail != null
|
|
418
|
+
? Object.keys(detail.transactionDetailLocalData.lineItemById)
|
|
419
|
+
: null,
|
|
420
|
+
matched: detail != null
|
|
421
|
+
? lineIds.filter((id) => detail.transactionDetailLocalData.lineItemById[id] != null)
|
|
422
|
+
: [],
|
|
423
|
+
missed: detail != null
|
|
424
|
+
? lineIds.filter((id) => detail.transactionDetailLocalData.lineItemById[id] == null)
|
|
425
|
+
: lineIds,
|
|
426
|
+
});
|
|
411
427
|
if (detail != null) {
|
|
412
428
|
lineIds.forEach((lineId) => {
|
|
413
429
|
const lineItem = detail.transactionDetailLocalData.lineItemById[lineId];
|