@openeventkit/event-site 2.1.49 → 2.1.51

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.
Files changed (135) hide show
  1. package/gatsby-node.js +21 -4
  2. package/package.json +3 -3
  3. package/src/actions/user-actions.js +9 -10
  4. package/src/cms/config/collections/configurationsCollection/siteSettings/index.js +21 -0
  5. package/src/cms/config/collections/configurationsCollection/siteSettings/typeDefs.js +5 -0
  6. package/src/cms/config/collections/contentPagesCollection/index.js +11 -1
  7. package/src/cms/config/collections/contentPagesCollection/typeDefs.js +1 -0
  8. package/src/cms/config/collections/defaultPagesCollection/marketingPage/index.js +2 -6
  9. package/src/cms/config/collections/defaultPagesCollection/marketingPage/typeDefs.js +0 -1
  10. package/src/cms/preview-templates/ContentPagePreview.js +12 -1
  11. package/src/components/AuthComponent.js +2 -1
  12. package/src/components/MarketingHero/MainColumn.js +23 -11
  13. package/src/components/RegisterButton.js +59 -0
  14. package/src/components/RegistrationFormShortcode.js +82 -0
  15. package/src/components/RegistrationModalComponent.js +124 -0
  16. package/src/components/VimeoPlayer.js +2 -2
  17. package/src/content/marketing-page/index.json +1 -2
  18. package/src/content/site-settings/index.json +1 -1
  19. package/src/content/sponsors.json +1 -1
  20. package/src/pages/index.js +0 -1
  21. package/src/styles/register-page.module.scss +23 -0
  22. package/src/templates/content-page/shortcodes.js +3 -5
  23. package/src/templates/extra-questions-page.js +1 -1
  24. package/src/templates/full-profile-page.js +2 -3
  25. package/src/templates/register-page.js +96 -0
  26. package/src/utils/alerts.js +34 -27
  27. package/src/utils/customErrorHandler.js +4 -4
  28. package/src/utils/registrationConstants.js +7 -0
  29. package/src/utils/ticketConstants.js +10 -0
  30. package/src/utils/useRegistrationWidgetProps.js +204 -0
  31. package/src/utils/useSiteSettings.js +4 -0
  32. package/.playwright-mcp/console-2026-02-26T16-44-19-373Z.log +0 -4
  33. package/.playwright-mcp/console-2026-02-26T16-47-01-636Z.log +0 -2
  34. package/.playwright-mcp/console-2026-02-26T16-49-02-149Z.log +0 -4
  35. package/.playwright-mcp/console-2026-02-26T16-49-40-507Z.log +0 -2
  36. package/.playwright-mcp/console-2026-02-26T16-50-19-509Z.log +0 -2
  37. package/.playwright-mcp/console-2026-02-26T16-57-54-251Z.log +0 -3
  38. package/.playwright-mcp/console-2026-02-26T19-57-40-442Z.log +0 -1
  39. package/.playwright-mcp/console-2026-02-26T19-57-58-088Z.log +0 -2
  40. package/.playwright-mcp/console-2026-02-26T20-05-42-541Z.log +0 -2
  41. package/.playwright-mcp/console-2026-02-26T20-06-33-506Z.log +0 -9
  42. package/.playwright-mcp/console-2026-02-26T20-42-10-293Z.log +0 -34
  43. package/.playwright-mcp/console-2026-02-26T20-42-57-262Z.log +0 -65
  44. package/.playwright-mcp/console-2026-02-26T21-01-25-696Z.log +0 -33
  45. package/.playwright-mcp/console-2026-02-26T21-03-18-294Z.log +0 -47
  46. package/.playwright-mcp/console-2026-02-27T00-27-06-325Z.log +0 -131
  47. package/.playwright-mcp/console-2026-02-27T00-49-26-441Z.log +0 -104
  48. package/.playwright-mcp/page-2026-02-26T16-51-33-776Z.png +0 -0
  49. package/src/components/RegistrationLiteComponent.js +0 -293
  50. package/src/components/summit-my-orders-tickets/components/ConfirmPopup/ConfirmPopup.js +0 -96
  51. package/src/components/summit-my-orders-tickets/components/ConfirmPopup/confirm-popup.scss +0 -57
  52. package/src/components/summit-my-orders-tickets/components/DelegatePopup/DelegatePopup.js +0 -50
  53. package/src/components/summit-my-orders-tickets/components/DelegatePopup/delegate-popup.scss +0 -57
  54. package/src/components/summit-my-orders-tickets/components/MyOrdersTickets.js +0 -79
  55. package/src/components/summit-my-orders-tickets/components/OrderDetails/OrderDetails.js +0 -112
  56. package/src/components/summit-my-orders-tickets/components/OrderDetails/order-details.scss +0 -128
  57. package/src/components/summit-my-orders-tickets/components/OrderList/OrderList.js +0 -80
  58. package/src/components/summit-my-orders-tickets/components/OrderList/OrderListItem.js +0 -85
  59. package/src/components/summit-my-orders-tickets/components/OrderList/order-list.scss +0 -60
  60. package/src/components/summit-my-orders-tickets/components/OrderOptions/OrderOptions.js +0 -83
  61. package/src/components/summit-my-orders-tickets/components/OrderOptions/order-options.scss +0 -50
  62. package/src/components/summit-my-orders-tickets/components/OrderSummary/OrderSummary.js +0 -64
  63. package/src/components/summit-my-orders-tickets/components/OrderSummary/OrderSummaryTable.js +0 -97
  64. package/src/components/summit-my-orders-tickets/components/OrderSummary/order-summary.scss +0 -178
  65. package/src/components/summit-my-orders-tickets/components/OrderTicketDetails/OrderTicketDetails.js +0 -102
  66. package/src/components/summit-my-orders-tickets/components/OrderTicketDetails/order-ticket-details.scss +0 -129
  67. package/src/components/summit-my-orders-tickets/components/OrderTicketList/OrderTicketList.js +0 -19
  68. package/src/components/summit-my-orders-tickets/components/OrderTicketList/OrderTicketListItem.js +0 -13
  69. package/src/components/summit-my-orders-tickets/components/OrderTicketList/order-ticket-list.scss +0 -21
  70. package/src/components/summit-my-orders-tickets/components/TicketDetails/TicketDetails.js +0 -93
  71. package/src/components/summit-my-orders-tickets/components/TicketDetails/ticket-details.scss +0 -129
  72. package/src/components/summit-my-orders-tickets/components/TicketList/TicketList.js +0 -65
  73. package/src/components/summit-my-orders-tickets/components/TicketList/TicketListItem.js +0 -16
  74. package/src/components/summit-my-orders-tickets/components/TicketList/ticket-list.scss +0 -21
  75. package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopup.js +0 -186
  76. package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupAssignForm.js +0 -136
  77. package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupEditDetailsForm/TicketPopupEditDetailsForm.js +0 -468
  78. package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupEditDetailsForm/ticket-popup-edit-details-form.scss +0 -71
  79. package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupNotifyForm.js +0 -64
  80. package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupReassignForm.js +0 -193
  81. package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupRefundForm.js +0 -64
  82. package/src/components/summit-my-orders-tickets/components/TicketPopup/ticket-popup.scss +0 -416
  83. package/src/components/summit-my-orders-tickets/context/TicketAssignedContext.js +0 -24
  84. package/src/components/summit-my-orders-tickets/global/constants.js +0 -10
  85. package/src/components/summit-my-orders-tickets/i18n/index.js +0 -37
  86. package/src/components/summit-my-orders-tickets/i18n/locales/en.json +0 -296
  87. package/src/components/summit-my-orders-tickets/i18n/locales/es.json +0 -296
  88. package/src/components/summit-my-orders-tickets/index.js +0 -1
  89. package/src/components/summit-my-orders-tickets/store/actions/base-actions.js +0 -7
  90. package/src/components/summit-my-orders-tickets/store/actions/order-actions.js +0 -96
  91. package/src/components/summit-my-orders-tickets/store/actions/summit-actions.js +0 -64
  92. package/src/components/summit-my-orders-tickets/store/actions/ticket-actions.js +0 -666
  93. package/src/components/summit-my-orders-tickets/store/actions/timer-actions.js +0 -29
  94. package/src/components/summit-my-orders-tickets/store/actions/user-actions.js +0 -42
  95. package/src/components/summit-my-orders-tickets/store/history.js +0 -16
  96. package/src/components/summit-my-orders-tickets/store/index.js +0 -117
  97. package/src/components/summit-my-orders-tickets/store/reducers/base-reducer.js +0 -67
  98. package/src/components/summit-my-orders-tickets/store/reducers/clock-reducer.js +0 -31
  99. package/src/components/summit-my-orders-tickets/store/reducers/order-reducer.js +0 -95
  100. package/src/components/summit-my-orders-tickets/store/reducers/summit-reducer.js +0 -52
  101. package/src/components/summit-my-orders-tickets/store/reducers/ticket-reducer.js +0 -92
  102. package/src/components/summit-my-orders-tickets/store/reducers/user-reducer.js +0 -35
  103. package/src/components/summit-my-orders-tickets/styles/_variables.scss +0 -17
  104. package/src/components/summit-my-orders-tickets/styles/general.scss +0 -17
  105. package/src/components/summit-my-orders-tickets/summit-my-orders-tickets.js +0 -86
  106. package/src/components/summit-my-orders-tickets/util/helpers/capitalizeFirstLetter.js +0 -1
  107. package/src/components/summit-my-orders-tickets/util/helpers/createReducer.js +0 -11
  108. package/src/components/summit-my-orders-tickets/util/helpers/formatCurrency.js +0 -15
  109. package/src/components/summit-my-orders-tickets/util/helpers/getDayNumberFromDate.js +0 -9
  110. package/src/components/summit-my-orders-tickets/util/helpers/getDaysBetweenDates.js +0 -16
  111. package/src/components/summit-my-orders-tickets/util/helpers/getDocumentOffset.js +0 -8
  112. package/src/components/summit-my-orders-tickets/util/helpers/getFormattedDate.js +0 -7
  113. package/src/components/summit-my-orders-tickets/util/helpers/getFormattedTime.js +0 -9
  114. package/src/components/summit-my-orders-tickets/util/helpers/getWindowScroll.js +0 -6
  115. package/src/components/summit-my-orders-tickets/util/helpers/index.js +0 -22
  116. package/src/components/summit-my-orders-tickets/util/index.js +0 -5
  117. package/src/components/summit-my-orders-tickets/util/order/calculateOrderTotals.js +0 -28
  118. package/src/components/summit-my-orders-tickets/util/order/getOrderStatusData.js +0 -71
  119. package/src/components/summit-my-orders-tickets/util/order/index.js +0 -2
  120. package/src/components/summit-my-orders-tickets/util/summit/checkSummitPast.js +0 -10
  121. package/src/components/summit-my-orders-tickets/util/summit/checkSummitStarted.js +0 -5
  122. package/src/components/summit-my-orders-tickets/util/summit/getSummitFormattedDate.js +0 -29
  123. package/src/components/summit-my-orders-tickets/util/summit/getSummitFormattedReassignDate.js +0 -8
  124. package/src/components/summit-my-orders-tickets/util/summit/getSummitLocation.js +0 -9
  125. package/src/components/summit-my-orders-tickets/util/summit/getSummitReassignDate.js +0 -7
  126. package/src/components/summit-my-orders-tickets/util/summit/index.js +0 -7
  127. package/src/components/summit-my-orders-tickets/util/summit/useSummitDetails.js +0 -36
  128. package/src/components/summit-my-orders-tickets/util/ticket/getTicketRole.js +0 -11
  129. package/src/components/summit-my-orders-tickets/util/ticket/getTicketStatusData.js +0 -48
  130. package/src/components/summit-my-orders-tickets/util/ticket/getTicketType.js +0 -1
  131. package/src/components/summit-my-orders-tickets/util/ticket/index.js +0 -4
  132. package/src/components/summit-my-orders-tickets/util/ticket/useTicketDetails.js +0 -60
  133. package/src/components/summit-my-orders-tickets/util/timer/index.js +0 -1
  134. package/src/components/summit-my-orders-tickets/util/timer/useNow.js +0 -8
  135. package/src/templates/login-page.js +0 -49
