@finos/legend-application-marketplace 0.1.56 → 0.1.58
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/__lib__/LegendMarketplaceAppEvent.d.ts +3 -1
- package/lib/__lib__/LegendMarketplaceAppEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendMarketplaceAppEvent.js +2 -0
- package/lib/__lib__/LegendMarketplaceAppEvent.js.map +1 -1
- package/lib/__lib__/LegendMarketplaceTelemetryHelper.d.ts +13 -7
- package/lib/__lib__/LegendMarketplaceTelemetryHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendMarketplaceTelemetryHelper.js +61 -19
- package/lib/__lib__/LegendMarketplaceTelemetryHelper.js.map +1 -1
- package/lib/components/Header/LegendMarketplaceIconToolbar.d.ts.map +1 -1
- package/lib/components/Header/LegendMarketplaceIconToolbar.js +34 -5
- package/lib/components/Header/LegendMarketplaceIconToolbar.js.map +1 -1
- package/lib/components/SearchBar/LegendMarketplaceSearchBar.js +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/pages/Lakehouse/MarketplaceLakehouseHome.d.ts.map +1 -1
- package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js +10 -21
- package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.js +23 -127
- package/lib/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.js +34 -158
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.js.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.d.ts.map +1 -1
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.js +58 -38
- package/lib/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.js.map +1 -1
- package/lib/stores/lakehouse/LegendMarketplaceSearchResultsStore.d.ts.map +1 -1
- package/lib/stores/lakehouse/LegendMarketplaceSearchResultsStore.js +7 -1
- package/lib/stores/lakehouse/LegendMarketplaceSearchResultsStore.js.map +1 -1
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts +22 -11
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -1
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js +145 -74
- package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -1
- package/lib/stores/orders/OrderHelpers.d.ts +1 -1
- package/lib/stores/orders/OrderHelpers.d.ts.map +1 -1
- package/lib/stores/orders/OrderHelpers.js +7 -6
- package/lib/stores/orders/OrderHelpers.js.map +1 -1
- package/lib/utils/EntitlementsUtils.d.ts +20 -0
- package/lib/utils/EntitlementsUtils.d.ts.map +1 -0
- package/lib/utils/EntitlementsUtils.js +107 -0
- package/lib/utils/EntitlementsUtils.js.map +1 -0
- package/package.json +10 -10
- package/src/__lib__/LegendMarketplaceAppEvent.ts +2 -0
- package/src/__lib__/LegendMarketplaceTelemetryHelper.ts +75 -21
- package/src/components/Header/LegendMarketplaceIconToolbar.tsx +94 -5
- package/src/components/SearchBar/LegendMarketplaceSearchBar.tsx +1 -1
- package/src/pages/Lakehouse/MarketplaceLakehouseHome.tsx +12 -58
- package/src/pages/Lakehouse/entitlements/EntitlementsClosedContractsDashboard.tsx +68 -235
- package/src/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.tsx +88 -295
- package/src/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.tsx +84 -49
- package/src/stores/lakehouse/LegendMarketplaceSearchResultsStore.ts +13 -3
- package/src/stores/lakehouse/entitlements/EntitlementsDashboardState.ts +234 -109
- package/src/stores/orders/OrderHelpers.ts +8 -7
- package/src/utils/EntitlementsUtils.tsx +207 -0
- package/tsconfig.json +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
4
|
*
|
|
@@ -14,123 +14,38 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { GraphManagerState,
|
|
17
|
+
import { GraphManagerState, V1_ContractState, V1_LiteDataContractWithUserStatus, } from '@finos/legend-graph';
|
|
18
18
|
import { DataGrid, } from '@finos/legend-lego/data-grid';
|
|
19
|
-
import { Box, CircularProgress, FormControlLabel,
|
|
20
|
-
import {
|
|
19
|
+
import { Box, CircularProgress, FormControlLabel, FormGroup, Switch, } from '@mui/material';
|
|
20
|
+
import { useMemo, useState } from 'react';
|
|
21
21
|
import { useLegendMarketplaceBaseStore } from '../../../application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
22
22
|
import { observer } from 'mobx-react-lite';
|
|
23
|
-
import {
|
|
23
|
+
import { startCase } from '@finos/legend-shared';
|
|
24
24
|
import { useAuth } from 'react-oidc-context';
|
|
25
|
-
import {
|
|
26
|
-
import { MultiUserRenderer, isContractInTerminalState, getOrganizationalScopeTypeName, getOrganizationalScopeTypeDetails, UserRenderer, EntitlementsDataContractViewer, EntitlementsDataContractViewerState, } from '@finos/legend-extension-dsl-data-product';
|
|
25
|
+
import { MultiUserRenderer, isContractInTerminalState, EntitlementsDataContractViewer, EntitlementsDataContractViewerState, isApprovalStatusTerminal, } from '@finos/legend-extension-dsl-data-product';
|
|
27
26
|
import { generateContractPagePath, generateLakehouseDataProductPath, } from '../../../__lib__/LegendMarketplaceNavigation.js';
|
|
28
27
|
import { flowResult } from 'mobx';
|
|
28
|
+
import { getCommonEntitlementsColDefs } from '../../../utils/EntitlementsUtils.js';
|
|
29
29
|
const AssigneesCellRenderer = (props) => {
|
|
30
|
-
const { dataContract,
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const [loading, setLoading] = useState(false);
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
const fetchAssignees = async () => {
|
|
38
|
-
if (dataContract) {
|
|
39
|
-
setLoading(true);
|
|
40
|
-
try {
|
|
41
|
-
const rawTasks = await entitlementsStore.lakehouseContractServerClient.getContractTasks(dataContract.guid, token);
|
|
42
|
-
const tasks = V1_deserializeTaskResponse(rawTasks);
|
|
43
|
-
const pendingTasks = tasks.filter((task) => task.rec.status === V1_UserApprovalStatus.PENDING);
|
|
44
|
-
const pendingAssignees = Array.from(new Set(pendingTasks.map((task) => task.assignees).flat()));
|
|
45
|
-
setAssignees(pendingAssignees);
|
|
46
|
-
entitlementsStore.contractIdToAssigneesMap.set(dataContract.guid, pendingAssignees);
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
assertErrorThrown(error);
|
|
50
|
-
entitlementsStore.applicationStore.notificationService.notifyError(`Error fetching contract assignees: ${error.message}`);
|
|
51
|
-
}
|
|
52
|
-
finally {
|
|
53
|
-
setLoading(false);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
if (assignees.length === 0) {
|
|
58
|
-
// eslint-disable-next-line no-void
|
|
59
|
-
void fetchAssignees();
|
|
60
|
-
}
|
|
61
|
-
}, [
|
|
62
|
-
assignees.length,
|
|
63
|
-
dataContract,
|
|
64
|
-
entitlementsStore.applicationStore.notificationService,
|
|
65
|
-
entitlementsStore.contractIdToAssigneesMap,
|
|
66
|
-
entitlementsStore.lakehouseContractServerClient,
|
|
67
|
-
token,
|
|
68
|
-
]);
|
|
69
|
-
return loading ? (_jsx(CircularProgress, { size: 20 })) : assignees.length > 0 ? (_jsx(MultiUserRenderer, { userIds: assignees, applicationStore: entitlementsStore.applicationStore, userSearchService: entitlementsStore.marketplaceBaseStore.userSearchService, singleUserClassName: "marketplace-lakehouse-entitlements__grid__user-display" })) : (_jsx(_Fragment, { children: "Unknown" }));
|
|
30
|
+
const { dataContract, entitlementsStore } = props;
|
|
31
|
+
const assignees = (dataContract instanceof V1_LiteDataContractWithUserStatus
|
|
32
|
+
? dataContract.pendingTaskWithAssignees?.assignees.toSorted()
|
|
33
|
+
: dataContract?.sortedAssigneeIds) ?? [];
|
|
34
|
+
return (_jsx(MultiUserRenderer, { userIds: assignees, applicationStore: entitlementsStore.applicationStore, userSearchService: entitlementsStore.marketplaceBaseStore.userSearchService, disableOnClick: true, singleUserClassName: "marketplace-lakehouse-entitlements__grid__user-display" }));
|
|
70
35
|
};
|
|
71
|
-
const TargetUserCellRenderer = observer((props) => {
|
|
72
|
-
const { dataContract, entitlementsStore, token } = props;
|
|
73
|
-
const [targetUsers, setTargetUsers] = useState(entitlementsStore.contractIdToTargetUsersMap.get(dataContract?.guid ?? '') ?? []);
|
|
74
|
-
const [loading, setLoading] = useState(false);
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
const fetchTargetUsers = async () => {
|
|
77
|
-
if (dataContract) {
|
|
78
|
-
setLoading(true);
|
|
79
|
-
try {
|
|
80
|
-
// We try to get the target users from the associated tasks first, since the
|
|
81
|
-
// tasks are what drive the timeline view. If there are no associated tasks,
|
|
82
|
-
// then we use the contract consumer.
|
|
83
|
-
const rawTasks = await entitlementsStore.lakehouseContractServerClient.getContractTasks(dataContract.guid, token);
|
|
84
|
-
const tasks = V1_deserializeTaskResponse(rawTasks);
|
|
85
|
-
const taskTargetUsers = Array.from(new Set(tasks.map((task) => task.rec.consumer)));
|
|
86
|
-
const _targetUsers = taskTargetUsers.length
|
|
87
|
-
? taskTargetUsers
|
|
88
|
-
: dataContract.consumer instanceof V1_AdhocTeam
|
|
89
|
-
? dataContract.consumer.users.map((user) => user.name)
|
|
90
|
-
: [];
|
|
91
|
-
setTargetUsers(_targetUsers);
|
|
92
|
-
entitlementsStore.contractIdToTargetUsersMap.set(dataContract.guid, _targetUsers);
|
|
93
|
-
}
|
|
94
|
-
catch (error) {
|
|
95
|
-
assertErrorThrown(error);
|
|
96
|
-
entitlementsStore.applicationStore.notificationService.notifyError(`Error fetching contract target users: ${error.message}`);
|
|
97
|
-
}
|
|
98
|
-
finally {
|
|
99
|
-
setLoading(false);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
if (targetUsers.length === 0) {
|
|
104
|
-
// eslint-disable-next-line no-void
|
|
105
|
-
void fetchTargetUsers();
|
|
106
|
-
}
|
|
107
|
-
}, [dataContract, entitlementsStore, targetUsers.length, token]);
|
|
108
|
-
return loading ? (_jsx(CircularProgress, { size: 20 })) : targetUsers.length > 0 ? (_jsx(MultiUserRenderer, { userIds: targetUsers, applicationStore: entitlementsStore.applicationStore, userSearchService: entitlementsStore.marketplaceBaseStore.userSearchService, singleUserClassName: "marketplace-lakehouse-entitlements__grid__user-display" })) : (_jsx(_Fragment, { children: "Unknown" }));
|
|
109
|
-
});
|
|
110
36
|
export const EntitlementsPendingContractsDashboard = observer((props) => {
|
|
111
37
|
const { dashboardState } = props;
|
|
112
|
-
const {
|
|
38
|
+
const { allContractsForUser, allContractsCreatedByUser } = dashboardState;
|
|
113
39
|
const marketplaceBaseStore = useLegendMarketplaceBaseStore();
|
|
114
40
|
const auth = useAuth();
|
|
115
|
-
const myPendingContracts = useMemo(() =>
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
!isContractInTerminalState(contract) &&
|
|
120
|
-
!myPendingContracts.includes(contract)) ?? [], [
|
|
121
|
-
allContracts,
|
|
122
|
-
dashboardState.lakehouseEntitlementsStore.applicationStore
|
|
123
|
-
.identityService.currentUser,
|
|
124
|
-
myPendingContracts,
|
|
125
|
-
]);
|
|
41
|
+
const myPendingContracts = useMemo(() => allContractsForUser?.filter((contract) => !isApprovalStatusTerminal(contract.status)) ?? [], [allContractsForUser]);
|
|
42
|
+
const myPendingContractIds = useMemo(() => new Set(myPendingContracts.map((c) => c.contractResultLite.guid)), [myPendingContracts]);
|
|
43
|
+
const pendingContractsForOthers = useMemo(() => allContractsCreatedByUser.filter((contract) => !isContractInTerminalState(contract.contractResultLite) &&
|
|
44
|
+
!myPendingContractIds.has(contract.contractResultLite.guid)), [allContractsCreatedByUser, myPendingContractIds]);
|
|
126
45
|
const [selectedContract, setSelectedContract] = useState();
|
|
127
46
|
const [showForOthers, setShowForOthers] = useState(myPendingContracts.length === 0 && pendingContractsForOthers.length > 0);
|
|
128
47
|
const handleCellClicked = (event) => {
|
|
129
|
-
|
|
130
|
-
event.colDef.colId !== 'requester' &&
|
|
131
|
-
event.colDef.colId !== 'assignees') {
|
|
132
|
-
setSelectedContract(event.data);
|
|
133
|
-
}
|
|
48
|
+
setSelectedContract(event.data?.contractResultLite);
|
|
134
49
|
};
|
|
135
50
|
const defaultColDef = useMemo(() => ({
|
|
136
51
|
minWidth: 50,
|
|
@@ -139,52 +54,11 @@ export const EntitlementsPendingContractsDashboard = observer((props) => {
|
|
|
139
54
|
flex: 1,
|
|
140
55
|
}), []);
|
|
141
56
|
const colDefs = useMemo(() => [
|
|
142
|
-
|
|
143
|
-
colId: 'consumerType',
|
|
144
|
-
headerName: 'Consumer Type',
|
|
145
|
-
cellRenderer: (params) => {
|
|
146
|
-
const consumer = params.data?.consumer;
|
|
147
|
-
const typeName = consumer
|
|
148
|
-
? getOrganizationalScopeTypeName(consumer, dashboardState.lakehouseEntitlementsStore.applicationStore.pluginManager.getApplicationPlugins())
|
|
149
|
-
: undefined;
|
|
150
|
-
const typeDetails = consumer
|
|
151
|
-
? getOrganizationalScopeTypeDetails(consumer, dashboardState.lakehouseEntitlementsStore.applicationStore.pluginManager.getApplicationPlugins())
|
|
152
|
-
: undefined;
|
|
153
|
-
return (_jsxs(_Fragment, { children: [typeName ?? 'Unknown', typeDetails !== undefined && (_jsx(Tooltip, { className: "marketplace-lakehouse-entitlements__grid__consumer-type__tooltip__icon", title: typeDetails, children: _jsx(InfoCircleIcon, {}) }))] }));
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
headerName: 'Target User(s)',
|
|
158
|
-
colId: 'targetUser',
|
|
159
|
-
cellRenderer: (params) => (_jsx(TargetUserCellRenderer, { dataContract: params.data, entitlementsStore: dashboardState.lakehouseEntitlementsStore, token: auth.user?.access_token })),
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
headerName: 'Requester',
|
|
163
|
-
colId: 'requester',
|
|
164
|
-
cellRenderer: (params) => {
|
|
165
|
-
const requester = params.data?.createdBy;
|
|
166
|
-
return requester ? (_jsx(UserRenderer, { userId: requester, applicationStore: marketplaceBaseStore.applicationStore, userSearchService: marketplaceBaseStore.userSearchService, className: "marketplace-lakehouse-entitlements__grid__user-display" })) : (_jsx(_Fragment, { children: "Unknown" }));
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
headerName: 'Target Data Product',
|
|
171
|
-
valueGetter: (params) => {
|
|
172
|
-
return params.data?.resourceId ?? 'Unknown';
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
headerName: 'Target Access Point Group',
|
|
177
|
-
valueGetter: (params) => {
|
|
178
|
-
const accessPointGroup = params.data?.resourceType === V1_ResourceType.ACCESS_POINT_GROUP
|
|
179
|
-
? params.data.accessPointGroup
|
|
180
|
-
: `${params.data?.accessPointGroup ?? 'Unknown'} (${params.data?.resourceType ?? 'Unknown Type'})`;
|
|
181
|
-
return accessPointGroup ?? 'Unknown';
|
|
182
|
-
},
|
|
183
|
-
},
|
|
57
|
+
...getCommonEntitlementsColDefs(dashboardState),
|
|
184
58
|
{
|
|
185
59
|
headerName: 'State',
|
|
186
60
|
valueGetter: (params) => {
|
|
187
|
-
const state = params.data?.state;
|
|
61
|
+
const state = params.data?.contractResultLite.state;
|
|
188
62
|
switch (state) {
|
|
189
63
|
case V1_ContractState.PENDING_DATA_OWNER_APPROVAL:
|
|
190
64
|
return 'Data Owner Approval';
|
|
@@ -197,31 +71,33 @@ export const EntitlementsPendingContractsDashboard = observer((props) => {
|
|
|
197
71
|
},
|
|
198
72
|
{
|
|
199
73
|
headerName: 'Business Justification',
|
|
200
|
-
valueGetter: (p) => p.data?.description,
|
|
74
|
+
valueGetter: (p) => p.data?.contractResultLite.description,
|
|
201
75
|
},
|
|
202
76
|
{
|
|
203
77
|
headerName: 'Assignees',
|
|
204
78
|
colId: 'assignees',
|
|
205
|
-
|
|
79
|
+
valueGetter: (params) => {
|
|
80
|
+
const assignees = (params.data instanceof V1_LiteDataContractWithUserStatus
|
|
81
|
+
? params.data.pendingTaskWithAssignees?.assignees.toSorted()
|
|
82
|
+
: params.data?.sortedAssigneeIds) ?? [];
|
|
83
|
+
return assignees.length > 0 ? assignees.join(', ') : 'Unknown';
|
|
84
|
+
},
|
|
85
|
+
cellRenderer: (params) => (_jsx(AssigneesCellRenderer, { dataContract: params.data, entitlementsStore: dashboardState.lakehouseEntitlementsStore })),
|
|
206
86
|
},
|
|
207
87
|
{
|
|
208
88
|
hide: true,
|
|
209
89
|
headerName: 'Contract ID',
|
|
210
|
-
valueGetter: (p) => p.data?.guid,
|
|
90
|
+
valueGetter: (p) => p.data?.contractResultLite.guid,
|
|
211
91
|
},
|
|
212
|
-
], [
|
|
213
|
-
auth.user?.access_token,
|
|
214
|
-
dashboardState.lakehouseEntitlementsStore,
|
|
215
|
-
marketplaceBaseStore.applicationStore,
|
|
216
|
-
marketplaceBaseStore.userSearchService,
|
|
217
|
-
pendingContracts,
|
|
218
|
-
]);
|
|
92
|
+
], [dashboardState]);
|
|
219
93
|
const gridRowData = useMemo(() => showForOthers
|
|
220
94
|
? [...myPendingContracts, ...pendingContractsForOthers]
|
|
221
95
|
: myPendingContracts, [showForOthers, myPendingContracts, pendingContractsForOthers]);
|
|
222
|
-
return (_jsxs(Box, { className: "marketplace-lakehouse-entitlements__pending-contracts", children: [_jsx(
|
|
96
|
+
return (_jsxs(Box, { className: "marketplace-lakehouse-entitlements__pending-contracts", children: [_jsx(FormGroup, { className: "marketplace-lakehouse-entitlements__pending-contracts__action-btns", children: _jsx(FormControlLabel, { control: dashboardState.fetchingContractsByUserState.isInProgress ? (_jsx(Box, { className: "marketplace-lakehouse-entitlements__pending-contracts__action-btn--loading", children: _jsx(CircularProgress, { size: 20 }) })) : (_jsx(Switch, { checked: showForOthers, onChange: (event) => setShowForOthers(event.target.checked) })), label: "Show my requests for others", title: dashboardState.fetchingContractsByUserState.isInProgress
|
|
97
|
+
? 'Loading requests for others'
|
|
98
|
+
: undefined, disabled: dashboardState.fetchingContractsByUserState.isInProgress, className: "marketplace-lakehouse-entitlements__pending-contracts__action-btn" }) }), _jsx(Box, { className: "marketplace-lakehouse-entitlements__pending-contracts__grid ag-theme-balham", children: _jsx(DataGrid, { rowData: gridRowData, onRowDataUpdated: (params) => {
|
|
223
99
|
params.api.refreshCells({ force: true });
|
|
224
|
-
}, suppressFieldDotNotation: true, suppressContextMenu: false, columnDefs: colDefs, onCellClicked: handleCellClicked, defaultColDef: defaultColDef, rowHeight: 45, overlayNoRowsTemplate: "You have no pending contracts", loading: dashboardState.
|
|
100
|
+
}, suppressFieldDotNotation: true, suppressContextMenu: false, columnDefs: colDefs, onCellClicked: handleCellClicked, defaultColDef: defaultColDef, rowHeight: 45, overlayNoRowsTemplate: "You have no pending contracts", loading: dashboardState.fetchingContractsForUserState.isInProgress, overlayLoadingTemplate: "Loading contracts" }) }), selectedContract !== undefined && (_jsx(EntitlementsDataContractViewer, { open: true, onClose: () => setSelectedContract(undefined), currentViewer: new EntitlementsDataContractViewerState(selectedContract, undefined, marketplaceBaseStore.applicationStore, marketplaceBaseStore.lakehouseContractServerClient, new GraphManagerState(marketplaceBaseStore.applicationStore.pluginManager, marketplaceBaseStore.applicationStore.logService), marketplaceBaseStore.userSearchService), onRefresh: async () => {
|
|
225
101
|
await flowResult(dashboardState.updateContract(selectedContract.guid, auth.user?.access_token));
|
|
226
102
|
}, getContractTaskUrl: (contractId, taskId) => marketplaceBaseStore.applicationStore.navigationService.navigator.generateAddress(generateContractPagePath(contractId, taskId)), getDataProductUrl: (dataProductId, deploymentId) => marketplaceBaseStore.applicationStore.navigationService.navigator.generateAddress(generateLakehouseDataProductPath(dataProductId, deploymentId)) }))] }));
|
|
227
103
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntitlementsPendingContractsDashboard.js","sourceRoot":"","sources":["../../../../src/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,QAAQ,GAIT,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,GAAG,EACH,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sEAAsE,CAAC;AACrH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,8BAA8B,EAC9B,iCAAiC,EACjC,YAAY,EACZ,8BAA8B,EAC9B,mCAAmC,GACpC,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BAAgB,CAAC,IAAI,EACrB,IAAI,CAAC,IAAI,EAAE,YAAY,CACxB,CACF,CAAC;gBACJ,CAAC,EACD,kBAAkB,EAAE,CAAC,UAAkB,EAAE,MAAc,EAAE,EAAE,CACzD,oBAAoB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,eAAe,CAC/E,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC,CAC7C,EAEH,iBAAiB,EAAE,CAAC,aAAqB,EAAE,YAAoB,EAAE,EAAE,CACjE,oBAAoB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,eAAe,CAC/E,gCAAgC,CAAC,aAAa,EAAE,YAAY,CAAC,CAC9D,GAEH,CACH,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"EntitlementsPendingContractsDashboard.js","sourceRoot":"","sources":["../../../../src/pages/Lakehouse/entitlements/EntitlementsPendingContractsDashboard.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAEhB,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,QAAQ,GAIT,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,GAAG,EACH,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sEAAsE,CAAC;AACrH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,8BAA8B,EAC9B,mCAAmC,EACnC,wBAAwB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
|
-
{"version":3,"file":"EntitlementsPendingTasksDashboard.d.ts","sourceRoot":"","sources":["../../../../src/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAqCH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sEAAsE,CAAC;
|
|
1
|
+
{"version":3,"file":"EntitlementsPendingTasksDashboard.d.ts","sourceRoot":"","sources":["../../../../src/pages/Lakehouse/entitlements/EntitlementsPendingTasksDashboard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAqCH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sEAAsE,CAAC;AA6MvH,eAAO,MAAM,iCAAiC,WACpC;IAAE,cAAc,EAAE,0BAA0B,CAAA;CAAE,KAAG,KAAK,CAAC,SAAS;;CA2oBzE,CAAC"}
|
|
@@ -28,8 +28,9 @@ import { startCase } from '@finos/legend-shared';
|
|
|
28
28
|
import { UserRenderer, getOrganizationalScopeTypeName, getOrganizationalScopeTypeDetails, EntitlementsDataContractViewer, EntitlementsDataContractViewerState, } from '@finos/legend-extension-dsl-data-product';
|
|
29
29
|
import { generateContractPagePath, generateLakehouseDataProductPath, } from '../../../__lib__/LegendMarketplaceNavigation.js';
|
|
30
30
|
import { CONTRACT_ACTION, LegendMarketplaceTelemetryHelper, } from '../../../__lib__/LegendMarketplaceTelemetryHelper.js';
|
|
31
|
+
import { formatOrderDate } from '../../../stores/orders/OrderHelpers.js';
|
|
31
32
|
const EntitlementsDashboardActionModal = (props) => {
|
|
32
|
-
const { open, selectedTasks, dashboardState, onClose, action,
|
|
33
|
+
const { open, selectedTasks, dashboardState, onClose, action, pendingTaskContracts, marketplaceBaseStore, } = props;
|
|
33
34
|
const auth = useAuth();
|
|
34
35
|
const [isLoading, setIsLoading] = useState(false);
|
|
35
36
|
const [errorMessages, setErrorMessages] = useState([]);
|
|
@@ -57,7 +58,7 @@ const EntitlementsDashboardActionModal = (props) => {
|
|
|
57
58
|
dashboardState.lakehouseEntitlementsStore.applicationStore.notificationService.notifySuccess(`${selectedTasks.length} selected contract requests have been ${action === 'approve' ? 'approved' : 'denied'} successfully.`);
|
|
58
59
|
handleClose();
|
|
59
60
|
LegendMarketplaceTelemetryHelper.logEvent_ActionDataContracts(dashboardState.lakehouseEntitlementsStore.applicationStore
|
|
60
|
-
.telemetryService, selectedTasks,
|
|
61
|
+
.telemetryService, selectedTasks, pendingTaskContracts, action === 'approve'
|
|
61
62
|
? CONTRACT_ACTION.APPROVED
|
|
62
63
|
: CONTRACT_ACTION.DENIED, dashboardState.lakehouseEntitlementsStore.applicationStore
|
|
63
64
|
.identityService.currentUser, undefined);
|
|
@@ -66,7 +67,7 @@ const EntitlementsDashboardActionModal = (props) => {
|
|
|
66
67
|
// If there were errors, we won't close the modal and will show the errors in the modal.
|
|
67
68
|
setErrorMessages(currentErrorMessages);
|
|
68
69
|
LegendMarketplaceTelemetryHelper.logEvent_ActionDataContracts(dashboardState.lakehouseEntitlementsStore.applicationStore
|
|
69
|
-
.telemetryService, selectedTasks,
|
|
70
|
+
.telemetryService, selectedTasks, pendingTaskContracts, action === 'approve'
|
|
70
71
|
? CONTRACT_ACTION.APPROVED
|
|
71
72
|
: CONTRACT_ACTION.DENIED, dashboardState.lakehouseEntitlementsStore.applicationStore
|
|
72
73
|
.identityService.currentUser, currentErrorMessages.map((error) => error[1]));
|
|
@@ -79,7 +80,7 @@ const EntitlementsDashboardActionModal = (props) => {
|
|
|
79
80
|
}
|
|
80
81
|
return (_jsxs(Dialog, { open: open, onClose: handleClose, fullWidth: true, maxWidth: "md", children: [_jsxs(DialogTitle, { children: [action === 'approve' ? 'Approve' : 'Deny', " Contract Requests"] }), _jsxs(DialogContent, { className: "marketplace-lakehouse-entitlements__data-contract-approval__content", children: [_jsx(CubesLoadingIndicator, { isLoading: isLoading, children: _jsx(CubesLoadingIndicatorIcon, {}) }), !isLoading && errorMessages.length === 0 && (_jsxs("div", { children: [action === 'approve' ? 'Approve' : 'Deny', " ", selectedTasks.length, ' ', "selected contract requests"] })), !isLoading && errorMessages.length > 0 && (_jsxs(_Fragment, { children: [successCount > 0 && (_jsxs(Box, { className: "marketplace-lakehouse-entitlements__data-contract-approval__success", children: [successCount, " selected contract requests were", ' ', action === 'approve' ? 'approved' : 'denied', " successfully"] })), errorMessages.map(([task, errorMessage]) => {
|
|
81
82
|
const contractId = task.dataContractId;
|
|
82
|
-
const contract =
|
|
83
|
+
const contract = pendingTaskContracts.find((c) => c.guid === contractId);
|
|
83
84
|
return (_jsxs(Box, { className: "marketplace-lakehouse-entitlements__data-contract-approval__error", children: [_jsxs("div", { className: "marketplace-lakehouse-entitlements__data-contract-approval__error__content", children: ["Encountered an error", ' ', action === 'approve' ? 'approving' : 'denying', " request for", ' ', _jsx("div", { className: "marketplace-lakehouse-entitlements__data-contract-approval__error__user", children: _jsx(UserRenderer, { userId: task.consumer, applicationStore: marketplaceBaseStore.applicationStore, userSearchService: marketplaceBaseStore.userSearchService }) }), ' ', "for ", startCase(contract?.resourceType.toLowerCase()), ' ', _jsx("span", { className: "marketplace-lakehouse-text__emphasis", children: contract?.accessPointGroup }), ' ', "on Data Product", ' ', _jsx("span", { className: "marketplace-lakehouse-text__emphasis", children: contract?.resourceId }), ":"] }), _jsx("div", { children: _jsx("code", { children: errorMessage }) })] }, task.taskId));
|
|
84
85
|
})] }))] }), _jsxs(DialogActions, { children: [_jsxs(Button, { onClick: () => {
|
|
85
86
|
// eslint-disable-next-line no-void
|
|
@@ -89,13 +90,13 @@ const EntitlementsDashboardActionModal = (props) => {
|
|
|
89
90
|
export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
90
91
|
// State and props
|
|
91
92
|
const { dashboardState } = props;
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const privilegeManagerTasks = useMemo(() =>
|
|
95
|
-
const dataOwnerTasks = useMemo(() =>
|
|
96
|
-
const otherTasks = useMemo(() =>
|
|
97
|
-
!dataOwnerTasks.includes(task)) ?? [], [dataOwnerTasks, privilegeManagerTasks,
|
|
98
|
-
const loading = dashboardState.
|
|
93
|
+
const pendingTasks = dashboardState.pendingTasks;
|
|
94
|
+
const pendingTaskContracts = dashboardState.pendingTaskContracts;
|
|
95
|
+
const privilegeManagerTasks = useMemo(() => pendingTasks?.filter((task) => task.type === V1_ApprovalType.CONSUMER_PRIVILEGE_MANAGER_APPROVAL) ?? [], [pendingTasks]);
|
|
96
|
+
const dataOwnerTasks = useMemo(() => pendingTasks?.filter((task) => task.type === V1_ApprovalType.DATA_OWNER_APPROVAL) ?? [], [pendingTasks]);
|
|
97
|
+
const otherTasks = useMemo(() => pendingTasks?.filter((task) => !privilegeManagerTasks.includes(task) &&
|
|
98
|
+
!dataOwnerTasks.includes(task)) ?? [], [dataOwnerTasks, privilegeManagerTasks, pendingTasks]);
|
|
99
|
+
const loading = dashboardState.fetchingPendingTasksState.isInProgress;
|
|
99
100
|
const marketplaceBaseStore = useLegendMarketplaceBaseStore();
|
|
100
101
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
101
102
|
const [selectedAction, setSelectedAction] = useState();
|
|
@@ -105,13 +106,13 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
105
106
|
const auth = useAuth();
|
|
106
107
|
// Effects
|
|
107
108
|
useEffect(() => {
|
|
108
|
-
if (dashboardState.
|
|
109
|
+
if (dashboardState.fetchingPendingTasksState.hasCompleted) {
|
|
109
110
|
setSelectedTaskIdsSet((prev) => {
|
|
110
111
|
const selectedArray = Array.from(prev.values());
|
|
111
|
-
return new Set(selectedArray.filter((taskId) =>
|
|
112
|
+
return new Set(selectedArray.filter((taskId) => pendingTasks?.map((task) => task.taskId).includes(taskId)));
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
}, [dashboardState.
|
|
115
|
+
}, [dashboardState.fetchingPendingTasksState.hasCompleted, pendingTasks]);
|
|
115
116
|
useEffect(() => {
|
|
116
117
|
setSearchParams((params) => {
|
|
117
118
|
if (selectedTaskIdsSet.size === 0) {
|
|
@@ -134,10 +135,8 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
134
135
|
event.api.setNodesSelected({ nodes: nodesToSelect, newValue: true });
|
|
135
136
|
};
|
|
136
137
|
const handleCellClicked = (event) => {
|
|
137
|
-
if (event.colDef.colId !== 'selection'
|
|
138
|
-
|
|
139
|
-
event.colDef.colId !== 'requester') {
|
|
140
|
-
const contract = allContracts?.find((_contract) => _contract.guid === event.data?.dataContractId);
|
|
138
|
+
if (event.colDef.colId !== 'selection') {
|
|
139
|
+
const contract = pendingTaskContracts.find((c) => c.guid === event.data?.dataContractId);
|
|
141
140
|
setSelectedContract(contract);
|
|
142
141
|
setSelectedContractTargetUser(event.data?.consumer);
|
|
143
142
|
}
|
|
@@ -192,18 +191,23 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
192
191
|
}, [selectedTaskIdsSet]);
|
|
193
192
|
const colDefs = useMemo(() => [
|
|
194
193
|
{
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
resizable: true,
|
|
198
|
-
headerName: 'Action Date',
|
|
199
|
-
flex: 1,
|
|
194
|
+
headerName: 'Date Created',
|
|
195
|
+
colId: 'dateCreated',
|
|
200
196
|
valueGetter: (params) => {
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
197
|
+
const contractId = params.data?.dataContractId;
|
|
198
|
+
const createdAt = pendingTaskContracts.find((c) => c.guid === contractId)?.createdAt;
|
|
199
|
+
return formatOrderDate(createdAt) ?? 'Unknown';
|
|
200
|
+
},
|
|
201
|
+
sortable: true,
|
|
202
|
+
sort: 'desc',
|
|
203
|
+
comparator: (_, __, val1, val2) => {
|
|
204
|
+
const contractId1 = val1.data?.dataContractId;
|
|
205
|
+
const contractId2 = val2.data?.dataContractId;
|
|
206
|
+
const createdAt1 = pendingTaskContracts.find((c) => c.guid === contractId1)?.createdAt;
|
|
207
|
+
const createdAt2 = pendingTaskContracts.find((c) => c.guid === contractId2)?.createdAt;
|
|
208
|
+
const dateA = createdAt1 ? new Date(createdAt1).getTime() : 0;
|
|
209
|
+
const dateB = createdAt2 ? new Date(createdAt2).getTime() : 0;
|
|
210
|
+
return dateA - dateB;
|
|
207
211
|
},
|
|
208
212
|
},
|
|
209
213
|
{
|
|
@@ -213,9 +217,17 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
213
217
|
colId: 'consumerType',
|
|
214
218
|
headerName: 'Consumer Type',
|
|
215
219
|
flex: 1,
|
|
220
|
+
valueGetter: (params) => {
|
|
221
|
+
const contractId = params.data?.dataContractId;
|
|
222
|
+
const consumer = pendingTaskContracts.find((c) => c.guid === contractId)?.consumer;
|
|
223
|
+
const typeName = consumer
|
|
224
|
+
? getOrganizationalScopeTypeName(consumer, dashboardState.lakehouseEntitlementsStore.applicationStore.pluginManager.getApplicationPlugins())
|
|
225
|
+
: undefined;
|
|
226
|
+
return typeName ?? 'Unknown';
|
|
227
|
+
},
|
|
216
228
|
cellRenderer: (params) => {
|
|
217
229
|
const contractId = params.data?.dataContractId;
|
|
218
|
-
const consumer =
|
|
230
|
+
const consumer = pendingTaskContracts.find((c) => c.guid === contractId)?.consumer;
|
|
219
231
|
const typeName = consumer
|
|
220
232
|
? getOrganizationalScopeTypeName(consumer, dashboardState.lakehouseEntitlementsStore.applicationStore.pluginManager.getApplicationPlugins())
|
|
221
233
|
: undefined;
|
|
@@ -232,8 +244,11 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
232
244
|
colId: 'targetUser',
|
|
233
245
|
headerName: 'Target User',
|
|
234
246
|
flex: 1,
|
|
247
|
+
valueGetter: (params) => {
|
|
248
|
+
return params.data?.consumer ?? 'Unknown';
|
|
249
|
+
},
|
|
235
250
|
cellRenderer: (params) => {
|
|
236
|
-
return (_jsx(UserRenderer, { userId: params.data?.consumer, applicationStore: marketplaceBaseStore.applicationStore, userSearchService: marketplaceBaseStore.userSearchService, className: "marketplace-lakehouse-entitlements__grid__user-display" }));
|
|
251
|
+
return (_jsx(UserRenderer, { userId: params.data?.consumer, applicationStore: marketplaceBaseStore.applicationStore, userSearchService: marketplaceBaseStore.userSearchService, disableOnClick: true, className: "marketplace-lakehouse-entitlements__grid__user-display" }));
|
|
237
252
|
},
|
|
238
253
|
},
|
|
239
254
|
{
|
|
@@ -243,10 +258,15 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
243
258
|
colId: 'requester',
|
|
244
259
|
headerName: 'Requester',
|
|
245
260
|
flex: 1,
|
|
261
|
+
valueGetter: (params) => {
|
|
262
|
+
const contractId = params.data?.dataContractId;
|
|
263
|
+
const requester = pendingTaskContracts.find((c) => c.guid === contractId)?.createdBy;
|
|
264
|
+
return requester ?? 'Unknown';
|
|
265
|
+
},
|
|
246
266
|
cellRenderer: (params) => {
|
|
247
267
|
const contractId = params.data?.dataContractId;
|
|
248
|
-
const requester =
|
|
249
|
-
return requester ? (_jsx(UserRenderer, { userId: requester, applicationStore: marketplaceBaseStore.applicationStore, userSearchService: marketplaceBaseStore.userSearchService, className: "marketplace-lakehouse-entitlements__grid__user-display" })) : (_jsx(_Fragment, { children: "Unknown" }));
|
|
268
|
+
const requester = pendingTaskContracts.find((c) => c.guid === contractId)?.createdBy;
|
|
269
|
+
return requester ? (_jsx(UserRenderer, { userId: requester, applicationStore: marketplaceBaseStore.applicationStore, userSearchService: marketplaceBaseStore.userSearchService, disableOnClick: true, className: "marketplace-lakehouse-entitlements__grid__user-display" })) : (_jsx(_Fragment, { children: "Unknown" }));
|
|
250
270
|
},
|
|
251
271
|
},
|
|
252
272
|
{
|
|
@@ -257,7 +277,7 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
257
277
|
flex: 1,
|
|
258
278
|
valueGetter: (params) => {
|
|
259
279
|
const contractId = params.data?.dataContractId;
|
|
260
|
-
const contract =
|
|
280
|
+
const contract = pendingTaskContracts.find((c) => c.guid === contractId);
|
|
261
281
|
return contract?.resourceId ?? 'Unknown';
|
|
262
282
|
},
|
|
263
283
|
},
|
|
@@ -269,7 +289,7 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
269
289
|
flex: 1,
|
|
270
290
|
valueGetter: (params) => {
|
|
271
291
|
const contractId = params.data?.dataContractId;
|
|
272
|
-
const contract =
|
|
292
|
+
const contract = pendingTaskContracts.find((c) => c.guid === contractId);
|
|
273
293
|
const accessPointGroup = contract?.resourceType === V1_ResourceType.ACCESS_POINT_GROUP
|
|
274
294
|
? contract.accessPointGroup
|
|
275
295
|
: `${contract?.accessPointGroup ?? 'Unknown'} (${contract?.resourceType ?? 'Unknown Type'})`;
|
|
@@ -284,7 +304,7 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
284
304
|
flex: 2,
|
|
285
305
|
valueGetter: (params) => {
|
|
286
306
|
const contractId = params.data?.dataContractId;
|
|
287
|
-
const businessJustification =
|
|
307
|
+
const businessJustification = pendingTaskContracts.find((c) => c.guid === contractId)?.description;
|
|
288
308
|
return businessJustification ?? 'Unknown';
|
|
289
309
|
},
|
|
290
310
|
},
|
|
@@ -298,11 +318,11 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
298
318
|
valueGetter: (params) => params.data?.dataContractId ?? 'Unknown',
|
|
299
319
|
},
|
|
300
320
|
], [
|
|
301
|
-
allContracts,
|
|
302
321
|
dashboardState.lakehouseEntitlementsStore.applicationStore
|
|
303
322
|
.pluginManager,
|
|
304
323
|
marketplaceBaseStore.applicationStore,
|
|
305
324
|
marketplaceBaseStore.userSearchService,
|
|
325
|
+
pendingTaskContracts,
|
|
306
326
|
]);
|
|
307
327
|
const privilegeManagerColDefs = useMemo(() => [
|
|
308
328
|
{
|
|
@@ -366,7 +386,7 @@ export const EntitlementsPendingTasksDashboard = observer((props) => {
|
|
|
366
386
|
params.api.refreshCells({ force: true });
|
|
367
387
|
}, suppressFieldDotNotation: true, suppressContextMenu: false, rowHeight: 45, rowSelection: rowSelection, onFirstDataRendered: handleFirstDataRendered, onCellClicked: handleCellClicked, columnDefs: dataOwnerColDefs, overlayNoRowsTemplate: "You have no contracts to approve as a Data Owner", loading: loading, overlayLoadingTemplate: "Loading contracts" }) })] }), otherTasks.length > 0 && (_jsxs(Box, { className: "marketplace-lakehouse-entitlements__pending-tasks__grid-container", children: [_jsx(Box, { className: "marketplace-lakehouse-entitlements__pending-tasks__grid__header", children: "Other Approvals" }), _jsx(Box, { className: "marketplace-lakehouse-entitlements__pending-tasks__grid ag-theme-balham", children: _jsx(DataGrid, { rowData: otherTasks, onRowDataUpdated: (params) => {
|
|
368
388
|
params.api.refreshCells({ force: true });
|
|
369
|
-
}, suppressFieldDotNotation: true, suppressContextMenu: false, rowHeight: 45, rowSelection: rowSelection, onFirstDataRendered: handleFirstDataRendered, onCellClicked: handleCellClicked, columnDefs: otherTasksColDefs, loading: loading, overlayLoadingTemplate: "Loading contracts" }) })] }))] })] }), _jsx(EntitlementsDashboardActionModal, { open: selectedAction !== undefined, selectedTasks:
|
|
389
|
+
}, suppressFieldDotNotation: true, suppressContextMenu: false, rowHeight: 45, rowSelection: rowSelection, onFirstDataRendered: handleFirstDataRendered, onCellClicked: handleCellClicked, columnDefs: otherTasksColDefs, loading: loading, overlayLoadingTemplate: "Loading contracts" }) })] }))] })] }), _jsx(EntitlementsDashboardActionModal, { open: selectedAction !== undefined, selectedTasks: pendingTasks?.filter((task) => selectedTaskIdsSet.has(task.taskId)) ?? [], dashboardState: dashboardState, onClose: () => setSelectedAction(undefined), action: selectedAction, pendingTaskContracts: pendingTaskContracts, marketplaceBaseStore: marketplaceBaseStore }), selectedContract !== undefined && (_jsx(EntitlementsDataContractViewer, { open: true, onClose: () => setSelectedContract(undefined), currentViewer: new EntitlementsDataContractViewerState(selectedContract, undefined, marketplaceBaseStore.applicationStore, marketplaceBaseStore.lakehouseContractServerClient, new GraphManagerState(marketplaceBaseStore.applicationStore.pluginManager, marketplaceBaseStore.applicationStore.logService), marketplaceBaseStore.userSearchService), onRefresh: async () => {
|
|
370
390
|
await flowResult(dashboardState.updateContract(selectedContract.guid, auth.user?.access_token));
|
|
371
391
|
}, getContractTaskUrl: (contractId, taskId) => marketplaceBaseStore.applicationStore.navigationService.navigator.generateAddress(generateContractPagePath(contractId, taskId)), getDataProductUrl: (dataProductId, deploymentId) => marketplaceBaseStore.applicationStore.navigationService.navigator.generateAddress(generateLakehouseDataProductPath(dataProductId, deploymentId)), initialSelectedUser: selectedContractTargetUser }))] }));
|
|
372
392
|
});
|