eionet2-dashboard 1.7.0 → 1.8.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/CHANGELOG.md +24 -1
- package/README.md +14 -17
- package/api/getGraphData/index.js +1 -1
- package/package.json +2 -2
- package/tabs/package-lock.json +1 -1
- package/tabs/package.json +3 -3
- package/tabs/public/auth-start.html +2 -2
- package/tabs/src/components/CustomColumnResizeIcon.jsx +2 -2
- package/tabs/src/components/Tab.jsx +3 -5
- package/tabs/src/components/activity/Activity.jsx +121 -68
- package/tabs/src/components/activity/ConsultationList.jsx +40 -10
- package/tabs/src/components/activity/PublicationList.jsx +28 -2
- package/tabs/src/components/my_country/AtAGlance.jsx +4 -5
- package/tabs/src/components/my_country/CountryMembers.jsx +97 -0
- package/tabs/src/components/my_country/CountryProgress.jsx +1 -4
- package/tabs/src/components/my_country/FullCircularProgress.jsx +31 -0
- package/tabs/src/components/my_country/ManagementBoard.jsx +3 -5
- package/tabs/src/components/my_country/MyCountry.jsx +47 -12
- package/tabs/src/components/my_country/ProgressGauge.jsx +8 -42
- package/tabs/src/components/my_country/UserCard.jsx +2 -2
- package/tabs/src/components/my_country/YearlyProgress.jsx +1 -1
- package/tabs/src/components/my_country/my_country.scss +5 -0
- package/tabs/src/data/apiProvider.js +2 -2
- package/tabs/src/data/sharepointProvider.js +48 -16
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,30 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [1.
|
|
7
|
+
### [1.8.0](https://github.com/eea/eionet2-dashboard/compare/1.7.1...1.8.0) - 8 December 2023
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: country desk officers( #261011) [Mihai Nicolae - [`fcc8bc2`](https://github.com/eea/eionet2-dashboard/commit/fcc8bc217ef5327ce494fa961599e3f65adfc758)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
15
|
+
- chore: version update [Mihai Nicolae - [`add4060`](https://github.com/eea/eionet2-dashboard/commit/add40609966c03810fc5cfdaf15b0ec2ce986b56)]
|
|
16
|
+
- chore: readme updates [Mihai Nicolae - [`07dc15c`](https://github.com/eea/eionet2-dashboard/commit/07dc15c18f018c8d077083ba3d9cd22686ecc940)]
|
|
17
|
+
|
|
18
|
+
### [1.7.1](https://github.com/eea/eionet2-dashboard/compare/1.7.0...1.7.1) - 29 November 2023
|
|
19
|
+
|
|
20
|
+
#### :rocket: New Features
|
|
21
|
+
|
|
22
|
+
- feat: ui improvements [Mihai Nicolae - [`822051f`](https://github.com/eea/eionet2-dashboard/commit/822051f21c19ddae4973012a052e1583207af9a9)]
|
|
23
|
+
- feat: add future cons/survery; fixes (#257970) [Mihai Nicolae - [`0f971ad`](https://github.com/eea/eionet2-dashboard/commit/0f971ad96f0539ebafd9061fb7d9d952fe1922c5)]
|
|
24
|
+
|
|
25
|
+
#### :house: Internal changes
|
|
26
|
+
|
|
27
|
+
- chore: version [Mihai Nicolae - [`870064d`](https://github.com/eea/eionet2-dashboard/commit/870064db6a0e5609c41a412f0c51438d6547db19)]
|
|
28
|
+
- chore: version [Mihai Nicolae - [`088ba5d`](https://github.com/eea/eionet2-dashboard/commit/088ba5de1b0738a011dfd0a1364113ed0acdaa13)]
|
|
29
|
+
|
|
30
|
+
### [1.7.0](https://github.com/eea/eionet2-dashboard/compare/1.6.1...1.7.0) - 28 November 2023
|
|
8
31
|
|
|
9
32
|
#### :rocket: New Features
|
|
10
33
|
|
package/README.md
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
+
|
|
1
2
|
# eionet2-dashboard
|
|
2
3
|
|
|
3
4
|
[](https://github.com/eea/eionet2-dashboard/releases)
|
|
4
5
|
|
|
5
|
-
Through this application,
|
|
6
|
+
Through this MS Teams application, Eionet users have access to information regarding:
|
|
6
7
|
- General Eionet activity (events, consultations, surveys, reports)
|
|
7
8
|
- Specific country information (management board, NFPs, ETCs, Eionet groups etc.) - Eionet in my country
|
|
8
9
|
- User account self management
|
|
9
10
|
- Publications
|
|
10
|
-
- Reporting
|
|
11
|
+
- Reporting obligations
|
|
11
12
|
|
|
12
13
|
The application is available to all Eionet 2.0 users.
|
|
13
14
|
The data displayed is retrieved from the EEA Azure tenant and from an internal EEA SharePoint Online instance.
|
|
14
15
|
|
|
15
16
|
### General Eionet activity
|
|
16
17
|
|
|
17
|
-
This functionality is available for all users. In this tab, the users can find information about (and register):
|
|
18
|
+
This functionality is available for all users. In this tab, the users can find information about (and register to):
|
|
18
19
|
- Events (that can be rated).
|
|
19
20
|
- Consultations.
|
|
20
|
-
- The (Admin or NFP) user enters the user attributes (contact data, roles, organizations etc.).
|
|
21
21
|
- Inquiries.
|
|
22
22
|
- Reports.
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
The displayed information is a selected sub-type of the full information list, ordered by (expiration/closing) date. The full list can be accessed from the tab through a link, which will point the user to the corresponding repository folder(s) stored in SharePoint.
|
|
24
25
|
|
|
25
26
|
### Eionet in my country
|
|
26
27
|
|
|
@@ -29,30 +30,26 @@ In its country the user have access to information regarding:
|
|
|
29
30
|
- The management board
|
|
30
31
|
- The number of groups, organisations
|
|
31
32
|
- Information about NFPs, ETCs etc.
|
|
32
|
-
- Specific country information about events, consultations, surveys, reports
|
|
33
|
+
- Specific country information about events, consultations, surveys, reports.
|
|
33
34
|
|
|
34
|
-
###
|
|
35
|
+
### Account self-service
|
|
35
36
|
|
|
36
37
|
This functionality offers users the option to manage/update their data themselves:
|
|
37
|
-
- View current user account data (with the exception of the attributes that can be updated only by an user with a higher authority - Admin or NFP)
|
|
38
|
-
- Update current user account data (with the exception of the attributes that can be updated only by an user with a higher authority - Admin or NFP)
|
|
38
|
+
- View current user account data (with the exception of the attributes that can be updated only by an user with a higher authority - Admin or NFP).
|
|
39
|
+
- Update current user account data (with the exception of the attributes that can be updated only by an user with a higher authority - Admin or NFP).
|
|
39
40
|
|
|
40
41
|
### Publications
|
|
41
42
|
|
|
42
43
|
In this tab the users have access to information about Eionet publications.
|
|
43
44
|
|
|
44
|
-
### Reporting
|
|
45
|
+
### Reporting obligations
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<br/>
|
|
47
|
+
In this tab the users have access to information about Eionet reporting obligations.
|
|
49
48
|
|
|
50
49
|
## Getting started
|
|
51
50
|
|
|
52
|
-
The application is available as a "tab" application in
|
|
53
|
-
When opening this tab, the users will see the Dashboard application, with two sets of tabs, corresponding to the functionalities
|
|
54
|
-
|
|
55
|
-
<br/>
|
|
51
|
+
The application is available as a "tab" application type in MS Teams Eionet 2.0 teams.
|
|
52
|
+
When opening this tab, the users will see the Dashboard application, with two sets of tabs, corresponding to the application functionalities.
|
|
56
53
|
|
|
57
54
|
## Release
|
|
58
55
|
|
|
@@ -100,7 +100,7 @@ module.exports = async function (context, req, teamsfxContext) {
|
|
|
100
100
|
const graphClient = teamsfx.createMicrosoftGraphClient(credential);
|
|
101
101
|
graphClient.config.defaultVersion = 'beta';
|
|
102
102
|
let path = "";
|
|
103
|
-
let result
|
|
103
|
+
let result;
|
|
104
104
|
|
|
105
105
|
let headers = {
|
|
106
106
|
'Content-Type': 'application/json'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eionet2-dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@microsoft/teamsfx-cli": "0.*",
|
|
16
16
|
"jest": "^28.1.0"
|
|
17
17
|
},
|
|
18
|
-
"license": "
|
|
18
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@emotion/react": "^11.8.1",
|
|
21
21
|
"@emotion/styled": "^11.8.1",
|
package/tabs/package-lock.json
CHANGED
package/tabs/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/eionet2-dashboard",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"license": "
|
|
5
|
-
"description": "Teams app for
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
|
+
"description": "MS Teams app for accessing Eionet activity and managing account information.",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/react": "^11.8.2",
|
|
8
8
|
"@emotion/styled": "^11.8.1",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
// y could be 1000, 1001, 1010, 1011 since most significant two bits needs to be 10
|
|
92
92
|
// y values are 8, 9, A, B
|
|
93
93
|
var cryptoObj = window.crypto || window.msCrypto; // for IE 11
|
|
94
|
-
if (cryptoObj
|
|
94
|
+
if (cryptoObj?.getRandomValues) {
|
|
95
95
|
var buffer = new Uint8Array(16);
|
|
96
96
|
cryptoObj.getRandomValues(buffer);
|
|
97
97
|
//buffer[6] and buffer[7] represents the time_hi_and_version field. We will set the four most significant bits (4 through 7) of buffer[6] to represent decimal number 4 (UUID version number).
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
|
|
170
170
|
// Return the base64-urlencoded sha256 hash for the PKCE challenge
|
|
171
171
|
async function pkceChallengeFromVerifier(v) {
|
|
172
|
-
hashed = await sha256(v);
|
|
172
|
+
const hashed = await sha256(v);
|
|
173
173
|
return base64urlencode(hashed);
|
|
174
174
|
}
|
|
175
175
|
</script>
|
|
@@ -30,8 +30,8 @@ export default function CustomColumnResizeIcon({ onWidthChanged, id }) {
|
|
|
30
30
|
|
|
31
31
|
const newWidth = parseInt(initialSize) + parseInt(e.clientX - initialPos);
|
|
32
32
|
if (newWidth > 0) {
|
|
33
|
-
for (let
|
|
34
|
-
const style =
|
|
33
|
+
for (let cell of cells) {
|
|
34
|
+
const style = cell.style;
|
|
35
35
|
style.width = style.minWidth = style.maxWidth = `${newWidth}px`;
|
|
36
36
|
}
|
|
37
37
|
columnHeaderStyle.width =
|
|
@@ -158,7 +158,7 @@ export default function Tab() {
|
|
|
158
158
|
|
|
159
159
|
me.isLoaded = true;
|
|
160
160
|
setSelfInfo(me);
|
|
161
|
-
setIsEionetUser(me
|
|
161
|
+
setIsEionetUser(me?.isEionetUser);
|
|
162
162
|
setLoading(false);
|
|
163
163
|
!!configuration.DashboardVersion &&
|
|
164
164
|
setVersionDialogOpen(configuration.DashboardVersion != version);
|
|
@@ -179,7 +179,7 @@ export default function Tab() {
|
|
|
179
179
|
return userInfo.isLoaded && menuId == 2;
|
|
180
180
|
}, [userInfo, menuId]),
|
|
181
181
|
selfServiceVisible = useCallback(() => {
|
|
182
|
-
return selfInfo
|
|
182
|
+
return selfInfo?.isLoaded && menuId == 4 && isEionetUser;
|
|
183
183
|
}, [selfInfo, menuId, isEionetUser]);
|
|
184
184
|
|
|
185
185
|
const setData4Menu = useCallback(
|
|
@@ -252,9 +252,7 @@ export default function Tab() {
|
|
|
252
252
|
uk: 'gb',
|
|
253
253
|
},
|
|
254
254
|
preProcessCountryCode = (code) => {
|
|
255
|
-
return Object.
|
|
256
|
-
? nonIsoCountryCodes[code]
|
|
257
|
-
: code;
|
|
255
|
+
return Object.hasOwn(nonIsoCountryCodes, code) ? nonIsoCountryCodes[code] : code;
|
|
258
256
|
};
|
|
259
257
|
|
|
260
258
|
return (
|
|
@@ -15,6 +15,8 @@ import Constants from '../../data/constants.json';
|
|
|
15
15
|
import LoopIcon from '@mui/icons-material/Loop';
|
|
16
16
|
import FastForwardOutlinedIcon from '@mui/icons-material/FastForwardOutlined';
|
|
17
17
|
import HistoryOutlinedIcon from '@mui/icons-material/HistoryOutlined';
|
|
18
|
+
import NextPlanOutlinedIcon from '@mui/icons-material/NextPlanOutlined';
|
|
19
|
+
|
|
18
20
|
import { ConsultationList } from './ConsultationList';
|
|
19
21
|
import { EventList } from './EventList';
|
|
20
22
|
import {
|
|
@@ -43,9 +45,11 @@ export function Activity({
|
|
|
43
45
|
[openConsultations, setOpenConsultations] = useState([]),
|
|
44
46
|
[reviewConsultations, setReviewConsultations] = useState([]),
|
|
45
47
|
[finalisedConsultations, setFinalisedConsultations] = useState([]),
|
|
48
|
+
[futureConsultations, setFutureConsultations] = useState([]),
|
|
46
49
|
[openSurveys, setOpenSurveys] = useState([]),
|
|
47
50
|
[reviewSurveys, setReviewSurveys] = useState([]),
|
|
48
51
|
[finalisedSurveys, setFinalisedSurveys] = useState([]),
|
|
52
|
+
[futureSurveys, setFutureSurveys] = useState([]),
|
|
49
53
|
[futurePublications, setFuturePublications] = useState([]),
|
|
50
54
|
[pastPublications, setPastPublications] = useState([]),
|
|
51
55
|
[upcomingObligations, setUpcomingObligations] = useState([]),
|
|
@@ -107,9 +111,9 @@ export function Activity({
|
|
|
107
111
|
onClick={() => setTabsValue(3)}
|
|
108
112
|
>
|
|
109
113
|
<ListItemIcon className="list-item-icon">
|
|
110
|
-
<
|
|
114
|
+
<NextPlanOutlinedIcon />
|
|
111
115
|
</ListItemIcon>
|
|
112
|
-
<ListItemText primary={'
|
|
116
|
+
<ListItemText primary={'Future(' + futureConsultations.length + ')'} />
|
|
113
117
|
</ListItemButton>
|
|
114
118
|
</ListItem>
|
|
115
119
|
<ListItem disablePadding className="list-item" key={6}>
|
|
@@ -118,15 +122,26 @@ export function Activity({
|
|
|
118
122
|
onClick={() => setTabsValue(4)}
|
|
119
123
|
>
|
|
120
124
|
<ListItemIcon className="list-item-icon">
|
|
121
|
-
<
|
|
125
|
+
<LoopIcon />
|
|
122
126
|
</ListItemIcon>
|
|
123
|
-
<ListItemText primary={'
|
|
127
|
+
<ListItemText primary={'Open (' + openConsultations.length + ')'} />
|
|
124
128
|
</ListItemButton>
|
|
125
129
|
</ListItem>
|
|
126
130
|
<ListItem disablePadding className="list-item" key={7}>
|
|
127
131
|
<ListItemButton
|
|
128
132
|
className={'list-item-button ' + (tabsValue == 5 ? ' drawer-item-selected' : '')}
|
|
129
133
|
onClick={() => setTabsValue(5)}
|
|
134
|
+
>
|
|
135
|
+
<ListItemIcon className="list-item-icon">
|
|
136
|
+
<FastForwardOutlinedIcon />
|
|
137
|
+
</ListItemIcon>
|
|
138
|
+
<ListItemText primary={'Review(' + reviewConsultations.length + ')'} />
|
|
139
|
+
</ListItemButton>
|
|
140
|
+
</ListItem>
|
|
141
|
+
<ListItem disablePadding className="list-item" key={8}>
|
|
142
|
+
<ListItemButton
|
|
143
|
+
className={'list-item-button ' + (tabsValue == 6 ? ' drawer-item-selected' : '')}
|
|
144
|
+
onClick={() => setTabsValue(6)}
|
|
130
145
|
>
|
|
131
146
|
<ListItemIcon className="list-item-icon">
|
|
132
147
|
<HistoryOutlinedIcon />
|
|
@@ -134,17 +149,29 @@ export function Activity({
|
|
|
134
149
|
<ListItemText primary={'Finalised(' + finalisedConsultations.length + ')'} />
|
|
135
150
|
</ListItemButton>
|
|
136
151
|
</ListItem>
|
|
137
|
-
|
|
152
|
+
|
|
153
|
+
<ListItem disablePadding className="list-item" key={9}>
|
|
138
154
|
<ListItemText
|
|
139
155
|
className="list-item-text"
|
|
140
156
|
primary={'INQUIRIES'}
|
|
141
157
|
sx={{ color: 'primary.main' }}
|
|
142
158
|
/>
|
|
143
159
|
</ListItem>
|
|
144
|
-
<ListItem disablePadding className="list-item" key={
|
|
160
|
+
<ListItem disablePadding className="list-item" key={10}>
|
|
145
161
|
<ListItemButton
|
|
146
|
-
className={'list-item-button ' + (tabsValue ==
|
|
147
|
-
onClick={() => setTabsValue(
|
|
162
|
+
className={'list-item-button ' + (tabsValue == 7 ? ' drawer-item-selected' : '')}
|
|
163
|
+
onClick={() => setTabsValue(7)}
|
|
164
|
+
>
|
|
165
|
+
<ListItemIcon className="list-item-icon">
|
|
166
|
+
<NextPlanOutlinedIcon />
|
|
167
|
+
</ListItemIcon>
|
|
168
|
+
<ListItemText primary={'Future(' + futureSurveys.length + ')'} />
|
|
169
|
+
</ListItemButton>
|
|
170
|
+
</ListItem>
|
|
171
|
+
<ListItem disablePadding className="list-item" key={11}>
|
|
172
|
+
<ListItemButton
|
|
173
|
+
className={'list-item-button ' + (tabsValue == 8 ? ' drawer-item-selected' : '')}
|
|
174
|
+
onClick={() => setTabsValue(8)}
|
|
148
175
|
>
|
|
149
176
|
<ListItemIcon className="list-item-icon">
|
|
150
177
|
<LoopIcon />
|
|
@@ -152,10 +179,10 @@ export function Activity({
|
|
|
152
179
|
<ListItemText primary={'Open(' + openSurveys.length + ')'} />
|
|
153
180
|
</ListItemButton>
|
|
154
181
|
</ListItem>
|
|
155
|
-
<ListItem disablePadding className="list-item" key={
|
|
182
|
+
<ListItem disablePadding className="list-item" key={12}>
|
|
156
183
|
<ListItemButton
|
|
157
|
-
className={'list-item-button ' + (tabsValue ==
|
|
158
|
-
onClick={() => setTabsValue(
|
|
184
|
+
className={'list-item-button ' + (tabsValue == 9 ? ' drawer-item-selected' : '')}
|
|
185
|
+
onClick={() => setTabsValue(9)}
|
|
159
186
|
>
|
|
160
187
|
<ListItemIcon className="list-item-icon">
|
|
161
188
|
<FastForwardOutlinedIcon />
|
|
@@ -163,10 +190,10 @@ export function Activity({
|
|
|
163
190
|
<ListItemText primary={'Review(' + reviewSurveys.length + ')'} />
|
|
164
191
|
</ListItemButton>
|
|
165
192
|
</ListItem>
|
|
166
|
-
<ListItem disablePadding className="list-item" key={
|
|
193
|
+
<ListItem disablePadding className="list-item" key={13}>
|
|
167
194
|
<ListItemButton
|
|
168
|
-
className={'list-item-button ' + (tabsValue ==
|
|
169
|
-
onClick={() => setTabsValue(
|
|
195
|
+
className={'list-item-button ' + (tabsValue == 10 ? ' drawer-item-selected' : '')}
|
|
196
|
+
onClick={() => setTabsValue(10)}
|
|
170
197
|
>
|
|
171
198
|
<ListItemIcon className="list-item-icon">
|
|
172
199
|
<HistoryOutlinedIcon />
|
|
@@ -174,17 +201,17 @@ export function Activity({
|
|
|
174
201
|
<ListItemText primary={'Finalised(' + finalisedSurveys.length + ')'} />
|
|
175
202
|
</ListItemButton>
|
|
176
203
|
</ListItem>
|
|
177
|
-
<ListItem disablePadding className="list-item" key={
|
|
204
|
+
<ListItem disablePadding className="list-item" key={14}>
|
|
178
205
|
<ListItemText
|
|
179
206
|
className="list-item-text"
|
|
180
|
-
primary={'PUBLICATIONS'}
|
|
207
|
+
primary={'PUBLICATIONS & OUTREACH'}
|
|
181
208
|
sx={{ color: 'primary.main' }}
|
|
182
209
|
/>
|
|
183
210
|
</ListItem>
|
|
184
|
-
<ListItem disablePadding className="list-item" key={
|
|
211
|
+
<ListItem disablePadding className="list-item" key={15}>
|
|
185
212
|
<ListItemButton
|
|
186
|
-
className={'list-item-button ' + (tabsValue ==
|
|
187
|
-
onClick={() => setTabsValue(
|
|
213
|
+
className={'list-item-button ' + (tabsValue == 11 ? ' drawer-item-selected' : '')}
|
|
214
|
+
onClick={() => setTabsValue(11)}
|
|
188
215
|
>
|
|
189
216
|
<ListItemIcon className="list-item-icon">
|
|
190
217
|
<LoopIcon />
|
|
@@ -192,10 +219,10 @@ export function Activity({
|
|
|
192
219
|
<ListItemText primary={'Future(' + futurePublications.length + ')'} />
|
|
193
220
|
</ListItemButton>
|
|
194
221
|
</ListItem>
|
|
195
|
-
<ListItem disablePadding className="list-item" key={
|
|
222
|
+
<ListItem disablePadding className="list-item" key={16}>
|
|
196
223
|
<ListItemButton
|
|
197
|
-
className={'list-item-button ' + (tabsValue ==
|
|
198
|
-
onClick={() => setTabsValue(
|
|
224
|
+
className={'list-item-button ' + (tabsValue == 12 ? ' drawer-item-selected' : '')}
|
|
225
|
+
onClick={() => setTabsValue(12)}
|
|
199
226
|
>
|
|
200
227
|
<ListItemIcon className="list-item-icon">
|
|
201
228
|
<HistoryOutlinedIcon />
|
|
@@ -203,17 +230,17 @@ export function Activity({
|
|
|
203
230
|
<ListItemText primary={'Past(' + pastPublications.length + ')'} />
|
|
204
231
|
</ListItemButton>
|
|
205
232
|
</ListItem>
|
|
206
|
-
<ListItem disablePadding className="list-item" key={
|
|
233
|
+
<ListItem disablePadding className="list-item" key={17}>
|
|
207
234
|
<ListItemText
|
|
208
235
|
className="list-item-text"
|
|
209
236
|
primary={'REPORTING OBLIGATIONS'}
|
|
210
237
|
sx={{ color: 'primary.main' }}
|
|
211
238
|
/>
|
|
212
239
|
</ListItem>
|
|
213
|
-
<ListItem disablePadding className="list-item" key={
|
|
240
|
+
<ListItem disablePadding className="list-item" key={18}>
|
|
214
241
|
<ListItemButton
|
|
215
|
-
className={'list-item-button ' + (tabsValue ==
|
|
216
|
-
onClick={() => setTabsValue(
|
|
242
|
+
className={'list-item-button ' + (tabsValue == 13 ? ' drawer-item-selected' : '')}
|
|
243
|
+
onClick={() => setTabsValue(13)}
|
|
217
244
|
>
|
|
218
245
|
<ListItemIcon className="list-item-icon">
|
|
219
246
|
<LoopIcon />
|
|
@@ -221,10 +248,10 @@ export function Activity({
|
|
|
221
248
|
<ListItemText primary={'Upcoming(' + upcomingObligations.length + ')'} />
|
|
222
249
|
</ListItemButton>
|
|
223
250
|
</ListItem>
|
|
224
|
-
<ListItem disablePadding className="list-item" key={
|
|
251
|
+
<ListItem disablePadding className="list-item" key={19}>
|
|
225
252
|
<ListItemButton
|
|
226
|
-
className={'list-item-button ' + (tabsValue ==
|
|
227
|
-
onClick={() => setTabsValue(
|
|
253
|
+
className={'list-item-button ' + (tabsValue == 14 ? ' drawer-item-selected' : '')}
|
|
254
|
+
onClick={() => setTabsValue(14)}
|
|
228
255
|
>
|
|
229
256
|
<ListItemIcon className="list-item-icon">
|
|
230
257
|
<HistoryOutlinedIcon />
|
|
@@ -244,36 +271,43 @@ export function Activity({
|
|
|
244
271
|
let fromDate = new Date();
|
|
245
272
|
fromDate.setMonth(fromDate.getMonth() - monthsBehind);
|
|
246
273
|
|
|
247
|
-
getMeetings(fromDate, country, userInfo)
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
274
|
+
getMeetings(fromDate, country, userInfo)
|
|
275
|
+
.then((loadedMeetings) => {
|
|
276
|
+
if (loadedMeetings) {
|
|
277
|
+
setCurrentMeetings(
|
|
278
|
+
loadedMeetings.filter((c) => {
|
|
279
|
+
return c.IsCurrent;
|
|
280
|
+
}),
|
|
281
|
+
);
|
|
282
|
+
setUpcomingMeetings(
|
|
283
|
+
loadedMeetings.filter((c) => {
|
|
284
|
+
return c.IsUpcoming;
|
|
285
|
+
}),
|
|
286
|
+
);
|
|
287
|
+
setPastMeetings(
|
|
288
|
+
loadedMeetings.filter((c) => {
|
|
289
|
+
return c.IsPast;
|
|
290
|
+
}),
|
|
291
|
+
);
|
|
292
|
+
}
|
|
265
293
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
294
|
+
setData4Menu(loadedMeetings);
|
|
295
|
+
setloading(false);
|
|
296
|
+
})
|
|
297
|
+
.catch((e) => {
|
|
298
|
+
setloading(false);
|
|
299
|
+
console.log(e.message);
|
|
300
|
+
});
|
|
269
301
|
|
|
270
302
|
getConsultations(undefined, fromDate, country).then((loadedConsultations) => {
|
|
271
303
|
if (loadedConsultations) {
|
|
304
|
+
const currentDate = new Date(new Date().toDateString());
|
|
272
305
|
setOpenConsultations(
|
|
273
306
|
loadedConsultations.filter((c) => {
|
|
274
307
|
return (
|
|
275
308
|
c.ConsultationType == Constants.ConsultationType.Consultation &&
|
|
276
|
-
c.Closed >=
|
|
309
|
+
c.Closed >= currentDate &&
|
|
310
|
+
c.Startdate <= currentDate
|
|
277
311
|
);
|
|
278
312
|
}),
|
|
279
313
|
);
|
|
@@ -281,8 +315,8 @@ export function Activity({
|
|
|
281
315
|
loadedConsultations.filter((c) => {
|
|
282
316
|
return (
|
|
283
317
|
c.ConsultationType == Constants.ConsultationType.Consultation &&
|
|
284
|
-
c.Closed <
|
|
285
|
-
c.Deadline >=
|
|
318
|
+
c.Closed < currentDate &&
|
|
319
|
+
c.Deadline >= currentDate
|
|
286
320
|
);
|
|
287
321
|
}),
|
|
288
322
|
);
|
|
@@ -290,8 +324,16 @@ export function Activity({
|
|
|
290
324
|
loadedConsultations.filter((c) => {
|
|
291
325
|
return (
|
|
292
326
|
c.ConsultationType == Constants.ConsultationType.Consultation &&
|
|
293
|
-
c.Closed <=
|
|
294
|
-
c.Deadline <
|
|
327
|
+
c.Closed <= currentDate &&
|
|
328
|
+
c.Deadline < currentDate
|
|
329
|
+
);
|
|
330
|
+
}),
|
|
331
|
+
);
|
|
332
|
+
setFutureConsultations(
|
|
333
|
+
loadedConsultations.filter((c) => {
|
|
334
|
+
return (
|
|
335
|
+
c.ConsultationType == Constants.ConsultationType.Consultation &&
|
|
336
|
+
c.Startdate > currentDate
|
|
295
337
|
);
|
|
296
338
|
}),
|
|
297
339
|
);
|
|
@@ -299,7 +341,9 @@ export function Activity({
|
|
|
299
341
|
setOpenSurveys(
|
|
300
342
|
loadedConsultations.filter((c) => {
|
|
301
343
|
return (
|
|
302
|
-
c.ConsultationType == Constants.ConsultationType.Survey &&
|
|
344
|
+
c.ConsultationType == Constants.ConsultationType.Survey &&
|
|
345
|
+
c.Closed >= currentDate &&
|
|
346
|
+
c.Startdate <= currentDate
|
|
303
347
|
);
|
|
304
348
|
}),
|
|
305
349
|
);
|
|
@@ -307,8 +351,8 @@ export function Activity({
|
|
|
307
351
|
loadedConsultations.filter((c) => {
|
|
308
352
|
return (
|
|
309
353
|
c.ConsultationType == Constants.ConsultationType.Survey &&
|
|
310
|
-
c.Closed <
|
|
311
|
-
c.Deadline >=
|
|
354
|
+
c.Closed < currentDate &&
|
|
355
|
+
c.Deadline >= currentDate
|
|
312
356
|
);
|
|
313
357
|
}),
|
|
314
358
|
);
|
|
@@ -316,8 +360,15 @@ export function Activity({
|
|
|
316
360
|
loadedConsultations.filter((c) => {
|
|
317
361
|
return (
|
|
318
362
|
c.ConsultationType == Constants.ConsultationType.Survey &&
|
|
319
|
-
c.Closed <=
|
|
320
|
-
c.Deadline <
|
|
363
|
+
c.Closed <= currentDate &&
|
|
364
|
+
c.Deadline < currentDate
|
|
365
|
+
);
|
|
366
|
+
}),
|
|
367
|
+
);
|
|
368
|
+
setFutureSurveys(
|
|
369
|
+
loadedConsultations.filter((c) => {
|
|
370
|
+
return (
|
|
371
|
+
c.ConsultationType == Constants.ConsultationType.Survey && c.Startdate > currentDate
|
|
321
372
|
);
|
|
322
373
|
}),
|
|
323
374
|
);
|
|
@@ -370,47 +421,49 @@ export function Activity({
|
|
|
370
421
|
openApproval={openApproval}
|
|
371
422
|
></EventList>
|
|
372
423
|
)}
|
|
373
|
-
{tabsValue >= 3 && tabsValue <=
|
|
424
|
+
{tabsValue >= 3 && tabsValue <= 6 && (
|
|
374
425
|
<ConsultationList
|
|
375
426
|
configuration={configuration}
|
|
376
427
|
openConsultations={openConsultations}
|
|
377
428
|
reviewConsultations={reviewConsultations}
|
|
378
429
|
finalisedConsultations={finalisedConsultations}
|
|
430
|
+
futureConsultations={futureConsultations}
|
|
379
431
|
type={Constants.ConsultationType.Consultation}
|
|
380
432
|
country={country}
|
|
381
433
|
tabsValue={tabsValue - 3}
|
|
382
434
|
></ConsultationList>
|
|
383
435
|
)}
|
|
384
|
-
{tabsValue >=
|
|
436
|
+
{tabsValue >= 7 && tabsValue <= 10 && (
|
|
385
437
|
<ConsultationList
|
|
386
438
|
configuration={configuration}
|
|
387
439
|
openConsultations={openSurveys}
|
|
388
440
|
reviewConsultations={reviewSurveys}
|
|
389
441
|
finalisedConsultations={finalisedSurveys}
|
|
442
|
+
futureConsultations={futureSurveys}
|
|
390
443
|
type={Constants.ConsultationType.Survey}
|
|
391
|
-
|
|
444
|
+
country={country}
|
|
445
|
+
tabsValue={tabsValue - 7}
|
|
392
446
|
></ConsultationList>
|
|
393
447
|
)}
|
|
394
|
-
{tabsValue >=
|
|
448
|
+
{tabsValue >= 11 && tabsValue <= 12 && (
|
|
395
449
|
<PublicatonList
|
|
396
450
|
userInfo={userInfo}
|
|
397
451
|
configuration={configuration}
|
|
398
452
|
futurePublications={futurePublications}
|
|
399
453
|
pastPublications={pastPublications}
|
|
400
|
-
tabsValue={tabsValue -
|
|
454
|
+
tabsValue={tabsValue - 11}
|
|
401
455
|
></PublicatonList>
|
|
402
456
|
)}
|
|
403
|
-
{tabsValue >=
|
|
457
|
+
{tabsValue >= 13 && tabsValue <= 14 && (
|
|
404
458
|
<ObligationList
|
|
405
459
|
userInfo={userInfo}
|
|
406
460
|
configuration={configuration}
|
|
407
461
|
upcomingObligations={upcomingObligations}
|
|
408
462
|
continuousObligations={continuousObligations}
|
|
409
|
-
tabsValue={tabsValue -
|
|
463
|
+
tabsValue={tabsValue - 13}
|
|
410
464
|
></ObligationList>
|
|
411
465
|
)}
|
|
412
466
|
</Box>
|
|
413
|
-
{false && <span>{userInfo.toString()}</span>}
|
|
414
467
|
</Box>
|
|
415
468
|
</div>
|
|
416
469
|
);
|