chore: update env to use localhost for API URLs and refactor SurveySaleDownloadPdf and SurveySaleSubmitPopup components
This commit is contained in:
parent
c9b3909a6b
commit
5cc1cc9247
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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}`
|
||||
: '-'}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -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)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@ -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 함수에 전달합니다.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user