첨부파일수 정
This commit is contained in:
parent
2aed71fa00
commit
52d76419c9
@ -3,7 +3,7 @@ import { useContext, useEffect, useReducer, useState } from 'react'
|
|||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||||
import { globalLocaleStore } from '@/store/localeAtom'
|
import { globalLocaleStore } from '@/store/localeAtom'
|
||||||
import { estimateState, floorPlanObjectState } from '@/store/floorPlanObjectAtom'
|
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 { SessionContext } from '@/app/SessionProvider'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
@ -202,7 +202,7 @@ export const useEstimateController = (planNo) => {
|
|||||||
if (flag && fileFlg && itemFlg) {
|
if (flag && fileFlg && itemFlg) {
|
||||||
//1. 첨부파일 저장시작
|
//1. 첨부파일 저장시작
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (estimateData.tempFileList.length > 1) {
|
if (isNotEmptyArray(estimateData.tempFileList) > 1) {
|
||||||
estimateData.tempFileList.forEach((file) => {
|
estimateData.tempFileList.forEach((file) => {
|
||||||
formData.append('files', file)
|
formData.append('files', file)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user