@openeventkit/event-site 2.0.145 → 2.0.147

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/gatsby-config.mjs CHANGED
@@ -164,7 +164,7 @@ const plugins = [
164
164
  remarkGfm
165
165
  ],
166
166
  rehypePlugins: [
167
- rehypeMdxImportMedia
167
+ rehypeMdxImportMedia
168
168
  ]
169
169
  }
170
170
  }
@@ -228,8 +228,7 @@ const plugins = [
228
228
  }
229
229
  }
230
230
  },
231
- ...googleTagManagerPlugin,
232
- "gatsby-plugin-netlify", // make sure to keep it last in the array
231
+ ...googleTagManagerPlugin
233
232
  ];
234
233
 
235
234
  const siteMetadata = {
package/gatsby-node.js CHANGED
@@ -238,7 +238,19 @@ const SSR_getSpeakers = async (baseUrl, summitId, accessToken, filter = null) =>
238
238
  const SSR_getSummit = async (baseUrl, summitId) => {
239
239
 
240
240
  const params = {
241
- expand: "event_types,tracks,tracks.subtracks,track_groups,presentation_levels,locations.rooms,locations.floors,order_extra_questions.values,schedule_settings,schedule_settings.filters,schedule_settings.pre_filters",
241
+ expand: "event_types," +
242
+ "tracks," +
243
+ "tracks.subtracks," +
244
+ "track_groups," +
245
+ "presentation_levels," +
246
+ "locations," +
247
+ "locations.rooms," +
248
+ "locations.floors," +
249
+ "order_extra_questions.values," +
250
+ "schedule_settings," +
251
+ "schedule_settings.filters," +
252
+ "schedule_settings.pre_filters,"+
253
+ "ticket_types",
242
254
  t: Date.now()
243
255
  };
244
256
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.145",
4
+ "version": "2.0.147",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
@@ -59,7 +59,6 @@
59
59
  "gatsby-plugin-image": "^3.13.1",
60
60
  "gatsby-plugin-manifest": "^5.13.1",
61
61
  "gatsby-plugin-mdx": "^5.12.3",
62
- "gatsby-plugin-netlify": "^5.1.1",
63
62
  "gatsby-plugin-page-creator": "^5.13.1",
64
63
  "gatsby-plugin-sass": "^6.13.1",
65
64
  "gatsby-plugin-sharp": "^5.13.1",
@@ -130,7 +129,7 @@
130
129
  "stream-browserify": "^3.0.0",
131
130
  "stream-chat": "^2.7.2",
132
131
  "stream-chat-react": "3.1.7",
133
- "summit-registration-lite": "5.0.41",
132
+ "summit-registration-lite": "5.0.42",
134
133
  "superagent": "8.0.9",
135
134
  "sweetalert2": "^9.17.0",
136
135
  "upcoming-events-widget": "3.0.7",
@@ -188,6 +188,7 @@ export const fetchSummitById = async(summitId, accessToken = null) => {
188
188
  'tracks.subtracks',
189
189
  'track_groups',
190
190
  'presentation_levels',
191
+ 'locations',
191
192
  'locations.rooms',
192
193
  'locations.floors',
193
194
  'order_extra_questions.values',
@@ -119,6 +119,7 @@ const RegistrationLiteComponent = ({
119
119
  const initialOrderComplete1stParagraph = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteInitialOrderComplete1stParagraph);
120
120
  const initialOrderComplete2ndParagraph = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteInitialOrderComplete2ndParagraph);
121
121
  const initialOrderCompleteButton = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteInitialOrderCompleteButton);
122
+ const orderCompleteTitle = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteOrderCompleteTitle);
122
123
  const orderComplete1stParagraph = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteOrderComplete1stParagraph);
123
124
  const orderComplete2ndParagraph = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteOrderComplete2ndParagraph);
124
125
  const orderCompleteButton = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteOrderCompleteButton);
