Skip to content

Commit 9f8479c

Browse files
committed
feat: 발표 자료 URL 추가
1 parent 89de8e8 commit 9f8479c

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

apps/pyconkr-participant-portal/src/components/pages/session_editor.tsx

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import * as Common from "@frontend/common";
22
import { SendAndArchive } from "@mui/icons-material";
3-
import { Box, Button, Divider, SelectChangeEvent, Stack, Typography } from "@mui/material";
3+
import { Box, Button, Divider, SelectChangeEvent, Stack, TextField, Typography } from "@mui/material";
44
import { ErrorBoundary, Suspense } from "@suspensive/react";
55
import { enqueueSnackbar, OptionsObject } from "notistack";
66
import * as React from "react";
77
import { Link, Navigate, useParams } from "react-router-dom";
88

99
import { useAppContext } from "../../contexts/app_context";
1010
import { SubmitConfirmDialog } from "../dialogs/submit_confirm";
11+
import { BlockQuote } from "../elements/blockquote";
1112
import { ErrorPage } from "../elements/error_page";
1213
import { LoadingPage } from "../elements/loading_page";
1314
import { MultiLanguageField, MultiLanguageMarkdownField } from "../elements/multilang_field";
@@ -25,6 +26,7 @@ type SessionUpdateSchema = {
2526
summary_en: string;
2627
description_ko: string;
2728
description_en: string;
29+
slideshow_url: string | null;
2830
image: string | null;
2931

3032
speakers: {
@@ -62,6 +64,7 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
6264
const setTitle = (value: string | undefined, lang: "ko" | "en") => setFormState((ps) => ({ ...ps, [`title_${lang}`]: value }));
6365
const setSummary = (value: string | undefined, lang: "ko" | "en") => setFormState((ps) => ({ ...ps, [`summary_${lang}`]: value }));
6466
const setDescription = (value: string | undefined, lang: "ko" | "en") => setFormState((ps) => ({ ...ps, [`description_${lang}`]: value }));
67+
const setSlideshowUrl = (slideshow_url: string) => setFormState((ps) => ({ ...ps, slideshow_url }));
6568
const setImage = (image: string | null) => setFormState((ps) => ({ ...ps, image }));
6669
const setSpeakerImage = (image: string | null) => setFormState((ps) => ({ ...ps, speakers: [{ ...speaker, image }] }));
6770
const setSpeakerBiography = (value: string | undefined, lang: "ko" | "en") =>
@@ -75,6 +78,17 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
7578
const speaker = formState.speakers[0];
7679

7780
const titleStr = language === "ko" ? "발표 정보 수정" : "Edit Session Information";
81+
const slideShowStr = language === "ko" ? "발표 슬라이드쇼 URL" : "Session Slideshow URL";
82+
const slideShowDescription =
83+
language === "ko" ? (
84+
<Typography variant="body2" color="textSecondary">
85+
발표 중에 사용할 슬라이드 자료 URL을 입력해주세요. (선택 사항)
86+
</Typography>
87+
) : (
88+
<Typography variant="body2" color="textSecondary">
89+
Please enter the URL of the slideshow material to be used during the session. (Optional)
90+
</Typography>
91+
);
7892
const sessionEditDescription =
7993
language === "ko" ? (
8094
<Typography variant="body2" color="textSecondary">
@@ -124,6 +138,17 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
124138
disabled={disabled}
125139
fullWidth
126140
/>
141+
<Common.Components.Fieldset legend={slideShowStr}>
142+
<BlockQuote children={slideShowDescription} />
143+
<TextField
144+
label={slideShowStr}
145+
value={formState.slideshow_url || ""}
146+
onChange={(e) => setSlideshowUrl(e.target.value)}
147+
disabled={disabled}
148+
sx={{ mt: 2 }}
149+
fullWidth
150+
/>
151+
</Common.Components.Fieldset>
127152
<MultiLanguageField
128153
label={{ ko: "발표 요약", en: "Session Summary" }}
129154
description={{ ko: "발표를 짧게 요약해주세요.", en: "Please enter the short session summary." }}
@@ -135,7 +160,7 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
135160
fullWidth
136161
/>
137162
<MultiLanguageMarkdownField
138-
label={{ ko: "발표 내용", en: "Session Description" }}
163+
label={{ ko: "발표 상세", en: "Session Description" }}
139164
description={{
140165
ko: "발표의 상세 내용을 입력해주세요.\n상세 설명은 마크다운 문법을 지원합니다.",
141166
en: "Please enter the description of the session.\nDetailed descriptions support Markdown syntax.",

apps/pyconkr/src/components/pages/presentation_detail.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export const PresentationDetailPage: React.FC = ErrorBoundary.with(
144144
const descriptionFallback = language === "ko" ? "해당 발표의 설명은 준비 중이에요!" : "Description of the presentation is under preparation!";
145145
const categoriesStr = language === "ko" ? "카테고리" : "Categories";
146146
const speakersStr = language === "ko" ? "발표자" : "Speakers";
147+
const slideShowStr = language === "ko" ? "발표 슬라이드" : "Presentation Slideshow";
147148

148149
React.useEffect(() => {
149150
setAppContext((prev) => ({
@@ -174,6 +175,15 @@ export const PresentationDetailPage: React.FC = ErrorBoundary.with(
174175
<Divider flexItem />
175176
</>
176177
) : null}
178+
{presentation.slideshow_url && (
179+
<>
180+
<Typography variant="subtitle1" fontWeight="bold" sx={{ width: "100%", p: 2, a: { color: "blue" } }}>
181+
{slideShowStr} :&nbsp;
182+
<Common.Components.LinkHandler href={presentation.slideshow_url} children={presentation.slideshow_url} />
183+
</Typography>
184+
<Divider flexItem />
185+
</>
186+
)}
177187
{presentation.image && (
178188
<StyledPresentationImage
179189
alt="Presentation Image"

packages/common/src/schemas/backendAPI.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ namespace BackendAPISchemas {
8080
title: string;
8181
summary: string | null;
8282
description: string;
83+
slideshow_url: string | null;
8384
image: string | null;
8485
categories: {
8586
id: string;

packages/common/src/schemas/backendAdminAPI.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ namespace BackendAdminAPISchemas {
9393
summary_en: string;
9494
description_ko: string;
9595
description_en: string;
96+
slideshow_url: string | null;
9697
image: string | null;
9798
};
9899

packages/common/src/schemas/backendParticipantPortalAPI.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ namespace BackendParticipantPortalAPISchemas {
6060
description: string; // Description of the presentation, translated to the current language
6161
description_ko: string; // Description in Korean
6262
description_en: string; // Description in English
63+
slideshow_url: string | null; // URL to the presentation's slideshow, if available
6364
image: string | null; // PK of the presentation's image
6465
speakers: {
6566
id: string; // UUID of the speaker

0 commit comments

Comments
 (0)