@openeventkit/event-site 1.0.10 → 1.0.11
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/package.json
CHANGED
|
@@ -91,7 +91,8 @@ export const TicketPopupEditDetailsForm = ({
|
|
|
91
91
|
const isUserTicketOwner = order.owner_id === userProfile.id;
|
|
92
92
|
|
|
93
93
|
useEffect(() => {
|
|
94
|
-
|
|
94
|
+
const attendeeId = ticket?.owner?.id;
|
|
95
|
+
dispatch(getMainOrderExtraQuestions({ summit, attendeeId }));
|
|
95
96
|
}, [ticket]);
|
|
96
97
|
|
|
97
98
|
const toggleSaveMessage = () => {
|
|
@@ -28,15 +28,15 @@ export const CLEAR_MARKETING_SETTINGS = 'CLEAR_MARKETING_SETTINGS';
|
|
|
28
28
|
|
|
29
29
|
export const setSummit = (summit) => async (dispatch) => dispatch(createAction(SET_SUMMIT)(summit))
|
|
30
30
|
|
|
31
|
-
export const getMainOrderExtraQuestions = ({ summit }) => async (dispatch, getState, { apiBaseUrl, getAccessToken, loginUrl }) => {
|
|
31
|
+
export const getMainOrderExtraQuestions = ({ summit, attendeeId }) => async (dispatch, getState, { apiBaseUrl, getAccessToken, loginUrl }) => {
|
|
32
32
|
|
|
33
|
-
if (!summit) return Promise.reject();
|
|
33
|
+
if (!summit || !attendeeId) return Promise.reject();
|
|
34
34
|
|
|
35
35
|
const accessToken = await getAccessToken().catch(_ => history.replace(loginUrl));
|
|
36
36
|
|
|
37
37
|
if (!accessToken) return Promise.reject();
|
|
38
38
|
|
|
39
|
-
const apiUrl = URI(`${apiBaseUrl}/api/v1/summits/${summit.id}/attendees/
|
|
39
|
+
const apiUrl = URI(`${apiBaseUrl}/api/v1/summits/${summit.id}/attendees/${attendeeId}/allowed-extra-questions`);
|
|
40
40
|
|
|
41
41
|
apiUrl.addQuery('access_token', accessToken);
|
|
42
42
|
apiUrl.addQuery('expand', '*sub_question_rules,*sub_question,*values');
|