Merge Q-CAST-III-MR-402: 첨부파일수 정

This commit is contained in:
상연 정 2024-11-28 05:22:34 +00:00 committed by Space Cloud
commit f2ae403265
No known key found for this signature in database
GPG Key ID: 2F4D45726235F749

View File

@ -3,7 +3,7 @@ import { useContext, useEffect, useReducer, useState } from 'react'
import { useRecoilState, useRecoilValue } from 'recoil'
import { globalLocaleStore } from '@/store/localeAtom'
import { estimateState, floorPlanObjectState } from '@/store/floorPlanObjectAtom'
import { isObjectNotEmpty } from '@/util/common-utils'
import { isObjectNotEmpty, isNotEmptyArray } from '@/util/common-utils'
import { SessionContext } from '@/app/SessionProvider'
import { useMessage } from '@/hooks/useMessage'
import { useRouter } from 'next/navigation'
@ -202,7 +202,7 @@ export const useEstimateController = (planNo) => {
if (flag && fileFlg && itemFlg) {
//1. 첨부파일 저장시작
const formData = new FormData()
if (estimateData.tempFileList.length > 1) {
if (isNotEmptyArray(estimateData.tempFileList) > 1) {
estimateData.tempFileList.forEach((file) => {
formData.append('files', file)
})