@zeniai/client-epic-state 4.13.5 → 4.13.9
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/chargeCard/chargeCard.d.ts +16 -2
- package/lib/entity/chargeCard/chargeCard.js +18 -1
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +14 -5
- package/lib/entity/chargeCard/chargeCardPayload.js +24 -7
- package/lib/entity/tenant/clearAllEpic.d.ts +4 -1
- package/lib/entity/tenant/clearAllEpic.js +6 -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 +5 -2
- package/lib/epic.js +5 -2
- package/lib/index.d.ts +15 -10
- package/lib/index.js +36 -20
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -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/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.d.ts +2 -0
- package/lib/view/addressView/toAddressViewLocalData.js +5 -4
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -1
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +1 -2
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +2 -5
- package/lib/view/settingsView/epic/updateMyProfileEpic.js +6 -4
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +6 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +2 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +1 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +1 -21
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +4 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +8 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +25 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +8 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +42 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -14
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +2 -13
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -6
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +2 -17
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +8 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +55 -15
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +44 -0
- package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.d.ts +3 -2
- package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.js +35 -18
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +65 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +22 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +76 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +28 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +23 -0
- package/lib/view/userListView/fetchUserListByTypeEpic.js +4 -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
|
@@ -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.9",
|
|
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",
|