diff --git a/.env.development b/.env.development index 248ee52..d821f10 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ NEXT_PUBLIC_RUN_MODE=development # 모바일 디바이스로 로컬 서버 확인하려면 자신 IP 주소로 변경 # 다시 로컬에서 개발할때는 localhost로 변경 #route handler -NEXT_PUBLIC_API_URL=http://172.30.1.15:3000 +NEXT_PUBLIC_API_URL=http://localhost:3000 #qsp 로그인 api NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120 diff --git a/.env.localhost b/.env.localhost index b1cb5c8..1480c7a 100644 --- a/.env.localhost +++ b/.env.localhost @@ -2,7 +2,7 @@ NEXT_PUBLIC_RUN_MODE=local # 모바일 디바이스로 로컬 서버 확인하려면 자신 IP 주소로 변경 # 다시 로컬에서 개발할때는 localhost로 변경 #route handler -NEXT_PUBLIC_API_URL=http://172.30.1.15:3000 +NEXT_PUBLIC_API_URL=http://localhost:3000 #qsp 로그인 api NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120 diff --git a/src/components/pdf/SurveySaleDownloadPdf.tsx b/src/components/pdf/SurveySaleDownloadPdf.tsx index 02ba732..b7c724a 100644 --- a/src/components/pdf/SurveySaleDownloadPdf.tsx +++ b/src/components/pdf/SurveySaleDownloadPdf.tsx @@ -53,9 +53,6 @@ export default function SurveySaleDownloadPdf() { router.push(`/survey-sale/${id}`) }) } - const supplementList = supplementaryFacilities - .filter((facility) => surveyDetail?.detailInfo?.supplementaryFacilities?.includes(facility.id.toString())) - .map((facility) => facility.name) return ( <> @@ -249,11 +246,15 @@ export default function SurveySaleDownloadPdf() { boxSizing: 'border-box', }} > - {supplementList === null && surveyDetail?.detailInfo?.supplementaryFacilitiesEtc === null - ? '-' + {surveyDetail?.detailInfo?.supplementaryFacilities + ? supplementaryFacilities + .filter((facility) => surveyDetail?.detailInfo?.supplementaryFacilities?.includes(facility.id.toString())) + .map((facility) => facility.name) + .join(', ') + + (surveyDetail?.detailInfo?.supplementaryFacilitiesEtc ? `, ${surveyDetail?.detailInfo?.supplementaryFacilitiesEtc}` : '') : surveyDetail?.detailInfo?.supplementaryFacilitiesEtc - ? `${supplementList.join(', ')}, ${surveyDetail?.detailInfo?.supplementaryFacilitiesEtc}` - : supplementList.join(', ')} + ? `${surveyDetail?.detailInfo?.supplementaryFacilitiesEtc}` + : '-'} diff --git a/src/components/popup/SurveySaleSubmitPopup.tsx b/src/components/popup/SurveySaleSubmitPopup.tsx index 4a33083..f4387e7 100644 --- a/src/components/popup/SurveySaleSubmitPopup.tsx +++ b/src/components/popup/SurveySaleSubmitPopup.tsx @@ -90,7 +90,6 @@ export default function SurveySaleSubmitPopup() { if (validateData(submitData)) { window.neoConfirm('送信しますか? 送信後は変更・修正することはできません。', () => { setIsShow(true) - submitSurvey({ targetId: submitData.store }) sendEmail({ to: submitData.receiver, subject: submitData.title, @@ -98,6 +97,8 @@ export default function SurveySaleSubmitPopup() { }) .then(() => { if (!isSubmittingSurvey) { + submitSurvey({ targetId: submitData.store }) + alert('提出が完了しました。') popupController.setSurveySaleSubmitPopup(false) } }) @@ -107,6 +108,7 @@ export default function SurveySaleSubmitPopup() { }) .finally(() => { setIsShow(false) + popupController.setSurveySaleSubmitPopup(false) }) }) } diff --git a/src/config/config.local.ts b/src/config/config.local.ts index 5498826..ac02c97 100644 --- a/src/config/config.local.ts +++ b/src/config/config.local.ts @@ -1,7 +1,7 @@ import getConfigs from '@/config/config.common' // 환경마다 달라져야 할 변수, 값들을 정의합니다. (여기는 local 환경에 맞는 값을 지정합니다.) -const baseUrl = 'http://172.30.1.15:3000' +const baseUrl = 'http://localhost:3000' const mode = 'local' // 환경마다 달라져야 할 값들을 getConfig 함수에 전달합니다.