@openeventkit/event-site 2.1.1 → 2.1.2
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 +2 -1
- package/netlify.toml +0 -2
- package/package.json +12 -9
- package/src/actions/fetch-entities-actions.js +1 -1
- package/src/cms/config/collections/configurationsCollection/payments/index.js +11 -5
- package/src/cms/config/collections/configurationsCollection/payments/typeDefs.js +6 -0
- package/src/cms/config/collections/configurationsCollection/typeDefs.js +3 -1
- package/src/components/AttendeeToAttendeeWidgetComponent.js +40 -38
- package/src/components/AuthComponent.js +4 -0
- package/src/components/AvatarEditorModal/index.js +1 -1
- package/src/components/ChangePasswordComponent.js +2 -1
- package/src/components/DisqusComponent.js +4 -1
- package/src/components/MyOrdersTicketsComponent.js +15 -10
- package/src/components/RegistrationLiteComponent.js +5 -1
- package/src/components/summit-my-orders-tickets/components/DelegatePopup/DelegatePopup.js +2 -3
- package/src/components/summit-my-orders-tickets/components/MyOrdersTickets.js +3 -3
- package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupAssignForm.js +2 -3
- package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupEditDetailsForm/TicketPopupEditDetailsForm.js +3 -1
- package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupReassignForm.js +1 -1
- package/src/content/marketing-page/index.json +2 -2
- package/src/content/{payments.json → payments/index.json} +3 -2
- package/src/content/site-settings/index.json +1 -1
- package/src/content/sponsors.json +1 -1
- package/src/pages/a/[...].js +2 -2
- package/src/routes/logout-callback-route.js +6 -2
- package/src/styles/change-password.module.scss +6 -1
- package/src/templates/extra-questions-page.js +6 -4
- package/src/utils/filePath.js +4 -2
- package/src/utils/usePaymentSettings.js +20 -0
package/gatsby-node.js
CHANGED
|
@@ -250,7 +250,8 @@ const SSR_getSummit = async (baseUrl, summitId) => {
|
|
|
250
250
|
"schedule_settings," +
|
|
251
251
|
"schedule_settings.filters," +
|
|
252
252
|
"schedule_settings.pre_filters,"+
|
|
253
|
-
"ticket_types"
|
|
253
|
+
"ticket_types," +
|
|
254
|
+
"badge_features_types" ,
|
|
254
255
|
t: Date.now()
|
|
255
256
|
};
|
|
256
257
|
|
package/netlify.toml
CHANGED
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
YARN_VERSION = "1.22.19"
|
|
9
9
|
YARN_FLAGS = "--no-ignore-optional"
|
|
10
10
|
NODE_OPTIONS = "--max-old-space-size=10240"
|
|
11
|
-
[[plugins]]
|
|
12
|
-
package = "netlify-plugin-gatsby-cache"
|
|
13
11
|
[[headers]]
|
|
14
12
|
# Define which paths this specific [[headers]] block will cover.
|
|
15
13
|
for = "/*"
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/server": "^11.11.0",
|
|
8
8
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
9
9
|
"@fortawesome/free-brands-svg-icons": "^6.5.2",
|
|
10
10
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
11
|
+
"@loadable/component": "^5.16.4",
|
|
11
12
|
"@mdx-js/react": "^3.0.1",
|
|
12
13
|
"@mdx-js/runtime": "^1.6.22",
|
|
13
14
|
"@mui/base": "^5.0.0-beta.40",
|
|
14
|
-
"@mui/icons-material": "^5.15.
|
|
15
|
-
"@mui/material": "^5.15.
|
|
15
|
+
"@mui/icons-material": "^5.15.20",
|
|
16
|
+
"@mui/material": "^5.15.20",
|
|
16
17
|
"@mux/mux-player-react": "^1.14.1",
|
|
17
18
|
"@ncwidgets/file-relation": "^0.8.0",
|
|
18
19
|
"@ncwidgets/id": "^0.8.1",
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
"event-feedback-widget": "^2.0.1",
|
|
53
54
|
"final-form": "4.20.7",
|
|
54
55
|
"font-awesome": "^4.7.0",
|
|
55
|
-
"formik": "^2.
|
|
56
|
+
"formik": "^2.4.6",
|
|
56
57
|
"full-schedule-widget": "3.0.9",
|
|
57
58
|
"gatsby": "^5.13.5",
|
|
58
59
|
"gatsby-alias-imports": "^1.0.6",
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
"idtoken-verifier": "^2.2.2",
|
|
76
77
|
"immutability-helper": "2.9.1",
|
|
77
78
|
"immutable": "^5.0.0-beta.5",
|
|
79
|
+
"js-cookie": "^3.0.5",
|
|
78
80
|
"jsdom": "^24.1.0",
|
|
79
81
|
"klaro": "^0.7.21",
|
|
80
82
|
"lite-schedule-widget": "3.0.3",
|
|
@@ -84,8 +86,9 @@
|
|
|
84
86
|
"markdown-it": "^12.0.0",
|
|
85
87
|
"moment": "^2.27.0",
|
|
86
88
|
"moment-timezone": "^0.5.31",
|
|
89
|
+
"my-orders-tickets-widget": "1.0.0-beta.47",
|
|
87
90
|
"object.assign": "^4.1.5",
|
|
88
|
-
"openstack-uicore-foundation": "4.
|
|
91
|
+
"openstack-uicore-foundation": "4.2.8",
|
|
89
92
|
"path-browserify": "^1.0.1",
|
|
90
93
|
"prop-types": "^15.6.0",
|
|
91
94
|
"react": "^18.2.0",
|
|
@@ -97,7 +100,7 @@
|
|
|
97
100
|
"react-dnd-html5-backend": "^16.0.1",
|
|
98
101
|
"react-dom": "^18.2.0",
|
|
99
102
|
"react-final-form": "6.5.9",
|
|
100
|
-
"react-i18next": "^
|
|
103
|
+
"react-i18next": "^14.1.2",
|
|
101
104
|
"react-iframe-comm": "^1.2.2",
|
|
102
105
|
"react-immutable-proptypes": "^2.2.0",
|
|
103
106
|
"react-laag": "^2.0.5",
|
|
@@ -131,9 +134,9 @@
|
|
|
131
134
|
"stream-browserify": "^3.0.0",
|
|
132
135
|
"stream-chat": "^2.7.2",
|
|
133
136
|
"stream-chat-react": "3.1.7",
|
|
134
|
-
"summit-registration-lite": "5.0.
|
|
137
|
+
"summit-registration-lite": "5.0.46",
|
|
135
138
|
"superagent": "8.0.9",
|
|
136
|
-
"sweetalert2": "^
|
|
139
|
+
"sweetalert2": "^11.11.1",
|
|
137
140
|
"upcoming-events-widget": "3.0.7",
|
|
138
141
|
"urijs": "^1.19.2",
|
|
139
142
|
"use-fit-text": "^2.4.0",
|
|
@@ -145,7 +148,7 @@
|
|
|
145
148
|
"web-vitals": "^1.1.2",
|
|
146
149
|
"what-input": "^5.2.10",
|
|
147
150
|
"xmlhttprequest": "^1.8.0",
|
|
148
|
-
"yup": "^
|
|
151
|
+
"yup": "^1.4.0"
|
|
149
152
|
},
|
|
150
153
|
"keywords": [
|
|
151
154
|
"Open Event Kit"
|
|
@@ -181,7 +181,6 @@ export const fetchSpeakerById = async(summitId, speakerId, accessToken = null) =
|
|
|
181
181
|
*/
|
|
182
182
|
export const fetchSummitById = async(summitId, accessToken = null) => {
|
|
183
183
|
let apiUrl = URI(`${process.env.GATSBY_SUMMIT_API_BASE_URL}/api/public/v1/summits/${summitId}`);
|
|
184
|
-
|
|
185
184
|
const expand = [
|
|
186
185
|
'event_types',
|
|
187
186
|
'tracks',
|
|
@@ -196,6 +195,7 @@ export const fetchSummitById = async(summitId, accessToken = null) => {
|
|
|
196
195
|
'schedule_settings.filters',
|
|
197
196
|
'schedule_settings.pre_filters',
|
|
198
197
|
"ticket_types",
|
|
198
|
+
"badge_features_types",
|
|
199
199
|
]
|
|
200
200
|
|
|
201
201
|
apiUrl.addQuery('expand', expand.join(','));
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
booleanField,
|
|
3
|
+
fileField,
|
|
3
4
|
} from "../../../fields";
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
+
import {
|
|
6
7
|
PAYMENTS_FILE_PATH,
|
|
7
8
|
APPLE_PAY_DOMAIN_FILE_PATH,
|
|
8
9
|
APPLE_PAY_DOMAIN_FILE_NAME
|
|
9
10
|
} from "@utils/filePath";
|
|
10
11
|
|
|
11
|
-
const payments = {
|
|
12
|
+
const payments = {
|
|
12
13
|
label: "Payments",
|
|
13
14
|
name: "payments",
|
|
14
15
|
file: PAYMENTS_FILE_PATH,
|
|
@@ -19,8 +20,13 @@ const payments = {
|
|
|
19
20
|
file: APPLE_PAY_DOMAIN_FILE_NAME,
|
|
20
21
|
media_folder: APPLE_PAY_DOMAIN_FILE_PATH,
|
|
21
22
|
public_folder: APPLE_PAY_DOMAIN_FILE_PATH,
|
|
22
|
-
}),
|
|
23
|
-
|
|
23
|
+
}),
|
|
24
|
+
booleanField({
|
|
25
|
+
label: "Hide Postal Code",
|
|
26
|
+
name: "hidePostalCode",
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export default payments;
|
|
@@ -2,10 +2,12 @@ const siteSettingsTypeDefs = require("./siteSettings/typeDefs");
|
|
|
2
2
|
const adsTypeDefs = require("./ads/typeDefs");
|
|
3
3
|
const navbarTypeDefs = require("./navbar/typeDefs");
|
|
4
4
|
const footerTypeDefs = require("./footer/typeDefs");
|
|
5
|
+
const paymentsTypeDefs = require("./payments/typeDefs");
|
|
5
6
|
|
|
6
7
|
module.exports = [
|
|
7
8
|
siteSettingsTypeDefs,
|
|
8
9
|
adsTypeDefs,
|
|
9
10
|
navbarTypeDefs,
|
|
10
|
-
footerTypeDefs
|
|
11
|
+
footerTypeDefs,
|
|
12
|
+
paymentsTypeDefs
|
|
11
13
|
].join("");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {useEffect, useRef, useState, useCallback} from "react";
|
|
2
2
|
import * as Sentry from "@sentry/react";
|
|
3
|
-
import {
|
|
3
|
+
import {connect} from "react-redux";
|
|
4
4
|
import FragmentParser from "openstack-uicore-foundation/lib/utils/fragment-parser";
|
|
5
|
-
import {
|
|
5
|
+
import {getAccessToken} from "openstack-uicore-foundation/lib/security/methods";
|
|
6
6
|
import {
|
|
7
7
|
AttendeeToAttendeeContainer,
|
|
8
8
|
permissions,
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
SUPABASE_URL,
|
|
19
19
|
SUPABASE_KEY,
|
|
20
20
|
} from "@utils/envVariables";
|
|
21
|
-
import {
|
|
21
|
+
import {PHASES} from "@utils/phasesUtils";
|
|
22
22
|
|
|
23
23
|
import "attendee-to-attendee-widget/dist/index.css";
|
|
24
24
|
|
|
25
|
-
import {
|
|
25
|
+
import {SentryFallbackFunction} from "./SentryErrorComponent";
|
|
26
26
|
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
27
|
+
import {useEventListener} from "@utils/hooks";
|
|
28
|
+
import {INIT_LOGOUT_EVENT} from "@utils/eventTriggers";
|
|
29
29
|
import {getAccessTokenSafely} from "../utils/loginUtils";
|
|
30
30
|
|
|
31
31
|
const sbAuthProps = {
|
|
@@ -33,9 +33,11 @@ const sbAuthProps = {
|
|
|
33
33
|
supabaseKey: getEnvVariable(SUPABASE_KEY),
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
const envVarsPresent = getEnvVariable(SUPABASE_URL) && getEnvVariable(SUPABASE_KEY) && getEnvVariable(STREAM_IO_API_KEY) && getEnvVariable(CHAT_API_BASE_URL);
|
|
37
|
+
|
|
36
38
|
const adminGroups = ["administrators", "super-admins"];
|
|
37
39
|
|
|
38
|
-
const AttendeesWidgetComponent = ({
|
|
40
|
+
const AttendeesWidgetComponent = ({user, event, summit, chatSettings}) => {
|
|
39
41
|
const [loading, setLoading] = useState(true);
|
|
40
42
|
|
|
41
43
|
//Deep linking support
|
|
@@ -44,18 +46,18 @@ const AttendeesWidgetComponent = ({ user, event, summit, chatSettings }) => {
|
|
|
44
46
|
const sqacRef = useRef();
|
|
45
47
|
const ocrRef = useRef();
|
|
46
48
|
|
|
47
|
-
const {
|
|
48
|
-
const {
|
|
49
|
-
const {
|
|
50
|
-
email,
|
|
51
|
-
groups,
|
|
49
|
+
const {userProfile, idpProfile} = user || {};
|
|
50
|
+
const {summit_tickets} = userProfile || {};
|
|
51
|
+
const {
|
|
52
|
+
email,
|
|
53
|
+
groups,
|
|
52
54
|
bio,
|
|
53
55
|
given_name,
|
|
54
56
|
family_name,
|
|
55
57
|
picture,
|
|
56
58
|
company,
|
|
57
59
|
job_title,
|
|
58
|
-
sub,
|
|
60
|
+
sub,
|
|
59
61
|
github_user,
|
|
60
62
|
linked_in_profile,
|
|
61
63
|
twitter_name,
|
|
@@ -69,7 +71,7 @@ const AttendeesWidgetComponent = ({ user, event, summit, chatSettings }) => {
|
|
|
69
71
|
} = idpProfile || {};
|
|
70
72
|
|
|
71
73
|
useEffect(() => {
|
|
72
|
-
if (!user || !userProfile || !idpProfile) return;
|
|
74
|
+
if (!user || !userProfile || !idpProfile || !envVarsPresent) return;
|
|
73
75
|
const fragmentParser = new FragmentParser();
|
|
74
76
|
const starHelpChatParam = fragmentParser.getParam("starthelpchat");
|
|
75
77
|
const starQAChatParam = fragmentParser.getParam("startqachat");
|
|
@@ -88,7 +90,7 @@ const AttendeesWidgetComponent = ({ user, event, summit, chatSettings }) => {
|
|
|
88
90
|
setLoading(false);
|
|
89
91
|
}, [user, idpProfile, userProfile]);
|
|
90
92
|
|
|
91
|
-
if (loading) return <div style={{
|
|
93
|
+
if (loading) return <div style={{margin: "20px auto", position: "relative"}}>Loading...</div>;
|
|
92
94
|
|
|
93
95
|
const chatProps = {
|
|
94
96
|
streamApiKey: getEnvVariable(STREAM_IO_API_KEY),
|
|
@@ -133,7 +135,7 @@ const AttendeesWidgetComponent = ({ user, event, summit, chatSettings }) => {
|
|
|
133
135
|
.filter((st) => st.badge)
|
|
134
136
|
.flatMap((st) => st.badge.features)
|
|
135
137
|
.map((feature) => feature.id))]
|
|
136
|
-
|
|
138
|
+
|
|
137
139
|
return summit.badge_features_types.filter((bft) => attendeeBadgeFeatureIds.includes(bft.id));
|
|
138
140
|
},
|
|
139
141
|
bio: bio,
|
|
@@ -144,14 +146,14 @@ const AttendeesWidgetComponent = ({ user, event, summit, chatSettings }) => {
|
|
|
144
146
|
showSocialInfo: public_profile_show_social_media_info === true,
|
|
145
147
|
showBio: public_profile_show_bio === true,
|
|
146
148
|
hasPermission: (permission) => {
|
|
147
|
-
const isAdmin =
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
const isAdmin = groups &&
|
|
150
|
+
groups.map((g) => g.slug).filter((g) => adminGroups.includes(g))
|
|
151
|
+
.length > 0;
|
|
150
152
|
switch (permission) {
|
|
151
153
|
case permissions.MANAGE_ROOMS:
|
|
152
154
|
return isAdmin;
|
|
153
155
|
case permissions.CHAT:
|
|
154
|
-
if(isAdmin) return true;
|
|
156
|
+
if (isAdmin) return true;
|
|
155
157
|
const accessLevels = summit_tickets
|
|
156
158
|
.flatMap((x) => x.badge?.type.access_levels)
|
|
157
159
|
.filter(
|
|
@@ -181,27 +183,27 @@ const AttendeesWidgetComponent = ({ user, event, summit, chatSettings }) => {
|
|
|
181
183
|
...sbAuthProps,
|
|
182
184
|
};
|
|
183
185
|
|
|
184
|
-
if (!chatSettings?.enabled) return null;
|
|
186
|
+
if (!chatSettings?.enabled || !envVarsPresent) return null;
|
|
185
187
|
|
|
186
188
|
return (
|
|
187
|
-
<div style={{
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
<div style={{margin: "20px auto", position: "relative"}}>
|
|
190
|
+
<Sentry.ErrorBoundary fallback={SentryFallbackFunction({componentName: 'Attendee To Attendee'})}>
|
|
191
|
+
<AttendeeToAttendeeContainer
|
|
192
|
+
{...widgetProps}
|
|
193
|
+
ref={{sdcRef, shcRef, sqacRef, ocrRef}}
|
|
194
|
+
/>
|
|
195
|
+
</Sentry.ErrorBoundary>
|
|
196
|
+
</div>
|
|
195
197
|
);
|
|
196
198
|
};
|
|
197
199
|
|
|
198
|
-
const mapState = ({
|
|
200
|
+
const mapState = ({settingState}) => ({
|
|
199
201
|
chatSettings: settingState.widgets.chat,
|
|
200
202
|
});
|
|
201
203
|
|
|
202
204
|
export const AttendeesWidget = connect(mapState)(AttendeesWidgetComponent);
|
|
203
205
|
|
|
204
|
-
const AccessTracker = ({
|
|
206
|
+
const AccessTracker = ({user, isLoggedUser, summitPhase, chatSettings, updateChatProfileEnabled = false}) => {
|
|
205
207
|
const chatProps = {
|
|
206
208
|
streamApiKey: getEnvVariable(STREAM_IO_API_KEY),
|
|
207
209
|
apiBaseUrl: getEnvVariable(IDP_BASE_URL),
|
|
@@ -215,7 +217,7 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings, updateCh
|
|
|
215
217
|
return accessToken;
|
|
216
218
|
},
|
|
217
219
|
};
|
|
218
|
-
|
|
220
|
+
|
|
219
221
|
const trackerRef = useRef();
|
|
220
222
|
|
|
221
223
|
const handleLogout = useCallback(() => {
|
|
@@ -228,7 +230,7 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings, updateCh
|
|
|
228
230
|
useEffect(() => {
|
|
229
231
|
if (!isLoggedUser) {
|
|
230
232
|
if (trackerRef.current)
|
|
231
|
-
|
|
233
|
+
trackerRef.current.signOut();
|
|
232
234
|
}
|
|
233
235
|
}, [isLoggedUser]);
|
|
234
236
|
|
|
@@ -251,7 +253,7 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings, updateCh
|
|
|
251
253
|
return null;
|
|
252
254
|
}
|
|
253
255
|
|
|
254
|
-
const {
|
|
256
|
+
const {summit_tickets} = user.userProfile;
|
|
255
257
|
const {
|
|
256
258
|
bio,
|
|
257
259
|
given_name,
|
|
@@ -310,12 +312,12 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings, updateCh
|
|
|
310
312
|
...sbAuthProps
|
|
311
313
|
};
|
|
312
314
|
|
|
313
|
-
if (!chatSettings.enabled) return null;
|
|
315
|
+
if (!chatSettings.enabled || !envVarsPresent) return null;
|
|
314
316
|
|
|
315
|
-
return <Tracker {...widgetProps} ref={trackerRef}
|
|
317
|
+
return <Tracker {...widgetProps} ref={trackerRef}/>;
|
|
316
318
|
};
|
|
317
319
|
|
|
318
|
-
const mapStateToProps = ({
|
|
320
|
+
const mapStateToProps = ({loggedUserState, userState, clockState, settingState}) => ({
|
|
319
321
|
isLoggedUser: loggedUserState.isLoggedUser,
|
|
320
322
|
user: userState,
|
|
321
323
|
summitPhase: clockState.summit_phase,
|
|
@@ -46,6 +46,7 @@ const AuthComponent = ({
|
|
|
46
46
|
const [otpLogin, setOtpLogin] = useState(false);
|
|
47
47
|
const [userEmail, setUserEmail] = useState('');
|
|
48
48
|
const [otpLength, setOtpLength] = useState(null);
|
|
49
|
+
const [otpLifeTime, setOtpLifeTime] = useState(null);
|
|
49
50
|
const [otpError, setOtpError] = useState(false);
|
|
50
51
|
|
|
51
52
|
const hasVirtualBadge = useMemo(() =>
|
|
@@ -129,8 +130,10 @@ const AuthComponent = ({
|
|
|
129
130
|
|
|
130
131
|
const sendCode = (email) => {
|
|
131
132
|
setUserEmail(email);
|
|
133
|
+
setOtpLifeTime(0);
|
|
132
134
|
return getPasswordlessCode(email).then(({ response }) => {
|
|
133
135
|
setOtpLength(response.otp_length);
|
|
136
|
+
setOtpLifeTime(response.otp_lifetime)
|
|
134
137
|
setOtpLogin(true);
|
|
135
138
|
}).catch((err) => {
|
|
136
139
|
const errorMessage = err.response?.body?.error || err.message;
|
|
@@ -154,6 +157,7 @@ const AuthComponent = ({
|
|
|
154
157
|
const passwordlessLoginProps = {
|
|
155
158
|
email: userEmail,
|
|
156
159
|
codeLength: otpLength,
|
|
160
|
+
codeLifeTime: otpLifeTime,
|
|
157
161
|
passwordlessLogin: (code) => loginPasswordless(code, userEmail).then(() => {
|
|
158
162
|
// close popup and then navigate bc its its the same origin page
|
|
159
163
|
// it would not reload and closed the popup automatically
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from "react";
|
|
2
2
|
import AvatarEditor from "react-avatar-editor";
|
|
3
|
-
import
|
|
3
|
+
import AjaxLoader from "openstack-uicore-foundation/lib/components/ajaxloader";
|
|
4
4
|
import { Box, Typography, Slider, Modal } from "@mui/material";
|
|
5
5
|
import { Button, IconButton } from "../ui";
|
|
6
6
|
import { styled } from "@mui/system";
|
|
@@ -35,6 +35,7 @@ const ChangePasswordComponent = ({ updatePassword }) => {
|
|
|
35
35
|
<div className={`columns is-mobile ${styles.passwordFields}`}>
|
|
36
36
|
<div className={`columns column is-full ${styles.inputField}`}>
|
|
37
37
|
<b>Current Password</b>
|
|
38
|
+
<i className={styles.subLabel}>(leave blank if you don't have one)</i>
|
|
38
39
|
<div>
|
|
39
40
|
<input
|
|
40
41
|
className={`column is-11 ${styles.input} ${styles.isLarge}`}
|
|
@@ -81,7 +82,7 @@ const ChangePasswordComponent = ({ updatePassword }) => {
|
|
|
81
82
|
</div>
|
|
82
83
|
<div className={`columns is-mobile ${styles.buttons}`}>
|
|
83
84
|
<div className={`column is-full`}>
|
|
84
|
-
<button disabled={!
|
|
85
|
+
<button disabled={!newPassword || !newPasswordConfirm}
|
|
85
86
|
className="button is-large"
|
|
86
87
|
onClick={() => updatePassword(currentPassword, newPassword, newPasswordConfirm)}
|
|
87
88
|
>
|
|
@@ -126,7 +126,10 @@ const DisqusComponent = ({summit, sponsor, event, disqusSSO, hideMobile, title,
|
|
|
126
126
|
if (!remoteAuthS3) error = ` ${error} ${!remoteAuthS3 ? 'SSO remoteAuthS3 missing' : ''}`;
|
|
127
127
|
if (!apiKey) error = ` ${error} ${!apiKey ? 'SSO apiKey missing' : ''}`;
|
|
128
128
|
if (!shortname) error = ` ${error} ${!shortname ? 'DISQUS_SHORTNAME env var missing' : ''}`;
|
|
129
|
-
|
|
129
|
+
|
|
130
|
+
// no error, fail silently
|
|
131
|
+
console.log(error);
|
|
132
|
+
return null;
|
|
130
133
|
}
|
|
131
134
|
|
|
132
135
|
const disqusConfig = {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as Sentry from "@sentry/react";
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { getUserProfile, ticketOwnerChange } from '../actions/user-actions';
|
|
7
|
-
|
|
4
|
+
import { getAccessToken } from 'openstack-uicore-foundation/lib/security/methods';
|
|
5
|
+
import { getEnvVariable, SUMMIT_API_BASE_URL, OAUTH2_CLIENT_ID, SUPPORT_EMAIL } from '../utils/envVariables';
|
|
6
|
+
import { getUserProfile, ticketOwnerChange,updateProfile } from '../actions/user-actions';
|
|
7
|
+
import loadable from "@loadable/component";
|
|
8
|
+
import 'my-orders-tickets-widget/dist/index.css';
|
|
9
|
+
import 'my-orders-tickets-widget/dist/i18n';
|
|
8
10
|
import { SentryFallbackFunction } from "./SentryErrorComponent";
|
|
9
|
-
|
|
11
|
+
const MyOrdersMyTicketsWidget = loadable(() => import("my-orders-tickets-widget/dist/index"), {
|
|
12
|
+
ssr: false,
|
|
13
|
+
fallback: null,
|
|
14
|
+
});
|
|
10
15
|
|
|
11
16
|
export const MyOrdersTicketsComponent = () => {
|
|
12
17
|
const dispatch = useDispatch();
|
|
@@ -18,19 +23,19 @@ export const MyOrdersTicketsComponent = () => {
|
|
|
18
23
|
const widgetProps = {
|
|
19
24
|
apiBaseUrl: getEnvVariable(SUMMIT_API_BASE_URL),
|
|
20
25
|
clientId: getEnvVariable(OAUTH2_CLIENT_ID),
|
|
21
|
-
idpBaseUrl: getEnvVariable(IDP_BASE_URL),
|
|
22
26
|
supportEmail: summit.support_email || getEnvVariable(SUPPORT_EMAIL),
|
|
23
27
|
loginUrl: '/',
|
|
24
|
-
getAccessToken
|
|
28
|
+
getAccessToken,
|
|
25
29
|
getUserProfile: async () => await dispatch(getUserProfile()),
|
|
30
|
+
updateProfile: (profile) => dispatch(updateProfile(profile)),
|
|
26
31
|
summit,
|
|
27
32
|
user,
|
|
28
33
|
onTicketAssigned: (ticket) => dispatch(ticketOwnerChange(ticket))
|
|
29
34
|
};
|
|
30
35
|
|
|
31
36
|
return (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
<Sentry.ErrorBoundary fallback={SentryFallbackFunction({componentName: 'My Orders & Tickets'})}>
|
|
38
|
+
<MyOrdersMyTicketsWidget {...widgetProps} />
|
|
39
|
+
</Sentry.ErrorBoundary>
|
|
35
40
|
);
|
|
36
41
|
};
|
|
@@ -22,6 +22,7 @@ import { SentryFallbackFunction } from "./SentryErrorComponent";
|
|
|
22
22
|
import RegistrationLiteWidget from "summit-registration-lite/dist";
|
|
23
23
|
import "summit-registration-lite/dist/index.css";
|
|
24
24
|
import useSiteSettings from "@utils/useSiteSettings";
|
|
25
|
+
import usePaymentSettings from "@utils/usePaymentSettings";
|
|
25
26
|
import useMarketingSettings, { MARKETING_SETTINGS_KEYS } from "@utils/useMarketingSettings";
|
|
26
27
|
import { getEnvVariable, SUMMIT_API_BASE_URL, OAUTH2_CLIENT_ID, REGISTRATION_BASE_URL, SUPPORT_EMAIL } from "@utils/envVariables";
|
|
27
28
|
import { userHasAccessLevel, VIRTUAL_ACCESS_LEVEL } from "@utils/authorizedGroups";
|
|
@@ -132,6 +133,8 @@ const RegistrationLiteComponent = ({
|
|
|
132
133
|
|
|
133
134
|
const siteSettings = useSiteSettings();
|
|
134
135
|
|
|
136
|
+
const paymentSettings = usePaymentSettings();
|
|
137
|
+
|
|
135
138
|
const widgetProps = {
|
|
136
139
|
apiBaseUrl: getEnvVariable(SUMMIT_API_BASE_URL),
|
|
137
140
|
clientId: getEnvVariable(OAUTH2_CLIENT_ID),
|
|
@@ -202,7 +205,8 @@ const RegistrationLiteComponent = ({
|
|
|
202
205
|
showCompanyInputDefaultOptions: showCompanyInputDefaultOptions,
|
|
203
206
|
idpLogoLight: siteSettings?.idpLogo?.idpLogoLight?.publicURL,
|
|
204
207
|
idpLogoDark: siteSettings?.idpLogo?.idpLogoDark?.publicURL,
|
|
205
|
-
idpLogoAlt: siteSettings?.idpLogo?.idpLogoAlt
|
|
208
|
+
idpLogoAlt: siteSettings?.idpLogo?.idpLogoAlt,
|
|
209
|
+
hidePostalCode: paymentSettings?.hidePostalCode
|
|
206
210
|
};
|
|
207
211
|
|
|
208
212
|
const { registerButton } = marketingPageSettings.hero.buttons;
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
**/
|
|
13
13
|
import React, { useState } from 'react'
|
|
14
14
|
import { useTranslation } from "react-i18next";
|
|
15
|
-
import { Input } from 'openstack-uicore-foundation/lib/components';
|
|
16
15
|
import usePortal from 'react-useportal';
|
|
17
16
|
|
|
18
17
|
import './delegate-popup.scss';
|
|
@@ -37,7 +36,7 @@ export const DelegatePopup = ({ isOpen, onAccept, onReject }) => {
|
|
|
37
36
|
<div className="confirm-popup">
|
|
38
37
|
<h4>Delegate Ticket</h4>
|
|
39
38
|
<p>Delegation will create a new attendee and require to you to fill the first Name, last Name and to answer the extra questions again</p>
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
<div className="buttons">
|
|
42
41
|
<span onClick={handleRejectClick}>{t("confirm_popup.cancel")}</span>
|
|
43
42
|
<span onClick={handleAcceptClick}>{t("confirm_popup.accept")}</span>
|
|
@@ -48,4 +47,4 @@ export const DelegatePopup = ({ isOpen, onAccept, onReject }) => {
|
|
|
48
47
|
)}
|
|
49
48
|
</>
|
|
50
49
|
);
|
|
51
|
-
};
|
|
50
|
+
};
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import
|
|
5
|
+
import AjaxLoader from "openstack-uicore-foundation/lib/components/ajaxloader";
|
|
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';
|
|
@@ -62,7 +62,7 @@ export const MyOrdersTickets = ({ className }) => {
|
|
|
62
62
|
)}
|
|
63
63
|
|
|
64
64
|
<div className={classNames('my-orders-tickets', className)}>
|
|
65
|
-
{hasOrders && (
|
|
65
|
+
{hasOrders && (
|
|
66
66
|
<OrderList />
|
|
67
67
|
)}
|
|
68
68
|
|
|
@@ -76,4 +76,4 @@ export const MyOrdersTickets = ({ className }) => {
|
|
|
76
76
|
</div>
|
|
77
77
|
</>
|
|
78
78
|
);
|
|
79
|
-
};
|
|
79
|
+
};
|
package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupAssignForm.js
CHANGED
|
@@ -5,9 +5,8 @@ import { CSSTransition } from "react-transition-group";
|
|
|
5
5
|
import Alert from 'react-bootstrap/lib/Alert';
|
|
6
6
|
import { useFormik } from 'formik';
|
|
7
7
|
import * as Yup from 'yup';
|
|
8
|
-
import
|
|
8
|
+
import Input from 'openstack-uicore-foundation/lib/components/inputs/text-input'
|
|
9
9
|
import { assignAttendee } from "../../store/actions/ticket-actions";
|
|
10
|
-
import { getSummitFormattedReassignDate } from "../../util";
|
|
11
10
|
import { useTicketAssignedContext } from "../../context/TicketAssignedContext";
|
|
12
11
|
|
|
13
12
|
const initialValues = {
|
|
@@ -134,4 +133,4 @@ export const TicketPopupAssignForm = ({ ticket, summit, order }) => {
|
|
|
134
133
|
</div>
|
|
135
134
|
</form>
|
|
136
135
|
)
|
|
137
|
-
};
|
|
136
|
+
};
|
|
@@ -5,7 +5,9 @@ import { CSSTransition } from "react-transition-group";
|
|
|
5
5
|
import Alert from 'react-bootstrap/lib/Alert';
|
|
6
6
|
import { useFormik } from 'formik';
|
|
7
7
|
import * as Yup from 'yup';
|
|
8
|
-
import
|
|
8
|
+
import Input from 'openstack-uicore-foundation/lib/components/inputs/text-input'
|
|
9
|
+
import RegistrationCompanyInput from 'openstack-uicore-foundation/lib/components/inputs/registration-company-input';
|
|
10
|
+
import RawHTML from 'openstack-uicore-foundation/lib/components/raw-html';
|
|
9
11
|
import ExtraQuestionsForm from 'openstack-uicore-foundation/lib/components/extra-questions';
|
|
10
12
|
import QuestionsSet from 'openstack-uicore-foundation/lib/utils/questions-set';
|
|
11
13
|
import { getMainOrderExtraQuestions } from '../../../store/actions/summit-actions';
|
package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupReassignForm.js
CHANGED
|
@@ -5,7 +5,7 @@ import { CSSTransition } from "react-transition-group";
|
|
|
5
5
|
import Alert from 'react-bootstrap/lib/Alert';
|
|
6
6
|
import { useFormik } from 'formik';
|
|
7
7
|
import * as Yup from 'yup';
|
|
8
|
-
import
|
|
8
|
+
import Input from 'openstack-uicore-foundation/lib/components/inputs/text-input'
|
|
9
9
|
import { changeTicketAttendee } from "../../store/actions/ticket-actions";
|
|
10
10
|
import { ConfirmPopup, CONFIRM_POPUP_CASE } from "../ConfirmPopup/ConfirmPopup";
|
|
11
11
|
import { getSummitFormattedReassignDate } from "../../util";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"favicon":{"asset":"icon.png"},"widgets":{"chat":{"enabled":true,"showQA":false,"showHelp":false,"defaultScope":"page"},"schedule":{"allowClick":true}},"identityProviderButtons":[{"buttonColor":"#082238","providerLabel":"Continue with FNid","providerLogo":"logo_fn.svg","providerLogoSize":27},{"buttonColor":"#0A66C2","providerLabel":"Sign in with LinkedIn","providerParam":"linkedin","providerLogo":"logo_linkedin.svg","providerLogoSize":18},{"buttonColor":"#000000","providerLabel":"Sign in with Apple","providerParam":"apple","providerLogoSize":17,"providerLogo":"logo_apple.svg"},{"buttonColor":"#1877F2","providerLabel":"Login with Facebook","providerParam":"facebook","providerLogo":"logo_facebook.svg","providerLogoSize":20}],"maintenanceMode":{"enabled":false,"title":"Site under maintenance","subtitle":"Please reload page shortly"},"staticJsonFilesBuildTime":[{"file":"src/data/summit.json","build_time":
|
|
1
|
+
{"favicon":{"asset":"icon.png"},"widgets":{"chat":{"enabled":true,"showQA":false,"showHelp":false,"defaultScope":"page"},"schedule":{"allowClick":true}},"identityProviderButtons":[{"buttonColor":"#082238","providerLabel":"Continue with FNid","providerLogo":"logo_fn.svg","providerLogoSize":27},{"buttonColor":"#0A66C2","providerLabel":"Sign in with LinkedIn","providerParam":"linkedin","providerLogo":"logo_linkedin.svg","providerLogoSize":18},{"buttonColor":"#000000","providerLabel":"Sign in with Apple","providerParam":"apple","providerLogoSize":17,"providerLogo":"logo_apple.svg"},{"buttonColor":"#1877F2","providerLabel":"Login with Facebook","providerParam":"facebook","providerLogo":"logo_facebook.svg","providerLogoSize":20}],"maintenanceMode":{"enabled":false,"title":"Site under maintenance","subtitle":"Please reload page shortly"},"staticJsonFilesBuildTime":[{"file":"src/data/summit.json","build_time":1748026605601},{"file":"src/data/events.json","build_time":1748026626928},{"file":"src/data/events.idx.json","build_time":1748026626985},{"file":"src/data/speakers.json","build_time":1748026634015},{"file":"src/data/speakers.idx.json","build_time":1748026634022},{"file":"src/content/sponsors.json","build_time":1748026637386},{"file":"src/data/voteable-presentations.json","build_time":1748026638342}],"lastBuild":1748026638342}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[]
|
|
1
|
+
[{"id":360,"created":1741369599,"last_edited":1741369599,"order":2,"summit_id":63,"is_published":true,"side_image":null,"header_image":null,"header_image_mobile":null,"carousel_advertise_image":null,"marquee":"","intro":"","external_link":"","video_link":"","chat_link":"","featured_event_id":0,"header_image_alt_text":"","side_image_alt_text":"","header_image_mobile_alt_text":"","carousel_advertise_image_alt_text":"","show_logo_in_event_page":true,"lead_report_setting_id":null,"extra_questions":[541],"members":[96743,29308],"company":{"id":3496,"created":1654774567,"last_edited":1654774567,"name":"Tipit","url":null,"url_segment":null,"city":null,"state":null,"country":null,"description":null,"industry":null,"contributions":null,"member_level":null,"overview":null,"products":null,"commitment":null,"commitment_author":null,"logo":null,"big_logo":null,"color":"#f0f0ee","display_on_site":false,"featured":false,"contact_email":null,"admin_email":null,"sponsorships":[],"project_sponsorships":[]},"sponsorship":{"id":2065,"widget_title":"Test Widget Title","lobby_template":"big-images","expo_hall_template":"big-images","sponsor_page_template":"small-header","event_page_template":"small-images","sponsor_page_use_disqus_widget":false,"sponsor_page_use_live_event_widget":false,"sponsor_page_use_schedule_widget":false,"sponsor_page_use_banner_widget":false,"badge_image":"https://summit-api-dev-assets.nyc3.digitaloceanspaces.com/summits/63/summit_sponsorship_types/2065/shopping.png","badge_image_alt_text":"","summit_id":63,"order":2,"should_display_on_expo_hall_page":false,"should_display_on_lobby_page":false,"type":{"id":8,"created":1603223268,"last_edited":1603223268,"name":"Featured","label":"Featured","order":8,"size":"Large"}},"ads":[],"materials":[],"social_networks":[]}]
|
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.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title:mySchedulePageJson.title, key: mySchedulePageJson.key }) }
|
|
85
|
+
{ mySchedulePageJson && !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.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title: mySchedulePageJson.title, key: mySchedulePageJson.key }) }
|
|
90
|
+
{ mySchedulePageJson && 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} />
|
|
@@ -40,8 +40,12 @@ export class LogOutCallbackRoute extends React.Component {
|
|
|
40
40
|
let query = URI.parseQuery(location.search);
|
|
41
41
|
// compare the state and perform the final logout
|
|
42
42
|
if (query.hasOwnProperty("state") && query["state"] === postLogoutState) {
|
|
43
|
-
this.props.doLogout();
|
|
44
43
|
let backUrl = getFromLocalStorage('post_logout_redirect_path', true);
|
|
44
|
+
this.props.doLogout();
|
|
45
|
+
// clear current state , bc unmounted widgets will not receive the LOG_OUT event
|
|
46
|
+
if(typeof window !== 'undefined') {
|
|
47
|
+
window.localStorage.clear();
|
|
48
|
+
}
|
|
45
49
|
navigate(backUrl ? backUrl : '/');
|
|
46
50
|
return;
|
|
47
51
|
}
|
|
@@ -69,4 +73,4 @@ export default connect(
|
|
|
69
73
|
{
|
|
70
74
|
doLogout
|
|
71
75
|
}
|
|
72
|
-
)(LogOutCallbackRoute)
|
|
76
|
+
)(LogOutCallbackRoute)
|
|
@@ -10,7 +10,9 @@ import { isEmpty } from "lodash";
|
|
|
10
10
|
import { getExtraQuestions } from '../actions/summit-actions';
|
|
11
11
|
import { saveAttendeeQuestions } from '../actions/user-actions';
|
|
12
12
|
import { TICKET_ATTENDEE_KEYS as TicketKeys } from '../components/summit-my-orders-tickets/store/actions/ticket-actions';
|
|
13
|
-
import
|
|
13
|
+
import Input from 'openstack-uicore-foundation/lib/components/inputs/text-input'
|
|
14
|
+
import RegistrationCompanyInput from 'openstack-uicore-foundation/lib/components/inputs/registration-company-input';
|
|
15
|
+
import RawHTML from 'openstack-uicore-foundation/lib/components/raw-html';
|
|
14
16
|
import FragmentParser from "openstack-uicore-foundation/lib/utils/fragment-parser";
|
|
15
17
|
import QuestionsSet from 'openstack-uicore-foundation/lib/utils/questions-set';
|
|
16
18
|
import ExtraQuestionsForm from 'openstack-uicore-foundation/lib/components/extra-questions';
|
|
@@ -259,12 +261,12 @@ export const ExtraQuestionsPageTemplate = ({ user, summit, extraQuestions, atten
|
|
|
259
261
|
onChange={(e) =>
|
|
260
262
|
formik.setFieldTouched(TicketKeys.disclaimerAccepted, true) && formik.handleChange(e)
|
|
261
263
|
}
|
|
262
|
-
checked={formik.values[TicketKeys.disclaimerAccepted]}
|
|
264
|
+
checked={formik.values[TicketKeys.disclaimerAccepted]}
|
|
263
265
|
/>
|
|
264
266
|
<label htmlFor={TicketKeys.disclaimerAccepted}>
|
|
265
267
|
{summit.registration_disclaimer_mandatory && <b> *</b>}
|
|
266
|
-
</label>
|
|
267
|
-
</div>
|
|
268
|
+
</label>
|
|
269
|
+
</div>
|
|
268
270
|
<div className="mt-3">
|
|
269
271
|
<RawHTML>
|
|
270
272
|
{summit.registration_disclaimer_content}
|
package/src/utils/filePath.js
CHANGED
|
@@ -41,7 +41,8 @@ const INVITATIONS_REJECT_PAGE_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/invitation
|
|
|
41
41
|
const SPONSORS_FILE_NAME = "sponsors.json";
|
|
42
42
|
const SPONSORS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/${SPONSORS_FILE_NAME}`;
|
|
43
43
|
const CMS_FONT_FILE_PATH = "/static/fonts/"
|
|
44
|
-
const
|
|
44
|
+
const PAYMENTS_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/payments`;
|
|
45
|
+
const PAYMENTS_FILE_PATH = `${PAYMENTS_DIR_PATH}/index.json`;
|
|
45
46
|
const APPLE_PAY_DOMAIN_FILE_PATH = `/static/.well-known/`
|
|
46
47
|
const APPLE_PAY_DOMAIN_FILE_NAME = `apple-developer-merchantid-domain-association`;
|
|
47
48
|
const MY_SCHEDULE_PAGE_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/my-schedule-page`;
|
|
@@ -58,7 +59,8 @@ exports.REQUIRED_DIR_PATHS = [
|
|
|
58
59
|
INVITATIONS_REJECT_PAGE_FILE_PATH,
|
|
59
60
|
NAVBAR_DIR_PATH,
|
|
60
61
|
FOOTER_DIR_PATH,
|
|
61
|
-
MY_SCHEDULE_PAGE_FILE_PATH
|
|
62
|
+
MY_SCHEDULE_PAGE_FILE_PATH,
|
|
63
|
+
PAYMENTS_DIR_PATH
|
|
62
64
|
];
|
|
63
65
|
|
|
64
66
|
exports.STATIC_CONTENT_DIR_PATH = STATIC_CONTENT_DIR_PATH;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
graphql,
|
|
3
|
+
useStaticQuery
|
|
4
|
+
} from "gatsby";
|
|
5
|
+
|
|
6
|
+
const paymentSettingsQuery = graphql`
|
|
7
|
+
query {
|
|
8
|
+
paymentsJson {
|
|
9
|
+
hidePostalCode
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const usePaymentSettings = () => {
|
|
15
|
+
const { paymentsJson } = useStaticQuery(paymentSettingsQuery);
|
|
16
|
+
return paymentsJson;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default usePaymentSettings;
|
|
20
|
+
|