@@ -187,6 +188,7 @@ const RegistrationLiteComponent = ({
187
188
  initialOrderComplete1stParagraph: initialOrderComplete1stParagraph,
188
189
  initialOrderComplete2ndParagraph: initialOrderComplete2ndParagraph,
189
190
  initialOrderCompleteButton: initialOrderCompleteButton,
191
+ orderCompleteTitle: orderCompleteTitle,
190
192
  orderComplete1stParagraph: orderComplete1stParagraph,
191
193
  orderComplete2ndParagraph: orderComplete2ndParagraph,
192
194
  orderCompleteButton: orderCompleteButton,
@@ -26,7 +26,9 @@ export const TicketPopupReassignForm = ({ ticket, summit, order }) => {
26
26
  const [showConfirm, setShowConfirm] = useState(false);
27
27
  const [newAttendeeEmail, setNewAttendeeEmail] = useState('');
28
28
  const [showSaveMessage, setShowSaveMessage] = useState(false);
29
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
29
30
  const [message, setMessage] = useState('')
31
+ const [errorMessage, setErrorMessage] = useState('')
30
32
 
31
33
  const { onTicketAssignChange } = useTicketAssignedContext();
32
34
 
@@ -38,6 +40,11 @@ export const TicketPopupReassignForm = ({ ticket, summit, order }) => {
38
40
  setTimeout(() => setShowSaveMessage(false), 5000);
39
41
  };
40
42
 
43
+ const toggleErrorMessage = () => {
44
+ setTimeout(() => setShowErrorMessage(true), 50);
45
+ setTimeout(() => setShowErrorMessage(false), 5000);
46
+ };
47
+
41
48
  const handleSubmit = (values, formikHelpers) => {
42
49
  setNewAttendeeEmail(values.attendee_email);
43
50
  setShowConfirm(true);
@@ -62,14 +69,17 @@ export const TicketPopupReassignForm = ({ ticket, summit, order }) => {
62
69
 
63
70
  dispatch(changeTicketAttendee({
64
71
  ticket,
65
- message,
72
+ message,
66
73
  order,
67
74
  data: { attendee_email: newAttendeeEmail }
68
75
  })).then((updatedTicket) => {
69
76
  onTicketAssignChange(updatedTicket);
70
77
  toggleSaveMessage();
71
78
  setMessage('');
72
- });
79
+ }).catch((err) => {
80
+ setErrorMessage(err);
81
+ toggleErrorMessage();
82
+ })
73
83
  };
74
84
 
75
85
  const handleConfirmReject = () => {
@@ -83,12 +93,12 @@ export const TicketPopupReassignForm = ({ ticket, summit, order }) => {
83
93
  <form className="ticket-reassign-form" onSubmit={formik.handleSubmit}>
84
94
  <div className="ticket-popup-form-body">
85
95
  {
86
- isTicketPrinted ?
96
+ isTicketPrinted ?
87
97
  <>
88
98
  <p>
89
99
  {t("ticket_popup.reassign_printed_ticket")}
90
100
  </p>
91
- </>
101
+ </>
92
102
  :
93
103
  <>
94
104
  {showSaveMessage && (
@@ -104,6 +114,19 @@ export const TicketPopupReassignForm = ({ ticket, summit, order }) => {
104
114
  </CSSTransition>
105
115
  )}
106
116
 
117
+ {showErrorMessage && (
118
+ <CSSTransition
119
+ unmountOnExit
120
+ in={showErrorMessage}
121
+ timeout={2000}
122
+ classNames="fade-in-out"
123
+ >
124
+ <Alert bsStyle="warning" className="ticket-popup-form-alert text-center">
125
+ {errorMessage}
126
+ </Alert>
127
+ </CSSTransition>
128
+ )}
129
+
107
130
  {!isUserTicketOwner && (
108
131
  <>
109
132
  <p>
@@ -167,4 +190,4 @@ export const TicketPopupReassignForm = ({ ticket, summit, order }) => {
167
190
  />
168
191
  </>
169
192
  )
170
- };
193
+ };
@@ -28,6 +28,7 @@ import { objectToQueryString } from 'openstack-uicore-foundation/lib/utils/metho
28
28
  import { getIdToken } from 'openstack-uicore-foundation/lib/security/methods';
29
29
  import { getUserOrders } from "./order-actions";
30
30
  import { updateProfile } from './user-actions';
31
+ import { processActionError } from './../../util/helpers/index';
31
32
 
32
33
  export const GET_TICKETS = 'GET_TICKETS';
33
34
  export const ASSIGN_TICKET = 'ASSIGN_TICKET';
@@ -49,10 +50,10 @@ export const TICKET_ATTENDEE_KEYS = {
49
50
  extraQuestions: 'extra_questions'
50
51
  }
51
52
 
52
- const customFetchErrorHandler = (response) => {
53
+ const customFetchErrorHandler = (response) => (dispatch) => {
53
54
  let code = response.status;
54
55
  let msg = response.statusText;
55
-
56
+ dispatch(stopLoading());
56
57
  switch (code) {
57
58
  case 403:
58
59
  Swal.fire('ERROR', i18n.t('errors.user_not_authz'), 'warning');
@@ -76,6 +77,24 @@ const customFetchErrorHandler = (response) => {
76
77
  }
77
78
  };
78
79
 
80
+ const customWithout412ErrorHandler = (
81
+ err
82
+ ) => (dispatch) => {
83
+ dispatch(stopLoading());
84
+ switch (err.status) {
85
+ case 403:
86
+ Swal.fire('ERROR', i18n.t('errors.user_not_authz'), 'warning');
87
+ break;
88
+ case 401:
89
+ Swal.fire('ERROR', i18n.t('errors.session_expired'), 'error');
90
+ break;
91
+ case 500:
92
+ Swal.fire('ERROR', i18n.t('errors.server_error'), 'error');
93
+ break;
94
+ }
95
+ };
96
+
97
+
79
98
  export const getUserTickets = ({ page = 1, perPage = 5 }) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
80
99
  const { userState: { userProfile }, summitState: { summit } } = getState();
81
100
 
@@ -229,7 +248,7 @@ export const assignAttendee = ({
229
248
  createAction(ASSIGN_TICKET),
230
249
  `${apiBaseUrl}/api/v1/summits/all/orders/${orderId}/tickets/${ticket.id}/attendee`,
231
250
  normalizedEntity,
232
- authErrorHandler
251
+ customWithout412ErrorHandler
233
252
  )(params)(dispatch).then((newTicket) => {
234
253
  if (reassignOrderId && context === 'ticket-list') {
235
254
  dispatch(getUserTickets({ page: ticketPage }));
@@ -238,9 +257,8 @@ export const assignAttendee = ({
238
257
  dispatch(getTicketsByOrder({ orderId, page: orderTicketsCurrentPage }));
239
258
  }
240
259
  return newTicket;
241
- }).catch(e => {
242
- dispatch(stopLoading());
243
- return (e);
260
+ }).catch(({err}) => {
261
+ processActionError(err);
244
262
  });
245
263
  }
246
264
 
@@ -301,7 +319,7 @@ export const editOwnedTicket = ({
301
319
  `${apiBaseUrl}/api/v1/summits/all/orders/all/tickets/${ticket.id}`,
302
320
  normalizedEntity,
303
321
  authErrorHandler
304
- )(params)(dispatch).then(async () => {
322
+ )(params)(dispatch).then(async () => {
305
323
  const hasManager = ticket.owner?.manager?.id || ticket.owner?.manager_id;
306
324
  // email should match ( only update my profile is ticket belongs to me!)
307
325
  // and if the ticket doesn't have a manager
@@ -392,7 +410,7 @@ export const changeTicketAttendee = ({
392
410
  createAction(REMOVE_TICKET_ATTENDEE),
393
411
  `${apiBaseUrl}/api/v1/summits/all/orders/${orderId}/tickets/${ticket.id}/attendee`,
394
412
  {},
395
- authErrorHandler
413
+ customWithout412ErrorHandler
396
414
  )(params)(dispatch).then(() => {
397
415
  return dispatch(assignAttendee({
398
416
  ticket,
@@ -409,10 +427,8 @@ export const changeTicketAttendee = ({
409
427
  reassignOrderId: orderId,
410
428
  }
411
429
  }));
412
- }).catch((e) => {
413
- console.log('error', e)
414
- dispatch(stopLoading());
415
- return (e);
430
+ }).catch(({err}) => {
431
+ processActionError(err);
416
432
  });
417
433
  };
418
434
 
@@ -573,16 +589,16 @@ export const delegateTicket = ({
573
589
  return putRequest(
574
590
  null,
575
591
  createAction(DELEGATE_TICKET),
576
- `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${orderId}/tickets/${ticket.id}/delegate`,
592
+ `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${orderId}/tickets/${ticket.id}/delegate`,
577
593
  normalizedEntity,
578
- authErrorHandler
594
+ authErrorHandler
579
595
  )(params)(dispatch).then(() => {
580
596
  dispatch(stopLoading());
581
597
  // Note: refresh the list view after updating the ticket.
582
598
  if (context === 'ticket-list') {
583
599
  dispatch(getUserTickets({ page: ticketPage }));
584
600
  } else {
585
- dispatch(getUserOrders({ page: orderPage })).then(() =>
601
+ dispatch(getUserOrders({ page: orderPage })).then(() =>
586
602
  dispatch(getTicketsByOrder({ orderId: ticket.order_id, page: orderTicketsCurrentPage }))
587
603
  );
588
604
  }
@@ -7,3 +7,16 @@ export * from './getFormattedDate';
7
7
  export * from './getFormattedTime';
8
8
  export * from './getWindowScroll';
9
9
  export * from './formatCurrency';
10
+
11
+
12
+ export const processActionError = (err) => {
13
+ if(err?.status == 412) {
14
+ let msg = '';
15
+ for (const [key, value] of Object.entries(err.response.body.errors)) {
16
+ msg += isNaN(key) ? `${key}: ` : "";
17
+ msg += `${value}`;
18
+ }
19
+ throw msg;
20
+ }
21
+ throw err;
22
+ }
@@ -1,4 +1,4 @@
1
- $color_accent: #00B189;
1
+ $color_accent: #00A2FF;
2
2
  $color_alerts: #ff0000;
3
3
  $color_background_light: #ffffff;
4
4
  $color_background_dark: #000000;
@@ -19,16 +19,16 @@ $color_input_text_color_light: #363636;
19
19
  $color_input_text_color_dark: #ffffff;
20
20
  $color_input_text_color_disabled_light: #ffffff;
21
21
  $color_input_text_color_disabled_dark: #ffffff;
22
- $color_primary: #8DC63F;
22
+ $color_primary: #000000;
23
23
  $color_primary_contrast: #FFFFFF;
24
- $color_secondary: #5e5f62;
25
- $color_secondary_contrast: #005870;
24
+ $color_secondary: #00A2FF;
25
+ $color_secondary_contrast: #181818;
26
26
  $color_text_light: #ffffff;
27
27
  $color_text_med: #828282;
28
- $color_text_dark: #5e5f62;
28
+ $color_text_dark: #000000;
29
29
  $color_text_input_hints_light: #7b7b7b;
30
30
  $color_text_input_hints_dark: #7b7b7b;
31
- $color_text_input_hints: #c4c4c4;
31
+ $color_text_input_hints: #131313;
32
32
 
33
33
  :root {
34
34
  --color_primary: #{$color_primary};
@@ -1,31 +1,26 @@
1
- $font-family: "Franklin Gothic";
1
+ /**
2
+ * Warning:
3
+ * Dont edit this file by hand, has been generated by fonts scss util
4
+ * Generated with font values set via CMS
5
+ **/
6
+
7
+ $font-family: 'Nunito Sans', sans-serif;
2
8
 
3
9
  :root {
4
- --font_family: "Franklin Gothic" !important;
10
+ --font_family: #{$font-family};
5
11
  }
6
12
 
7
- @font-face {
8
- font-family: "Franklin Gothic";
9
- src: url("/fonts/franklingothic-book.ttf") format("truetype");
10
- font-weight: normal;
11
- }
12
- @font-face {
13
- font-family: "Franklin Gothic";
14
- src: url("/fonts/franklingothic-medium.ttf") format("truetype");
15
- font-weight: bold;
16
- }
17
-
18
13
  %font-regular {
19
- font-family: var(--font_family);
14
+ font-family: 'Nunito Sans', sans-serif;
20
15
  font-weight: 400;
21
16
  }
22
17
 
23
18
  %font-semi {
24
- font-family: var(--font_family);
19
+ font-family: 'Nunito Sans', sans-serif;
25
20
  font-weight: 600;
26
21
  }
27
22
 
28
23
  %font-bold {
29
- font-family: var(--font_family);
24
+ font-family: 'Nunito Sans', sans-serif;
30
25
  font-weight: 700;
31
26
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { GatsbyImage, getImage } from "gatsby-plugin-image";
2
+ import { getImage, getSrc } from "gatsby-plugin-image";
3
3
  import Masonry from "react-masonry-css";
4
4
  import Slider from "react-slick";
5
5
  import Link from "../../components/Link";
@@ -32,11 +32,11 @@ export default React.forwardRef(({ data }, ref) => (
32
32
  if (item.images[0].link) {
33
33
  return (
34
34
  <Link key={index} to={item.images[0].link}>
35
- <GatsbyImage image={image} alt={alt} />
35
+ <img src={getSrc(image)} alt={alt} />
36
36
  </Link>
37
37
  );
38
38
  } else {
39
- return <GatsbyImage key={index} image={image} alt={alt} />;
39
+ return <img key={index} src={getSrc(image)} alt={alt} />;
40
40
  };
41
41
  } else if (item.images && item.images.length > 1) {
42
42
  return (
@@ -51,11 +51,11 @@ export default React.forwardRef(({ data }, ref) => (
51
51
  if (image.link) {
52
52
  return (
53
53
  <Link key={indexSlide} to={image.link}>
54
- <GatsbyImage image={img} alt={alt} />
54
+ <img src={getSrc(img)} alt={alt} />
55
55
  </Link>
56
56
  );
57
57
  } else {
58
- return <GatsbyImage key={indexSlide} image={img} alt={alt} />;
58
+ return <img key={indexSlide} src={getSrc(img)} alt={alt} />;
59
59
  };
60
60
  })}
61
61
  </Slider>
@@ -59,7 +59,7 @@ const SponsorPageTemplate = ({ sponsorId, sponsors, scanBadge, eventId, lastData
59
59
  };
60
60
 
61
61
  if (notFound) {
62
- return <Interstitial title="Sponsor not found" navigateTo="/a/sponsors" ontained />
62
+ return <Interstitial title="Sponsor not found" navigateTo="/a/sponsors" contained />
63
63
  }
64
64
 
65
65
  const {
@@ -17,6 +17,7 @@ export const MARKETING_SETTINGS_KEYS = {
17
17
  regLiteInitialOrderComplete1stParagraph: "REG_LITE_INITIAL_ORDER_COMPLETE_STEP_1ST_PARAGRAPH",
18
18
  regLiteInitialOrderComplete2ndParagraph: "REG_LITE_INITIAL_ORDER_COMPLETE_STEP_2ND_PARAGRAPH",
19
19
  regLiteInitialOrderCompleteButton: "REG_LITE_INITIAL_ORDER_COMPLETE_BTN_LABEL",
20
+ regLiteOrderCompleteTitle: "REG_LITE_ORDER_COMPLETE_TITLE",
20
21
  regLiteOrderComplete1stParagraph: "REG_LITE_ORDER_COMPLETE_STEP_1ST_PARAGRAPH",
21
22
  regLiteOrderComplete2ndParagraph: "REG_LITE_ORDER_COMPLETE_STEP_2ND_PARAGRAPH",
22
23
  regLiteOrderCompleteButton: "REG_LITE_ORDER_COMPLETE_BTN_LABEL",