eionet2-dashboard 1.4.0
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/.fx/configs/azure.parameters.Prod_EEA.json +15 -0
- package/.fx/configs/azure.parameters.dev.json +15 -0
- package/.fx/configs/config.Prod_EEA.json +10 -0
- package/.fx/configs/config.dev.json +10 -0
- package/.fx/configs/projectSettings.json +83 -0
- package/.fx/states/state.Prod_EEA.json +47 -0
- package/.fx/states/state.dev.json +47 -0
- package/.vscode/launch.json +91 -0
- package/.vscode/settings.json +6 -0
- package/.vscode/tasks.json +63 -0
- package/CHANGELOG.md +140 -0
- package/Jenkinsfile +166 -0
- package/LICENSE.md +9 -0
- package/README.md +55 -0
- package/api/.funcignore +11 -0
- package/api/extensions.csproj +11 -0
- package/api/getGraphData/function.json +27 -0
- package/api/getGraphData/index.js +147 -0
- package/api/host.json +11 -0
- package/api/package-lock.json +1546 -0
- package/api/package.json +17 -0
- package/api/proxies.json +4 -0
- package/package.json +25 -0
- package/tabs/.env.teamsfx.Prod_EEA +11 -0
- package/tabs/.env.teamsfx.dev +11 -0
- package/tabs/.eslintrc.json +48 -0
- package/tabs/.prettierrc +7 -0
- package/tabs/.stylelintrc.json +6 -0
- package/tabs/babel.config.js +3 -0
- package/tabs/package-lock.json +15564 -0
- package/tabs/package.json +88 -0
- package/tabs/public/auth-end.html +76 -0
- package/tabs/public/auth-start.html +178 -0
- package/tabs/public/deploy.png +0 -0
- package/tabs/public/favicon.ico +0 -0
- package/tabs/public/hello.png +0 -0
- package/tabs/public/index.html +20 -0
- package/tabs/public/publish.png +0 -0
- package/tabs/src/components/App.jsx +36 -0
- package/tabs/src/components/CustomColumnResizeIcon.jsx +68 -0
- package/tabs/src/components/CustomDrawer.jsx +51 -0
- package/tabs/src/components/EventDialogTitle.jsx +29 -0
- package/tabs/src/components/HtmlBox.jsx +18 -0
- package/tabs/src/components/Privacy.jsx +17 -0
- package/tabs/src/components/ResizableGrid.jsx +44 -0
- package/tabs/src/components/Tab.jsx +477 -0
- package/tabs/src/components/Tab.scss +138 -0
- package/tabs/src/components/TabConfig.jsx +51 -0
- package/tabs/src/components/TabPanel.jsx +29 -0
- package/tabs/src/components/TermsOfUse.jsx +17 -0
- package/tabs/src/components/UnderConstruction.jsx +24 -0
- package/tabs/src/components/UserMenu.jsx +109 -0
- package/tabs/src/components/_variables.scss +10 -0
- package/tabs/src/components/activity/Activity.jsx +301 -0
- package/tabs/src/components/activity/ConsultationList.jsx +297 -0
- package/tabs/src/components/activity/EventList.jsx +463 -0
- package/tabs/src/components/activity/GroupsTags.jsx +26 -0
- package/tabs/src/components/activity/Reporting.jsx +13 -0
- package/tabs/src/components/activity/activity.scss +153 -0
- package/tabs/src/components/event_rating/EventRating.jsx +92 -0
- package/tabs/src/components/event_rating/EventRatingDialog.jsx +46 -0
- package/tabs/src/components/event_registration/Approval.jsx +80 -0
- package/tabs/src/components/event_registration/ApprovalDialog.jsx +30 -0
- package/tabs/src/components/event_registration/ApprovalList.jsx +62 -0
- package/tabs/src/components/event_registration/EventRegistration.jsx +214 -0
- package/tabs/src/components/lib/useData.js +33 -0
- package/tabs/src/components/lib/useGraph.js +39 -0
- package/tabs/src/components/lib/useTeamsFx.js +55 -0
- package/tabs/src/components/my_country/AtAGlance.jsx +151 -0
- package/tabs/src/components/my_country/CountryProgress.jsx +92 -0
- package/tabs/src/components/my_country/DataReporters.jsx +13 -0
- package/tabs/src/components/my_country/GroupView.jsx +54 -0
- package/tabs/src/components/my_country/GroupsBoard.jsx +52 -0
- package/tabs/src/components/my_country/IndicatorCard.jsx +60 -0
- package/tabs/src/components/my_country/ManagementBoard.jsx +109 -0
- package/tabs/src/components/my_country/MyCountry.jsx +186 -0
- package/tabs/src/components/my_country/ProgressGauge.jsx +125 -0
- package/tabs/src/components/my_country/ScientificCommittee.jsx +13 -0
- package/tabs/src/components/my_country/YearlyProgress.jsx +41 -0
- package/tabs/src/components/my_country/my_country.scss +81 -0
- package/tabs/src/components/publications/Publications.jsx +13 -0
- package/tabs/src/components/self_service/UserEdit.jsx +334 -0
- package/tabs/src/components/self_service/UserEdit.scss +107 -0
- package/tabs/src/data/apiProvider.js +153 -0
- package/tabs/src/data/constants.json +7 -0
- package/tabs/src/data/hooks/useConfiguration.js +18 -0
- package/tabs/src/data/icsHelper.js +38 -0
- package/tabs/src/data/messages.json +39 -0
- package/tabs/src/data/provider.js +199 -0
- package/tabs/src/data/selfServiceProvider.js +59 -0
- package/tabs/src/data/selfServiceSharepointProvider.js +68 -0
- package/tabs/src/data/sharepointProvider.js +729 -0
- package/tabs/src/data/validator.js +25 -0
- package/tabs/src/data/validator.test.js +9 -0
- package/tabs/src/index.css +16 -0
- package/tabs/src/index.jsx +6 -0
- package/tabs/src/static/images/teams-icon.svg +1 -0
- package/tabs/src/utils/uiHelper.js +6 -0
- package/templates/appPackage/aad.template.json +133 -0
- package/templates/appPackage/manifest.template.json +58 -0
- package/templates/appPackage/resources/color.png +0 -0
- package/templates/appPackage/resources/outline.png +0 -0
- package/templates/azure/config.bicep +27 -0
- package/templates/azure/main.bicep +20 -0
- package/templates/azure/provision/frontendHosting.bicep +23 -0
- package/templates/azure/provision/function.bicep +82 -0
- package/templates/azure/provision/identity.bicep +14 -0
- package/templates/azure/provision/simpleAuth.bicep +44 -0
- package/templates/azure/provision.bicep +58 -0
- package/templates/azure/teamsFx/function.bicep +76 -0
- package/templates/azure/teamsFx/simpleAuth.bicep +43 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { React, useCallback, useState } from 'react';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { Button, Box, Typography, Link, Dialog, IconButton, Tooltip } from '@mui/material';
|
|
4
|
+
import TaskAltIcon from '@mui/icons-material/TaskAlt';
|
|
5
|
+
import AssignmentIcon from '@mui/icons-material/Assignment';
|
|
6
|
+
import GradingIcon from '@mui/icons-material/Grading';
|
|
7
|
+
|
|
8
|
+
import { GroupsTags } from './GroupsTags';
|
|
9
|
+
import ResizableGrid from '../ResizableGrid';
|
|
10
|
+
|
|
11
|
+
export function ConsultationList({
|
|
12
|
+
userInfo,
|
|
13
|
+
configuration,
|
|
14
|
+
openConsultations,
|
|
15
|
+
reviewConsultations,
|
|
16
|
+
finalisedConsultations,
|
|
17
|
+
type,
|
|
18
|
+
tabsValue,
|
|
19
|
+
}) {
|
|
20
|
+
const [tagsCellOpen, setTagCellOpen] = useState(false),
|
|
21
|
+
[selectedGroups, setSelectedGroups] = useState([]);
|
|
22
|
+
|
|
23
|
+
const renderConsultationTitle = (params) => {
|
|
24
|
+
return (
|
|
25
|
+
<Box>
|
|
26
|
+
{params.row.Linktofolder && (
|
|
27
|
+
<Tooltip title={params.row.Title}>
|
|
28
|
+
<Link
|
|
29
|
+
className="grid-text"
|
|
30
|
+
style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}
|
|
31
|
+
component="button"
|
|
32
|
+
variant="body1"
|
|
33
|
+
onClick={() => {
|
|
34
|
+
params.row.Linktofolder && window.open(params.row.Linktofolder, '_blank');
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
{params.row.Title}
|
|
38
|
+
</Link>
|
|
39
|
+
</Tooltip>
|
|
40
|
+
)}
|
|
41
|
+
|
|
42
|
+
{!params.row.Linktofolder && (
|
|
43
|
+
<Tooltip title={params.row.Title}>
|
|
44
|
+
<Typography
|
|
45
|
+
className="grid-text"
|
|
46
|
+
style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}
|
|
47
|
+
variant="body1"
|
|
48
|
+
component={'span'}
|
|
49
|
+
>
|
|
50
|
+
{params.row.Title}
|
|
51
|
+
</Typography>
|
|
52
|
+
</Tooltip>
|
|
53
|
+
)}
|
|
54
|
+
</Box>
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
renderDocument = (params) => {
|
|
58
|
+
return (
|
|
59
|
+
<Tooltip title="See details">
|
|
60
|
+
<IconButton
|
|
61
|
+
variant="contained"
|
|
62
|
+
color="primary"
|
|
63
|
+
onClick={() => {
|
|
64
|
+
params.row.ItemLink && window.open(params.row.ItemLink, '_blank');
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
<AssignmentIcon></AssignmentIcon>
|
|
68
|
+
</IconButton>
|
|
69
|
+
</Tooltip>
|
|
70
|
+
);
|
|
71
|
+
},
|
|
72
|
+
renderGroupsTags = (params) => {
|
|
73
|
+
return <GroupsTags handleClick={handleCellClick} groups={params.row.EionetGroups || []} />;
|
|
74
|
+
},
|
|
75
|
+
renderStartDate = (params) => {
|
|
76
|
+
let dateFormat = configuration.DateFormatDashboard || 'dd-MMM-yyyy';
|
|
77
|
+
return (
|
|
78
|
+
<Typography className="grid-text" variant="body1" component={'span'}>
|
|
79
|
+
{format(params.row.Startdate, dateFormat)}
|
|
80
|
+
</Typography>
|
|
81
|
+
);
|
|
82
|
+
},
|
|
83
|
+
renderDeadline = (params) => {
|
|
84
|
+
let dateFormat = configuration.DateFormatDashboard || 'dd-MMM-yyyy';
|
|
85
|
+
return (
|
|
86
|
+
<Typography className="grid-text" variant="body1" component={'span'}>
|
|
87
|
+
{format(params.row.Deadline, dateFormat)}
|
|
88
|
+
</Typography>
|
|
89
|
+
);
|
|
90
|
+
},
|
|
91
|
+
renderResults = (params) => {
|
|
92
|
+
if (params.row.LinkToResults) {
|
|
93
|
+
return (
|
|
94
|
+
<Tooltip title={configuration.ConsultationResultsTooltip}>
|
|
95
|
+
<IconButton
|
|
96
|
+
variant="contained"
|
|
97
|
+
color="success"
|
|
98
|
+
onClick={() => {
|
|
99
|
+
params.row.LinkToResults && window.open(params.row.LinkToResults, '_blank');
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
<GradingIcon />
|
|
103
|
+
</IconButton>
|
|
104
|
+
</Tooltip>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
renderCountryResponded = (params) => {
|
|
109
|
+
return (
|
|
110
|
+
<div className="grid-cell-centered">
|
|
111
|
+
{params.row.HasUserCountryResponded && (
|
|
112
|
+
<Tooltip title={configuration.CountryRespondedTooltip}>
|
|
113
|
+
<TaskAltIcon color="success"></TaskAltIcon>
|
|
114
|
+
</Tooltip>
|
|
115
|
+
)}
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
},
|
|
119
|
+
handleCellClick = useCallback(
|
|
120
|
+
(groups) => {
|
|
121
|
+
setTagCellOpen(true);
|
|
122
|
+
setSelectedGroups(groups);
|
|
123
|
+
},
|
|
124
|
+
[tagsCellOpen, selectedGroups],
|
|
125
|
+
),
|
|
126
|
+
handleTagDialogClose = useCallback(() => {
|
|
127
|
+
setTagCellOpen(false);
|
|
128
|
+
}, [tagsCellOpen]);
|
|
129
|
+
|
|
130
|
+
const startDateColumn = {
|
|
131
|
+
field: 'Startdate',
|
|
132
|
+
headerName: 'Launch date',
|
|
133
|
+
width: '100',
|
|
134
|
+
renderCell: renderStartDate,
|
|
135
|
+
},
|
|
136
|
+
titleColumn = {
|
|
137
|
+
field: 'Closed',
|
|
138
|
+
headerName: type,
|
|
139
|
+
flex: 0.75,
|
|
140
|
+
renderCell: renderConsultationTitle,
|
|
141
|
+
},
|
|
142
|
+
documentColumn = {
|
|
143
|
+
field: 'Title',
|
|
144
|
+
headerName: 'Document',
|
|
145
|
+
width: '100',
|
|
146
|
+
align: 'center',
|
|
147
|
+
renderCell: renderDocument,
|
|
148
|
+
},
|
|
149
|
+
groupsColumn = {
|
|
150
|
+
field: 'EionetGroups',
|
|
151
|
+
headerName: 'Eionet groups',
|
|
152
|
+
renderCell: renderGroupsTags,
|
|
153
|
+
flex: 0.5,
|
|
154
|
+
},
|
|
155
|
+
countryRespondedColumn = {
|
|
156
|
+
field: 'HasUserCountryResponded',
|
|
157
|
+
headerName: 'Responded',
|
|
158
|
+
renderCell: renderCountryResponded,
|
|
159
|
+
align: 'center',
|
|
160
|
+
width: '100',
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const getCellColor = (params) => {
|
|
164
|
+
if (params.value < 3) {
|
|
165
|
+
return 'red-cell-text';
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
let openColumns = [];
|
|
170
|
+
openColumns.push(titleColumn);
|
|
171
|
+
openColumns.push(documentColumn);
|
|
172
|
+
openColumns.push(groupsColumn);
|
|
173
|
+
openColumns.push(startDateColumn);
|
|
174
|
+
openColumns.push({
|
|
175
|
+
field: 'DaysLeft',
|
|
176
|
+
headerName: 'Days left',
|
|
177
|
+
width: '100',
|
|
178
|
+
align: 'center',
|
|
179
|
+
cellClassName: (params) => {
|
|
180
|
+
return getCellColor(params);
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
userInfo.country && openColumns.push(countryRespondedColumn);
|
|
184
|
+
|
|
185
|
+
let reviewColumns = [];
|
|
186
|
+
reviewColumns.push(titleColumn);
|
|
187
|
+
reviewColumns.push(documentColumn);
|
|
188
|
+
reviewColumns.push(groupsColumn);
|
|
189
|
+
reviewColumns.push(startDateColumn);
|
|
190
|
+
reviewColumns.push({
|
|
191
|
+
field: 'DaysFinalised',
|
|
192
|
+
headerName: 'Finalised in (days)',
|
|
193
|
+
width: '170',
|
|
194
|
+
align: 'center',
|
|
195
|
+
cellClassName: (params) => {
|
|
196
|
+
return getCellColor(params);
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
userInfo.country && reviewColumns.push(countryRespondedColumn);
|
|
200
|
+
|
|
201
|
+
let finalisedColumns = [];
|
|
202
|
+
finalisedColumns.push(titleColumn);
|
|
203
|
+
finalisedColumns.push(documentColumn);
|
|
204
|
+
finalisedColumns.push(groupsColumn);
|
|
205
|
+
finalisedColumns.push({
|
|
206
|
+
field: 'Deadline',
|
|
207
|
+
headerName: 'Deadline',
|
|
208
|
+
width: '100',
|
|
209
|
+
renderCell: renderDeadline,
|
|
210
|
+
});
|
|
211
|
+
userInfo.country && finalisedColumns.push(countryRespondedColumn);
|
|
212
|
+
finalisedColumns.push({
|
|
213
|
+
field: 'Results',
|
|
214
|
+
headerName: 'Results',
|
|
215
|
+
width: '75',
|
|
216
|
+
align: 'center',
|
|
217
|
+
renderCell: renderResults,
|
|
218
|
+
});
|
|
219
|
+
return (
|
|
220
|
+
<div className="">
|
|
221
|
+
{false && <span>{configuration.toString()}</span>}
|
|
222
|
+
<Box
|
|
223
|
+
sx={{
|
|
224
|
+
boxShadow: 2,
|
|
225
|
+
}}
|
|
226
|
+
>
|
|
227
|
+
<Dialog open={tagsCellOpen} onClose={handleTagDialogClose} maxWidth="xl">
|
|
228
|
+
<GroupsTags groups={selectedGroups} isDialog={true} />
|
|
229
|
+
<Button
|
|
230
|
+
onClick={handleTagDialogClose}
|
|
231
|
+
sx={{ alignSelf: 'end', marginRight: '0.5rem', marginBottom: '0.5rem' }}
|
|
232
|
+
>
|
|
233
|
+
Close
|
|
234
|
+
</Button>
|
|
235
|
+
</Dialog>
|
|
236
|
+
<Box sx={{ display: 'flex', height: '97%', width: '100%' }}>
|
|
237
|
+
{tabsValue == 0 && (
|
|
238
|
+
<ResizableGrid
|
|
239
|
+
rows={openConsultations}
|
|
240
|
+
columns={openColumns}
|
|
241
|
+
hideFooterSelectedRowCount={true}
|
|
242
|
+
pageSizeOptions={[25, 50, 100]}
|
|
243
|
+
initialState={{
|
|
244
|
+
pagination: { paginationModel: { pageSize: 25 } },
|
|
245
|
+
sorting: {
|
|
246
|
+
sortModel: [
|
|
247
|
+
{
|
|
248
|
+
field: 'DaysLeft',
|
|
249
|
+
sort: 'asc',
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
},
|
|
253
|
+
}}
|
|
254
|
+
/>
|
|
255
|
+
)}
|
|
256
|
+
{tabsValue == 1 && (
|
|
257
|
+
<ResizableGrid
|
|
258
|
+
rows={reviewConsultations}
|
|
259
|
+
columns={reviewColumns}
|
|
260
|
+
pageSizeOptions={[25, 50, 100]}
|
|
261
|
+
hideFooterSelectedRowCount={true}
|
|
262
|
+
initialState={{
|
|
263
|
+
sorting: {
|
|
264
|
+
sortModel: [
|
|
265
|
+
{
|
|
266
|
+
field: 'DaysFinalised',
|
|
267
|
+
sort: 'asc',
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
}}
|
|
272
|
+
/>
|
|
273
|
+
)}
|
|
274
|
+
{tabsValue == 2 && (
|
|
275
|
+
<ResizableGrid
|
|
276
|
+
rows={finalisedConsultations}
|
|
277
|
+
columns={finalisedColumns}
|
|
278
|
+
pageSizeOptions={[25, 50, 100]}
|
|
279
|
+
hideFooterSelectedRowCount={true}
|
|
280
|
+
initialState={{
|
|
281
|
+
pagination: { paginationModel: { pageSize: 25 } },
|
|
282
|
+
sorting: {
|
|
283
|
+
sortModel: [
|
|
284
|
+
{
|
|
285
|
+
field: 'Deadline',
|
|
286
|
+
sort: 'desc',
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
}}
|
|
291
|
+
/>
|
|
292
|
+
)}
|
|
293
|
+
</Box>
|
|
294
|
+
</Box>
|
|
295
|
+
</div>
|
|
296
|
+
);
|
|
297
|
+
}
|