@zeniai/client-epic-state 5.1.0-betaSS1 → 5.1.0-betaSS3
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/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +8 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +8 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +8 -1
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +8 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +8 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +8 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -1
- package/package.json +1 -1
|
@@ -42,8 +42,15 @@ export const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI)
|
|
|
42
42
|
page_size: manualSearch.pageSize,
|
|
43
43
|
search_text: query,
|
|
44
44
|
};
|
|
45
|
+
// BETA TEST — Shubham dev namespace for transaction-categorization
|
|
46
|
+
// `statuses` / `count_only_statuses` rollout. Revert before merge by
|
|
47
|
+
// restoring `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}` in
|
|
48
|
+
// place of the hardcoded base. Mirrored in
|
|
49
|
+
// `fetchTransactionCategorizationEpic.ts` and
|
|
50
|
+
// `backgroundRefetchReviewTabEpic.ts` — grep `BETA TEST` to find
|
|
51
|
+
// every override site.
|
|
45
52
|
return zeniAPI
|
|
46
|
-
.getJSON(
|
|
53
|
+
.getJSON(`https://dev.api.zeni.ai/version/accounting/shubham/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
47
54
|
.pipe(mergeMap((response) => {
|
|
48
55
|
if (isSuccessResponse(response) && response.data != null) {
|
|
49
56
|
const { transactions, next_page_token, total_count } = response.data;
|
|
@@ -34,7 +34,14 @@ export const backgroundRefetchReviewTabEpic = (actions$, state$, zeniAPI) => act
|
|
|
34
34
|
search_text: reviewUiState.searchString,
|
|
35
35
|
statuses: effectiveReviewStatuses,
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
// BETA TEST — Shubham dev namespace for transaction-categorization
|
|
38
|
+
// `statuses` / `count_only_statuses` rollout. Revert before merge by
|
|
39
|
+
// restoring `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}` in
|
|
40
|
+
// place of the hardcoded base. Mirrored in
|
|
41
|
+
// `fetchTransactionCategorizationEpic.ts` and
|
|
42
|
+
// `searchTransactionsForManualMatchEpic.ts` — grep `BETA TEST` to
|
|
43
|
+
// find every override site.
|
|
44
|
+
return zeniAPI.getJSON(`https://dev.api.zeni.ai/version/accounting/shubham/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`);
|
|
38
45
|
};
|
|
39
46
|
return fetchPage(null).pipe(expand((response) => {
|
|
40
47
|
if (!isSuccessResponse(response) || response.data == null) {
|
|
@@ -25,8 +25,15 @@ export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) =>
|
|
|
25
25
|
statuses,
|
|
26
26
|
count_only_statuses: countOnlyStatuses,
|
|
27
27
|
};
|
|
28
|
+
// BETA TEST — Shubham dev namespace for transaction-categorization
|
|
29
|
+
// `statuses` / `count_only_statuses` rollout. Revert before merge by
|
|
30
|
+
// restoring `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}` in
|
|
31
|
+
// place of the hardcoded base. Mirrored in
|
|
32
|
+
// `backgroundRefetchReviewTabEpic.ts` and
|
|
33
|
+
// `searchTransactionsForManualMatchEpic.ts` — grep `BETA TEST` to
|
|
34
|
+
// find every override site.
|
|
28
35
|
return zeniAPI
|
|
29
|
-
.getJSON(
|
|
36
|
+
.getJSON(`https://dev.api.zeni.ai/version/accounting/shubham/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
30
37
|
.pipe(mergeMap((response) => {
|
|
31
38
|
if (isSuccessResponse(response) && response.data != null) {
|
|
32
39
|
const updateActions = [];
|
|
@@ -951,7 +951,11 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
951
951
|
},
|
|
952
952
|
updateTotalCountForTransactionCategorization(draft, action) {
|
|
953
953
|
const { selectedTab, selectedPeriod, totalCount } = action.payload;
|
|
954
|
-
|
|
954
|
+
const periodId = toMonthYearPeriodId(selectedPeriod);
|
|
955
|
+
draft.transactionCategorizationView[selectedTab].uiState.totalCount[periodId] = totalCount;
|
|
956
|
+
if (selectedTab === 'review') {
|
|
957
|
+
draft.parentTotalCountByTab.review[periodId] = totalCount;
|
|
958
|
+
}
|
|
955
959
|
},
|
|
956
960
|
updateParentTotalCountForTab(draft, action) {
|
|
957
961
|
const { selectedTab, selectedPeriod, parentTotalCount } = action.payload;
|
package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js
CHANGED
|
@@ -45,8 +45,15 @@ const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI) => {
|
|
|
45
45
|
page_size: manualSearch.pageSize,
|
|
46
46
|
search_text: query,
|
|
47
47
|
};
|
|
48
|
+
// BETA TEST — Shubham dev namespace for transaction-categorization
|
|
49
|
+
// `statuses` / `count_only_statuses` rollout. Revert before merge by
|
|
50
|
+
// restoring `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}` in
|
|
51
|
+
// place of the hardcoded base. Mirrored in
|
|
52
|
+
// `fetchTransactionCategorizationEpic.ts` and
|
|
53
|
+
// `backgroundRefetchReviewTabEpic.ts` — grep `BETA TEST` to find
|
|
54
|
+
// every override site.
|
|
48
55
|
return zeniAPI
|
|
49
|
-
.getJSON(
|
|
56
|
+
.getJSON(`https://dev.api.zeni.ai/version/accounting/shubham/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
50
57
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
51
58
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
52
59
|
const { transactions, next_page_token, total_count } = response.data;
|
|
@@ -37,7 +37,14 @@ const backgroundRefetchReviewTabEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
37
37
|
search_text: reviewUiState.searchString,
|
|
38
38
|
statuses: effectiveReviewStatuses,
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
// BETA TEST — Shubham dev namespace for transaction-categorization
|
|
41
|
+
// `statuses` / `count_only_statuses` rollout. Revert before merge by
|
|
42
|
+
// restoring `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}` in
|
|
43
|
+
// place of the hardcoded base. Mirrored in
|
|
44
|
+
// `fetchTransactionCategorizationEpic.ts` and
|
|
45
|
+
// `searchTransactionsForManualMatchEpic.ts` — grep `BETA TEST` to
|
|
46
|
+
// find every override site.
|
|
47
|
+
return zeniAPI.getJSON(`https://dev.api.zeni.ai/version/accounting/shubham/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`);
|
|
41
48
|
};
|
|
42
49
|
return fetchPage(null).pipe((0, operators_1.expand)((response) => {
|
|
43
50
|
if (!(0, responsePayload_1.isSuccessResponse)(response) || response.data == null) {
|
|
@@ -28,8 +28,15 @@ const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => action
|
|
|
28
28
|
statuses,
|
|
29
29
|
count_only_statuses: countOnlyStatuses,
|
|
30
30
|
};
|
|
31
|
+
// BETA TEST — Shubham dev namespace for transaction-categorization
|
|
32
|
+
// `statuses` / `count_only_statuses` rollout. Revert before merge by
|
|
33
|
+
// restoring `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}` in
|
|
34
|
+
// place of the hardcoded base. Mirrored in
|
|
35
|
+
// `backgroundRefetchReviewTabEpic.ts` and
|
|
36
|
+
// `searchTransactionsForManualMatchEpic.ts` — grep `BETA TEST` to
|
|
37
|
+
// find every override site.
|
|
31
38
|
return zeniAPI
|
|
32
|
-
.getJSON(
|
|
39
|
+
.getJSON(`https://dev.api.zeni.ai/version/accounting/shubham/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
33
40
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
34
41
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
35
42
|
const updateActions = [];
|
|
@@ -958,7 +958,11 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
958
958
|
},
|
|
959
959
|
updateTotalCountForTransactionCategorization(draft, action) {
|
|
960
960
|
const { selectedTab, selectedPeriod, totalCount } = action.payload;
|
|
961
|
-
|
|
961
|
+
const periodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
962
|
+
draft.transactionCategorizationView[selectedTab].uiState.totalCount[periodId] = totalCount;
|
|
963
|
+
if (selectedTab === 'review') {
|
|
964
|
+
draft.parentTotalCountByTab.review[periodId] = totalCount;
|
|
965
|
+
}
|
|
962
966
|
},
|
|
963
967
|
updateParentTotalCountForTab(draft, action) {
|
|
964
968
|
const { selectedTab, selectedPeriod, parentTotalCount } = action.payload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.0-
|
|
3
|
+
"version": "5.1.0-betaSS3",
|
|
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",
|