eionet2-dashboard 3.1.2 → 3.1.3

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,11 +4,13 @@ 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
- ### [3.1.2](https://github.com/eea/eionet2-dashboard/compare/3.1.1...3.1.2) - 16 December 2024
7
+ ### [3.1.3](https://github.com/eea/eionet2-dashboard/compare/3.1.2...3.1.3) - 17 December 2024
8
8
 
9
9
  #### :bug: Bug Fixes
10
10
 
11
- - fix: missing config, small ui improvements [Mihai Nicolae - [`5667719`](https://github.com/eea/eionet2-dashboard/commit/5667719ebcc7e75743a4cb55e840268a37e6d391)]
11
+ - fix: correct email for hybrid meetings [Mihai Nicolae - [`2a3440c`](https://github.com/eea/eionet2-dashboard/commit/2a3440c83644600059c355319fd51974c7b305b2)]
12
+
13
+ ### [3.1.2](https://github.com/eea/eionet2-dashboard/compare/3.1.1...3.1.2) - 16 December 2024
12
14
 
13
15
  ### [3.1.1](https://github.com/eea/eionet2-dashboard/compare/3.1.0...3.1.1) - 13 December 2024
14
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eionet2-dashboard",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "scripts": {
@@ -72,7 +72,7 @@ export function EventExternalRegistration({ event, userInfo }) {
72
72
  if (response) {
73
73
  participant.id = response.id;
74
74
  event.Participants.push(participant);
75
- setEventProperties(true);
75
+ setEventProperties();
76
76
  setSuccessRegister(true);
77
77
  }
78
78
  }
@@ -83,8 +83,7 @@ export function EventExternalRegistration({ event, userInfo }) {
83
83
  }
84
84
  setLoading(false);
85
85
  },
86
- setEventProperties = (hasRegistered) => {
87
- event.HasRegistered = hasRegistered;
86
+ setEventProperties = () => {
88
87
  event.NoOfRegistered = event.Participants.filter((p) => {
89
88
  return p.Registered;
90
89
  }).length;
@@ -297,6 +297,7 @@ export async function getMeetings(fromDate, country, userInfo) {
297
297
  IsPast: isPast,
298
298
 
299
299
  IsOnline: fields.MeetingType && fields.MeetingType == 'Online',
300
+ IsOnlineOrHybrid: fields.MeetingType && fields.MeetingType != 'Offline',
300
301
  IsOffline: fields.MeetingType && fields.MeetingType != 'Online',
301
302
 
302
303
  CustomMeetingRequest: fields.CustomMeetingRequests,
@@ -690,9 +691,7 @@ export async function patchParticipant(participant, event, approvalChanged) {
690
691
  }
691
692
 
692
693
  function getNotificationSubject(config, event, forNFP) {
693
- let emailSubjectProperty = `Reg${
694
- event.MeetingType == 'Online' ? 'Online' : 'Offline'
695
- }EmailSubject`;
694
+ let emailSubjectProperty = `Reg${event.IsOnlineOrHybrid ? 'Online' : 'Offline'}EmailSubject`;
696
695
 
697
696
  const suffix = forNFP ? 'NFP' : 'User';
698
697
  emailSubjectProperty += suffix;
@@ -700,7 +699,7 @@ function getNotificationSubject(config, event, forNFP) {
700
699
  }
701
700
 
702
701
  function getNotificationBody(config, event, forNFP) {
703
- let emailBodyProperty = `Reg${event.MeetingType == 'Online' ? 'Online' : 'Offline'}EmailBody`;
702
+ let emailBodyProperty = `Reg${event.IsOnlineOrHybrid ? 'Online' : 'Offline'}EmailBody`;
704
703
 
705
704
  const suffix = forNFP ? 'NFP' : 'User';
706
705
  emailBodyProperty += suffix;
@@ -708,14 +707,13 @@ function getNotificationBody(config, event, forNFP) {
708
707
  }
709
708
 
710
709
  function getExternalNotificationSubject(config, event) {
711
- const subject =
712
- config[`Invite${event.MeetingType == 'Online' ? 'Online' : 'Offline'}EmailSubject`];
710
+ const subject = config[`Invite${event.IsOnlineOrHybrid ? 'Online' : 'Offline'}EmailSubject`];
713
711
  return subject?.replaceAll(MEETING_TITLE_PLACEHOLDER, event.Title);
714
712
  }
715
713
 
716
714
  function getExternalNotificationBody(config, event) {
717
715
  return replacePlaceholders(
718
- config[`Invite${event.MeetingType == 'Online' ? 'Online' : 'Offline'}EmailBody`],
716
+ config[`Invite${event.IsOnlineOrHybrid ? 'Online' : 'Offline'}EmailBody`],
719
717
  event,
720
718
  );
721
719
  }