Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue schedule on organiser interface loading eternally #205

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN apt-get update && \
echo 'pretalxuser ALL=(ALL) NOPASSWD: /usr/bin/supervisord' >> /etc/sudoers

ENV LC_ALL=C.UTF-8
ENV BASE_PATH=/talk

COPY pyproject.toml /pretalx
COPY src /pretalx/src
Expand Down
11 changes: 6 additions & 5 deletions src/pretalx/frontend/schedule-editor/src/api.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const basePath = process.env.BASE_PATH || '/talk';
const api = {
eventSlug: window.location.pathname.split("/")[3],
eventSlug: basePath ? window.location.pathname.split("/")[4] : window.location.pathname.split("/")[3],
http (verb, url, body) {
var fullHeaders = {}
fullHeaders['Content-Type'] = 'application/json'
Expand Down Expand Up @@ -42,7 +43,7 @@ const api = {
},
fetchTalks (options) {
options = options || {}
let url = `/orga/event/${api.eventSlug}/schedule/api/talks/`
let url = `${basePath}/orga/event/${api.eventSlug}/schedule/api/talks/`
if (window.location.search) {
url += window.location.search + '&'
} else {
Expand All @@ -57,15 +58,15 @@ const api = {
return api.http('GET', url, null)
},
fetchAvailabilities () {
const url = `/orga/event/${api.eventSlug}/schedule/api/availabilities/`
const url = `${basePath}/orga/event/${api.eventSlug}/schedule/api/availabilities/`
return api.http('GET', url, null)
},
fetchWarnings () {
const url = `/orga/event/${api.eventSlug}/schedule/api/warnings/`
const url = `${basePath}/orga/event/${api.eventSlug}/schedule/api/warnings/`
return api.http('GET', url, null)
},
fetchRooms () {
return api.getList(`/api/events/${api.eventSlug}/rooms`)
return api.getList(`${basePath}/api/events/${api.eventSlug}/rooms`)
},
saveTalk (talk, {action = 'PATCH'} = {}) {
// Only call from App.saveTalk, which knows which data to update
Expand Down
Loading