@openeventkit/event-site 2.1.24 → 2.1.26
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/package.json +2 -2
- package/src/actions/user-actions.js +3 -2
- package/src/i18n/locales/en.json +2 -0
- package/src/pages/a/overflow-player.js +3 -3
- package/src/reducers/user-reducer.js +3 -1
- package/src/templates/rsvp-page.js +14 -6
- package/src/utils/rsvpConstants.js +7 -1
- package/src/workers/sync_strategies/activity_type_synch_strategy.js +5 -0
- package/src/workers/sync_strategies/speaker_synch_strategy.js +67 -61
- package/src/workers/sync_strategies/summit_synch_strategy.js +5 -0
- package/src/workers/sync_strategies/venue_room_synch_strategy.js +5 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.26",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/server": "^11.11.0",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"rehype-mdx-import-media": "^1.2.0",
|
|
126
126
|
"remark-gfm": "^4.0.1",
|
|
127
127
|
"sass": "^1.49.9",
|
|
128
|
-
"schedule-filter-widget": "3.0.
|
|
128
|
+
"schedule-filter-widget": "3.0.7",
|
|
129
129
|
"simple-chat-widget": "^1.0.31",
|
|
130
130
|
"simple-oauth2": "^4.1.0",
|
|
131
131
|
"slick-carousel": "^1.8.1",
|
|
@@ -678,8 +678,9 @@ export const rejectInvitation = (token) => async (dispatch) => {
|
|
|
678
678
|
|
|
679
679
|
export const getRSVPInvitation = (token, eventId) => async (dispatch) => {
|
|
680
680
|
let params = {
|
|
681
|
-
fields: "status,
|
|
682
|
-
|
|
681
|
+
fields: "status,event.id,event.rsvp_capacity",
|
|
682
|
+
expand: "event",
|
|
683
|
+
relations: "none,event.none"
|
|
683
684
|
};
|
|
684
685
|
|
|
685
686
|
return getRequest(
|
package/src/i18n/locales/en.json
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"invite_message": "You have been invited to RSVP {{event}}",
|
|
15
15
|
"decline_message": "You have declined your invitation.",
|
|
16
16
|
"confirm_message": "Your attendance to this event is confirmed.",
|
|
17
|
+
"waitlist_message": "This activity is currently full, but you have been added to the wait list and will be automatically confirmed should space become available.",
|
|
18
|
+
"full_message": "This activity is full.",
|
|
17
19
|
"speakers": "Speakers",
|
|
18
20
|
"accept_button": "YES, I will attend.",
|
|
19
21
|
"decline_button": "NO, I will not attend."
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { useParams } from "react-router-dom";
|
|
3
2
|
import { connect } from "react-redux";
|
|
4
3
|
import { useTranslation } from "react-i18next";
|
|
5
4
|
import { getOverflowEventByKey } from "../../actions/event-actions";
|
|
6
5
|
import { Container, Box, CircularProgress, Typography, Fade } from "@mui/material";
|
|
7
6
|
import VideoComponent from "../../components/VideoComponent";
|
|
8
7
|
import ErrorMessage from "../../components/ErrorMessage";
|
|
8
|
+
import withRealTimeUpdates from "../../utils/real_time_updates/withRealTimeUpdates";
|
|
9
9
|
import "../../i18n";
|
|
10
10
|
|
|
11
11
|
const OverflowPlayerPage = ({
|
|
@@ -25,7 +25,7 @@ const OverflowPlayerPage = ({
|
|
|
25
25
|
if (overflowStreamKey) {
|
|
26
26
|
fetchOverflowEvent(overflowStreamKey);
|
|
27
27
|
}
|
|
28
|
-
}, [overflowStreamKey, fetchOverflowEvent]);
|
|
28
|
+
}, [overflowStreamKey, fetchOverflowEvent, event?.overflow_streaming_url]);
|
|
29
29
|
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
if (event && !loading && !error) {
|
|
@@ -146,4 +146,4 @@ const mapDispatchToProps = (dispatch) => ({
|
|
|
146
146
|
fetchOverflowEvent: (streamKey) => dispatch(getOverflowEventByKey(streamKey))
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
export default connect(mapStateToProps, mapDispatchToProps)(OverflowPlayerPage);
|
|
149
|
+
export default connect(mapStateToProps, mapDispatchToProps)(withRealTimeUpdates(OverflowPlayerPage));
|
|
@@ -144,7 +144,9 @@ const userReducer = (state = DEFAULT_STATE, action) => {
|
|
|
144
144
|
return { ...state, rsvpInvitation: null }
|
|
145
145
|
}
|
|
146
146
|
case RECEIVE_RSVP_INVITATION: {
|
|
147
|
-
|
|
147
|
+
let invitation = payload.response;
|
|
148
|
+
invitation.event_id = invitation.event.id;
|
|
149
|
+
return { ...state, rsvpInvitation: invitation }
|
|
148
150
|
}
|
|
149
151
|
case RSVP_INVITATION_ERROR: {
|
|
150
152
|
const { errorMessage } = payload;
|
|
@@ -7,7 +7,7 @@ import Layout from "../components/Layout";
|
|
|
7
7
|
import { acceptRSVPInvitation, declineRSVPInvitation, getRSVPInvitation } from "../actions/user-actions";
|
|
8
8
|
import { getEventById } from "../actions/event-actions";
|
|
9
9
|
import styles from "../styles/rsvp-page.module.scss"
|
|
10
|
-
import { RSVP_STATUS } from "@utils/rsvpConstants";
|
|
10
|
+
import { RSVP_STATUS, RSVP_CAPACITY } from "@utils/rsvpConstants";
|
|
11
11
|
import { Badge } from "react-bootstrap";
|
|
12
12
|
import "../i18n";
|
|
13
13
|
|
|
@@ -96,15 +96,18 @@ const RSVPPage = ({ location, rsvpInvitation, event, getRSVPInvitation, acceptRS
|
|
|
96
96
|
}
|
|
97
97
|
<div className={styles.buttonWrapper}>
|
|
98
98
|
{errorMessage && (
|
|
99
|
-
|
|
99
|
+
<h3 dangerouslySetInnerHTML={{ __html: errorMessage }} />
|
|
100
100
|
)}
|
|
101
101
|
{rsvpInvitation?.status === RSVP_STATUS.rejected && (
|
|
102
102
|
<h4>{t("rsvp_page.decline_message")} </h4>
|
|
103
103
|
)}
|
|
104
104
|
{rsvpInvitation?.status === RSVP_STATUS.accepted && (
|
|
105
|
-
|
|
105
|
+
rsvpInvitation?.rsvp?.seat_type === RSVP_CAPACITY.waitlist ?
|
|
106
|
+
<h4>{t("rsvp_page.waitlist_message")} </h4>
|
|
107
|
+
:
|
|
108
|
+
<h4>{t("rsvp_page.confirm_message")} </h4>
|
|
106
109
|
)}
|
|
107
|
-
{rsvpInvitation?.status === RSVP_STATUS.pending && (
|
|
110
|
+
{rsvpInvitation?.status === RSVP_STATUS.pending && rsvpInvitation?.event?.rsvp_capacity !== RSVP_CAPACITY.full && (
|
|
108
111
|
<>
|
|
109
112
|
<button className="button is-large" onClick={() => handleConfirmRSVP(true)}>
|
|
110
113
|
{t("rsvp_page.accept_button")}
|
|
@@ -113,13 +116,18 @@ const RSVPPage = ({ location, rsvpInvitation, event, getRSVPInvitation, acceptRS
|
|
|
113
116
|
{t("rsvp_page.decline_button")}
|
|
114
117
|
</button>
|
|
115
118
|
</>
|
|
116
|
-
)
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
{rsvpInvitation?.status === RSVP_STATUS.pending && rsvpInvitation?.event?.rsvp_capacity === RSVP_CAPACITY.full && (
|
|
122
|
+
<h4>{t("rsvp_page.full_message")} </h4>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
117
125
|
</div>
|
|
118
126
|
</>)
|
|
119
127
|
:
|
|
120
128
|
(
|
|
121
129
|
<>
|
|
122
|
-
|
|
130
|
+
<h3>Activity not found.</h3>
|
|
123
131
|
</>
|
|
124
132
|
)
|
|
125
133
|
}
|
|
@@ -59,6 +59,11 @@ class ActivityTypeSynchStrategy extends AbstractSynchStrategy{
|
|
|
59
59
|
|
|
60
60
|
return Promise.resolve(res);
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
// Unknown op
|
|
64
|
+
const msg = `ActivityTypeSynchStrategy::process unknown entity_operator '${entity_operator}'`;
|
|
65
|
+
console.warn(msg);
|
|
66
|
+
throw new Error(msg);
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
|
|
@@ -21,91 +21,97 @@ class SpeakerSynchStrategy extends AbstractSynchStrategy {
|
|
|
21
21
|
console.log(`SpeakerSynchStrategy::process`, payload);
|
|
22
22
|
|
|
23
23
|
const {entity_operator, entity_id} = payload;
|
|
24
|
+
if (entity_operator === 'UPDATE') {
|
|
24
25
|
|
|
25
|
-
if (entity_operator !== 'UPDATE') return;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
const entity = await fetchSpeakerById(this.summit.id, entity_id, this.accessToken);
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
if (!entity) return Promise.reject('SpeakerSynchStrategy::process entity not retrieved.');
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
let eventsData = [...this.allEvents];
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
// Remove speaker and re-insert
|
|
34
|
+
this.allSpeakers = this.allSpeakers.filter(s => s.id !== entity_id);
|
|
35
|
+
this.allSpeakers.push(entity);
|
|
36
|
+
this.allIDXSpeakers = rebuildIndex(this.allSpeakers);
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
// Update events where speaker is listed
|
|
39
|
+
for (const eventId of entity.presentations || []) {
|
|
40
|
+
const res = getIndexedItem(this.allIDXEvents, eventsData, eventId);
|
|
41
|
+
if (!res || !Array.isArray(res.item.speakers)) {
|
|
42
|
+
console.log(`SpeakerSynchStrategy::process: event ${eventId} not found or invalid`);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const updatedSpeakers = res.item.speakers.map(s =>
|
|
47
|
+
s.id === entity.id ? entity : s
|
|
48
|
+
);
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
eventsData[res.idx] = {
|
|
51
|
+
...res.item,
|
|
52
|
+
speakers: updatedSpeakers,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
// Update events where speaker is moderator
|
|
57
|
+
for (const eventId of entity.moderated_presentations || []) {
|
|
58
|
+
const res = getIndexedItem(this.allIDXEvents, eventsData, eventId);
|
|
59
|
+
if (!res) {
|
|
60
|
+
console.log(`SpeakerSynchStrategy::process: moderator event ${eventId} not found`);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
eventsData[res.idx] = {
|
|
65
|
+
...res.item,
|
|
66
|
+
moderator: entity,
|
|
67
|
+
};
|
|
62
68
|
}
|
|
63
69
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
// Update summit timestamp
|
|
71
|
+
this.summit = {
|
|
72
|
+
...this.summit,
|
|
73
|
+
timestamp: moment().unix(),
|
|
67
74
|
};
|
|
68
|
-
}
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
...this.summit,
|
|
73
|
-
timestamp: moment().unix(),
|
|
74
|
-
};
|
|
76
|
+
// update files on cache
|
|
77
|
+
console.log(`SpeakerSynchStrategy::process updating cache files`);
|
|
75
78
|
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
try {
|
|
80
|
+
const localNowUtc = Date.now();
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
const localNowUtc = Date.now();
|
|
82
|
+
await saveFile(this.summit.id, BUCKET_SUMMIT_DATA_KEY, this.summit, localNowUtc);
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
await saveFile(this.summit.id, BUCKET_EVENTS_DATA_KEY, eventsData, localNowUtc);
|
|
83
85
|
|
|
84
|
-
|
|
86
|
+
await saveFile(this.summit.id, BUCKET_EVENTS_IDX_DATA_KEY, this.allIDXEvents, localNowUtc);
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
await saveFile(this.summit.id, BUCKET_SPEAKERS_DATA_KEY, this.allSpeakers, localNowUtc);
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
await saveFile(this.summit.id, BUCKET_SPEAKERS_IDX_DATA_KEY, this.allIDXSpeakers, localNowUtc);
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
} catch (e) {
|
|
93
|
+
console.log(e);
|
|
94
|
+
}
|
|
91
95
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
let res = {
|
|
97
|
+
payload,
|
|
98
|
+
entity,
|
|
99
|
+
summit: this.summit,
|
|
100
|
+
eventsData,
|
|
101
|
+
allIDXEvents: this.allIDXEvents,
|
|
102
|
+
allSpeakers: this.allSpeakers,
|
|
103
|
+
allIDXSpeakers: this.allIDXSpeakers
|
|
104
|
+
};
|
|
95
105
|
|
|
96
|
-
|
|
97
|
-
payload,
|
|
98
|
-
entity,
|
|
99
|
-
summit: this.summit,
|
|
100
|
-
eventsData,
|
|
101
|
-
allIDXEvents: this.allIDXEvents,
|
|
102
|
-
allSpeakers: this.allSpeakers,
|
|
103
|
-
allIDXSpeakers: this.allIDXSpeakers
|
|
104
|
-
};
|
|
106
|
+
console.log(`SpeakerSynchStrategy::process done`, res);
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
return Promise.resolve(res);
|
|
109
|
+
}
|
|
107
110
|
|
|
108
|
-
|
|
111
|
+
// Unknown op
|
|
112
|
+
const msg = `SpeakerSynchStrategy::process unknown entity_operator '${entity_operator}'`;
|
|
113
|
+
console.warn(msg);
|
|
114
|
+
throw new Error(msg);
|
|
109
115
|
|
|
110
116
|
}
|
|
111
117
|
|
|
@@ -58,6 +58,11 @@ class SummitSynchStrategy extends AbstractSynchStrategy {
|
|
|
58
58
|
return Promise.resolve(res);
|
|
59
59
|
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
// Unknown op
|
|
63
|
+
const msg = `SummitSynchStrategy::process unknown entity_operator '${entity_operator}'`;
|
|
64
|
+
console.warn(msg);
|
|
65
|
+
throw new Error(msg);
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
|
|
@@ -83,6 +83,11 @@ class VenueRoomSynchStrategy extends AbstractSynchStrategy{
|
|
|
83
83
|
return Promise.resolve(res);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
|
|
87
|
+
// Unknown op
|
|
88
|
+
const msg = `VenueRoomSynchStrategy::process unknown entity_operator '${entity_operator}'`;
|
|
89
|
+
console.warn(msg);
|
|
90
|
+
throw new Error(msg);
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
|