@zeniai/client-epic-state 4.14.72 → 4.14.74
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.
|
@@ -80,10 +80,17 @@ exports.getOnboardingCockpitView = (0, toolkit_1.createSelector)((state) => stat
|
|
|
80
80
|
.filter((value) => value != null);
|
|
81
81
|
onboardingCustomers = getFilteredOnboardingCustomers(onboardingCustomers, uiState.filterText);
|
|
82
82
|
const sortedOnboardingCustomers = getSortedOnboardingCustomers(onboardingCustomers, uiState.sortKey, uiState.sortOrder, rootState.userState);
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
const bankAccountLinkedOnboardingUsers = sortedOnboardingCustomers.flatMap((company) => {
|
|
84
|
+
var _a;
|
|
85
|
+
const userIds = ((_a = company.company.company.companyOnboardingInfo.onboardingInfo) === null || _a === void 0 ? void 0 : _a.bankAccountLinked.userIds) || [];
|
|
86
|
+
return (0, userSelector_1.getUsersByUserIds)(rootState.userState, userIds);
|
|
87
|
+
});
|
|
88
|
+
const zeniUsers = (0, userSelector_1.getAllZeniUsersFromState)(rootState);
|
|
89
|
+
const mergedUsersMap = new Map();
|
|
90
|
+
[...zeniUsers, ...bankAccountLinkedOnboardingUsers].forEach((user) => {
|
|
91
|
+
mergedUsersMap.set(user.userId, user);
|
|
92
|
+
});
|
|
93
|
+
const orderedUsers = (0, orderBy_1.default)(Array.from(mergedUsersMap.values()), (user) => (0, userSelector_1.getUserName)(user), 'asc');
|
|
87
94
|
return {
|
|
88
95
|
version: 1,
|
|
89
96
|
fetchState: fetchState,
|
|
@@ -98,7 +105,7 @@ exports.getOnboardingCockpitView = (0, toolkit_1.createSelector)((state) => stat
|
|
|
98
105
|
zeniUsers: {
|
|
99
106
|
fetchState: rootState.companyViewState.zeniUsers.fetchState,
|
|
100
107
|
error: rootState.companyViewState.zeniUsers.error,
|
|
101
|
-
values:
|
|
108
|
+
values: orderedUsers,
|
|
102
109
|
},
|
|
103
110
|
retryBankAccountConnectionFetchStateByCompanyId,
|
|
104
111
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.74",
|
|
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",
|