eionet2-dashboard 1.8.3 → 1.8.4

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,22 @@ 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.8.4](https://github.com/eea/eionet2-dashboard/compare/1.8.3...1.8.4) - 7 February 2024
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: correct link display(#262918) [Mihai Nicolae - [`7618693`](https://github.com/eea/eionet2-dashboard/commit/7618693abd56f4cb6d556b159e18b0714dbf80f4)]
12
+ - fix: correct loading of statistics(#264598) [Mihai Nicolae - [`9ca7094`](https://github.com/eea/eionet2-dashboard/commit/9ca7094213fe0644d84bd399705693d153289ecb)]
13
+ - fix: avoid redundant logging (#263854) [Mihai Nicolae - [`d6abb98`](https://github.com/eea/eionet2-dashboard/commit/d6abb98f6d1173ac44c78bbcd03dd850e20ae3af)]
14
+
15
+ #### :house: Internal changes
16
+
17
+ - chore: dependency resolution [Mihai Nicolae - [`88d3540`](https://github.com/eea/eionet2-dashboard/commit/88d35408310667b318ad0ab70768fb273ebcaba6)]
18
+ - chore: dependency resolution [Mihai Nicolae - [`0fa1983`](https://github.com/eea/eionet2-dashboard/commit/0fa1983d51ab1d98debda7d114e6c0c48bf1b9e0)]
19
+ - chore: remove undefined initialization [Mihai Nicolae - [`715aa2d`](https://github.com/eea/eionet2-dashboard/commit/715aa2df0ff2057e58f99a57c38d0b01c2de83f7)]
20
+ - chore: small corrections [Mihai Nicolae - [`feddfb6`](https://github.com/eea/eionet2-dashboard/commit/feddfb6b1d53dddae98beb67f2dcf45b4f2f457e)]
21
+ - chore: version update [Mihai Nicolae - [`b6bc895`](https://github.com/eea/eionet2-dashboard/commit/b6bc895938b977267c4410875330ccb65ad64b0b)]
22
+
7
23
  ### [1.8.3](https://github.com/eea/eionet2-dashboard/compare/1.8.2...1.8.3) - 26 January 2024
8
24
 
9
25
  #### :rocket: New Features
package/README.md CHANGED
@@ -35,8 +35,8 @@ In its country the user have access to information regarding:
35
35
  ### Account self-service
36
36
 
37
37
  This functionality offers users the option to manage/update their data themselves:
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).
38
+ - View current user account data (with the exception of the attributes that can be updated only by a 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 a user with a higher authority - Admin or NFP).
40
40
 
41
41
  ### Publications
42
42
 
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "description": {
22
22
  "short": "Eionet Dashboard",
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, enquiries and other relevant information. It is needed by EIonet users to manage their registrations for Eionet events."
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, enquiries 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": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eionet2-dashboard",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/eionet2-dashboard",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/tabs/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/eionet2-dashboard",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "MS Teams app for accessing Eionet activity and managing account information.",
6
6
  "dependencies": {
@@ -86,7 +86,12 @@
86
86
  ]
87
87
  },
88
88
  "resolutions": {
89
- "@azure/core-rest-pipeline": "1.12.1"
89
+ "@azure/core-rest-pipeline": "1.12.1",
90
+ "@azure/core-util": "1.5.0",
91
+ "@azure/core-auth": "1.4.0",
92
+ "@azure/core-client": "1.5.0",
93
+ "@azure/core-lro": "2.2.0",
94
+ "workbox-webpack-plugin": "6.4.1"
90
95
  },
91
96
  "homepage": "."
92
- }
97
+ }
@@ -135,6 +135,7 @@ export default function Tab() {
135
135
  (async () => {
136
136
  setLoading(true);
137
137
  let me = await getMe();
138
+ setSelectedCountry(me.country);
138
139
  setUserInfo({
139
140
  isAdmin: me.isAdmin,
140
141
  isNFP: me.isNFP,
@@ -148,8 +149,6 @@ export default function Tab() {
148
149
  surname: me.surname,
149
150
  });
150
151
 
151
- setSelectedCountry(me.country);
152
-
153
152
  if (me.isAdmin || !me.isEionetUser) {
154
153
  setCanChangeCountry(true);
155
154
  const loadedCountries = await getCountries();
@@ -45,7 +45,6 @@ export function IndicatorCard({ labelText, valueText, url, infoText }) {
45
45
  <Link
46
46
  sx={{ color: 'text.main' }}
47
47
  className="card-details"
48
- color="secondary"
49
48
  component="button"
50
49
  variant="body1"
51
50
  onClick={() => {
@@ -19,7 +19,6 @@ import {
19
19
  } from '../../data/sharepointProvider';
20
20
  import { GroupsBoard } from './GroupsBoard';
21
21
  import './my_country.scss';
22
- import { getConfiguration } from '../../data/apiProvider';
23
22
  import { ScientificCommittee } from './ScientificCommittee';
24
23
  import { DataReporters } from './DataReporters';
25
24
  import TabPanel from '../TabPanel';
@@ -32,15 +31,14 @@ import GroupWorkIcon from '@mui/icons-material/GroupWork';
32
31
  import CustomDrawer from '../CustomDrawer';
33
32
  import { CountryMembers } from './CountryMembers';
34
33
 
35
- export function MyCountry({ userInfo, selectedCountry, drawerOpen }) {
34
+ export function MyCountry({ userInfo, selectedCountry, configuration, drawerOpen }) {
36
35
  const [tabsValue, setTabsValue] = useState(0),
37
36
  [users, setUsers] = useState([]),
38
37
  [mappings, setMappings] = useState([]),
39
38
  [loading, setloading] = useState(false),
40
39
  [organisations, setOrganisations] = useState([]),
41
40
  [selectedCountryInfo, setSelectedCountryInfo] = useState({}),
42
- [availableGroups, setAvailableGroups] = useState([]),
43
- [configuration, setConfiguration] = useState({});
41
+ [availableGroups, setAvailableGroups] = useState([]);
44
42
 
45
43
  const loadData = (country) => {
46
44
  setloading(true);
@@ -70,11 +68,6 @@ export function MyCountry({ userInfo, selectedCountry, drawerOpen }) {
70
68
  (async () => {
71
69
  setloading(true);
72
70
 
73
- const loadedConfiguration = await getConfiguration();
74
- if (loadedConfiguration) {
75
- setConfiguration(loadedConfiguration);
76
- }
77
-
78
71
  loadData(selectedCountry);
79
72
 
80
73
  let loadedMappings = await getMappingsList();
@@ -90,7 +90,10 @@ export function ProgressGauge({ totalCount, responseCount, label, infoText, url
90
90
  width: '150px',
91
91
  height: '1rem',
92
92
  fontSize: '20px',
93
+ color: 'text.main',
93
94
  }}
95
+ component="button"
96
+ variant="body1"
94
97
  onClick={() => {
95
98
  url && window.open(url, '_blank');
96
99
  }}
@@ -33,7 +33,7 @@ export async function apiGet(path, credentialType = 'app', skipLog) {
33
33
  }
34
34
  }
35
35
 
36
- export async function apiPost(path, data, credentialType = 'app') {
36
+ export async function apiPost(path, data, credentialType = 'app', skipLog) {
37
37
  try {
38
38
  return await callApiFunction('graphData', 'post', {
39
39
  credentialType: credentialType,
@@ -41,7 +41,7 @@ export async function apiPost(path, data, credentialType = 'app') {
41
41
  path: path,
42
42
  });
43
43
  } catch (err) {
44
- logError(err, path, data);
44
+ !skipLog && logError(err, path, data);
45
45
  throw err;
46
46
  }
47
47
  }
@@ -72,7 +72,7 @@ export async function apiDelete(path, credentialType = 'app') {
72
72
  }
73
73
  }
74
74
 
75
- let _userMail = undefined;
75
+ let _userMail;
76
76
  export async function getUserMail() {
77
77
  if (!_userMail) {
78
78
  const response = await apiGet('me?$select=id,displayName,mail,mobilePhone,country', 'user');
@@ -87,7 +87,7 @@ export async function getUserMail() {
87
87
  const sharepointSiteId = process.env.REACT_APP_SHAREPOINT_SITE_ID,
88
88
  configurationListId = process.env.REACT_APP_CONFIGURATION_LIST_ID;
89
89
 
90
- let _configuration = undefined;
90
+ let _configuration;
91
91
  export async function getConfiguration() {
92
92
  try {
93
93
  if (!_configuration) {
@@ -108,8 +108,7 @@ export async function getConfiguration() {
108
108
  }
109
109
 
110
110
  export async function logError(err, apiPath, data) {
111
- const spConfig = await getConfiguration(),
112
- userMail = await getUserMail();
111
+ const userMail = await getUserMail();
113
112
 
114
113
  const title = err.response?.data?.error?.body || err.message;
115
114
 
@@ -125,9 +124,16 @@ export async function logError(err, apiPath, data) {
125
124
  },
126
125
  };
127
126
 
128
- let graphURL =
129
- '/sites/' + spConfig.SharepointSiteId + '/lists/' + spConfig.LoggingListId + '/items';
130
- await apiPost(graphURL, fields);
127
+ if (_configuration) {
128
+ await apiPost(
129
+ `/sites/${_configuration.SharepointSiteId}/lists/${_configuration.LoggingListId}/items`,
130
+ fields,
131
+ 'app',
132
+ true,
133
+ );
134
+ } else {
135
+ console.log('Configuration not loaded cannot proceed');
136
+ }
131
137
  }
132
138
 
133
139
  export async function logInfo(message, apiPath, data, action) {
@@ -2,8 +2,7 @@ import { createEvent } from 'ics';
2
2
  import { differenceInMinutes, format } from 'date-fns';
3
3
 
4
4
  export function createIcs(meeting) {
5
- let result = undefined,
6
- duration = undefined;
5
+ let result, duration;
7
6
  const meetingStart = new Date(meeting.MeetingStart);
8
7
  const durationInMinutes = differenceInMinutes(new Date(meeting.MeetingEnd), meetingStart);
9
8
  if (durationInMinutes >= 60) {
@@ -9,8 +9,8 @@
9
9
  "JoiningTeam": "The user could not be added to the Eionet teams. Please use the Manage user tab to update the user Membership(s)",
10
10
  "TagsCreation": "The tags could not be updated. Please use the Manage user tab to update the user Membership(s)",
11
11
  "SharepointUser": "User details could not be updated in the SharePoint Users list.",
12
- "Mail": "An error has occured during the sending invitation email.",
13
- "Error": "An error has occured during the invitation process."
12
+ "Mail": "An error has occurred during the sending invitation email.",
13
+ "Error": "An error has occurred during the invitation process."
14
14
  }
15
15
  },
16
16
  "UserList": {
@@ -22,13 +22,13 @@
22
22
  "MissingMembership": "At least one the following fields must be selected Eionet groups, Other memberships or NFP.",
23
23
  "Errors": {
24
24
  "ADUserCreation": "Could not update the user contact data.",
25
- "Mail": "An error has occured during the sending inviation email.",
25
+ "Mail": "An error has occurred during the sending invitation email.",
26
26
  "Invitation": "Could not create the user invitation.",
27
27
  "ADUser": "Could not update the user contact data.",
28
28
  "JoiningTeam": "The user could not be added to the Eionet teams. Please use the Manage user tab to update the user Membership(s)",
29
29
  "TagsCreation": "The tags could not be updated. Please use the Manage user tab to update the user Membership(s)",
30
30
  "SharepointUser": "User details could not be updated in the SharePoint Users list.",
31
- "Error": "An error has occured when saving user information."
31
+ "Error": "An error has occurred when saving user information."
32
32
  }
33
33
  },
34
34
  "UserDelete": {
@@ -1,7 +1,7 @@
1
1
  import { apiGet, getConfiguration, apiPost, logInfo, logError } from './apiProvider';
2
2
  import { getSPUserByMail, getMeetingManager, getOrganisationList } from './sharepointProvider';
3
3
 
4
- let _profile = undefined;
4
+ let _profile;
5
5
  export async function getMe() {
6
6
  if (!_profile) {
7
7
  const config = await getConfiguration(),
@@ -149,7 +149,7 @@ export async function sendEmail(subject, text, emails, attachment) {
149
149
 
150
150
  const attachments = [];
151
151
  if (attachment) {
152
- let buffer = undefined;
152
+ let buffer;
153
153
  const reader = new FileReader();
154
154
 
155
155
  const promise = new Promise((resolve) => {
@@ -39,7 +39,7 @@ export async function getOrganisationList(country) {
39
39
  }
40
40
  }
41
41
 
42
- let mappingsList = undefined;
42
+ let mappingsList;
43
43
  export async function getMappingsList() {
44
44
  const config = await getConfiguration();
45
45
  try {
@@ -850,7 +850,6 @@ export async function postRating(event, participant, value) {
850
850
  await apiPost(ratingGraphURL, ratingData);
851
851
  success = true;
852
852
  } catch (err) {
853
- //await logError(err);
854
853
  success = false;
855
854
  }
856
855
  }