fix: change the SRL_NO at temporary save

This commit is contained in:
Dayoung 2025-05-22 09:05:41 +09:00
parent a483ffce44
commit bdbdf9997f

View File

@ -266,8 +266,8 @@ export async function POST(request: Request) {
// 마지막 번호 추출
const lastNumber = lastSurvey ? parseInt(lastSurvey.SRL_NO.slice(-3)) : 0
// 새로운 srlNo 생성
const newSrlNo = baseSrlNo + (lastNumber + 1).toString().padStart(3, '0')
// 새로운 srlNo 생성 - 임시저장일 경우 '임시저장' 으로 저장
const newSrlNo = baseSrlNo.startsWith('一時保存') ? baseSrlNo : baseSrlNo + (lastNumber + 1).toString().padStart(3, '0')
const { detailInfo, ...basicInfo } = body.survey
// @ts-ignore