diff --git a/backend/custom_admin/src/components/schedule-builder/calendar.tsx b/backend/custom_admin/src/components/schedule-builder/calendar.tsx
index 0cd9689d13..e043faddd4 100644
--- a/backend/custom_admin/src/components/schedule-builder/calendar.tsx
+++ b/backend/custom_admin/src/components/schedule-builder/calendar.tsx
@@ -19,7 +19,7 @@ export const Calendar = ({ day: { day, rooms, slots } }: Props) => {
@@ -51,6 +51,7 @@ export const Calendar = ({ day: { day, rooms, slots } }: Props) => {
{rooms.map((_, index) => (
{
- const { visibleScheduleItemId } = useIframeEditor();
+ const { visibleScheduleItemId, close } = useIframeEditor();
+ const apolloClient = getApolloClient();
+
+ const onClose = () => {
+ close();
+ apolloClient.refetchQueries({
+ include: ["ConferenceSchedule"],
+ });
+ };
+
+ useEffect(() => {
+ if (visibleScheduleItemId) {
+ document.body.style.overflow = "hidden";
+ } else {
+ document.body.style.overflow = "auto";
+ }
+
+ return () => {
+ document.body.style.overflow = "auto";
+ };
+ }, [visibleScheduleItemId]);
if (!visibleScheduleItemId) {
return null;
@@ -13,9 +36,12 @@ export const EditorIframe = () => {
return (
);
diff --git a/backend/custom_admin/src/components/schedule-builder/item.tsx b/backend/custom_admin/src/components/schedule-builder/item.tsx
index 1de4b008e1..2d514999c3 100644
--- a/backend/custom_admin/src/components/schedule-builder/item.tsx
+++ b/backend/custom_admin/src/components/schedule-builder/item.tsx
@@ -48,21 +48,22 @@ export const Item = ({ slots, slot, item, rooms, rowStart }) => {
className="bg-slate-200 p-3 z-50"
>
- - [{item.type}]
- - {item.title}
-
- Duration:{" "}
- {item.submission?.duration} mins
+ [{item.type} - {duration} mins]
-
- Speakers:{" "}
-
- {item.speakers.map((speaker) => speaker.fullname).join(",")}
-
+ {item.title}
+ {item.speakers.length > 0 && (
+ -
+
+ {item.speakers.map((speaker) => speaker.fullname).join(",")}
+
+
+ )}
-
- Edit schedule item!!
+ Edit schedule item
diff --git a/backend/custom_admin/src/components/shared/base.tsx b/backend/custom_admin/src/components/shared/base.tsx
index 4745da0680..4bbdf5a634 100644
--- a/backend/custom_admin/src/components/shared/base.tsx
+++ b/backend/custom_admin/src/components/shared/base.tsx
@@ -9,6 +9,10 @@ const client = new ApolloClient({
cache: new InMemoryCache(),
});
+export const getApolloClient = () => {
+ return client;
+};
+
export const Base = ({ children }: Props) => {
console.log("client", client);
return {children};