@openeventkit/event-site 2.1.25 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.1.25",
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.6",
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,event_id",
682
- relations: "none"
681
+ fields: "status,event.id,event.rsvp_capacity",
682
+ expand: "event",
683
+ relations: "none,event.none"
683
684
  };
684
685
 
685
686
  return getRequest(
@@ -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
- return { ...state, rsvpInvitation: payload.response }
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
- <h3 dangerouslySetInnerHTML={{ __html: errorMessage }} />
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
- <h4>{t("rsvp_page.confirm_message")} </h4>
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
- <h3>Activity not found.</h3>
130
+ <h3>Activity not found.</h3>
123
131
  </>
124
132
  )
125
133
  }
@@ -4,4 +4,10 @@ const RSVP_STATUS = {
4
4
  rejected: "Rejected"
5
5
  };
6
6
 
7
- export { RSVP_STATUS };
7
+ const RSVP_CAPACITY = {
8
+ regular: "Regular",
9
+ waitlist: "WaitList",
10
+ full: "Full",
11
+ };
12
+
13
+ export { RSVP_STATUS, RSVP_CAPACITY };