@openeventkit/event-site 1.0.48 → 1.0.50
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-node.js +9 -3
- package/package.json +3 -3
- package/src/actions/update-data-actions.js +1 -1
- package/src/cms/config/collections/configurationsCollection/siteSettings/index.js +6 -0
- package/src/cms/config/collections/configurationsCollection/siteSettings/typeDefs.js +1 -0
- package/src/cms/config/collections/defaultPagesCollection/expoHallPage/index.js +39 -0
- package/src/cms/config/collections/defaultPagesCollection/expoHallPage/typeDefs.js +15 -0
- package/src/cms/config/collections/defaultPagesCollection/index.js +3 -1
- package/src/cms/config/collections/defaultPagesCollection/lobbyPage/index.js +16 -0
- package/src/cms/config/collections/defaultPagesCollection/lobbyPage/typeDefs.js +5 -0
- package/src/cms/config/collections/defaultPagesCollection/typeDefs.js +3 -1
- package/src/cms/config/index.js +4 -0
- package/src/components/AttendeeToAttendeeWidgetComponent.js +13 -3
- package/src/components/FullSchedule.js +2 -0
- package/src/components/HeroComponent.js +1 -1
- package/src/components/RegistrationLiteComponent.js +0 -2
- package/src/components/SponsorComponent.js +31 -32
- package/src/components/summit-my-orders-tickets/components/MyOrdersTickets.js +2 -5
- package/src/components/summit-my-orders-tickets/components/OrderDetails/OrderDetails.js +12 -7
- package/src/components/summit-my-orders-tickets/components/OrderList/OrderList.js +1 -3
- package/src/components/summit-my-orders-tickets/components/OrderList/OrderListItem.js +8 -5
- package/src/components/summit-my-orders-tickets/store/actions/order-actions.js +6 -1
- package/src/components/summit-my-orders-tickets/store/actions/ticket-actions.js +4 -2
- package/src/components/summit-my-orders-tickets/store/reducers/order-reducer.js +11 -0
- package/src/content/expo-hall-page/index.json +1 -0
- package/src/content/lobby-page/index.json +1 -0
- package/src/content/site-settings/index.json +1 -0
- package/src/pages/a/index.js +13 -9
- package/src/pages/a/sponsors.js +76 -0
- package/src/reducers/sponsor-reducer.js +3 -6
- package/src/styles/style.scss +5 -16
- package/src/templates/event-page.js +1 -11
- package/src/templates/expo-hall-page.js +28 -27
- package/src/templates/extra-questions-page.js +1 -1
- package/src/templates/lobby-page.js +6 -2
- package/src/utils/filePath.js +2 -0
- package/src/utils/useMarketingSettings.js +3 -2
- package/src/utils/useSiteSettings.js +1 -0
- package/static/fonts/RobloxBETA-Regular-v1.007.otf +0 -0
- package/static/fonts/RobloxDisplayBETA-Bold-v1.003.otf +0 -0
- package/src/components/summit-my-orders-tickets/components/OrderList/OrderList.helpers.js +0 -36
- package/src/components/summit-my-orders-tickets/context/OrdersTicketsContext.js +0 -38
- package/src/content/expo-hall.json +0 -10
- package/static/admin/config.yml.template +0 -365
package/gatsby-node.js
CHANGED
|
@@ -20,6 +20,7 @@ const {
|
|
|
20
20
|
COLORS_SASS_FILE_PATH,
|
|
21
21
|
SITE_SETTINGS_FILE_PATH,
|
|
22
22
|
LOBBY_PAGE_FILE_PATH,
|
|
23
|
+
EXPO_HALL_PAGE_FILE_PATH,
|
|
23
24
|
SUMMIT_FILE_PATH,
|
|
24
25
|
EVENTS_FILE_PATH,
|
|
25
26
|
EVENTS_IDX_FILE_PATH,
|
|
@@ -224,10 +225,11 @@ exports.onPreBootstrap = async () => {
|
|
|
224
225
|
|
|
225
226
|
const summitId = process.env.GATSBY_SUMMIT_ID;
|
|
226
227
|
const summitApiBaseUrl = process.env.GATSBY_SUMMIT_API_BASE_URL;
|
|
227
|
-
|
|
228
|
+
let marketingSettings = await SSR_getMarketingSettings(process.env.GATSBY_MARKETING_API_BASE_URL, summitId);
|
|
228
229
|
const colorSettings = fs.existsSync(COLORS_FILE_PATH) ? JSON.parse(fs.readFileSync(COLORS_FILE_PATH)) : require(`./${DEFAULT_COLORS_FILE_PATH}`);
|
|
229
230
|
const globalSettings = fs.existsSync(SITE_SETTINGS_FILE_PATH) ? JSON.parse(fs.readFileSync(SITE_SETTINGS_FILE_PATH)) : {};
|
|
230
231
|
const lobbyPageSettings = fs.existsSync(LOBBY_PAGE_FILE_PATH) ? JSON.parse(fs.readFileSync(LOBBY_PAGE_FILE_PATH)) : {};
|
|
232
|
+
const expoHallPageSettings = fs.existsSync(EXPO_HALL_PAGE_FILE_PATH) ? JSON.parse(fs.readFileSync(EXPO_HALL_PAGE_FILE_PATH)) : {};
|
|
231
233
|
|
|
232
234
|
const config = {
|
|
233
235
|
client: {
|
|
@@ -245,9 +247,12 @@ exports.onPreBootstrap = async () => {
|
|
|
245
247
|
|
|
246
248
|
const accessToken = await getAccessToken(config, process.env.GATSBY_BUILD_SCOPES).then(({ token }) => token.access_token);
|
|
247
249
|
|
|
250
|
+
const FileType = 'FILE';
|
|
248
251
|
// extract colors from marketing settings
|
|
249
|
-
marketingSettings.map(
|
|
250
|
-
if (key.startsWith("color_")) colorSettings[key] = value;
|
|
252
|
+
marketingSettings = marketingSettings.map( entry => {
|
|
253
|
+
if (entry.key.startsWith("color_")) colorSettings[entry.key] = entry.value;
|
|
254
|
+
if(entry.type === FileType) return {...entry, value: entry.file};
|
|
255
|
+
return {...entry};
|
|
251
256
|
});
|
|
252
257
|
|
|
253
258
|
// create required directories
|
|
@@ -260,6 +265,7 @@ exports.onPreBootstrap = async () => {
|
|
|
260
265
|
fs.writeFileSync(MARKETING_SETTINGS_FILE_PATH, JSON.stringify(marketingSettings), "utf8");
|
|
261
266
|
fs.writeFileSync(COLORS_FILE_PATH, JSON.stringify(colorSettings), "utf8");
|
|
262
267
|
fs.writeFileSync(LOBBY_PAGE_FILE_PATH, JSON.stringify(lobbyPageSettings), "utf8");
|
|
268
|
+
fs.writeFileSync(EXPO_HALL_PAGE_FILE_PATH, JSON.stringify(expoHallPageSettings), "utf8");
|
|
263
269
|
|
|
264
270
|
let sassColors = "";
|
|
265
271
|
Object.entries(colorSettings).forEach(([key, value]) => sassColors += `$${key} : ${value};\n`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.50",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@mui/base": "^5.0.0-alpha.114",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"font-awesome": "^4.7.0",
|
|
43
43
|
"formik": "^2.2.9",
|
|
44
44
|
"fs-extra": "^9.0.1",
|
|
45
|
-
"full-schedule-widget": "^2.0.
|
|
45
|
+
"full-schedule-widget": "^2.0.36",
|
|
46
46
|
"gatsby": "^5.8.1",
|
|
47
47
|
"gatsby-alias-imports": "^1.0.6",
|
|
48
48
|
"gatsby-plugin-image": "^3.8.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"stream-browserify": "^3.0.0",
|
|
118
118
|
"stream-chat": "^2.7.2",
|
|
119
119
|
"stream-chat-react": "3.1.7",
|
|
120
|
-
"summit-registration-lite": "
|
|
120
|
+
"summit-registration-lite": "4.0.21",
|
|
121
121
|
"superagent": "8.0.9",
|
|
122
122
|
"sweetalert2": "^9.17.0",
|
|
123
123
|
"upcoming-events-widget": "2.0.8",
|
|
@@ -55,7 +55,7 @@ const fetchBucket = async (etagKeyPre, dataKeyPre, fileName, summitId, lastBuild
|
|
|
55
55
|
|
|
56
56
|
if (eTag) headers.headers = {'If-None-Match': eTag};
|
|
57
57
|
|
|
58
|
-
console.log(`fetchBucket ${url} eTag ${eTag} lastModifiedStored ${lastModifiedStored} lastBuildTime ${lastBuildTime}`);
|
|
58
|
+
//console.log(`fetchBucket ${url} eTag ${eTag} lastModifiedStored ${lastModifiedStored} lastBuildTime ${lastBuildTime}`);
|
|
59
59
|
|
|
60
60
|
return fetch(url, {
|
|
61
61
|
method: 'GET',
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
stringField,
|
|
3
|
+
objectField,
|
|
4
|
+
imageWithAltField
|
|
5
|
+
} from "../../../fields";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
EXPO_HALL_PAGE_FILE_PATH
|
|
9
|
+
} from "@utils/filePath";
|
|
10
|
+
|
|
11
|
+
const expoHallPage = {
|
|
12
|
+
label: "Expo Hall Page",
|
|
13
|
+
name: "expo-hall-page",
|
|
14
|
+
file: EXPO_HALL_PAGE_FILE_PATH,
|
|
15
|
+
fields: [
|
|
16
|
+
objectField({
|
|
17
|
+
label: "Hero",
|
|
18
|
+
name: "hero",
|
|
19
|
+
fields: [
|
|
20
|
+
stringField({
|
|
21
|
+
label: "Title",
|
|
22
|
+
name: "title"
|
|
23
|
+
}),
|
|
24
|
+
stringField({
|
|
25
|
+
label: "Subtitle",
|
|
26
|
+
name: "subTitle",
|
|
27
|
+
required: false
|
|
28
|
+
}),
|
|
29
|
+
imageWithAltField({
|
|
30
|
+
label: "Background Image",
|
|
31
|
+
name: "background"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default expoHallPage;
|
|
39
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
module.exports = `
|
|
3
|
+
type ImageWithAlt {
|
|
4
|
+
src: File @fileByRelativePath
|
|
5
|
+
alt: String
|
|
6
|
+
}
|
|
7
|
+
type ExpoHallPageHero {
|
|
8
|
+
title: String
|
|
9
|
+
subTitle: String
|
|
10
|
+
background: ImageWithAlt
|
|
11
|
+
}
|
|
12
|
+
type ExpoHallPageJson implements Node {
|
|
13
|
+
hero: ExpoHallPageHero
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
import marketingPage from "./marketingPage";
|
|
6
6
|
import lobbyPage from "./lobbyPage";
|
|
7
|
+
import expoHallPage from "./expoHallPage";
|
|
7
8
|
|
|
8
9
|
const defaultPagesCollection = {
|
|
9
10
|
...collectionDefaults({
|
|
@@ -12,7 +13,8 @@ const defaultPagesCollection = {
|
|
|
12
13
|
}),
|
|
13
14
|
files: [
|
|
14
15
|
marketingPage,
|
|
15
|
-
lobbyPage
|
|
16
|
+
lobbyPage,
|
|
17
|
+
expoHallPage
|
|
16
18
|
]
|
|
17
19
|
};
|
|
18
20
|
|
|
@@ -60,6 +60,22 @@ const lobbyPage = {
|
|
|
60
60
|
label: "Live Event Widget - Featured Event",
|
|
61
61
|
name: "liveNowFeaturedEventId",
|
|
62
62
|
required: false
|
|
63
|
+
}),
|
|
64
|
+
objectField({
|
|
65
|
+
label: "Sponsors Widget Button",
|
|
66
|
+
name: "sponsorsWidgetButton",
|
|
67
|
+
fields: [
|
|
68
|
+
stringField({
|
|
69
|
+
label: "Text",
|
|
70
|
+
name: "text",
|
|
71
|
+
required: false
|
|
72
|
+
}),
|
|
73
|
+
stringField({
|
|
74
|
+
label: "Link",
|
|
75
|
+
name: "link",
|
|
76
|
+
required: false
|
|
77
|
+
}),
|
|
78
|
+
]
|
|
63
79
|
})
|
|
64
80
|
]
|
|
65
81
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
module.exports = `
|
|
3
|
+
type Button {
|
|
4
|
+
text: String
|
|
5
|
+
link: String
|
|
6
|
+
}
|
|
3
7
|
type ImageWithAlt {
|
|
4
8
|
src: File @fileByRelativePath
|
|
5
9
|
alt: String
|
|
@@ -20,5 +24,6 @@ module.exports = `
|
|
|
20
24
|
hero: LobbyPageHero
|
|
21
25
|
centerColumn: LobbyPageCenterColumn
|
|
22
26
|
liveNowFeaturedEventId: String
|
|
27
|
+
sponsorsWidgetButton: Button
|
|
23
28
|
}
|
|
24
29
|
`;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const marketingPageTypeDefs = require("./marketingPage/typeDefs");
|
|
2
2
|
const lobbyPageTypeDefs = require("./lobbyPage/typeDefs");
|
|
3
|
+
const expoHallPageTypeDefs = require("./expoHallPage/typeDefs");
|
|
3
4
|
|
|
4
5
|
module.exports = [
|
|
5
6
|
marketingPageTypeDefs,
|
|
6
|
-
lobbyPageTypeDefs
|
|
7
|
+
lobbyPageTypeDefs,
|
|
8
|
+
expoHallPageTypeDefs
|
|
7
9
|
].join("");
|
package/src/cms/config/index.js
CHANGED
|
@@ -32,7 +32,7 @@ const sbAuthProps = {
|
|
|
32
32
|
|
|
33
33
|
const adminGroups = ["administrators", "super-admins"];
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
const AttendeesWidgetComponent = ({ user, event, chatSettings }) => {
|
|
36
36
|
const [loading, setLoading] = useState(true);
|
|
37
37
|
|
|
38
38
|
//Deep linking support
|
|
@@ -163,6 +163,8 @@ export const AttendeesWidget = ({ user, event, chatSettings }) => {
|
|
|
163
163
|
...sbAuthProps,
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
+
if (!chatSettings?.enabled) return null;
|
|
167
|
+
|
|
166
168
|
return (
|
|
167
169
|
<div style={{ margin: "20px auto", position: "relative" }}>
|
|
168
170
|
<Sentry.ErrorBoundary fallback={SentryFallbackFunction({componentName: 'Attendee To Attendee'})}>
|
|
@@ -175,7 +177,13 @@ export const AttendeesWidget = ({ user, event, chatSettings }) => {
|
|
|
175
177
|
);
|
|
176
178
|
};
|
|
177
179
|
|
|
178
|
-
const
|
|
180
|
+
const mapState = ({ settingState }) => ({
|
|
181
|
+
chatSettings: settingState.widgets.chat,
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
export const AttendeesWidget = connect(mapState)(AttendeesWidgetComponent);
|
|
185
|
+
|
|
186
|
+
const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings }) => {
|
|
179
187
|
const trackerRef = useRef();
|
|
180
188
|
|
|
181
189
|
const handleLogout = useCallback(() => {
|
|
@@ -260,6 +268,8 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase }) => {
|
|
|
260
268
|
...sbAuthProps,
|
|
261
269
|
};
|
|
262
270
|
|
|
271
|
+
if (!chatSettings.enabled) return null;
|
|
272
|
+
|
|
263
273
|
return <Tracker {...widgetProps} ref={trackerRef} />;
|
|
264
274
|
};
|
|
265
275
|
|
|
@@ -267,7 +277,7 @@ const mapStateToProps = ({ loggedUserState, userState, clockState, settingState
|
|
|
267
277
|
isLoggedUser: loggedUserState.isLoggedUser,
|
|
268
278
|
user: userState,
|
|
269
279
|
summitPhase: clockState.summit_phase,
|
|
270
|
-
chatSettings: settingState.widgets.chat
|
|
280
|
+
chatSettings: settingState.widgets.chat,
|
|
271
281
|
});
|
|
272
282
|
|
|
273
283
|
export default connect(mapStateToProps)(AccessTracker);
|
|
@@ -28,6 +28,7 @@ const FullSchedule = ({
|
|
|
28
28
|
}) => {
|
|
29
29
|
const { getSettingByKey } = useMarketingSettings();
|
|
30
30
|
const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.schedultDefaultImage);
|
|
31
|
+
const summitLogoPrint = getSettingByKey(MARKETING_SETTINGS_KEYS.fullScheduleSummitLogoPrint);
|
|
31
32
|
const componentProps = {
|
|
32
33
|
title: "Schedule",
|
|
33
34
|
summit,
|
|
@@ -35,6 +36,7 @@ const FullSchedule = ({
|
|
|
35
36
|
userProfile,
|
|
36
37
|
withThumbs: false,
|
|
37
38
|
defaultImage: defaultImage,
|
|
39
|
+
summitLogoPrint: summitLogoPrint ? summitLogoPrint : null,
|
|
38
40
|
showSendEmail: false,
|
|
39
41
|
onStartChat: null,
|
|
40
42
|
shareLink: getShareLink(filters, view),
|
|
@@ -8,7 +8,7 @@ const HeroComponent = ({ title, subtitle, event, redirectTo, options = {} }) =>
|
|
|
8
8
|
}, [redirectTo]);
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<section className={`hero
|
|
11
|
+
<section className={`hero ${event ? 'talk__break' : 'is-fullheight'}`}>
|
|
12
12
|
<div className="hero-body">
|
|
13
13
|
<div className={`${event ? '' : 'container has-text-centered'}`}>
|
|
14
14
|
<h1 className="title">{title}</h1>
|
|
@@ -111,7 +111,6 @@ const RegistrationLiteComponent = ({
|
|
|
111
111
|
|
|
112
112
|
const inPersonDisclaimer = getSettingByKey(MARKETING_SETTINGS_KEYS.registrationInPersonDisclaimer);
|
|
113
113
|
const allowPromoCodes = !!Number(getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteAllowPromoCodes));
|
|
114
|
-
const companyInputPlaceholder = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteCompanyInputPlaceholder);
|
|
115
114
|
const companyDDLPlaceholder = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteCompanyDDLPlaceholder);
|
|
116
115
|
const initialOrderComplete1stParagraph = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteInitialOrderComplete1stParagraph)
|
|
117
116
|
const initialOrderComplete2ndParagraph = getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteInitialOrderComplete2ndParagraph)
|
|
@@ -178,7 +177,6 @@ const RegistrationLiteComponent = ({
|
|
|
178
177
|
});
|
|
179
178
|
},
|
|
180
179
|
allowPromoCodes: allowPromoCodes,
|
|
181
|
-
companyInputPlaceholder: companyInputPlaceholder,
|
|
182
180
|
companyDDLPlaceholder: companyDDLPlaceholder,
|
|
183
181
|
supportEmail: getEnvVariable(SUPPORT_EMAIL),
|
|
184
182
|
initialOrderComplete1stParagraph: initialOrderComplete1stParagraph,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
import Slider from "react-slick";
|
|
4
|
-
import Link from
|
|
5
|
-
import { getSponsorURL } from
|
|
4
|
+
import Link from "../components/Link";
|
|
5
|
+
import { getSponsorURL } from "../utils/urlFormating";
|
|
6
6
|
|
|
7
|
-
import styles from
|
|
7
|
+
import styles from "../styles/sponsor.module.scss";
|
|
8
8
|
|
|
9
|
-
const SponsorComponent = ({ page, sponsorsState,
|
|
9
|
+
const SponsorComponent = ({ page, sponsorsState, linkButton }) => {
|
|
10
10
|
let renderButton = false;
|
|
11
11
|
|
|
12
12
|
let sponsorsByTier = sponsorsState.reduce((memo, x) => {
|
|
13
|
-
if (!memo[x[
|
|
14
|
-
memo[x[
|
|
13
|
+
if (!memo[x["sponsorship"].type.name]) { memo[x["sponsorship"].type.name] = []; }
|
|
14
|
+
memo[x["sponsorship"].type.name].push(x);
|
|
15
15
|
return memo;
|
|
16
16
|
}, {});
|
|
17
17
|
|
|
@@ -24,16 +24,16 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
24
24
|
{Object.values(sponsorsByTier).sort((a, b) => a.order - b.order).map((tier, tierIndex) => {
|
|
25
25
|
const sponsors = tier.sponsors.sort((a, b) => a.order - b.order);
|
|
26
26
|
if (!tier) return null;
|
|
27
|
-
const template = page ===
|
|
27
|
+
const template = page === "lobby" ? tier.lobby_template : page === "event" ? tier.event_page_template : "expo-hall";
|
|
28
28
|
if (sponsors?.length > 0) {
|
|
29
29
|
renderButton = true;
|
|
30
30
|
switch (template) {
|
|
31
|
-
case
|
|
32
|
-
if (page ===
|
|
31
|
+
case "big-images": {
|
|
32
|
+
if (page === "lobby" && !tier.should_display_on_lobby_page) {
|
|
33
33
|
return null
|
|
34
34
|
} else {
|
|
35
35
|
return (
|
|
36
|
-
<div className={`${tierIndex === 0 ? styles.firstContainer :
|
|
36
|
+
<div className={`${tierIndex === 0 ? styles.firstContainer : ""} ${styles.bigImageContainer}`} key={tierIndex}>
|
|
37
37
|
{tier.widget_title &&
|
|
38
38
|
<span><b>{tier.widget_title}</b></span>
|
|
39
39
|
}
|
|
@@ -59,17 +59,17 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
case
|
|
63
|
-
if (page ===
|
|
62
|
+
case "small-images": {
|
|
63
|
+
if (page === "lobby" && !tier.should_display_on_lobby_page) {
|
|
64
64
|
return null
|
|
65
65
|
} else {
|
|
66
66
|
return (
|
|
67
|
-
<div className={`${tierIndex === 0 ? styles.firstContainer :
|
|
67
|
+
<div className={`${tierIndex === 0 ? styles.firstContainer : ""} ${styles.smallImageContainer}`} key={tierIndex}>
|
|
68
68
|
{tier.widget_title &&
|
|
69
69
|
<span><b>{tier.widget_title}</b></span>
|
|
70
70
|
}
|
|
71
71
|
{sponsors.map((sponsor, index) => {
|
|
72
|
-
if (page ===
|
|
72
|
+
if (page === "event" && !sponsor.showLogoInEventPage) return null
|
|
73
73
|
return (
|
|
74
74
|
(!sponsor.company.big_logo && !sponsor.company.logo) ?
|
|
75
75
|
null
|
|
@@ -96,9 +96,9 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
96
96
|
)
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
case
|
|
99
|
+
case "horizontal-images": {
|
|
100
100
|
return (
|
|
101
|
-
<div className={`${tierIndex === 0 ? styles.firstContainer :
|
|
101
|
+
<div className={`${tierIndex === 0 ? styles.firstContainer : ""} ${styles.horizontalContainer} px-6`} key={tierIndex}>
|
|
102
102
|
{sponsors.map((sponsor, index) => {
|
|
103
103
|
return (
|
|
104
104
|
(!sponsor.company.big_logo && !sponsor.company.logo) ?
|
|
@@ -125,7 +125,7 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
125
125
|
</div>
|
|
126
126
|
)
|
|
127
127
|
}
|
|
128
|
-
case
|
|
128
|
+
case "expo-hall": {
|
|
129
129
|
return tier.should_display_on_expo_hall_page === true && (
|
|
130
130
|
<div className={`${styles.expoContainer} px-6`} key={tierIndex}>
|
|
131
131
|
{sponsors.map((sponsor, index) => {
|
|
@@ -136,7 +136,7 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
136
136
|
sponsor.is_published ?
|
|
137
137
|
<div className={`
|
|
138
138
|
${styles.imageBox}
|
|
139
|
-
${tier.expo_hall_template ===
|
|
139
|
+
${tier.expo_hall_template === "big-images" ? styles.large : tier.expo_hall_template === "medium-images" ? styles.medium : styles.small}`}
|
|
140
140
|
key={`${tier.type.label}-${index}`}
|
|
141
141
|
>
|
|
142
142
|
<Link to={`/a/sponsor/${getSponsorURL(sponsor.id, sponsor.company.name)}`}>
|
|
@@ -146,7 +146,7 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
146
146
|
: sponsor.external_link ?
|
|
147
147
|
<div className={`
|
|
148
148
|
${styles.imageBox}
|
|
149
|
-
${tier.expo_hall_template ===
|
|
149
|
+
${tier.expo_hall_template === "big-images" ? styles.large : tier.expo_hall_template === "medium-images" ? styles.medium : styles.small}`}
|
|
150
150
|
key={`${tier.type.label}-${index}`}
|
|
151
151
|
>
|
|
152
152
|
<Link to={sponsor.external_link}>
|
|
@@ -156,7 +156,7 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
156
156
|
:
|
|
157
157
|
<div className={`
|
|
158
158
|
${styles.imageBox}
|
|
159
|
-
${tier.expo_hall_template ===
|
|
159
|
+
${tier.expo_hall_template === "big-images" ? styles.large : tier.expo_hall_template === "medium-images" ? styles.medium : styles.small}`}
|
|
160
160
|
key={`${tier.type.label}-${index}`}
|
|
161
161
|
>
|
|
162
162
|
<img src={sponsor.company.big_logo ? sponsor.company.big_logo : sponsor.company.logo} alt={sponsor.company.name} />
|
|
@@ -166,23 +166,23 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
166
166
|
</div>
|
|
167
167
|
)
|
|
168
168
|
}
|
|
169
|
-
case
|
|
170
|
-
if (page ===
|
|
169
|
+
case "carousel": {
|
|
170
|
+
if (page === "lobby" && !tier.should_display_on_lobby_page) {
|
|
171
171
|
return null
|
|
172
172
|
} else {
|
|
173
173
|
const sliderSettings = {
|
|
174
174
|
autoplay: true,
|
|
175
175
|
autoplaySpeed: 5000,
|
|
176
176
|
infinite: true,
|
|
177
|
-
className:
|
|
177
|
+
className: "sponsor-carousel",
|
|
178
178
|
dots: false,
|
|
179
179
|
slidesToShow: 1,
|
|
180
180
|
slidesToScroll: 1
|
|
181
181
|
};
|
|
182
182
|
return (
|
|
183
|
-
<div className={`${tierIndex === 0 ? styles.firstContainer :
|
|
183
|
+
<div className={`${tierIndex === 0 ? styles.firstContainer : ""} ${styles.carouselContainer}`} key={tierIndex}>
|
|
184
184
|
{tier.widget_title &&
|
|
185
|
-
<span style={{ marginBottom:
|
|
185
|
+
<span style={{ marginBottom: "0" }}><b>{tier.widget_title}</b></span>
|
|
186
186
|
}
|
|
187
187
|
<Slider {...sliderSettings}>
|
|
188
188
|
{sponsors.map((sponsor, index) => {
|
|
@@ -219,10 +219,10 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
219
219
|
return null;
|
|
220
220
|
}
|
|
221
221
|
})}
|
|
222
|
-
{
|
|
223
|
-
<Link className={styles.link} to={
|
|
222
|
+
{linkButton?.text && linkButton?.link && renderButton &&
|
|
223
|
+
<Link className={styles.link} to={linkButton.link}>
|
|
224
224
|
<button className={`${styles.button} button is-large`}>
|
|
225
|
-
{
|
|
225
|
+
{linkButton.text}
|
|
226
226
|
</button>
|
|
227
227
|
</Link>
|
|
228
228
|
}
|
|
@@ -231,8 +231,7 @@ const SponsorComponent = ({ page, sponsorsState, lobbyButton }) => {
|
|
|
231
231
|
};
|
|
232
232
|
|
|
233
233
|
const mapStateToProps = ({ sponsorState }) => ({
|
|
234
|
-
sponsorsState: sponsorState.sponsors
|
|
235
|
-
lobbyButton: sponsorState.lobbyButton
|
|
234
|
+
sponsorsState: sponsorState.sponsors
|
|
236
235
|
});
|
|
237
236
|
|
|
238
|
-
export default connect(mapStateToProps, {})(SponsorComponent);
|
|
237
|
+
export default connect(mapStateToProps, {})(SponsorComponent);
|
|
@@ -6,7 +6,6 @@ import { AjaxLoader } from "openstack-uicore-foundation/lib/components";
|
|
|
6
6
|
import { getUserOrders } from '../store/actions/order-actions';
|
|
7
7
|
import { getUserTickets } from '../store/actions/ticket-actions';
|
|
8
8
|
import { OrderList } from './OrderList/OrderList';
|
|
9
|
-
import { OrderListContextProvider } from './OrderList/OrderList.helpers';
|
|
10
9
|
import { TicketList } from './TicketList/TicketList';
|
|
11
10
|
|
|
12
11
|
export const MyOrdersTickets = ({ className }) => {
|
|
@@ -63,10 +62,8 @@ export const MyOrdersTickets = ({ className }) => {
|
|
|
63
62
|
)}
|
|
64
63
|
|
|
65
64
|
<div className={classNames('my-orders-tickets', className)}>
|
|
66
|
-
{hasOrders && (
|
|
67
|
-
<
|
|
68
|
-
<OrderList />
|
|
69
|
-
</OrderListContextProvider>
|
|
65
|
+
{hasOrders && (
|
|
66
|
+
<OrderList />
|
|
70
67
|
)}
|
|
71
68
|
|
|
72
69
|
{(hasOrders && hasTickets) && (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from "react"
|
|
2
|
-
import { useDispatch } from "react-redux";
|
|
2
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { getNow } from "../../store/actions/timer-actions";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getSummitFormattedDate,
|
|
12
12
|
formatCurrency
|
|
13
13
|
} from "../../util";
|
|
14
|
-
import {
|
|
14
|
+
import { setActiveOrderId } from "../../store/actions/order-actions";
|
|
15
15
|
|
|
16
16
|
import './order-details.scss';
|
|
17
17
|
|
|
@@ -20,16 +20,21 @@ export const OrderDetails = ({ order, summit, className }) => {
|
|
|
20
20
|
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
const dispatch = useDispatch();
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
const {
|
|
25
|
+
activeOrderId
|
|
26
|
+
} = useSelector(state => state.orderState || {});
|
|
24
27
|
|
|
25
28
|
const isSummitPast = checkSummitPast(summit, dispatch(getNow()));
|
|
26
29
|
const statusData = getOrderStatusData(order, isSummitPast);
|
|
27
|
-
const isActive =
|
|
30
|
+
const isActive = activeOrderId === order.id;
|
|
31
|
+
|
|
32
|
+
const handleSetOrderActive = (orderId) => dispatch(setActiveOrderId( orderId ));
|
|
28
33
|
|
|
29
34
|
const handleClick = (event) => {
|
|
30
|
-
if (isActive) return
|
|
35
|
+
if (isActive) return handleSetOrderActive(null);
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
handleSetOrderActive(order.id);
|
|
33
38
|
|
|
34
39
|
setTimeout(() => {
|
|
35
40
|
const offset = getDocumentOffset(elementRef.current);
|
|
@@ -42,7 +47,7 @@ export const OrderDetails = ({ order, summit, className }) => {
|
|
|
42
47
|
};
|
|
43
48
|
|
|
44
49
|
// Clear active order on unmount (i.e., when page pagination changes)
|
|
45
|
-
useEffect(() => () =>
|
|
50
|
+
useEffect(() => () => setActiveOrderId(null), []);
|
|
46
51
|
|
|
47
52
|
return (
|
|
48
53
|
<div
|
|
@@ -6,7 +6,6 @@ import classNames from 'classnames';
|
|
|
6
6
|
import { getUserOrders } from "../../store/actions/order-actions";
|
|
7
7
|
import { getTicketsByOrder } from "../../store/actions/ticket-actions";
|
|
8
8
|
import { OrderListItem } from './OrderListItem';
|
|
9
|
-
import { useOrderListContext } from "./OrderList.helpers";
|
|
10
9
|
|
|
11
10
|
import './order-list.scss';
|
|
12
11
|
|
|
@@ -19,6 +18,7 @@ export const OrderList = ({ className }) => {
|
|
|
19
18
|
current_page: currentPage,
|
|
20
19
|
last_page: lastPage,
|
|
21
20
|
per_page: perPage,
|
|
21
|
+
activeOrderId,
|
|
22
22
|
total
|
|
23
23
|
} = useSelector(state => state.orderState || {});
|
|
24
24
|
|
|
@@ -28,8 +28,6 @@ export const OrderList = ({ className }) => {
|
|
|
28
28
|
}
|
|
29
29
|
} = useSelector(state => state.ticketState || {});
|
|
30
30
|
|
|
31
|
-
const { state : { activeOrderId } } = useOrderListContext();
|
|
32
|
-
|
|
33
31
|
const handlePageChange = (page) => dispatch(getUserOrders({ page, perPage }));
|
|
34
32
|
|
|
35
33
|
const handleTicketPageChange = (orderId, page) => dispatch(getTicketsByOrder({ orderId, page }));
|
|
@@ -5,21 +5,24 @@ import { OrderDetails } from '../OrderDetails/OrderDetails';
|
|
|
5
5
|
import { OrderSummary } from '../OrderSummary/OrderSummary';
|
|
6
6
|
import { OrderTicketList } from '../OrderTicketList/OrderTicketList';
|
|
7
7
|
import { OrderOptions } from "../OrderOptions/OrderOptions";
|
|
8
|
-
import { useOrderListContext } from "./OrderList.helpers";
|
|
9
8
|
import Pager from "../../../Pager";
|
|
10
9
|
|
|
11
10
|
export const OrderListItem = ({ order, className, changeTicketsPage }) => {
|
|
12
11
|
const summit = useSelector(state => state.summitState.summit);
|
|
13
|
-
const { state } = useOrderListContext();
|
|
14
12
|
|
|
15
13
|
const {
|
|
16
14
|
orderTickets: {
|
|
17
15
|
total, per_page, current_page, last_page, tickets
|
|
18
16
|
},
|
|
19
|
-
loading
|
|
17
|
+
loading,
|
|
20
18
|
} = useSelector(state => state.ticketState || {});
|
|
21
19
|
|
|
22
|
-
const
|
|
20
|
+
const {
|
|
21
|
+
activeOrderId,
|
|
22
|
+
isOrderLoading
|
|
23
|
+
} = useSelector(state => state.orderState || {});
|
|
24
|
+
|
|
25
|
+
const isActive = activeOrderId === order.id;
|
|
23
26
|
|
|
24
27
|
return (
|
|
25
28
|
<li className={classNames('order-list__item', { 'order-list__item--active': isActive }, className)}>
|
|
@@ -27,7 +30,7 @@ export const OrderListItem = ({ order, className, changeTicketsPage }) => {
|
|
|
27
30
|
<div className="col-md-8">
|
|
28
31
|
<OrderDetails order={order} summit={summit} />
|
|
29
32
|
|
|
30
|
-
{isActive && tickets.length > 0 && (
|
|
33
|
+
{!isOrderLoading && isActive && tickets.length > 0 && (
|
|
31
34
|
<>
|
|
32
35
|
<OrderSummary type="mobile" order={order} summit={summit} tickets={tickets}/>
|
|
33
36
|
|
|
@@ -23,6 +23,7 @@ import history from '../history';
|
|
|
23
23
|
|
|
24
24
|
export const GET_USER_ORDERS = 'GET_ORDERS';
|
|
25
25
|
export const REFUND_ORDER = 'REFUND_ORDER';
|
|
26
|
+
export const SET_ACTIVE_ORDER_ID = 'SET_ACTIVE_ORDER_ID';
|
|
26
27
|
|
|
27
28
|
export const getUserOrders = ({ page = 1, perPage = 5 }) => async (dispatch, getState, { getAccessToken, apiBaseUrl, loginUrl }) => {
|
|
28
29
|
const { summitState: { summit } } = getState();
|
|
@@ -81,4 +82,8 @@ export const cancelOrder = ({ order }) => async (dispatch, getState, { getAccess
|
|
|
81
82
|
dispatch(stopLoading());
|
|
82
83
|
return e;
|
|
83
84
|
});
|
|
84
|
-
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const setActiveOrderId = (orderId) => async (dispatch, getState) => {
|
|
88
|
+
return dispatch(createAction(SET_ACTIVE_ORDER_ID)(orderId));
|
|
89
|
+
}
|