@@ -1,468 +0,0 @@
1
- import React, { useEffect, useMemo, useRef, useState } from 'react';
2
- import { useDispatch, useSelector } from "react-redux";
3
- import { useTranslation } from "react-i18next";
4
- import { CSSTransition } from "react-transition-group";
5
- import Alert from 'react-bootstrap/lib/Alert';
6
- import { useFormik } from 'formik';
7
- import * as Yup from 'yup';
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';
11
- import ExtraQuestionsForm from 'openstack-uicore-foundation/lib/components/extra-questions';
12
- import QuestionsSet from 'openstack-uicore-foundation/lib/utils/questions-set';
13
- import { getMainOrderExtraQuestions } from '../../../store/actions/summit-actions';
14
- import {
15
- editOwnedTicket,
16
- removeAttendee,
17
- delegateTicket,
18
- TICKET_ATTENDEE_KEYS as TicketKeys
19
- } from '../../../store/actions/ticket-actions';
20
- import { useTicketDetails } from '../../../util';
21
- import useMarketingSettings, { MARKETING_SETTINGS_KEYS } from "@utils/useMarketingSettings";
22
- import { ConfirmPopup, CONFIRM_POPUP_CASE } from '../../ConfirmPopup/ConfirmPopup';
23
-
24
- import { DefaultScrollBehaviour as ScrollBehaviour } from '@utils/scroll';
25
-
26
- import './ticket-popup-edit-details-form.scss';
27
- import { useTicketAssignedContext } from '../../../context/TicketAssignedContext';
28
- import { DelegatePopup } from '../../DelegatePopup/DelegatePopup';
29
-
30
- const noop = () => {};
31
-
32
- export const TicketPopupEditDetailsForm = ({
33
- ticket,
34
- summit,
35
- order,
36
- canEditTicketData,
37
- goToReassignPanel,
38
- context
39
- }) => {
40
- const formRef = useRef(null);
41
- const { t } = useTranslation();
42
- const dispatch = useDispatch();
43
- const userProfile = useSelector(state => state.userState.userProfile);
44
- const extraQuestions = useSelector(state => state.summitState.extra_questions || []);
45
- const isLoading = useSelector(state => state.orderState.loading || state.summitState.loading || state.ticketState.loading);
46
- const [triedSubmitting, setTriedSubmitting] = useState(false);
47
- const [showSaveMessage, setShowSaveMessage] = useState(false);
48
- const [showConfirm, setShowConfirm] = useState(false);
49
- const [showDelegate, setShowDelegate] = useState(false);
50
- const [isDelegating, setIsDelegating] = useState(false);
51
- const [showUnassignMessage, setShowUnassignMessage] = useState(false);
52
- const {
53
- isReassignable,
54
- formattedReassignDate,
55
- daysUntilReassignDeadline,
56
- isUnassigned,
57
- allowsDelegate
58
- } = useTicketDetails({ ticket, summit });
59
-
60
- const { onTicketAssignChange } = useTicketAssignedContext();
61
-
62
- const { getSettingByKey } = useMarketingSettings();
63
-
64
- const showCompanyInputDefaultOptions = !!Number(getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteShowCompanyInputDefaultOptions));
65
- const showCompanyInput = !!Number(getSettingByKey(MARKETING_SETTINGS_KEYS.regLiteShowCompanyInput));
66
-
67
- const initialValues = useMemo(() => {
68
- const {
69
- email,
70
- first_name,
71
- last_name,
72
- company,
73
- disclaimer_accepted_date,
74
- extra_questions
75
- } = ticket.owner || {};
76
-
77
- const formattedExtraQuestions = extra_questions ?
78
- extra_questions.map(({ question_id, value }) => (
79
- { question_id, value }
80
- )) : [];
81
-
82
- return {
83
- [TicketKeys.email]: email,
84
- [TicketKeys.firstName]: first_name,
85
- [TicketKeys.lastName]: last_name,
86
- [TicketKeys.company]: { id: null, name: company },
87
- [TicketKeys.disclaimerAccepted]: !!disclaimer_accepted_date,
88
- [TicketKeys.extraQuestions]: formattedExtraQuestions
89
- };
90
- }, [ticket]);
91
-
92
- const validationSchema = useMemo(() => Yup.object().shape({
93
- [TicketKeys.firstName]: Yup.string().required(),
94
- [TicketKeys.lastName]: Yup.string().required(),
95
- [TicketKeys.company]: showCompanyInput && Yup.object().shape({
96
- id: Yup.number().nullable(),
97
- name: Yup.string().required(),
98
- }),
99
- ...(summit.registration_disclaimer_mandatory && {
100
- [TicketKeys.disclaimerAccepted]: Yup.boolean().oneOf([true]).required()
101
- })
102
- }), [summit]);
103
-
104
- const hasExtraQuestions = extraQuestions.length > 0;
105
- const isUserTicketOwner = order.owner_id === userProfile.id;
106
-
107
- useEffect(() => {
108
- const attendeeId = ticket?.owner?.id;
109
- dispatch(getMainOrderExtraQuestions({ summit, attendeeId }));
110
- }, [ticket]);
111
-
112
- const toggleSaveMessage = () => {
113
- setTimeout(() => setShowSaveMessage(true), 50);
114
- setTimeout(() => setShowSaveMessage(false), 5000);
115
- };
116
-
117
- const toggleUnassignMessage = () => {
118
- setTimeout(() => setShowUnassignMessage(true), 50);
119
- setTimeout(() => setShowUnassignMessage(false), 5000);
120
- };
121
-
122
- const updateTicket = (values, formikHelpers) => {
123
- formikHelpers.setSubmitting(true);
124
-
125
- const params = {
126
- ticket,
127
- order,
128
- context,
129
- data: values,
130
- };
131
-
132
- if(isDelegating) {
133
- dispatch(delegateTicket(params))
134
- .then(() => toggleSaveMessage())
135
- .catch((error) => console.error(error))
136
- .then(() => {
137
- formikHelpers.resetForm({ values });
138
- formikHelpers.setSubmitting(false);
139
- setIsDelegating(false);
140
- });
141
- } else {
142
- dispatch(editOwnedTicket(params))
143
- .then(() => toggleSaveMessage())
144
- .catch((error) => console.error(error))
145
- .then(() => {
146
- // Note: Need to do this to persist the extra question values
147
- formikHelpers.resetForm({ values });
148
- formikHelpers.setSubmitting(false);
149
- });
150
- }
151
-
152
- };
153
-
154
- const handleConfirmAccept = async () => {
155
- setShowConfirm(false);
156
- dispatch(removeAttendee({ticket, context})).then((updatedTicket) => {
157
- onTicketAssignChange(updatedTicket);
158
- toggleUnassignMessage()
159
- });
160
- };
161
-
162
- const handleConfirmReject = () => {
163
- setShowConfirm(false);
164
- };
165
-
166
- const handleDelegateAccept = () => {
167
- setShowDelegate(false);
168
- setIsDelegating(true);
169
- formik.resetForm({
170
- values: {
171
- ...formik.values,
172
- [TicketKeys.firstName]: "",
173
- [TicketKeys.lastName]: "",
174
- [TicketKeys.disclaimerAccepted]: false,
175
- [TicketKeys.extraQuestions]: []
176
- }
177
- });
178
- };
179
-
180
- const handleDelegateReject = () => {
181
- setShowDelegate(false);
182
- };
183
-
184
- const handleSubmit = (values, formikHelpers) => updateTicket(values, formikHelpers);
185
-
186
- const formik = useFormik({
187
- initialValues,
188
- onSubmit: handleSubmit,
189
- validationSchema,
190
- // Note: We need `enableReinitialize` to be `true` so the extra questions aren't cleared after saving.
191
- enableReinitialize: true
192
- });
193
-
194
- const scrollToError = (error) => document.querySelector(`label[for="${error}"]`).scrollIntoView(ScrollBehaviour);
195
-
196
- const validateForm = (errorId = null) => {
197
- // Validate the formik form
198
- formik.validateForm().then((errors) => {
199
- const errorKeys = Object.keys(errors);
200
- // attendee data
201
- if (errorKeys.length > 0 && errorKeys[0] != TicketKeys.disclaimerAccepted) {
202
- scrollToError(errorKeys[0]);
203
- return;
204
- }
205
- // extra question
206
- if (errorId) {
207
- formRef.current.scroll2QuestionById(errorId);
208
- return;
209
- }
210
- // disclaimer
211
- if (errorKeys.length > 0) {
212
- scrollToError(errorKeys[0]);
213
- return;
214
- }
215
- // submit the formik form
216
- formik.handleSubmit();
217
- });
218
- };
219
-
220
- const triggerSubmit = () => {
221
- setTriedSubmitting(true);
222
- if (hasExtraQuestions) {
223
- // TODO: We shouldn't have to do this to get the changes from the `ExtraQuestionsForm`.
224
- // We should just be able to pass an `onChange` event handler to the `ExtraQuestionsForm`.
225
- formRef.current.doSubmit();
226
- return;
227
- }
228
- validateForm();
229
- };
230
-
231
- const handleExtraQuestionError = (errors, ref, errorId) => {
232
- validateForm(errorId);
233
- }
234
-
235
- const onExtraQuestionsAnswersSet = (answersForm) => {
236
- const questionSet = new QuestionsSet(extraQuestions);
237
- const newAnswers = Object.keys(answersForm).reduce((acc, name) => {
238
- let question = questionSet.getQuestionByName(name);
239
- if (!question) {
240
- console.error(`Missing question for answer ${name}.`);
241
- return acc;
242
- }
243
- if (answersForm[name] || answersForm[name].length > 0) {
244
- acc.push({ question_id: question.id, answer: `${answersForm[name]}` });
245
- }
246
- return acc;
247
- }, []);
248
- // Set the extra question answers on the formik state.
249
- formik.setFieldValue(TicketKeys.extraQuestions, newAnswers);
250
- validateForm();
251
- };
252
-
253
- const canSubmitChanges = () => {
254
- const qs = new QuestionsSet(extraQuestions, initialValues[TicketKeys.extraQuestions]);
255
- const unansweredExtraQuestions = !qs.completed();
256
- return canEditTicketData || isReassignable || unansweredExtraQuestions || isDelegating;
257
- }
258
-
259
- return (
260
- <div className="ticket-popup-edit-details-form">
261
- {showSaveMessage &&
262
- <CSSTransition
263
- unmountOnExit
264
- in={showSaveMessage}
265
- timeout={2000}
266
- classNames="fade-in-out"
267
- >
268
- <Alert bsStyle="success" className="ticket-popup-form-alert text-center">
269
- {t("tickets.save_message")}
270
- </Alert>
271
- </CSSTransition>
272
- }
273
-
274
- {showUnassignMessage &&
275
- <CSSTransition
276
- unmountOnExit
277
- in={showUnassignMessage}
278
- timeout={2000}
279
- classNames="fade-in-out"
280
- >
281
- <Alert bsStyle="success" className="ticket-popup-form-alert text-center">
282
- {t("tickets.unassign_success_message")}
283
- </Alert>
284
- </CSSTransition>
285
- }
286
-
287
- <div className="ticket-popup-form-body columns is-multiline">
288
-
289
- <div className="attendee-info column is-full">
290
- <h4 className="pb-3">{t("ticket_popup.edit_basic_info")}</h4>
291
- <label htmlFor={TicketKeys.email}>Email</label>
292
- <Input
293
- id={TicketKeys.email}
294
- name={TicketKeys.email}
295
- className="form-control"
296
- value={initialValues[TicketKeys.email]}
297
- disabled={true}
298
- />
299
- {isUserTicketOwner && isReassignable &&
300
- <div className="mt-1">
301
- <span onClick={() => goToReassignPanel()}>
302
- <u>Reassign</u>
303
- </span>
304
- {` | `}
305
- <span onClick={() => setShowConfirm(true)}>
306
- <u>Unassign</u>
307
- </span>
308
- </div>
309
- }
310
- </div>
311
-
312
- <div className="attendee-info column is-full">
313
- <label htmlFor={TicketKeys.firstName}>
314
- {t("ticket_popup.edit_first_name")}
315
- {!initialValues[TicketKeys.firstName] && <b> *</b>}
316
- </label>
317
- <Input
318
- id={TicketKeys.firstName}
319
- name={TicketKeys.firstName}
320
- className="form-control"
321
- placeholder={t("ticket_popup.edit_first_name_placeholder")}
322
- value={formik.values[TicketKeys.firstName]}
323
- onBlur={formik.handleBlur}
324
- onChange={!!initialValues[TicketKeys.firstName] && !isDelegating ? noop : formik.handleChange}
325
- disabled={!!initialValues[TicketKeys.firstName] && !isDelegating}
326
- />
327
- {(formik.touched[TicketKeys.firstName] || triedSubmitting) && formik.errors[TicketKeys.firstName] &&
328
- <p className="error-label">{t("ticket_popup.edit_required")}</p>
329
- }
330
- </div>
331
-
332
- <div className="attendee-info column is-full">
333
- <label htmlFor={TicketKeys.lastName}>
334
- {t("ticket_popup.edit_last_name")}
335
- {!initialValues[TicketKeys.lastName] && <b> *</b>}
336
- </label>
337
- <Input
338
- id={TicketKeys.lastName}
339
- name={TicketKeys.lastName}
340
- className="form-control"
341
- placeholder={t("ticket_popup.edit_last_name_placeholder")}
342
- value={formik.values[TicketKeys.lastName]}
343
- onBlur={formik.handleBlur}
344
- onChange={!!initialValues[TicketKeys.lastName] && !isDelegating ? noop : formik.handleChange}
345
- disabled={!!initialValues[TicketKeys.lastName] && !isDelegating}
346
- />
347
- {(formik.touched[TicketKeys.lastName] || triedSubmitting) && formik.errors[TicketKeys.lastName] &&
348
- <p className="error-label">{t("ticket_popup.edit_required")}</p>
349
- }
350
- </div>
351
-
352
- {allowsDelegate &&
353
- <div className="attendee-info column is-full">
354
- <button className="button-text" type='button' onClick={() => setShowDelegate(true)}>Delegate</button>
355
- </div>
356
- }
357
-
358
- {showCompanyInput &&
359
- <div className="attendee-info column is-full">
360
- <label htmlFor={TicketKeys.company}>
361
- {t("ticket_popup.edit_company")}
362
- {!initialValues[TicketKeys.company].name && <b> *</b>}
363
- </label>
364
- <RegistrationCompanyInput
365
- id={TicketKeys.company}
366
- name={TicketKeys.company}
367
- summitId={summit.id}
368
- placeholder={t("ticket_popup.edit_company_placeholder")}
369
- value={formik.values[TicketKeys.company]}
370
- onBlur={formik.handleBlur}
371
- onChange={!!initialValues[TicketKeys.company].name ? noop : formik.handleChange}
372
- disabled={!!initialValues[TicketKeys.company].name}
373
- defaultOptions={showCompanyInputDefaultOptions}
374
- openMenuOnFocus={showCompanyInputDefaultOptions}
375
- openMenuOnClick={showCompanyInputDefaultOptions}
376
- styles={{
377
- menu: (base) => ({ ...base, zIndex: 9999 }),
378
- }}
379
- tabSelectsValue={false}
380
- />
381
- {(formik.touched[TicketKeys.company] || triedSubmitting) && formik.errors[TicketKeys.company] &&
382
- <p className="error-label">{t("ticket_popup.edit_required")}</p>
383
- }
384
- </div>
385
- }
386
-
387
- {(initialValues[TicketKeys.firstName] || initialValues[TicketKeys.lastName] || initialValues[TicketKeys.company].name) &&
388
- <div className="column is-full pb-5">
389
- {t("ticket_popup.assign_note")}
390
- </div>
391
- }
392
-
393
- {hasExtraQuestions &&
394
- <div className="column is-full pt-5">
395
- <h4 className="pb-2">{t("ticket_popup.edit_preferences")}</h4>
396
- <ExtraQuestionsForm
397
- // This key is added to trigger a new render when the extra questions are resetted on delegation
398
- key={formik.values[TicketKeys.extraQuestions].length}
399
- ref={formRef}
400
- extraQuestions={extraQuestions}
401
- userAnswers={formik.values[TicketKeys.extraQuestions]}
402
- onAnswerChanges={onExtraQuestionsAnswersSet}
403
- allowExtraQuestionsEdit={canEditTicketData || isDelegating}
404
- questionContainerClassName={`columns is-multiline extra-question pt-3`}
405
- questionLabelContainerClassName={'column is-full pb-0'}
406
- questionControlContainerClassName={`column is-full pt-0`}
407
- shouldScroll2FirstError={false}
408
- onError={handleExtraQuestionError}
409
- />
410
- </div>
411
- }
412
-
413
- {summit.registration_disclaimer_content &&
414
- <div className="column is-full attendee-info abc-checkbox disclaimer mt-3">
415
- <div className='input-wrapper'>
416
- <input
417
- type="checkbox"
418
- id={TicketKeys.disclaimerAccepted}
419
- name={TicketKeys.disclaimerAccepted}
420
- onBlur={formik.handleBlur}
421
- onChange={(e) =>
422
- formik.setFieldTouched(TicketKeys.disclaimerAccepted, true) && formik.handleChange(e)
423
- }
424
- checked={formik.values[TicketKeys.disclaimerAccepted]}
425
- />
426
- <label htmlFor={TicketKeys.disclaimerAccepted}>
427
- {summit.registration_disclaimer_mandatory && <b> *</b>}
428
- </label>
429
- </div>
430
- <div>
431
- <RawHTML>
432
- {summit.registration_disclaimer_content}
433
- </RawHTML>
434
- </div>
435
- {(formik.touched[TicketKeys.disclaimerAccepted] || triedSubmitting) && formik.errors[TicketKeys.disclaimerAccepted] &&
436
- <p className="error-label">{t("ticket_popup.edit_required")}</p>
437
- }
438
- </div>
439
- }
440
- </div>
441
-
442
- {canSubmitChanges() &&
443
- <div className="ticket-popup-footer">
444
- <button
445
- type="button"
446
- className="btn btn-primary"
447
- disabled={formik.isSubmitting}
448
- onClick={triggerSubmit}
449
- >
450
- {!formik.isSubmitting && <>{t("ticket_popup.save_changes")}</>}
451
- {formik.isSubmitting && <>{t("ticket_popup.saving_changes")}...</>}
452
- </button>
453
- </div>
454
- }
455
- <ConfirmPopup
456
- isOpen={showConfirm}
457
- popupCase={CONFIRM_POPUP_CASE.UNASSIGN_TICKET}
458
- onAccept={handleConfirmAccept}
459
- onReject={handleConfirmReject}
460
- />
461
- <DelegatePopup
462
- isOpen={showDelegate}
463
- onAccept={handleDelegateAccept}
464
- onReject={handleDelegateReject}
465
- />
466
- </div>
467
- );
468
- };
@@ -1,71 +0,0 @@
1
- @import "../../../styles/variables";
2
-
3
- .ticket-popup-edit-details-form {
4
- h4 {
5
- font-weight: 700;
6
- }
7
- .attendee-info {
8
- label {
9
- font-weight: 600;
10
- b {
11
- color: red;
12
- }
13
- }
14
- u {
15
- cursor: pointer;
16
- }
17
- &.disclaimer {
18
- display: grid;
19
- grid-template-columns: 0fr 14fr;
20
- grid-template-rows: 1fr;
21
- gap: 15px;
22
- .input-wrapper {
23
- width: 35px;
24
- }
25
- }
26
- }
27
- .questions-form {
28
- padding-bottom: 2em;
29
- }
30
- .extra-question {
31
- label {
32
- font-weight: 600;
33
- b {
34
- color: red;
35
- }
36
- }
37
- [id^=rl_wrapper] div {
38
- padding-top: 5px;
39
- &~ div {
40
- padding-top: 10px;
41
- }
42
- }
43
- input[type="checkbox"] {
44
- margin-right: 3px;
45
- &~ label {
46
- padding-left: 13px !important;
47
- }
48
- }
49
- h4 {
50
- font-weight: 400;
51
- font-size: 1em !important;
52
- line-height: 1;
53
- padding-top: 4px;
54
- margin-bottom: 0px;
55
- }
56
- }
57
- .error-label {
58
- color: red;
59
- display: block;
60
- font-size: 12px;
61
- font-weight: 700;
62
- margin: auto 0;
63
- padding: 0;
64
- grid-column: span 2;
65
- &::before {
66
- content: "\f071";
67
- font-family: FontAwesome;
68
- padding-right: 5px;
69
- }
70
- }
71
- }
@@ -1,64 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { useDispatch } from "react-redux";
3
- import { useTranslation } from "react-i18next";
4
- import { CSSTransition } from "react-transition-group";
5
- import Alert from 'react-bootstrap/lib/Alert';
6
- import { resendNotification } from '../../store/actions/ticket-actions';
7
- import { getSummitFormattedReassignDate } from '../../util';
8
-
9
- export const TicketPopupNotifyForm = ({ ticket, summit }) => {
10
- const { t } = useTranslation();
11
- const dispatch = useDispatch();
12
- const [showSaveMessage, setShowSaveMessage] = useState(false);
13
- const [message, setMessage] = useState('')
14
-
15
- const toggleSaveMessage = () => {
16
- setTimeout(() => {
17
- setShowSaveMessage(true)
18
- setMessage('');
19
- }, 50);
20
- setTimeout(() => setShowSaveMessage(false), 5000);
21
- };
22
-
23
- const handleNotifyButtonClick = () => {
24
- dispatch(resendNotification({ ...ticket, message })).then(() => {
25
- toggleSaveMessage();
26
- setMessage('');
27
- });
28
- }
29
-
30
- return (
31
- <div className="ticket-notify-form">
32
- <div className="ticket-popup-form-body">
33
- {showSaveMessage && (
34
- <CSSTransition
35
- unmountOnExit
36
- in={showSaveMessage}
37
- timeout={2000}
38
- classNames="fade-in-out"
39
- >
40
- <Alert bsStyle="success" className="ticket-popup-form-alert text-center">
41
- {t("tickets.notify_success_message")}
42
- </Alert>
43
- </CSSTransition>
44
- )}
45
-
46
- <p>{t("ticket_popup.notify_text_1")} {getSummitFormattedReassignDate(summit)}.</p>
47
-
48
- <p>
49
- {t("ticket_popup.notify_text_2")} <b>{ticket.owner.email} </b>
50
- {t("ticket_popup.notify_text_3")} <b>{ticket.owner.email}</b>
51
- </p>
52
-
53
- <p>
54
- <label>{t("ticket_popup.notify_message")} </label> {t("ticket_popup.notify_message_condition")}
55
- <br />
56
- <textarea value={message} rows="4" onChange={(e) => setMessage(e.target.value)} style={{width: '80%', padding: 5}} />
57
- </p>
58
- <button className="btn btn-primary" onClick={handleNotifyButtonClick}>
59
- {t("ticket_popup.notify_button")}
60
- </button>
61
- </div>
62
- </div>
63
- );
64
- };