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,24 @@
|
|
|
1
|
+
import ConstructionIcon from '@mui/icons-material/Construction';
|
|
2
|
+
import { React } from 'react';
|
|
3
|
+
import { Box, Typography } from '@mui/material';
|
|
4
|
+
|
|
5
|
+
export function UnderConstruction() {
|
|
6
|
+
return (
|
|
7
|
+
<Box
|
|
8
|
+
sx={{
|
|
9
|
+
boxShadow: '2',
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
height: '100%',
|
|
13
|
+
width: '100%',
|
|
14
|
+
justifyContent: 'start',
|
|
15
|
+
padding: '5rem',
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<ConstructionIcon sx={{ fontSize: '10rem', width: '100%' }}></ConstructionIcon>
|
|
19
|
+
<Typography sx={{ fontSize: 'larger', textAlign: 'center' }}>
|
|
20
|
+
Page under construction
|
|
21
|
+
</Typography>
|
|
22
|
+
</Box>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { useState, React, useCallback } from 'react';
|
|
2
|
+
import { Badge, Box, Button, Menu, MenuItem, Divider, Typography } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
import FactCheckOutlinedIcon from '@mui/icons-material/FactCheckOutlined';
|
|
5
|
+
import PortraitIcon from '@mui/icons-material/Portrait';
|
|
6
|
+
import ManageAccountsOutlinedIcon from '@mui/icons-material/ManageAccountsOutlined';
|
|
7
|
+
import ReviewsOutlinedIcon from '@mui/icons-material/ReviewsOutlined';
|
|
8
|
+
|
|
9
|
+
export function UserMenu({
|
|
10
|
+
userInfo,
|
|
11
|
+
openSelfService,
|
|
12
|
+
events2Rate,
|
|
13
|
+
events2Approve,
|
|
14
|
+
openRating,
|
|
15
|
+
openApproval,
|
|
16
|
+
}) {
|
|
17
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
18
|
+
const open = Boolean(anchorEl);
|
|
19
|
+
const handleClick = useCallback(
|
|
20
|
+
(event) => {
|
|
21
|
+
setAnchorEl(event.currentTarget);
|
|
22
|
+
},
|
|
23
|
+
[anchorEl],
|
|
24
|
+
),
|
|
25
|
+
handleSelfService = () => {
|
|
26
|
+
openSelfService();
|
|
27
|
+
handleClose();
|
|
28
|
+
},
|
|
29
|
+
handleClose = () => {
|
|
30
|
+
setAnchorEl(null);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Box>
|
|
35
|
+
<Button
|
|
36
|
+
className="user-menu-button"
|
|
37
|
+
aria-controls={open ? 'demo-customized-menu' : undefined}
|
|
38
|
+
aria-haspopup="true"
|
|
39
|
+
aria-expanded={open ? 'true' : undefined}
|
|
40
|
+
variant="outline"
|
|
41
|
+
color="secondary"
|
|
42
|
+
disableElevation
|
|
43
|
+
endIcon={
|
|
44
|
+
<Badge
|
|
45
|
+
anchorOrigin={{
|
|
46
|
+
vertical: 'top',
|
|
47
|
+
horizontal: 'right',
|
|
48
|
+
}}
|
|
49
|
+
badgeContent={events2Rate.length + (userInfo.isNFP ? events2Approve.length : 0)}
|
|
50
|
+
color="error"
|
|
51
|
+
>
|
|
52
|
+
<PortraitIcon color="secondary.main" />
|
|
53
|
+
</Badge>
|
|
54
|
+
}
|
|
55
|
+
onClick={handleClick}
|
|
56
|
+
>
|
|
57
|
+
{userInfo.displayName}
|
|
58
|
+
</Button>
|
|
59
|
+
<Menu
|
|
60
|
+
id="demo-customized-menu"
|
|
61
|
+
MenuListProps={{
|
|
62
|
+
'aria-labelledby': 'demo-customized-button',
|
|
63
|
+
}}
|
|
64
|
+
PaperProps={{
|
|
65
|
+
style: {
|
|
66
|
+
width: 300,
|
|
67
|
+
},
|
|
68
|
+
}}
|
|
69
|
+
anchorEl={anchorEl}
|
|
70
|
+
open={open}
|
|
71
|
+
onClose={handleClose}
|
|
72
|
+
>
|
|
73
|
+
<MenuItem className="menu-item" onClick={handleSelfService} disableRipple>
|
|
74
|
+
<ManageAccountsOutlinedIcon color="primary" className="menu-icon" />
|
|
75
|
+
Edit my profile
|
|
76
|
+
</MenuItem>
|
|
77
|
+
{!!events2Rate?.length && <Divider sx={{ my: 0.5 }} />}
|
|
78
|
+
{!!events2Rate?.length && (
|
|
79
|
+
<MenuItem sx={{ pointerEvents: 'none' }} className="menu-item" disableRipple>
|
|
80
|
+
<ReviewsOutlinedIcon color="primary" className="menu-icon" />
|
|
81
|
+
Rate Event
|
|
82
|
+
</MenuItem>
|
|
83
|
+
)}
|
|
84
|
+
{events2Rate.map((e) => (
|
|
85
|
+
<MenuItem key={e.id} onClick={() => openRating(e)} disableRipple>
|
|
86
|
+
<Typography className="grid-text" variant="inherit" noWrap>
|
|
87
|
+
{e.Title}
|
|
88
|
+
</Typography>
|
|
89
|
+
</MenuItem>
|
|
90
|
+
))}
|
|
91
|
+
{userInfo.isNFP && !!events2Approve?.length && <Divider sx={{ my: 0.5 }} />}
|
|
92
|
+
{userInfo.isNFP && !!events2Approve?.length && (
|
|
93
|
+
<MenuItem sx={{ pointerEvents: 'none' }} className="menu-item" disableRipple>
|
|
94
|
+
<FactCheckOutlinedIcon className="menu-icon" />
|
|
95
|
+
For NFP Approval
|
|
96
|
+
</MenuItem>
|
|
97
|
+
)}
|
|
98
|
+
{userInfo.isNFP &&
|
|
99
|
+
events2Approve.map((e) => (
|
|
100
|
+
<MenuItem key={e.id} onClick={() => openApproval(e)} disableRipple>
|
|
101
|
+
<Typography className="grid-text" variant="inherit" noWrap>
|
|
102
|
+
{e.Title}
|
|
103
|
+
</Typography>
|
|
104
|
+
</MenuItem>
|
|
105
|
+
))}
|
|
106
|
+
</Menu>
|
|
107
|
+
</Box>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { React, useState, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Backdrop,
|
|
4
|
+
CircularProgress,
|
|
5
|
+
Box,
|
|
6
|
+
ListItem,
|
|
7
|
+
ListItemIcon,
|
|
8
|
+
ListItemText,
|
|
9
|
+
ListItemButton,
|
|
10
|
+
} from '@mui/material';
|
|
11
|
+
|
|
12
|
+
import Constants from '../../data/constants.json';
|
|
13
|
+
import LoopIcon from '@mui/icons-material/Loop';
|
|
14
|
+
import FastForwardOutlinedIcon from '@mui/icons-material/FastForwardOutlined';
|
|
15
|
+
import HistoryOutlinedIcon from '@mui/icons-material/HistoryOutlined';
|
|
16
|
+
import { ConsultationList } from './ConsultationList';
|
|
17
|
+
import { EventList } from './EventList';
|
|
18
|
+
import { getConsultations, getMeetings } from '../../data/sharepointProvider';
|
|
19
|
+
import CustomDrawer from '../CustomDrawer';
|
|
20
|
+
|
|
21
|
+
export function Activity({ userInfo, configuration, setData4Menu, openRating, openApproval }) {
|
|
22
|
+
const [tabsValue, setTabsValue] = useState(0),
|
|
23
|
+
[pastMeetings, setPastMeetings] = useState([]),
|
|
24
|
+
[currentMeetings, setCurrentMeetings] = useState([]),
|
|
25
|
+
[upcomingMeetings, setUpcomingMeetings] = useState([]),
|
|
26
|
+
[openConsultations, setOpenConsultations] = useState([]),
|
|
27
|
+
[reviewConsultations, setReviewConsultations] = useState([]),
|
|
28
|
+
[finalisedConsultations, setFinalisedConsultations] = useState([]),
|
|
29
|
+
[openSurveys, setOpenSurveys] = useState([]),
|
|
30
|
+
[reviewSurveys, setReviewSurveys] = useState([]),
|
|
31
|
+
[finalisedSurveys, setFinalisedSurveys] = useState([]),
|
|
32
|
+
[loading, setloading] = useState(false);
|
|
33
|
+
|
|
34
|
+
const drawerOptions = (
|
|
35
|
+
<div>
|
|
36
|
+
<ListItem disablePadding className="list-item" key={0}>
|
|
37
|
+
<ListItemText
|
|
38
|
+
className="list-item-text"
|
|
39
|
+
primary={'EVENTS'}
|
|
40
|
+
sx={{ color: 'primary.main' }}
|
|
41
|
+
/>
|
|
42
|
+
</ListItem>
|
|
43
|
+
<ListItem disablePadding className="list-item" key={1}>
|
|
44
|
+
<ListItemButton
|
|
45
|
+
className={'list-item-button ' + (tabsValue == 0 ? ' drawer-item-selected' : '')}
|
|
46
|
+
onClick={() => setTabsValue(0)}
|
|
47
|
+
>
|
|
48
|
+
<ListItemIcon className="list-item-icon">
|
|
49
|
+
<LoopIcon />
|
|
50
|
+
</ListItemIcon>
|
|
51
|
+
<ListItemText primary={'Ongoing(' + currentMeetings.length + ')'} />
|
|
52
|
+
</ListItemButton>
|
|
53
|
+
</ListItem>
|
|
54
|
+
<ListItem disablePadding className="list-item" key={2}>
|
|
55
|
+
<ListItemButton
|
|
56
|
+
className={'list-item-button ' + (tabsValue == 1 ? ' drawer-item-selected' : '')}
|
|
57
|
+
onClick={() => setTabsValue(1)}
|
|
58
|
+
>
|
|
59
|
+
<ListItemIcon className="list-item-icon">
|
|
60
|
+
<FastForwardOutlinedIcon />
|
|
61
|
+
</ListItemIcon>
|
|
62
|
+
<ListItemText primary={'Upcoming(' + upcomingMeetings.length + ')'} />
|
|
63
|
+
</ListItemButton>
|
|
64
|
+
</ListItem>
|
|
65
|
+
<ListItem disablePadding className="list-item" key={3}>
|
|
66
|
+
<ListItemButton
|
|
67
|
+
className={'list-item-button ' + (tabsValue == 2 ? ' drawer-item-selected' : '')}
|
|
68
|
+
onClick={() => setTabsValue(2)}
|
|
69
|
+
>
|
|
70
|
+
<ListItemIcon className="list-item-icon">
|
|
71
|
+
<HistoryOutlinedIcon />
|
|
72
|
+
</ListItemIcon>
|
|
73
|
+
<ListItemText primary={'Past(' + pastMeetings.length + ')'} />
|
|
74
|
+
</ListItemButton>
|
|
75
|
+
</ListItem>
|
|
76
|
+
<ListItem disablePadding className="list-item" key={4}>
|
|
77
|
+
<ListItemText
|
|
78
|
+
className="list-item-text"
|
|
79
|
+
primary={'CONSULTATIONS'}
|
|
80
|
+
sx={{ color: 'primary.main' }}
|
|
81
|
+
/>
|
|
82
|
+
</ListItem>
|
|
83
|
+
<ListItem disablePadding className="list-item" key={5}>
|
|
84
|
+
<ListItemButton
|
|
85
|
+
className={'list-item-button ' + (tabsValue == 3 ? ' drawer-item-selected' : '')}
|
|
86
|
+
onClick={() => setTabsValue(3)}
|
|
87
|
+
>
|
|
88
|
+
<ListItemIcon className="list-item-icon">
|
|
89
|
+
<LoopIcon />
|
|
90
|
+
</ListItemIcon>
|
|
91
|
+
<ListItemText primary={'Open (' + openConsultations.length + ')'} />
|
|
92
|
+
</ListItemButton>
|
|
93
|
+
</ListItem>
|
|
94
|
+
<ListItem disablePadding className="list-item" key={6}>
|
|
95
|
+
<ListItemButton
|
|
96
|
+
className={'list-item-button ' + (tabsValue == 4 ? ' drawer-item-selected' : '')}
|
|
97
|
+
onClick={() => setTabsValue(4)}
|
|
98
|
+
>
|
|
99
|
+
<ListItemIcon className="list-item-icon">
|
|
100
|
+
<FastForwardOutlinedIcon />
|
|
101
|
+
</ListItemIcon>
|
|
102
|
+
<ListItemText primary={'Review(' + reviewConsultations.length + ')'} />
|
|
103
|
+
</ListItemButton>
|
|
104
|
+
</ListItem>
|
|
105
|
+
<ListItem disablePadding className="list-item" key={7}>
|
|
106
|
+
<ListItemButton
|
|
107
|
+
className={'list-item-button ' + (tabsValue == 5 ? ' drawer-item-selected' : '')}
|
|
108
|
+
onClick={() => setTabsValue(5)}
|
|
109
|
+
>
|
|
110
|
+
<ListItemIcon className="list-item-icon">
|
|
111
|
+
<HistoryOutlinedIcon />
|
|
112
|
+
</ListItemIcon>
|
|
113
|
+
<ListItemText primary={'Finalised(' + finalisedConsultations.length + ')'} />
|
|
114
|
+
</ListItemButton>
|
|
115
|
+
</ListItem>
|
|
116
|
+
<ListItem disablePadding className="list-item" key={8}>
|
|
117
|
+
<ListItemText
|
|
118
|
+
className="list-item-text"
|
|
119
|
+
primary={'INQUIRIES'}
|
|
120
|
+
sx={{ color: 'primary.main' }}
|
|
121
|
+
/>
|
|
122
|
+
</ListItem>
|
|
123
|
+
<ListItem disablePadding className="list-item" key={9}>
|
|
124
|
+
<ListItemButton
|
|
125
|
+
className={'list-item-button ' + (tabsValue == 6 ? ' drawer-item-selected' : '')}
|
|
126
|
+
onClick={() => setTabsValue(6)}
|
|
127
|
+
>
|
|
128
|
+
<ListItemIcon className="list-item-icon">
|
|
129
|
+
<LoopIcon />
|
|
130
|
+
</ListItemIcon>
|
|
131
|
+
<ListItemText primary={'Open(' + openSurveys.length + ')'} />
|
|
132
|
+
</ListItemButton>
|
|
133
|
+
</ListItem>
|
|
134
|
+
<ListItem disablePadding className="list-item" key={10}>
|
|
135
|
+
<ListItemButton
|
|
136
|
+
className={'list-item-button ' + (tabsValue == 7 ? ' drawer-item-selected' : '')}
|
|
137
|
+
onClick={() => setTabsValue(7)}
|
|
138
|
+
>
|
|
139
|
+
<ListItemIcon className="list-item-icon">
|
|
140
|
+
<FastForwardOutlinedIcon />
|
|
141
|
+
</ListItemIcon>
|
|
142
|
+
<ListItemText primary={'Review(' + reviewSurveys.length + ')'} />
|
|
143
|
+
</ListItemButton>
|
|
144
|
+
</ListItem>
|
|
145
|
+
<ListItem disablePadding className="list-item" key={11}>
|
|
146
|
+
<ListItemButton
|
|
147
|
+
className={'list-item-button ' + (tabsValue == 8 ? ' drawer-item-selected' : '')}
|
|
148
|
+
onClick={() => setTabsValue(8)}
|
|
149
|
+
>
|
|
150
|
+
<ListItemIcon className="list-item-icon">
|
|
151
|
+
<HistoryOutlinedIcon />
|
|
152
|
+
</ListItemIcon>
|
|
153
|
+
<ListItemText primary={'Finalised(' + finalisedSurveys.length + ')'} />
|
|
154
|
+
</ListItemButton>
|
|
155
|
+
</ListItem>
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
//get old data according to configuration. 24 months if no configuration made
|
|
160
|
+
const monthsBehind = configuration.DashboardNumberOfMonthsData || 24;
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
(async () => {
|
|
163
|
+
setloading(true);
|
|
164
|
+
|
|
165
|
+
let fromDate = new Date();
|
|
166
|
+
fromDate.setMonth(fromDate.getMonth() - monthsBehind);
|
|
167
|
+
|
|
168
|
+
const loadedMeetings = await getMeetings(fromDate, userInfo.country, userInfo),
|
|
169
|
+
loadedConsultations = await getConsultations(undefined, fromDate, userInfo.country);
|
|
170
|
+
|
|
171
|
+
if (loadedMeetings) {
|
|
172
|
+
setCurrentMeetings(
|
|
173
|
+
loadedMeetings.filter((c) => {
|
|
174
|
+
return c.IsCurrent;
|
|
175
|
+
}),
|
|
176
|
+
);
|
|
177
|
+
setUpcomingMeetings(
|
|
178
|
+
loadedMeetings.filter((c) => {
|
|
179
|
+
return c.IsUpcoming;
|
|
180
|
+
}),
|
|
181
|
+
);
|
|
182
|
+
setPastMeetings(
|
|
183
|
+
loadedMeetings.filter((c) => {
|
|
184
|
+
return c.IsPast;
|
|
185
|
+
}),
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
setData4Menu(loadedMeetings);
|
|
190
|
+
|
|
191
|
+
if (loadedConsultations) {
|
|
192
|
+
setOpenConsultations(
|
|
193
|
+
loadedConsultations.filter((c) => {
|
|
194
|
+
return (
|
|
195
|
+
c.ConsultationType == Constants.ConsultationType.Consultation &&
|
|
196
|
+
c.Closed >= new Date()
|
|
197
|
+
);
|
|
198
|
+
}),
|
|
199
|
+
);
|
|
200
|
+
setReviewConsultations(
|
|
201
|
+
loadedConsultations.filter((c) => {
|
|
202
|
+
return (
|
|
203
|
+
c.ConsultationType == Constants.ConsultationType.Consultation &&
|
|
204
|
+
c.Closed < new Date() &&
|
|
205
|
+
c.Deadline >= new Date()
|
|
206
|
+
);
|
|
207
|
+
}),
|
|
208
|
+
);
|
|
209
|
+
setFinalisedConsultations(
|
|
210
|
+
loadedConsultations.filter((c) => {
|
|
211
|
+
return (
|
|
212
|
+
c.ConsultationType == Constants.ConsultationType.Consultation &&
|
|
213
|
+
c.Closed <= new Date() &&
|
|
214
|
+
c.Deadline < new Date()
|
|
215
|
+
);
|
|
216
|
+
}),
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
setOpenSurveys(
|
|
220
|
+
loadedConsultations.filter((c) => {
|
|
221
|
+
return (
|
|
222
|
+
c.ConsultationType == Constants.ConsultationType.Survey && c.Closed >= new Date()
|
|
223
|
+
);
|
|
224
|
+
}),
|
|
225
|
+
);
|
|
226
|
+
setReviewSurveys(
|
|
227
|
+
loadedConsultations.filter((c) => {
|
|
228
|
+
return (
|
|
229
|
+
c.ConsultationType == Constants.ConsultationType.Survey &&
|
|
230
|
+
c.Closed < new Date() &&
|
|
231
|
+
c.Deadline >= new Date()
|
|
232
|
+
);
|
|
233
|
+
}),
|
|
234
|
+
);
|
|
235
|
+
setFinalisedSurveys(
|
|
236
|
+
loadedConsultations.filter((c) => {
|
|
237
|
+
return (
|
|
238
|
+
c.ConsultationType == Constants.ConsultationType.Survey &&
|
|
239
|
+
c.Closed <= new Date() &&
|
|
240
|
+
c.Deadline < new Date()
|
|
241
|
+
);
|
|
242
|
+
}),
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
setloading(false);
|
|
247
|
+
})();
|
|
248
|
+
}, [monthsBehind, userInfo]);
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<div className="main">
|
|
252
|
+
<Box sx={{ overflowY: 'scroll', display: 'flex', paddingTop: '4rem', height: '100%' }}>
|
|
253
|
+
<Backdrop
|
|
254
|
+
sx={{ color: '#6b32a8', zIndex: (theme) => theme.zIndex.drawer + 1 }}
|
|
255
|
+
open={loading}
|
|
256
|
+
>
|
|
257
|
+
<CircularProgress color="primary" />
|
|
258
|
+
</Backdrop>
|
|
259
|
+
<CustomDrawer drawerOptions={drawerOptions}></CustomDrawer>
|
|
260
|
+
<Box sx={{ width: '100%' }}>
|
|
261
|
+
{tabsValue >= 0 && tabsValue <= 2 && (
|
|
262
|
+
<EventList
|
|
263
|
+
userInfo={userInfo}
|
|
264
|
+
configuration={configuration}
|
|
265
|
+
pastMeetings={pastMeetings}
|
|
266
|
+
currentMeetings={currentMeetings}
|
|
267
|
+
upcomingMeetings={upcomingMeetings}
|
|
268
|
+
country={userInfo.country}
|
|
269
|
+
tabsValue={tabsValue}
|
|
270
|
+
openRating={openRating}
|
|
271
|
+
openApproval={openApproval}
|
|
272
|
+
></EventList>
|
|
273
|
+
)}
|
|
274
|
+
{tabsValue >= 3 && tabsValue <= 5 && (
|
|
275
|
+
<ConsultationList
|
|
276
|
+
userInfo={userInfo}
|
|
277
|
+
configuration={configuration}
|
|
278
|
+
openConsultations={openConsultations}
|
|
279
|
+
reviewConsultations={reviewConsultations}
|
|
280
|
+
finalisedConsultations={finalisedConsultations}
|
|
281
|
+
type={Constants.ConsultationType.Consultation}
|
|
282
|
+
tabsValue={tabsValue - 3}
|
|
283
|
+
></ConsultationList>
|
|
284
|
+
)}
|
|
285
|
+
{tabsValue >= 6 && tabsValue <= 8 && (
|
|
286
|
+
<ConsultationList
|
|
287
|
+
userInfo={userInfo}
|
|
288
|
+
configuration={configuration}
|
|
289
|
+
openConsultations={openSurveys}
|
|
290
|
+
reviewConsultations={reviewSurveys}
|
|
291
|
+
finalisedConsultations={finalisedSurveys}
|
|
292
|
+
type={Constants.ConsultationType.Survey}
|
|
293
|
+
tabsValue={tabsValue - 6}
|
|
294
|
+
></ConsultationList>
|
|
295
|
+
)}
|
|
296
|
+
</Box>
|
|
297
|
+
{false && <span>{userInfo.toString()}</span>}
|
|
298
|
+
</Box>
|
|
299
|
+
</div>
|
|
300
|
+
);
|
|
301
|
+
}
|