eionet2-dashboard 1.5.0 → 1.6.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 CHANGED
@@ -4,6 +4,26 @@ 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.6.0](https://github.com/eea/eionet2-dashboard/compare/1.5.0...1.6.0) - 3 November 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: filter publications(#257970) [Mihai Nicolae - [`79764e2`](https://github.com/eea/eionet2-dashboard/commit/79764e24badc8b3c25821a37344f4dc549a3c30b)]
12
+ - feat: various ui improvements [Mihai Nicolae - [`4134ced`](https://github.com/eea/eionet2-dashboard/commit/4134ced67667448267ab9bd615dfe23a7222397a)]
13
+
14
+ #### :house: Internal changes
15
+
16
+ - chore: manifest updates (#260093) [Mihai Nicolae - [`49a31fd`](https://github.com/eea/eionet2-dashboard/commit/49a31fdbc22188febad9fe17914bdefa6f75f949)]
17
+ - chore: changes after prod deployment [Mihai Nicolae - [`ee787a6`](https://github.com/eea/eionet2-dashboard/commit/ee787a61b4f56666d8d2141869a6fc28b9181bfa)]
18
+ - chore: readme updates [Mihai Nicolae - [`bd96a66`](https://github.com/eea/eionet2-dashboard/commit/bd96a66cb811827db5fa983220d1c775cb4b82a2)]
19
+
20
+ ### [1.5.0](https://github.com/eea/eionet2-dashboard/compare/1.4.2...1.5.0) - 26 October 2023
21
+
22
+ #### :house: Internal changes
23
+
24
+ - chore: version update [Mihai Nicolae - [`a1815e7`](https://github.com/eea/eionet2-dashboard/commit/a1815e787e3692c906c717c34ad737d909582d26)]
25
+ - chore: version upgrade [Mihai Nicolae - [`87a9f98`](https://github.com/eea/eionet2-dashboard/commit/87a9f98af5396a60f9f2a7f1a03c47988126b496)]
26
+
7
27
  ### [1.4.2](https://github.com/eea/eionet2-dashboard/compare/1.4.1...1.4.2) - 26 October 2023
8
28
 
9
29
  #### :rocket: New Features
@@ -0,0 +1,3 @@
1
+ ### [1.6.0]
2
+ Configuration keys
3
+ - PublicationsText - contains values used the filter the displayed publications. Use semicolon to separate values. Check is not case sensitive.
package/README.md CHANGED
@@ -2,43 +2,58 @@
2
2
 
3
3
  [![GitHub release](https://img.shields.io/github/v/release/eea/eionet2-dashboard)](https://github.com/eea/eionet2-dashboard/releases)
4
4
 
5
- This (MS Teams) application implements dashboard type (view-at-a-glance) functionalities for Eionet 2.0.
6
- Through this application, the user have access to information regarding:
5
+ Through this application, the users have access to information regarding:
7
6
  - General Eionet activity (events, consultations, surveys, reports)
8
7
  - Specific country information (management board, NFPs, ETCs, Eionet groups etc.) - Eionet in my country
8
+ - User account self management
9
9
  - Publications
10
+ - Reporting
10
11
 
11
12
  The application is available to all Eionet 2.0 users.
12
13
  The data displayed is retrieved from the EEA Azure tenant and from an internal EEA SharePoint Online instance.
13
14
 
14
15
  ### General Eionet activity
15
16
 
16
- This tab is available for all users. In this tab, the users can find information about:
17
- - Events.
17
+ This functionality is available for all users. In this tab, the users can find information about (and register):
18
+ - Events (that can be rated).
18
19
  - Consultations.
19
20
  - The (Admin or NFP) user enters the user attributes (contact data, roles, organizations etc.).
20
21
  - Inquiries.
21
22
  - Reports.
22
- The displayed information is a selected subtype of the full 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 folders.
23
+ The displayed information is a selected subtype of the full 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 folders in SharePoint.
23
24
 
24
25
  ### Eionet in my country
25
26
 
26
- In this country the users have access to statistical information regarding:
27
+ In its country the user have access to information regarding:
27
28
  - Active and pending invitation users
28
29
  - The management board
29
30
  - The number of groups, organisations
30
31
  - Information about NFPs, ETCs etc.
31
32
  - Specific country information about events, consultations, surveys, reports
32
33
 
33
- ## Publications
34
+ ### Self service
35
+
36
+ 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)
39
+
40
+ ### Publications
34
41
 
35
42
  In this tab the users have access to information about Eionet publications.
36
43
 
44
+ ### Reporting
45
+
46
+ _Under construction_
47
+
48
+ <br/>
49
+
37
50
  ## Getting started
38
51
 
39
52
  The application is available as a "tab" application in the MS Teams Eionet 2.0 teams.
40
53
  When opening this tab, the users will see the Dashboard application, with two sets of tabs, corresponding to the functionalities presented above.
41
54
 
55
+ <br/>
56
+
42
57
  ## Release
43
58
 
44
59
  See [RELEASE.md](https://github.com/eea/eionet2-dashboard/blob/master/RELEASE.md).
@@ -49,7 +64,7 @@ For now the contributions are not open outside the internal EEA project team.
49
64
 
50
65
  ## Copyright and license
51
66
 
52
- The Initial Owner of the Original Code is [European Environment Agency (EEA)](http://eea.europa.eu).
67
+ The Initial Owner of the Original Code is the [European Environment Agency (EEA)](http://eea.europa.eu).
53
68
  All Rights Reserved.
54
69
 
55
70
  See [LICENSE.md](https://github.com/eea/eionet2-dashboard/blob/master/LICENSE.md) for details.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.11/MicrosoftTeams.schema.json",
3
3
  "manifestVersion": "1.11",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
5
  "id": "${{TEAMS_APP_ID}}",
6
6
  "packageName": "com.microsoft.teams.extension",
7
7
  "developer": {
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "description": {
22
22
  "short": "Eionet Dashboard",
23
- "full": "Available to all Eionet users and shows relevant country information & events and consultations"
23
+ "full": "Available to all EEA and Eionet users. The Eionet Dashboard shows shows relevant country statistics and information about all Eionet Groups and ETCs. It includes a list of all events, consultations, inquiries and other relevant information. It is needed by EIonet users to manage their registrations for Eionet events."
24
24
  },
25
25
  "accentColor": "#FFFFFF",
26
26
  "bots": [],
Binary file
Binary file
package/env/.env.Prod_EEA CHANGED
@@ -32,6 +32,13 @@ PROVISIONOUTPUT__IDENTITYOUTPUT__IDENTITYRESOURCEID=/subscriptions/2e921569-0c14
32
32
  PROVISIONOUTPUT__IDENTITYOUTPUT__IDENTITYCLIENTID=25d0e402-1496-4255-8e13-74b7f5661aac
33
33
  PROVISIONOUTPUT__FUNCTIONOUTPUT__FUNCTIONAPPRESOURCEID=/subscriptions/2e921569-0c14-4082-ad47-bd65b64ec3d3/resourceGroups/eionet_user_management-Prod_EEA-rg/providers/Microsoft.Web/sites/eionet2dasprodf6d33eapi
34
34
  PROVISIONOUTPUT__FUNCTIONOUTPUT__FUNCTIONENDPOINT=https://eionet2dasprodf6d33eapi.azurewebsites.net
35
-
35
+
36
36
  REACT_APP_SHAREPOINT_SITE_ID=9ec66e9b-9f90-4796-b50b-612ae7f8a882
37
- REACT_APP_CONFIGURATION_LIST_ID=5fe7b50d-43cd-404c-a514-a16b665a6e69
37
+ REACT_APP_CONFIGURATION_LIST_ID=5fe7b50d-43cd-404c-a514-a16b665a6e69
38
+ PROVISIONOUTPUT__FRONTENDHOSTINGOUTPUT__TEAMSFXPLUGINID=fx-resource-frontend-hosting
39
+ PROVISIONOUTPUT__IDENTITYOUTPUT__TEAMSFXPLUGINID=fx-resource-identity
40
+ PROVISIONOUTPUT__SIMPLEAUTHOUTPUT__TEAMSFXPLUGINID=fx-resource-simple-auth
41
+ PROVISIONOUTPUT__SIMPLEAUTHOUTPUT__ENDPOINT=https://eionet2dasprodf6d33esimpleauth.azurewebsites.net
42
+ PROVISIONOUTPUT__SIMPLEAUTHOUTPUT__WEBAPPRESOURCEID=/subscriptions/2e921569-0c14-4082-ad47-bd65b64ec3d3/resourceGroups/eionet_user_management-Prod_EEA-rg/providers/Microsoft.Web/sites/eionet2dasprodf6d33esimpleAuth
43
+ PROVISIONOUTPUT__FUNCTIONOUTPUT__TEAMSFXPLUGINID=fx-resource-function
44
+ DOTNET_PATH=C:\Users\Hettich\.fx\bin\dotnet
package/env/.env.dev CHANGED
@@ -42,4 +42,5 @@ PROVISIONOUTPUT__FUNCTIONOUTPUT__TEAMSFXPLUGINID=fx-resource-function
42
42
  DOTNET_PATH=/usr/share/dotnet
43
43
 
44
44
  REACT_APP_SHAREPOINT_SITE_ID=7lcpdm.sharepoint.com,bf9359de-0f13-4b00-8b5a-114f6ef3bfb0,6609a994-5225-4a1d-bd05-a239c7b45f72
45
- REACT_APP_CONFIGURATION_LIST_ID=010b1be2-0df5-4ab1-b2a7-17e010aae775
45
+ REACT_APP_CONFIGURATION_LIST_ID=010b1be2-0df5-4ab1-b2a7-17e010aae775
46
+ TEAMS_APP_PUBLISHED_APP_ID=9b7ad10e-2c90-4414-9fa8-579d3792aaad
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eionet2-dashboard",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/eionet2-dashboard",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -5625,6 +5625,12 @@
5625
5625
  }
5626
5626
  }
5627
5627
  },
5628
+ "css-mediaquery": {
5629
+ "version": "0.1.2",
5630
+ "resolved": "https://nexus.dudes.local/repository/npm/css-mediaquery/-/css-mediaquery-0.1.2.tgz",
5631
+ "integrity": "sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==",
5632
+ "dev": true
5633
+ },
5628
5634
  "css-minimizer-webpack-plugin": {
5629
5635
  "version": "3.4.1",
5630
5636
  "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz",
@@ -10591,6 +10597,15 @@
10591
10597
  "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
10592
10598
  "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ=="
10593
10599
  },
10600
+ "matchmediaquery": {
10601
+ "version": "0.3.1",
10602
+ "resolved": "https://nexus.dudes.local/repository/npm/matchmediaquery/-/matchmediaquery-0.3.1.tgz",
10603
+ "integrity": "sha512-Hlk20WQHRIm9EE9luN1kjRjYXAQToHOIAHPJn9buxBwuhfTHoKUcX+lXBbxc85DVQfXYbEQ4HcwQdd128E3qHQ==",
10604
+ "dev": true,
10605
+ "requires": {
10606
+ "css-mediaquery": "^0.1.2"
10607
+ }
10608
+ },
10594
10609
  "mathml-tag-names": {
10595
10610
  "version": "2.1.3",
10596
10611
  "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz",
@@ -12726,6 +12741,18 @@
12726
12741
  "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
12727
12742
  "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A=="
12728
12743
  },
12744
+ "react-responsive": {
12745
+ "version": "9.0.2",
12746
+ "resolved": "https://nexus.dudes.local/repository/npm/react-responsive/-/react-responsive-9.0.2.tgz",
12747
+ "integrity": "sha512-+4CCab7z8G8glgJoRjAwocsgsv6VA2w7JPxFWHRc7kvz8mec1/K5LutNC2MG28Mn8mu6+bu04XZxHv5gyfT7xQ==",
12748
+ "dev": true,
12749
+ "requires": {
12750
+ "hyphenate-style-name": "^1.0.0",
12751
+ "matchmediaquery": "^0.3.0",
12752
+ "prop-types": "^15.6.1",
12753
+ "shallow-equal": "^1.2.1"
12754
+ }
12755
+ },
12729
12756
  "react-router": {
12730
12757
  "version": "5.3.3",
12731
12758
  "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.3.tgz",
package/tabs/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/eionet2-dashboard",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "license": "MIT",
5
5
  "description": "Teams app for managing Eionet users.",
6
6
  "dependencies": {
@@ -38,6 +38,7 @@
38
38
  "eslint-plugin-react-hooks": "^4.6.0",
39
39
  "jest-junit": "^14.0.0",
40
40
  "prettier": "^2.6.2",
41
+ "react-responsive": "^9.0.2",
41
42
  "stylelint": "^14.8.5",
42
43
  "stylelint-config-idiomatic-order": "^8.1.0",
43
44
  "stylelint-config-prettier": "^9.0.3",
@@ -1,4 +1,5 @@
1
1
  import { React, useState, useEffect, useCallback } from 'react';
2
+ import { useMediaQuery } from 'react-responsive';
2
3
 
3
4
  import { getMe } from '../data/provider';
4
5
  import { useConfiguration } from '../data/hooks/useConfiguration';
@@ -25,6 +26,8 @@ import { ThemeProvider, createTheme } from '@mui/material/styles';
25
26
 
26
27
  import OpenInNewIcon from '@mui/icons-material/OpenInNew';
27
28
  import CloseIcon from '@mui/icons-material/Close';
29
+ import MenuIcon from '@mui/icons-material/Menu';
30
+ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
28
31
 
29
32
  import './Tab.scss';
30
33
 
@@ -99,6 +102,7 @@ const theme = createTheme({
99
102
  });
100
103
 
101
104
  export default function Tab() {
105
+ const isMobile = useMediaQuery({ query: `(max-width: 768px)` });
102
106
  const configuration = useConfiguration();
103
107
 
104
108
  const version = process.env.REACT_APP_VERSION;
@@ -124,7 +128,8 @@ export default function Tab() {
124
128
  [selectedEvent, setSelectedEvent] = useState({}),
125
129
  [approvalVisible, setApprovalVisible] = useState(false),
126
130
  [ratingVisible, setRatingVisible] = useState(false),
127
- [versionDialogOpen, setVersionDialogOpen] = useState(false);
131
+ [versionDialogOpen, setVersionDialogOpen] = useState(false),
132
+ [drawerOpen, setDraweOpen] = useState(!isMobile);
128
133
 
129
134
  useEffect(() => {
130
135
  (async () => {
@@ -236,6 +241,9 @@ export default function Tab() {
236
241
  },
237
242
  handleVersionDialogClose = () => {
238
243
  setVersionDialogOpen(false);
244
+ },
245
+ handleDrawerOpen = () => {
246
+ setDraweOpen(!drawerOpen);
239
247
  };
240
248
 
241
249
  const nonIsoCountryCodes = {
@@ -265,6 +273,17 @@ export default function Tab() {
265
273
  sx={{ zIndex: (theme) => theme.zIndex.drawer + 1 }}
266
274
  >
267
275
  <Toolbar>
276
+ {isMobile && (
277
+ <IconButton
278
+ color="inherit"
279
+ aria-label="open drawer"
280
+ onClick={handleDrawerOpen}
281
+ edge="start"
282
+ >
283
+ {!drawerOpen && <MenuIcon />}
284
+ {drawerOpen && <ChevronLeftIcon />}
285
+ </IconButton>
286
+ )}
268
287
  <MenuItem onClick={() => onMenuClick(1)}>
269
288
  <Typography
270
289
  color="suplementary.text"
@@ -290,7 +309,17 @@ export default function Tab() {
290
309
  {canChangeCountry && (
291
310
  <Autocomplete
292
311
  sx={{
293
- width: '5%',
312
+ width: 100,
313
+ [theme.breakpoints.up('sm')]: {
314
+ width: 80,
315
+ },
316
+ }}
317
+ componentsProps={{
318
+ paper: {
319
+ sx: {
320
+ width: 100,
321
+ },
322
+ },
294
323
  }}
295
324
  disablePortal
296
325
  id="country"
@@ -376,6 +405,7 @@ export default function Tab() {
376
405
  setData4Menu={setData4Menu}
377
406
  openRating={openRating}
378
407
  openApproval={openApproval}
408
+ drawerOpen={drawerOpen}
379
409
  />
380
410
  )}
381
411
  {myCountryVisible() && (
@@ -383,6 +413,7 @@ export default function Tab() {
383
413
  userInfo={userInfo}
384
414
  selectedCountry={selectedCountry}
385
415
  configuration={configuration}
416
+ drawerOpen={drawerOpen}
386
417
  />
387
418
  )}
388
419
  {selfServiceVisible() && <UserEdit user={selfInfo} />}
@@ -19,7 +19,7 @@ import { ConsultationList } from './ConsultationList';
19
19
  import { EventList } from './EventList';
20
20
  import { getConsultations, getMeetings, getPublications } from '../../data/sharepointProvider';
21
21
  import CustomDrawer from '../CustomDrawer';
22
- import { PublicatonList } from './Publications';
22
+ import { PublicatonList } from './PublicationList';
23
23
 
24
24
  export function Activity({
25
25
  userInfo,
@@ -28,6 +28,7 @@ export function Activity({
28
28
  setData4Menu,
29
29
  openRating,
30
30
  openApproval,
31
+ drawerOpen,
31
32
  }) {
32
33
  const [tabsValue, setTabsValue] = useState(0),
33
34
  [pastMeetings, setPastMeetings] = useState([]),
@@ -207,8 +208,8 @@ export function Activity({
207
208
  fromDate.setMonth(fromDate.getMonth() - monthsBehind);
208
209
 
209
210
  const loadedMeetings = await getMeetings(fromDate, country, userInfo),
210
- loadedConsultations = await getConsultations(undefined, fromDate, country),
211
- loadedPublications = await getPublications();
211
+ loadedConsultations = await getConsultations(undefined, fromDate, country);
212
+ let loadedPublications = await getPublications();
212
213
 
213
214
  if (loadedMeetings) {
214
215
  setCurrentMeetings(
@@ -286,6 +287,12 @@ export function Activity({
286
287
  }
287
288
 
288
289
  if (loadedPublications) {
290
+ const typeFilter = configuration.PublicationsType
291
+ ? configuration.PublicationsType.split(';').map((p) => p.toLowerCase())
292
+ : [];
293
+ loadedPublications = loadedPublications.filter(
294
+ (p) => !p.ItemType || p.ItemType.some((it) => typeFilter.includes(it.toLowerCase())),
295
+ );
289
296
  setFuturePublications(loadedPublications.filter((p) => !p.IsPast));
290
297
  setPastPublications(loadedPublications.filter((p) => p.IsPast));
291
298
  }
@@ -303,7 +310,7 @@ export function Activity({
303
310
  >
304
311
  <CircularProgress color="primary" />
305
312
  </Backdrop>
306
- <CustomDrawer drawerOptions={drawerOptions}></CustomDrawer>
313
+ {drawerOpen && <CustomDrawer drawerOptions={drawerOptions}></CustomDrawer>}
307
314
  <Box sx={{ width: '100%' }}>
308
315
  {tabsValue >= 0 && tabsValue <= 2 && (
309
316
  <EventList
@@ -26,35 +26,43 @@ export function PublicatonList({
26
26
  </Typography>
27
27
  );
28
28
  },
29
- renderChips = (params) => {
29
+ renderTypes = (params) => {
30
+ return renderChips(params.row.ItemType);
31
+ },
32
+ renderProducts = (params) => {
33
+ return renderChips(params.row.ExtraCommsProducts);
34
+ },
35
+ renderChips = (data) => {
30
36
  let index = 0;
31
- const products = params.row.ExtraCommsProducts;
32
- return (
33
- <Tooltip title={products.join(', ') || ''} arrow>
34
- <div id="test">
35
- {products.map((m) => (
36
- <Chip variant="outlined" color="primary" key={index++} label={m} />
37
- ))}
38
- </div>
39
- </Tooltip>
40
- );
37
+ if (data && data.length) {
38
+ return (
39
+ <Tooltip title={data.join(', ') || ''} arrow>
40
+ <div id="chipContainer">
41
+ {data.map((m) => (
42
+ <Chip variant="outlined" color="primary" key={index++} label={m} />
43
+ ))}
44
+ </div>
45
+ </Tooltip>
46
+ );
47
+ }
41
48
  };
42
49
 
43
50
  const gridColumns = [
44
51
  {
45
52
  field: 'Title',
46
- headerName: 'Event',
53
+ headerName: 'Title',
47
54
  flex: 1,
48
55
  },
49
56
  {
50
57
  field: 'ItemType',
51
58
  headerName: 'Type',
59
+ renderCell: renderTypes,
52
60
  flex: 0.5,
53
61
  },
54
62
  {
55
63
  field: 'ExtraCommsProducts',
56
64
  headerName: 'Products',
57
- renderCell: renderChips,
65
+ renderCell: renderProducts,
58
66
  flex: 0.5,
59
67
  },
60
68
  {
@@ -89,7 +97,7 @@ export function PublicatonList({
89
97
  sortModel: [
90
98
  {
91
99
  field: 'Date',
92
- sort: 'desc',
100
+ sort: 'asc',
93
101
  },
94
102
  ],
95
103
  },
@@ -1,10 +1,18 @@
1
1
  import { React, useState } from 'react';
2
- import { Box, ListItem, ListItemButton, ListItemText } from '@mui/material';
2
+ import { Box, ListItem, ListItemButton, ListItemText, IconButton } from '@mui/material';
3
+
4
+ import MenuIcon from '@mui/icons-material/Menu';
5
+ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
6
+
7
+ import { useMediaQuery } from 'react-responsive';
8
+
3
9
  import { GroupView } from './GroupView';
4
10
  import CustomDrawer from '../CustomDrawer';
5
11
 
6
12
  export function GroupsBoard({ users, mappings }) {
7
- const [groupIndex, setGroupIndex] = useState(0),
13
+ const isMobile = useMediaQuery({ query: `(max-width: 768px)` });
14
+ const [drawerOpen, setDraweOpen] = useState(!isMobile),
15
+ [groupIndex, setGroupIndex] = useState(0),
8
16
  groups = mappings
9
17
  .map((m) => {
10
18
  const filteredUsers = users.filter((user) => {
@@ -48,6 +56,10 @@ export function GroupsBoard({ users, mappings }) {
48
56
  </div>
49
57
  );
50
58
 
59
+ const handleDrawerOpen = () => {
60
+ setDraweOpen(!drawerOpen);
61
+ };
62
+
51
63
  return (
52
64
  <Box
53
65
  sx={{
@@ -58,7 +70,15 @@ export function GroupsBoard({ users, mappings }) {
58
70
  background: 'white',
59
71
  }}
60
72
  >
61
- <CustomDrawer drawerOptions={drawerOptions}></CustomDrawer>
73
+ <Box sx={{ display: 'flex' }}>
74
+ {isMobile && (
75
+ <IconButton sx={{ alignSelf: 'flex-start' }} onClick={handleDrawerOpen}>
76
+ {!drawerOpen && <MenuIcon />}
77
+ {drawerOpen && <ChevronLeftIcon />}
78
+ </IconButton>
79
+ )}
80
+ {drawerOpen && <CustomDrawer drawerOptions={drawerOptions}></CustomDrawer>}
81
+ </Box>
62
82
  <GroupView group={groups[groupIndex]}></GroupView>
63
83
  </Box>
64
84
  );
@@ -29,7 +29,7 @@ import GroupIcon from '@mui/icons-material/Group';
29
29
  import GroupWorkIcon from '@mui/icons-material/GroupWork';
30
30
  import CustomDrawer from '../CustomDrawer';
31
31
 
32
- export function MyCountry({ userInfo, selectedCountry }) {
32
+ export function MyCountry({ userInfo, selectedCountry, drawerOpen }) {
33
33
  const [tabsValue, setTabsValue] = useState(0),
34
34
  [users, setUsers] = useState([]),
35
35
  [mappings, setMappings] = useState([]),
@@ -135,7 +135,7 @@ export function MyCountry({ userInfo, selectedCountry }) {
135
135
  <CircularProgress color="primary" />
136
136
  </Backdrop>
137
137
 
138
- <CustomDrawer drawerOptions={drawerOptions}> </CustomDrawer>
138
+ {drawerOpen && <CustomDrawer drawerOptions={drawerOptions}> </CustomDrawer>}
139
139
  <Box sx={{ width: '100%' }}>
140
140
  <TabPanel value={tabsValue} index={0}>
141
141
  <AtAGlance
@@ -1,5 +1,5 @@
1
1
  import { createEvent } from 'ics';
2
- import { differenceInMinutes } from 'date-fns';
2
+ import { differenceInMinutes, format } from 'date-fns';
3
3
 
4
4
  export function createIcs(meeting) {
5
5
  let result = undefined,
@@ -17,15 +17,10 @@ export function createIcs(meeting) {
17
17
  };
18
18
  }
19
19
  const event = {
20
- start: [
21
- meetingStart.getFullYear(),
22
- meetingStart.getMonth(),
23
- meetingStart.getDate(),
24
- meetingStart.getHours(),
25
- meetingStart.getMinutes(),
26
- ],
20
+ start: format(meetingStart, 'yyyy-M-d-H-m').split('-').map(Number),
27
21
  duration: duration,
28
22
  title: meeting.Title,
23
+ organizer: { name: 'EEA' },
29
24
  ...(meeting.MeetingLink && { url: meeting.MeetingLink }),
30
25
  };
31
26
 
@@ -606,7 +606,7 @@ function getNotificationBody(config, event, forNFP) {
606
606
  function replacePlaceholders(property, event) {
607
607
  if (property) {
608
608
  property = property.replaceAll(MEETING_TITLE_PLACEHOLDER, event.Title);
609
- property = property.replaceAll(MEETING_JOIN_URL_PLACEHOLDER, event.MeetingLink);
609
+ property = property.replaceAll(MEETING_JOIN_URL_PLACEHOLDER, event.MeetingLink || '');
610
610
  }
611
611
 
612
612
  //event.MeetingJoinContent && (property += event.MeetingJoinContent);
@@ -680,10 +680,10 @@ export async function getADUserInfos(lookupIds) {
680
680
  const userInfo = await getADUser(lookupId);
681
681
  if (userInfo && userInfo.id) {
682
682
  const userId = userInfo.id;
683
+ userInfo.lookupId = lookupId;
683
684
  try {
684
685
  const response = await apiGet('/users/' + userId + '/photos/64x64/$value', 'app', true);
685
686
  userInfo.base64Photo = response?.graphClientMessage;
686
- userInfo.lookupId = lookupId;
687
687
  } catch (error) {
688
688
  console.log(error);
689
689
  }