@zeniai/client-epic-state 4.13.12 → 4.13.14
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/account/accountPayload.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/vendor/__mocks__/vendorMock.js +0 -2
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +1 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +73 -4
- package/lib/entity/vendor/vendorPayload.d.ts +6 -1
- package/lib/entity/vendor/vendorPayload.js +3 -3
- package/lib/entity/vendor/vendorState.d.ts +8 -1
- package/lib/entity/vendor/vendorType.d.ts +2 -0
- package/lib/entity/vendor/vendorType.js +4 -1
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -1
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4607 -0
- package/lib/view/accountMappingView/accountMappingPayload.js +75 -32
- package/lib/view/accountMappingView/accountMappingReducer.js +36 -10
- package/lib/view/accountMappingView/accountMappingState.d.ts +1 -1
- package/lib/view/accountMappingView/accountMappingViewSelector.d.ts +5 -0
- package/lib/view/accountMappingView/accountMappingViewSelector.js +11 -1
- package/lib/view/accountMappingView/initializeAccountMappingViewEpic.d.ts +2 -1
- package/lib/view/accountMappingView/initializeAccountMappingViewEpic.js +2 -0
- package/lib/view/accountMappingView/saveAccountMappingViewEpic.js +6 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailPayload.d.ts +1 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailPayload.js +4 -3
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
- package/lib/view/vendor1099TypeList/vendor1099TypeListEpic.d.ts +7 -0
- package/lib/view/vendor1099TypeList/vendor1099TypeListEpic.js +23 -0
- package/lib/view/vendor1099TypeList/vendor1099TypeListPayload.d.ts +15 -0
- package/lib/view/vendor1099TypeList/vendor1099TypeListPayload.js +2 -0
- package/lib/view/vendor1099TypeList/vendor1099TypeListReducer.d.ts +7 -0
- package/lib/view/vendor1099TypeList/vendor1099TypeListReducer.js +52 -0
- package/lib/view/vendor1099TypeList/vendor1099TypeListState.d.ts +9 -0
- package/lib/view/vendor1099TypeList/vendor1099TypeListState.js +2 -0
- package/lib/view/vendorFiling1099/__mock__/json/vendorFiling1099ListSuccess.json +4 -1
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +12 -3
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +2 -4
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.d.ts +4 -1
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +2 -2
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +7 -7
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListSelector.js +21 -10
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.js +1 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../reducer';
|
|
4
4
|
import { fetchVendorsFiling1099List } from './vendorFiling1099ListReducer';
|
|
5
|
-
import {
|
|
5
|
+
import { fetchVendor1099TypeList } from '../../vendor1099TypeList/vendor1099TypeListReducer';
|
|
6
6
|
import { initializeAccountMappingView } from '../../accountMappingView/accountMappingReducer';
|
|
7
|
-
export declare type ActionType = ReturnType<typeof fetchVendorsFiling1099List> | ReturnType<typeof
|
|
7
|
+
export declare type ActionType = ReturnType<typeof fetchVendorsFiling1099List> | ReturnType<typeof fetchVendor1099TypeList> | ReturnType<typeof initializeAccountMappingView>;
|
|
8
8
|
export declare const fetchVendorsFiling1099AllEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -4,23 +4,23 @@ exports.fetchVendorsFiling1099AllEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const vendorFiling1099ListReducer_1 = require("./vendorFiling1099ListReducer");
|
|
7
|
-
const
|
|
7
|
+
const vendor1099TypeListReducer_1 = require("../../vendor1099TypeList/vendor1099TypeListReducer");
|
|
8
8
|
const accountMappingReducer_1 = require("../../accountMappingView/accountMappingReducer");
|
|
9
9
|
const fetchVendorsFiling1099AllEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(vendorFiling1099ListReducer_1.fetchVendorsFiling1099All.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
const state = state$.value;
|
|
11
11
|
const vendorActions = [];
|
|
12
12
|
if (action.payload.cacheOverride === true) {
|
|
13
|
-
if (state.
|
|
14
|
-
state.
|
|
15
|
-
vendorActions.push((0,
|
|
13
|
+
if (state.vendor1099TypeListState.hasValidState() === false &&
|
|
14
|
+
state.vendor1099TypeListState.fetchState !== 'In-Progress') {
|
|
15
|
+
vendorActions.push((0, vendor1099TypeListReducer_1.fetchVendor1099TypeList)());
|
|
16
16
|
}
|
|
17
17
|
vendorActions.push((0, accountMappingReducer_1.initializeAccountMappingView)());
|
|
18
18
|
vendorActions.push((0, vendorFiling1099ListReducer_1.fetchVendorsFiling1099List)());
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
|
-
if (state.
|
|
22
|
-
state.
|
|
23
|
-
vendorActions.push((0,
|
|
21
|
+
if (state.vendor1099TypeListState.hasValidState() === false &&
|
|
22
|
+
state.vendor1099TypeListState.fetchState !== 'In-Progress') {
|
|
23
|
+
vendorActions.push((0, vendor1099TypeListReducer_1.fetchVendor1099TypeList)());
|
|
24
24
|
}
|
|
25
25
|
vendorActions.push((0, accountMappingReducer_1.initializeAccountMappingView)());
|
|
26
26
|
vendorActions.push((0, vendorFiling1099ListReducer_1.fetchVendorsFiling1099List)());
|
|
@@ -9,7 +9,7 @@ const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
|
9
9
|
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
10
10
|
const getVendorFiling1099List = (state) => {
|
|
11
11
|
var _a;
|
|
12
|
-
const { vendorFiling1099ListState, vendorState,
|
|
12
|
+
const { vendorFiling1099ListState, vendorState, vendor1099TypeListState, accountMappingState, } = state;
|
|
13
13
|
const targetIds = vendorFiling1099ListState.vendorIds;
|
|
14
14
|
const allFetchStates = [
|
|
15
15
|
accountMappingState.accountListFetchState,
|
|
@@ -19,24 +19,33 @@ const getVendorFiling1099List = (state) => {
|
|
|
19
19
|
error: vendorFiling1099ListState.error,
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
fetchState:
|
|
23
|
-
error:
|
|
22
|
+
fetchState: vendor1099TypeListState.fetchState,
|
|
23
|
+
error: vendor1099TypeListState.error,
|
|
24
24
|
},
|
|
25
25
|
];
|
|
26
26
|
const fetchStatus = (0, reduceFetchState_1.reduceAllFetchState)(allFetchStates);
|
|
27
|
-
const vendorTypeList = vendorTypeListState.vendorTypes;
|
|
28
27
|
const loweredSearchText = vendorFiling1099ListState.uiState.searchString
|
|
29
28
|
.trim()
|
|
30
29
|
.toLowerCase();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
const vendors = (0, vendorSelector_1.getVendorsByVendorIds)(vendorState, targetIds);
|
|
31
|
+
let vendorFiling1099ViewList = vendors.flatMap((vendor) => {
|
|
32
|
+
const vendorRows = [];
|
|
33
|
+
if (vendor.isINTType === true) {
|
|
34
|
+
vendorRows.push(Object.assign(Object.assign({}, vendor), { filing1099Type: 'int', filing1099Total: vendor.filing1099INTTotal }));
|
|
35
|
+
}
|
|
36
|
+
if (vendor.isMISCType === true) {
|
|
37
|
+
vendorRows.push(Object.assign(Object.assign({}, vendor), { filing1099Type: 'misc', filing1099Total: vendor.filing1099MISCTotal }));
|
|
38
|
+
}
|
|
39
|
+
if (vendor.isNECType === true) {
|
|
40
|
+
vendorRows.push(Object.assign(Object.assign({}, vendor), { filing1099Type: 'nec', filing1099Total: vendor.filing1099NECTotal }));
|
|
41
|
+
}
|
|
42
|
+
return vendorRows;
|
|
36
43
|
});
|
|
44
|
+
vendorFiling1099ViewList = vendorFiling1099ViewList.filter((vendor) => { var _a; return (_a = vendor.legalName) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(loweredSearchText); });
|
|
45
|
+
vendorFiling1099ViewList = (0, exports.sortedVendorFiling1099View)(vendorFiling1099ViewList, vendorFiling1099ListState.uiState.sortKey, vendorFiling1099ListState.uiState.sortOrder);
|
|
37
46
|
return {
|
|
38
47
|
vendors: vendorFiling1099ViewList,
|
|
39
|
-
vendorTypeList:
|
|
48
|
+
vendorTypeList: vendor1099TypeListState.vendorTypes,
|
|
40
49
|
isVendor1099Populated: (_a = vendorFiling1099ListState.isVendor1099Populated) !== null && _a !== void 0 ? _a : true,
|
|
41
50
|
uiState: vendorFiling1099ListState.uiState,
|
|
42
51
|
vendorFiling1099DownloadData: vendorFiling1099ListState.vendorFiling1099DownloadData,
|
|
@@ -56,6 +65,8 @@ const sortedVendorFiling1099View = (vendorFiling1099List, sortKey, sortOrder) =>
|
|
|
56
65
|
return vendor.vendorType;
|
|
57
66
|
case 'w9':
|
|
58
67
|
return vendor.filing1099W9Files;
|
|
68
|
+
case 'filing1099type':
|
|
69
|
+
return vendor.filing1099Type;
|
|
59
70
|
case 'status':
|
|
60
71
|
return vendor.filing1099Status;
|
|
61
72
|
default:
|
|
@@ -20,7 +20,7 @@ export interface VendorFiling1099ListQuery {
|
|
|
20
20
|
sortOrder: SortOrder;
|
|
21
21
|
sortKey: VendorFiling1099ListViewSortKey;
|
|
22
22
|
}
|
|
23
|
-
declare const toVendorFiling1099ListViewSortKey: (v: string) => "total" | "status" | "w9" | "legal_name" | "tax_classification";
|
|
23
|
+
declare const toVendorFiling1099ListViewSortKey: (v: string) => "total" | "status" | "w9" | "legal_name" | "tax_classification" | "filing1099type";
|
|
24
24
|
export declare type VendorFiling1099ListViewSortKey = ReturnType<typeof toVendorFiling1099ListViewSortKey>;
|
|
25
25
|
export declare type Type1099Download = 'nec' | 'misc' | 'int';
|
|
26
26
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.14",
|
|
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",
|