From 96d9b3baf81a0bddf21b80b04cdc69bbcadf756b Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Mon, 21 Sep 2026 12:48:10 +0900 Subject: [PATCH] =?UTF-8?q?260921=5F02=5FENH:=20KON,=20KIWI=20=EC=84=A4?= =?UTF-8?q?=EB=AC=B8=20URL=20=EC=95=9E=EB=B6=80=EB=B6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=AA=BB=ED=95=98=EA=B2=8C=20=EB=A7=89=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(pages)/(main)/project/info/page.tsx | 60 ++++++++++++++++---- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/src/app/(pages)/(main)/project/info/page.tsx b/src/app/(pages)/(main)/project/info/page.tsx index a3d6b0e..3df368c 100644 --- a/src/app/(pages)/(main)/project/info/page.tsx +++ b/src/app/(pages)/(main)/project/info/page.tsx @@ -182,6 +182,26 @@ const SurveyCard = ({ survey, index, itrntPrjctCd, userTeam, invalidField, onReg }) } + // KON/KIWI는 호스트 placeholder까지 고정하고 '?' 이후 쿼리스트링만 편집 가능하게 한다. + const konKiwiPlaceholderPrefix = survey.surveyTy === SurveyType.KIWI ? 'https://[$KIWI-URL]' : 'https://[$KON-URL]' + // 저장 후 생성된 실제 URL(surveyFullUrl)이 있으면 placeholder 대신 실제 호스트를 접두어로 노출한다. + const konKiwiDisplayPrefix = survey.surveyUrl?.trim() + ? survey.surveyUrl.split('?')[0] + : konKiwiPlaceholderPrefix + const konKiwiQuery = (() => { + const url = survey.surveyUrl ?? '' + const idx = url.indexOf('?') + return idx >= 0 ? url.slice(idx + 1) : '' + })() + + const handleKonKiwiQueryChange = (query: string) => { + onChange(survey.uiKey, { + surveyUrl: `${konKiwiPlaceholderPrefix}?${query}`, + surveyFullUrl: null, + surveyShortUrl: null, + }) + } + return (
@@ -248,18 +268,34 @@ const SurveyCard = ({ survey, index, itrntPrjctCd, userTeam, invalidField, onReg
- onChange(survey.uiKey, { - surveyUrl: e.target.value, - surveyFullUrl: null, - surveyShortUrl: null, - })} - placeholder="https://" - className="h-9" - aria-invalid={invalidField === 'surveyUrl'} - /> + {isKonKiwi ? ( +
+ + {konKiwiDisplayPrefix}? + + handleKonKiwiQueryChange(e.target.value)} + placeholder="sid=[$SID]" + className="h-9 rounded-l-none" + aria-invalid={invalidField === 'surveyUrl'} + /> +
+ ) : ( + onChange(survey.uiKey, { + surveyUrl: e.target.value, + surveyFullUrl: null, + surveyShortUrl: null, + })} + placeholder="https://" + className="h-9" + aria-invalid={invalidField === 'surveyUrl'} + /> + )}
{survey.surveyTy === SurveyType.EXTERNAL && ( -- 2.49.0.windows.1