@openeventkit/event-site 2.1.0-beta.0 → 2.1.1
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 +5 -1
- package/package.json +5 -3
- package/src/actions/fetch-entities-actions.js +26 -0
- package/src/cms/config/collections/defaultPagesCollection/marketingPage/index.js +10 -5
- package/src/cms/config/collections/defaultPagesCollection/marketingPage/typeDefs.js +8 -3
- package/src/components/LogoutButton.js +3 -9
- package/src/components/MyOrdersTicketsComponent.js +2 -2
- package/src/components/RegistrationLiteComponent.js +5 -0
- package/src/components/summit-my-orders-tickets/store/actions/order-actions.js +12 -5
- package/src/components/summit-my-orders-tickets/store/actions/summit-actions.js +5 -2
- package/src/components/summit-my-orders-tickets/store/actions/ticket-actions.js +65 -22
- package/src/components/summit-my-orders-tickets/store/actions/user-actions.js +6 -3
- package/src/content/marketing-page/index.json +4 -3
- package/src/pages/a/[...].js +2 -2
- package/src/pages/index.js +1 -0
- package/src/templates/content-page/shortcodes.js +1 -1
- package/src/templates/marketing-page-template/styles.module.scss +2 -0
- package/src/utils/loginUtils.js +15 -4
- package/src/workers/sync_strategies/activity_type_synch_strategy.js +4 -5
- package/src/workers/sync_strategies/synch_strategy_factory.js +5 -2
- package/src/workers/sync_strategies/track_synch_strategy.js +76 -0
package/gatsby-config.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { createRequire } from "module";
|
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
import webpack from "webpack";
|
|
6
6
|
import remarkGfm from "remark-gfm";
|
|
7
|
+
import rehypeExternalLinks from "rehype-external-links";
|
|
7
8
|
import rehypeMdxImportMedia from "rehype-mdx-import-media";
|
|
8
9
|
|
|
9
10
|
const require = createRequire(import.meta.url);
|
|
@@ -154,7 +155,9 @@ const plugins = [
|
|
|
154
155
|
// It's important to specify the maxWidth (in pixels) of
|
|
155
156
|
// the content container as this plugin uses this as the
|
|
156
157
|
// base for generating different widths of each image.
|
|
157
|
-
maxWidth: 2048
|
|
158
|
+
maxWidth: 2048,
|
|
159
|
+
linkImagesToOriginal: false,
|
|
160
|
+
wrapperStyle: fluidResult => "margin-left: 0; margin-right: auto;"
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
],
|
|
@@ -164,6 +167,7 @@ const plugins = [
|
|
|
164
167
|
remarkGfm
|
|
165
168
|
],
|
|
166
169
|
rehypePlugins: [
|
|
170
|
+
rehypeExternalLinks,
|
|
167
171
|
rehypeMdxImportMedia
|
|
168
172
|
]
|
|
169
173
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.1",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
|
+
"@emotion/server": "^11.11.0",
|
|
7
8
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
8
9
|
"@fortawesome/free-brands-svg-icons": "^6.5.2",
|
|
9
10
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
@@ -116,10 +117,11 @@
|
|
|
116
117
|
"redux": "^4.1.2",
|
|
117
118
|
"redux-persist": "^6.0.0",
|
|
118
119
|
"redux-thunk": "^2.4.1",
|
|
120
|
+
"rehype-external-links": "^3.0.0",
|
|
119
121
|
"rehype-mdx-import-media": "^1.2.0",
|
|
120
122
|
"remark-gfm": "^4.0.0",
|
|
121
123
|
"sass": "^1.49.9",
|
|
122
|
-
"schedule-filter-widget": "3.0.
|
|
124
|
+
"schedule-filter-widget": "3.0.2",
|
|
123
125
|
"simple-chat-widget": "^1.0.31",
|
|
124
126
|
"simple-oauth2": "^4.1.0",
|
|
125
127
|
"slick-carousel": "^1.8.1",
|
|
@@ -129,7 +131,7 @@
|
|
|
129
131
|
"stream-browserify": "^3.0.0",
|
|
130
132
|
"stream-chat": "^2.7.2",
|
|
131
133
|
"stream-chat-react": "3.1.7",
|
|
132
|
-
"summit-registration-lite": "5.0.
|
|
134
|
+
"summit-registration-lite": "5.0.44",
|
|
133
135
|
"superagent": "8.0.9",
|
|
134
136
|
"sweetalert2": "^9.17.0",
|
|
135
137
|
"upcoming-events-widget": "3.0.7",
|
|
@@ -195,6 +195,32 @@ export const fetchSummitById = async(summitId, accessToken = null) => {
|
|
|
195
195
|
'schedule_settings',
|
|
196
196
|
'schedule_settings.filters',
|
|
197
197
|
'schedule_settings.pre_filters',
|
|
198
|
+
"ticket_types",
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
apiUrl.addQuery('expand', expand.join(','));
|
|
202
|
+
|
|
203
|
+
return fetch(apiUrl.toString(), {
|
|
204
|
+
method: 'GET'
|
|
205
|
+
}).then(async (response) => {
|
|
206
|
+
if (response.status === 200) {
|
|
207
|
+
return await response.json();
|
|
208
|
+
}
|
|
209
|
+
return null;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @param summitId
|
|
215
|
+
* @param trackId
|
|
216
|
+
* @param accessToken
|
|
217
|
+
* @returns {Promise<* | null>}
|
|
218
|
+
*/
|
|
219
|
+
export const fetchTrackById = async(summitId, trackId, accessToken = null) => {
|
|
220
|
+
let apiUrl = URI(`${process.env.GATSBY_SUMMIT_API_BASE_URL}/api/public/v1/summits/${summitId}/tracks/${trackId}`);
|
|
221
|
+
|
|
222
|
+
const expand = [
|
|
223
|
+
'subtracks',
|
|
198
224
|
]
|
|
199
225
|
|
|
200
226
|
apiUrl.addQuery('expand', expand.join(','));
|
|
@@ -79,7 +79,12 @@ const marketingPage = {
|
|
|
79
79
|
label: "Display",
|
|
80
80
|
name: "display",
|
|
81
81
|
required: false
|
|
82
|
-
})
|
|
82
|
+
}),
|
|
83
|
+
stringField({
|
|
84
|
+
label: "External Registration Link",
|
|
85
|
+
name: "externalRegistrationLink",
|
|
86
|
+
required: false
|
|
87
|
+
}),
|
|
83
88
|
]
|
|
84
89
|
}),
|
|
85
90
|
objectField({
|
|
@@ -116,7 +121,7 @@ const marketingPage = {
|
|
|
116
121
|
required: false
|
|
117
122
|
}),
|
|
118
123
|
stringField({
|
|
119
|
-
label: "Text",
|
|
124
|
+
label: "Text",
|
|
120
125
|
name: "text"
|
|
121
126
|
})
|
|
122
127
|
]
|
|
@@ -152,7 +157,7 @@ const marketingPage = {
|
|
|
152
157
|
required: false
|
|
153
158
|
}),
|
|
154
159
|
stringField({
|
|
155
|
-
label: "Title",
|
|
160
|
+
label: "Title",
|
|
156
161
|
name: "title"
|
|
157
162
|
})
|
|
158
163
|
]
|
|
@@ -167,7 +172,7 @@ const marketingPage = {
|
|
|
167
172
|
required: false
|
|
168
173
|
}),
|
|
169
174
|
stringField({
|
|
170
|
-
label: "Title",
|
|
175
|
+
label: "Title",
|
|
171
176
|
name: "title",
|
|
172
177
|
required: false
|
|
173
178
|
})
|
|
@@ -183,7 +188,7 @@ const marketingPage = {
|
|
|
183
188
|
required: false
|
|
184
189
|
}),
|
|
185
190
|
stringField({
|
|
186
|
-
label: "Title",
|
|
191
|
+
label: "Title",
|
|
187
192
|
name: "title"
|
|
188
193
|
}),
|
|
189
194
|
imageWithAltField()
|
|
@@ -42,13 +42,18 @@ module.exports = `
|
|
|
42
42
|
display: Boolean
|
|
43
43
|
text: String
|
|
44
44
|
}
|
|
45
|
-
type
|
|
45
|
+
type MarketingPageHeroRegistrationButton {
|
|
46
|
+
text: String
|
|
47
|
+
display: Boolean
|
|
48
|
+
externalRegistrationLink: String
|
|
49
|
+
}
|
|
50
|
+
type MarketingPageHeroLoginButton {
|
|
46
51
|
text: String
|
|
47
52
|
display: Boolean
|
|
48
53
|
}
|
|
49
54
|
type MarketingPageHeroButtons {
|
|
50
|
-
loginButton:
|
|
51
|
-
registerButton:
|
|
55
|
+
loginButton: MarketingPageHeroLoginButton
|
|
56
|
+
registerButton: MarketingPageHeroRegistrationButton
|
|
52
57
|
}
|
|
53
58
|
type MarketingPageHero {
|
|
54
59
|
title: String
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { triggerLogoutEvent } from "@utils/eventTriggers";
|
|
2
|
+
import {onLogOut} from "../utils/loginUtils";
|
|
4
3
|
|
|
5
4
|
export default class
|
|
6
5
|
LogoutButton extends React.Component {
|
|
7
6
|
|
|
8
7
|
onClickLogout() {
|
|
9
|
-
|
|
10
|
-
navigate("/auth/logout", {
|
|
11
|
-
state: {
|
|
12
|
-
backUrl: window.location.pathname
|
|
13
|
-
}
|
|
14
|
-
})
|
|
8
|
+
onLogOut();
|
|
15
9
|
}
|
|
16
10
|
|
|
17
11
|
render() {
|
|
@@ -29,4 +23,4 @@ export default class
|
|
|
29
23
|
return null;
|
|
30
24
|
}
|
|
31
25
|
}
|
|
32
|
-
}
|
|
26
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as Sentry from "@sentry/react";
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
-
import { getAccessToken } from 'openstack-uicore-foundation/lib/security/methods';
|
|
5
4
|
import { getEnvVariable, IDP_BASE_URL, SUMMIT_API_BASE_URL, OAUTH2_CLIENT_ID, SUPPORT_EMAIL } from '../utils/envVariables';
|
|
6
5
|
import { MyOrdersTicketsWidget } from './summit-my-orders-tickets';
|
|
7
6
|
import { getUserProfile, ticketOwnerChange } from '../actions/user-actions';
|
|
8
7
|
|
|
9
8
|
import { SentryFallbackFunction } from "./SentryErrorComponent";
|
|
9
|
+
import {getAccessTokenSafely} from "../utils/loginUtils";
|
|
10
10
|
|
|
11
11
|
export const MyOrdersTicketsComponent = () => {
|
|
12
12
|
const dispatch = useDispatch();
|
|
@@ -21,7 +21,7 @@ export const MyOrdersTicketsComponent = () => {
|
|
|
21
21
|
idpBaseUrl: getEnvVariable(IDP_BASE_URL),
|
|
22
22
|
supportEmail: summit.support_email || getEnvVariable(SUPPORT_EMAIL),
|
|
23
23
|
loginUrl: '/',
|
|
24
|
-
getAccessToken,
|
|
24
|
+
getAccessToken: getAccessTokenSafely,
|
|
25
25
|
getUserProfile: async () => await dispatch(getUserProfile()),
|
|
26
26
|
summit,
|
|
27
27
|
user,
|
|
@@ -73,6 +73,11 @@ const RegistrationLiteComponent = ({
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
const handleOpenPopup = () => {
|
|
76
|
+
const { registerButton } = marketingPageSettings.hero.buttons;
|
|
77
|
+
if(registerButton?.externalRegistrationLink){
|
|
78
|
+
window.location = registerButton.externalRegistrationLink;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
76
81
|
setIsActive(true);
|
|
77
82
|
}
|
|
78
83
|
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
stopLoading,
|
|
20
20
|
startLoading
|
|
21
21
|
} from 'openstack-uicore-foundation/lib/utils/actions';
|
|
22
|
-
import history from '../history';
|
|
23
22
|
|
|
24
23
|
export const GET_USER_ORDERS = 'GET_ORDERS';
|
|
25
24
|
export const REFUND_ORDER = 'REFUND_ORDER';
|
|
@@ -28,7 +27,11 @@ export const SET_ACTIVE_ORDER_ID = 'SET_ACTIVE_ORDER_ID';
|
|
|
28
27
|
export const getUserOrders = ({ page = 1, perPage = 5 }) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
29
28
|
const { summitState: { summit } } = getState();
|
|
30
29
|
|
|
31
|
-
const accessToken = await getAccessToken().catch(
|
|
30
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
31
|
+
dispatch(stopLoading());
|
|
32
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
33
|
+
return Promise.reject();
|
|
34
|
+
});
|
|
32
35
|
|
|
33
36
|
if (!accessToken) return Promise.reject();
|
|
34
37
|
|
|
@@ -59,9 +62,13 @@ export const getUserOrders = ({ page = 1, perPage = 5 }) => async (dispatch, get
|
|
|
59
62
|
export const cancelOrder = ({ order }) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
60
63
|
const { orderState: { current_page } } = getState();
|
|
61
64
|
|
|
62
|
-
const accessToken = await getAccessToken().catch(
|
|
65
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
66
|
+
dispatch(stopLoading());
|
|
67
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
68
|
+
return Promise.reject();
|
|
69
|
+
});
|
|
63
70
|
|
|
64
|
-
if (!accessToken) return;
|
|
71
|
+
if (!accessToken) return Promise.reject();
|
|
65
72
|
|
|
66
73
|
dispatch(startLoading());
|
|
67
74
|
|
|
@@ -86,4 +93,4 @@ export const cancelOrder = ({ order }) => async (dispatch, getState, { getAccess
|
|
|
86
93
|
|
|
87
94
|
export const setActiveOrderId = (orderId) => async (dispatch, getState) => {
|
|
88
95
|
return dispatch(createAction(SET_ACTIVE_ORDER_ID)(orderId));
|
|
89
|
-
}
|
|
96
|
+
}
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
startLoading,
|
|
20
20
|
authErrorHandler,
|
|
21
21
|
} from 'openstack-uicore-foundation/lib/utils/actions';
|
|
22
|
-
import history from "../history";
|
|
23
22
|
|
|
24
23
|
export const SET_SUMMIT = 'SET_SUMMIT';
|
|
25
24
|
export const GET_MAIN_EXTRA_QUESTIONS = 'GET_MAIN_EXTRA_QUESTIONS';
|
|
@@ -32,7 +31,11 @@ export const getMainOrderExtraQuestions = ({ summit, attendeeId }) => async (dis
|
|
|
32
31
|
|
|
33
32
|
if (!summit || !attendeeId) return Promise.reject();
|
|
34
33
|
|
|
35
|
-
const accessToken = await getAccessToken().catch(
|
|
34
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
35
|
+
dispatch(stopLoading());
|
|
36
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
37
|
+
return Promise.reject();
|
|
38
|
+
});
|
|
36
39
|
|
|
37
40
|
if (!accessToken) return Promise.reject();
|
|
38
41
|
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
import i18n from '../../i18n';
|
|
15
15
|
import IdTokenVerifier from 'idtoken-verifier';
|
|
16
16
|
import Swal from 'sweetalert2';
|
|
17
|
-
import history from '../history';
|
|
18
17
|
import {
|
|
19
18
|
authErrorHandler,
|
|
20
19
|
getRequest,
|
|
@@ -100,7 +99,11 @@ export const getUserTickets = ({ page = 1, perPage = 5 }) => async (dispatch, ge
|
|
|
100
99
|
|
|
101
100
|
if (!summit) return Promise.reject();
|
|
102
101
|
|
|
103
|
-
const accessToken = await getAccessToken().catch(
|
|
102
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
103
|
+
dispatch(stopLoading());
|
|
104
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
105
|
+
return Promise.reject();
|
|
106
|
+
});
|
|
104
107
|
|
|
105
108
|
if (!accessToken) return Promise.reject();
|
|
106
109
|
|
|
@@ -142,9 +145,13 @@ export const getTicketById = ({order, ticket}) => async (dispatch, getState, { g
|
|
|
142
145
|
|
|
143
146
|
if (!summit) return
|
|
144
147
|
|
|
145
|
-
const accessToken = await getAccessToken().catch(
|
|
148
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
149
|
+
dispatch(stopLoading());
|
|
150
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
151
|
+
return Promise.reject();
|
|
152
|
+
});
|
|
146
153
|
|
|
147
|
-
if (!accessToken) return;
|
|
154
|
+
if (!accessToken) return Promise.reject();
|
|
148
155
|
|
|
149
156
|
dispatch(startLoading());
|
|
150
157
|
|
|
@@ -171,9 +178,13 @@ export const getTicketsByOrder = ({ orderId, page = 1, perPage = 5 }) => async (
|
|
|
171
178
|
|
|
172
179
|
dispatch(startLoading());
|
|
173
180
|
|
|
174
|
-
const accessToken = await getAccessToken().catch(
|
|
181
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
182
|
+
dispatch(stopLoading());
|
|
183
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
184
|
+
return Promise.reject();
|
|
185
|
+
});
|
|
175
186
|
|
|
176
|
-
if (!accessToken) return;
|
|
187
|
+
if (!accessToken) return Promise.reject();
|
|
177
188
|
|
|
178
189
|
const params = {
|
|
179
190
|
access_token: accessToken,
|
|
@@ -212,9 +223,13 @@ export const assignAttendee = ({
|
|
|
212
223
|
reassignOrderId = null
|
|
213
224
|
}
|
|
214
225
|
}) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
215
|
-
const accessToken = await getAccessToken().catch(
|
|
226
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
227
|
+
dispatch(stopLoading());
|
|
228
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
229
|
+
return Promise.reject();
|
|
230
|
+
});
|
|
216
231
|
|
|
217
|
-
if (!accessToken) return;
|
|
232
|
+
if (!accessToken) return Promise.reject();
|
|
218
233
|
|
|
219
234
|
dispatch(startLoading());
|
|
220
235
|
|
|
@@ -274,9 +289,13 @@ export const editOwnedTicket = ({
|
|
|
274
289
|
extra_questions,
|
|
275
290
|
}
|
|
276
291
|
}) => async (dispatch, getState, { getAccessToken, getUserProfile, apiBaseUrl, loginUrl }) => {
|
|
277
|
-
const accessToken = await getAccessToken().catch(
|
|
292
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
293
|
+
dispatch(stopLoading());
|
|
294
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
295
|
+
return Promise.reject();
|
|
296
|
+
});
|
|
278
297
|
|
|
279
|
-
if (!accessToken) return;
|
|
298
|
+
if (!accessToken) return Promise.reject();
|
|
280
299
|
|
|
281
300
|
dispatch(startLoading());
|
|
282
301
|
|
|
@@ -357,9 +376,13 @@ export const editOwnedTicket = ({
|
|
|
357
376
|
};
|
|
358
377
|
|
|
359
378
|
export const resendNotification = (ticket) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
360
|
-
const accessToken = await getAccessToken().catch(
|
|
379
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
380
|
+
dispatch(stopLoading());
|
|
381
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
382
|
+
return Promise.reject();
|
|
383
|
+
});
|
|
361
384
|
|
|
362
|
-
if (!accessToken) return;
|
|
385
|
+
if (!accessToken) return Promise.reject();
|
|
363
386
|
|
|
364
387
|
const { message } = ticket;
|
|
365
388
|
|
|
@@ -392,9 +415,13 @@ export const changeTicketAttendee = ({
|
|
|
392
415
|
context,
|
|
393
416
|
data: { attendee_email }
|
|
394
417
|
}) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
395
|
-
const accessToken = await getAccessToken().catch(
|
|
418
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
419
|
+
dispatch(stopLoading());
|
|
420
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
421
|
+
return Promise.reject();
|
|
422
|
+
});
|
|
396
423
|
|
|
397
|
-
if (!accessToken) return;
|
|
424
|
+
if (!accessToken) return Promise.reject();
|
|
398
425
|
|
|
399
426
|
dispatch(startLoading());
|
|
400
427
|
|
|
@@ -439,9 +466,13 @@ export const removeAttendee = ({ticket, context}) => async (dispatch, getState,
|
|
|
439
466
|
ticketState: { current_page: ticketPage, orderTickets: { current_page : orderTicketsCurrentPage } }
|
|
440
467
|
} = getState();
|
|
441
468
|
|
|
442
|
-
const accessToken = await getAccessToken().catch(
|
|
469
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
470
|
+
dispatch(stopLoading());
|
|
471
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
472
|
+
return Promise.reject();
|
|
473
|
+
});
|
|
443
474
|
|
|
444
|
-
if (!accessToken) return;
|
|
475
|
+
if (!accessToken) return Promise.reject();
|
|
445
476
|
|
|
446
477
|
dispatch(startLoading());
|
|
447
478
|
|
|
@@ -474,9 +505,13 @@ export const removeAttendee = ({ticket, context}) => async (dispatch, getState,
|
|
|
474
505
|
};
|
|
475
506
|
|
|
476
507
|
export const getTicketPDF = ({ ticket }) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
477
|
-
const accessToken = await getAccessToken().catch(
|
|
508
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
509
|
+
dispatch(stopLoading());
|
|
510
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
511
|
+
return Promise.reject();
|
|
512
|
+
});
|
|
478
513
|
|
|
479
|
-
if (!accessToken) return;
|
|
514
|
+
if (!accessToken) return Promise.reject();
|
|
480
515
|
|
|
481
516
|
dispatch(startLoading());
|
|
482
517
|
|
|
@@ -510,9 +545,13 @@ export const getTicketPDF = ({ ticket }) => async (dispatch, getState, { getAcce
|
|
|
510
545
|
};
|
|
511
546
|
|
|
512
547
|
export const refundTicket = ({ ticket, order }) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
513
|
-
const accessToken = await getAccessToken().catch(
|
|
548
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
549
|
+
dispatch(stopLoading());
|
|
550
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
551
|
+
return Promise.reject();
|
|
552
|
+
});
|
|
514
553
|
|
|
515
|
-
if (!accessToken) return;
|
|
554
|
+
if (!accessToken) return Promise.reject();
|
|
516
555
|
|
|
517
556
|
dispatch(startLoading());
|
|
518
557
|
|
|
@@ -559,9 +598,13 @@ export const delegateTicket = ({
|
|
|
559
598
|
extra_questions,
|
|
560
599
|
}
|
|
561
600
|
}) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
562
|
-
const accessToken = await getAccessToken().catch(
|
|
601
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
602
|
+
dispatch(stopLoading());
|
|
603
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
604
|
+
return Promise.reject();
|
|
605
|
+
});
|
|
563
606
|
|
|
564
|
-
if (!accessToken) return;
|
|
607
|
+
if (!accessToken) return Promise.reject();
|
|
565
608
|
|
|
566
609
|
dispatch(startLoading());
|
|
567
610
|
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
stopLoading,
|
|
6
6
|
startLoading
|
|
7
7
|
} from 'openstack-uicore-foundation/lib/utils/actions';
|
|
8
|
-
import history from '../history';
|
|
9
8
|
|
|
10
9
|
export const START_LOADING_IDP_PROFILE = 'START_LOADING_IDP_PROFILE';
|
|
11
10
|
export const STOP_LOADING_IDP_PROFILE = 'STOP_LOADING_IDP_PROFILE';
|
|
@@ -15,9 +14,13 @@ export const SET_USER = 'SET_USER';
|
|
|
15
14
|
export const setUser = (user) => (dispatch) => dispatch(createAction(SET_USER)(user));
|
|
16
15
|
|
|
17
16
|
export const updateProfile = (profile) => async (dispatch, getState, { getAccessToken, idpBaseUrl, loginUrl }) => {
|
|
18
|
-
const accessToken = await getAccessToken().catch(
|
|
17
|
+
const accessToken = await getAccessToken().catch(() => {
|
|
18
|
+
dispatch(stopLoading());
|
|
19
|
+
console.log('REJECTING PROMISE AFTER STOP LOADING')
|
|
20
|
+
return Promise.reject();
|
|
21
|
+
});
|
|
19
22
|
|
|
20
|
-
if (!accessToken) return;
|
|
23
|
+
if (!accessToken) return Promise.reject();
|
|
21
24
|
|
|
22
25
|
dispatch(startLoading());
|
|
23
26
|
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
"buttons": {
|
|
7
7
|
"registerButton": {
|
|
8
8
|
"text": "Register Now",
|
|
9
|
-
"display": true
|
|
9
|
+
"display": true,
|
|
10
|
+
"externalRegistrationLink": ""
|
|
10
11
|
},
|
|
11
12
|
"loginButton": {
|
|
12
13
|
"text": "Log In",
|
|
13
|
-
"display":
|
|
14
|
+
"display": false
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"images": []
|
|
@@ -30,4 +31,4 @@
|
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
"masonry": {}
|
|
33
|
-
}
|
|
34
|
+
}
|
package/src/pages/a/[...].js
CHANGED
|
@@ -82,12 +82,12 @@ const App = ({ isLoggedUser, user, summitPhase, allowClick = true, data }) => {
|
|
|
82
82
|
<MyTicketsPage path="/my-tickets" isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
83
83
|
<FullProfilePage path="/profile" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
84
84
|
<ExtraQuestionsPage path="/extra-questions" isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
85
|
-
{ !mySchedulePageJson
|
|
85
|
+
{ !mySchedulePageJson.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title:mySchedulePageJson.title, key: mySchedulePageJson.key }) }
|
|
86
86
|
<WithAuthzRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
87
87
|
<PostersPage path="/posters" trackGroupId={0} location={location} />
|
|
88
88
|
<PostersPage path="/posters/:trackGroupId" location={location} />
|
|
89
89
|
<PosterDetailPage path="/poster/:presentationId/" isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
90
|
-
{ mySchedulePageJson
|
|
90
|
+
{ mySchedulePageJson.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title: mySchedulePageJson.title, key: mySchedulePageJson.key }) }
|
|
91
91
|
<ShowOpenRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
92
92
|
<WithBadgeRoute path="/event/:eventId" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
93
93
|
<EventPage path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
|
package/src/pages/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
.masonry {
|
|
5
5
|
.grid {
|
|
6
6
|
display: flex;
|
|
7
|
+
overflow: hidden;
|
|
7
8
|
}
|
|
8
9
|
.slider {
|
|
9
10
|
margin-bottom: -5px;
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
display: inline-block;
|
|
14
15
|
width: 100%;
|
|
15
16
|
font-size: 0;
|
|
17
|
+
transform: scale(1.004);
|
|
16
18
|
.masonryImage {
|
|
17
19
|
width: 100%;
|
|
18
20
|
object-fit: cover;
|
package/src/utils/loginUtils.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getAccessToken } from 'openstack-uicore-foundation/lib/security/methods'
|
|
2
2
|
import * as Sentry from '@sentry/react'
|
|
3
3
|
import {
|
|
4
4
|
getEnvVariable,
|
|
5
5
|
AUTHORIZED_DEFAULT_PATH
|
|
6
6
|
} from "./envVariables";
|
|
7
|
+
import { navigate } from "gatsby";
|
|
8
|
+
import { triggerLogoutEvent } from "@utils/eventTriggers";
|
|
9
|
+
|
|
10
|
+
export const onLogOut = (backUrl = null) => {
|
|
11
|
+
triggerLogoutEvent();
|
|
12
|
+
navigate("/auth/logout", {
|
|
13
|
+
state: {
|
|
14
|
+
backUrl: backUrl || window.location.pathname
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
7
18
|
|
|
8
19
|
export const getDefaultLocation = (
|
|
9
20
|
eventRedirect,
|
|
@@ -50,7 +61,7 @@ export const validateIdentityProviderButtons = (
|
|
|
50
61
|
.filter(button =>
|
|
51
62
|
// default identity provider has no providerParam set
|
|
52
63
|
!button[buttonPropertyMapping.providerParam] ||
|
|
53
|
-
availableSocialProviders.includes(button[buttonPropertyMapping.providerParam])
|
|
64
|
+
availableSocialProviders.includes(button[buttonPropertyMapping.providerParam])
|
|
54
65
|
);
|
|
55
66
|
|
|
56
67
|
return filteredButtons;
|
|
@@ -60,9 +71,9 @@ export const getAccessTokenSafely = async () => {
|
|
|
60
71
|
try {
|
|
61
72
|
return await getAccessToken();
|
|
62
73
|
} catch (e) {
|
|
63
|
-
console.log("getAccessToken error: ", e);
|
|
74
|
+
console.log("loginUtils::getAccessToken error: ", e);
|
|
64
75
|
Sentry.captureException(e)
|
|
65
|
-
|
|
76
|
+
onLogOut();
|
|
66
77
|
return Promise.reject();
|
|
67
78
|
}
|
|
68
79
|
};
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
BUCKET_SUMMIT_DATA_KEY,
|
|
6
6
|
saveFile
|
|
7
7
|
} from "../../utils/dataUpdatesUtils";
|
|
8
|
-
|
|
8
|
+
import moment from "moment-timezone";
|
|
9
9
|
/**
|
|
10
10
|
* ActivityTypeSynchStrategy
|
|
11
11
|
*/
|
|
@@ -23,15 +23,14 @@ class ActivityTypeSynchStrategy extends AbstractSynchStrategy{
|
|
|
23
23
|
if (!entity) return Promise.reject('ActivityTypeSynchStrategy::process entity not found.');
|
|
24
24
|
|
|
25
25
|
// update summit
|
|
26
|
-
this.summit.event_types = [...this.summit.event_types.filter(et => et.id !== entity_id),
|
|
27
|
-
|
|
26
|
+
this.summit.event_types = [...this.summit.event_types.filter(et => et.id !== entity_id), entity];
|
|
27
|
+
this.summit.timestamp = moment().unix();
|
|
28
28
|
// update events
|
|
29
29
|
this.allEvents = this.allEvents.map(ev => {
|
|
30
30
|
if (ev.type.id === entity_id) return ({...ev, type: entity});
|
|
31
31
|
return ev;
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
-
|
|
35
34
|
// update files on cache
|
|
36
35
|
console.log(`ActivityTypeSynchStrategy::process updating cache files`);
|
|
37
36
|
|
|
@@ -63,4 +62,4 @@ class ActivityTypeSynchStrategy extends AbstractSynchStrategy{
|
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
export default ActivityTypeSynchStrategy;
|
|
65
|
+
export default ActivityTypeSynchStrategy;
|
|
@@ -4,7 +4,7 @@ import VenueRoomSynchStrategy from "./venue_room_synch_strategy";
|
|
|
4
4
|
import SpeakerSynchStrategy from "./speaker_synch_strategy";
|
|
5
5
|
import SummitSynchStrategy from "./summit_synch_strategy";
|
|
6
6
|
import ActivityTypeSynchStrategy from "./activity_type_synch_strategy";
|
|
7
|
-
|
|
7
|
+
import TrackSynchStrategy from "./track_synch_strategy";
|
|
8
8
|
/**
|
|
9
9
|
* SynchStrategyFactory
|
|
10
10
|
*/
|
|
@@ -37,8 +37,11 @@ class SynchStrategyFactory {
|
|
|
37
37
|
if (entity_type === 'Summit') {
|
|
38
38
|
return new SummitSynchStrategy(summit, allEvents, allIDXEvents, allSpeakers, allIDXSpeakers, accessToken);
|
|
39
39
|
}
|
|
40
|
+
if(entity_type === 'PresentationCategory'){
|
|
41
|
+
return new TrackSynchStrategy(summit, allEvents, allIDXEvents, allSpeakers, allIDXSpeakers, accessToken);
|
|
42
|
+
}
|
|
40
43
|
return null;
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
export default SynchStrategyFactory;
|
|
47
|
+
export default SynchStrategyFactory;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import AbstractSynchStrategy from "./abstract_synch_strategy";
|
|
2
|
+
import {fetchTrackById} from "../../actions/fetch-entities-actions";
|
|
3
|
+
import {
|
|
4
|
+
BUCKET_EVENTS_DATA_KEY,
|
|
5
|
+
BUCKET_SUMMIT_DATA_KEY,
|
|
6
|
+
saveFile
|
|
7
|
+
} from "../../utils/dataUpdatesUtils";
|
|
8
|
+
import moment from "moment-timezone";
|
|
9
|
+
/**
|
|
10
|
+
* TrackSynchStrategy
|
|
11
|
+
*/
|
|
12
|
+
class TrackSynchStrategy extends AbstractSynchStrategy{
|
|
13
|
+
|
|
14
|
+
async process(payload){
|
|
15
|
+
|
|
16
|
+
console.log(`TrackSynchStrategy::process`, payload);
|
|
17
|
+
|
|
18
|
+
const {entity_operator, entity_id} = payload;
|
|
19
|
+
|
|
20
|
+
const entity = await fetchTrackById(this.summit.id, entity_id, this.accessToken);
|
|
21
|
+
|
|
22
|
+
if (entity_operator === 'UPDATE') {
|
|
23
|
+
if (!entity) return Promise.reject('TrackSynchStrategy::process entity not found.');
|
|
24
|
+
|
|
25
|
+
// update summit
|
|
26
|
+
|
|
27
|
+
this.summit = {
|
|
28
|
+
...this.summit,
|
|
29
|
+
timestamp : moment().unix(),
|
|
30
|
+
tracks : this.summit.tracks.map(t => {
|
|
31
|
+
if(t?.id === entity_id) return {...t, ...entity};
|
|
32
|
+
|
|
33
|
+
return {...t, subtracks: t.subtracks.map(st => {
|
|
34
|
+
if(st?.id === entity_id) return {...st, ...entity};
|
|
35
|
+
return st;
|
|
36
|
+
})};
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
// update events
|
|
40
|
+
this.allEvents = this.allEvents.map(ev => {
|
|
41
|
+
if (ev?.track?.id === entity_id) return ({...ev, track: entity});
|
|
42
|
+
return ev;
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
// update files on cache
|
|
46
|
+
console.log(`TrackSynchStrategy::process updating cache files`);
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const localNowUtc = Date.now();
|
|
50
|
+
|
|
51
|
+
await saveFile(this.summit.id, BUCKET_EVENTS_DATA_KEY, this.allEvents, localNowUtc);
|
|
52
|
+
await saveFile(this.summit.id, BUCKET_SUMMIT_DATA_KEY, this.summit, localNowUtc);
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
catch (e){
|
|
56
|
+
console.log(e);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let res = {
|
|
60
|
+
payload,
|
|
61
|
+
entity,
|
|
62
|
+
summit : this.summit,
|
|
63
|
+
eventsData: this.allEvents,
|
|
64
|
+
allIDXEvents : this.allIDXEvents,
|
|
65
|
+
allSpeakers : this.allSpeakers,
|
|
66
|
+
allIDXSpeakers : this.allIDXSpeakers
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
console.log(`TrackSynchStrategy::process done`, res);
|
|
70
|
+
|
|
71
|
+
return Promise.resolve(res);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default TrackSynchStrategy;
|