From bb85d2ed6b39562e963c6ba204278e520dc13c3b Mon Sep 17 00:00:00 2001 From: basssy Date: Wed, 5 Feb 2025 09:11:18 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=81=EB=A9=B4=EC=84=A4=EC=B9=98=20?= =?UTF-8?q?=ED=94=8C=EB=9E=98=EA=B7=B8=20=EA=B4=80=EB=A0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 3 ++ src/components/management/StuffDetail.jsx | 22 +++++++------ .../management/StuffSearchCondition.jsx | 13 ++++---- .../estimate/useEstimateController.js | 31 ++++++++++++------- 4 files changed, 41 insertions(+), 28 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index a97cb4cb..b5d8bce0 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -1366,6 +1366,9 @@ export default function Estimate({}) { {getMessage('estimate.detail.fileFlg')} + {estimateContextState?.northArrangement === '1' && ( +
{getMessage('estimate.detail.dragFileGuide')}
+ )}
diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index 191b3156..fe8fea47 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -411,11 +411,12 @@ export default function StuffDetail() { if (session?.storeId === 'T01') { url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}` } else { - if (session.storeLvl === '1') { - url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` - } else { - url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` - } + // if (session.storeLvl === '1') { + // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` + // } else { + // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` + // } + url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` } get({ url: url }).then((res) => { @@ -523,11 +524,12 @@ export default function StuffDetail() { if (session?.storeId === 'T01') { url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}` } else { - if (session.storeLvl === '1') { - url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` - } else { - url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` - } + // if (session.storeLvl === '1') { + // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` + // } else { + // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` + // } + url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` } get({ url: url }).then((res) => { if (!isEmptyArray(res)) { diff --git a/src/components/management/StuffSearchCondition.jsx b/src/components/management/StuffSearchCondition.jsx index 62b75483..5021548d 100644 --- a/src/components/management/StuffSearchCondition.jsx +++ b/src/components/management/StuffSearchCondition.jsx @@ -474,12 +474,13 @@ export default function StuffSearchCondition() { //T01일떄 url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}` } else { - if (session.storeLvl === '1') { - //T01아닌 1차점일때 - url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` - } else { - url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` - } + // if (session.storeLvl === '1') { + // //T01아닌 1차점일때 + // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` + // } else { + // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` + // } + url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` } get({ url: url }).then((res) => { diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index ebd1ad88..7654f3ba 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -80,7 +80,6 @@ export const useEstimateController = (planNo) => { res.data.pkgAsp = roundedNumber.toString() } - setEstimateContextState(res.data) } } @@ -155,7 +154,7 @@ export const useEstimateController = (planNo) => { }) .catch((error) => { console.log('::FileDownLoad Error::', error) - alert('File does not exist.') + return swalFire({ text: getMessage('File does not exist'), type: 'alert' }) }) } @@ -169,19 +168,19 @@ export const useEstimateController = (planNo) => { if (estimateData?.charger === null || estimateData?.charger?.trim().length === 0) { flag = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredCharger')) + return swalFire({ text: getMessage('estimate.detail.save.requiredCharger'), type: 'alert' }) } if (estimateData?.objectName === null || estimateData?.objectName?.trim().length === 0) { flag = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredObjectName')) + return swalFire({ text: getMessage('estimate.detail.save.requiredObjectName'), type: 'alert' }) } if (isNaN(Date.parse(estimateData.estimateDate))) { flag = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredEstimateDate')) + return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateDate'), type: 'alert' }) } if (estimateData.estimateType === 'YJSS') { @@ -189,7 +188,7 @@ export const useEstimateController = (planNo) => { if (pkgAsp === '0') { flag = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredPkgAsp')) + return swalFire({ text: getMessage('estimate.detail.save.requiredPkgAsp'), type: 'alert' }) } } @@ -209,6 +208,14 @@ export const useEstimateController = (planNo) => { //기존에 첨부된 파일이 없으면 if (isEmptyArray(estimateData.newFileList)) { //새로 첨부한 파일이 없으면 + + //북면 먼저 체크 + if (estimateData?.northArrangement === '1') { + fileFlg = false + setIsGlobalLoading(false) + return swalFire({ text: getMessage('estimate.detail.save.requiredNorthArrangementFileUpload'), type: 'alert' }) + } + if (estimateData.itemList.length > 1) { estimateData.itemList.map((row) => { if (row.delFlg === '0') { @@ -217,7 +224,7 @@ export const useEstimateController = (planNo) => { if (estimateData.fileFlg === '0') { fileFlg = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredFileUpload')) + return swalFire({ text: getMessage('estimate.detail.save.requiredFileUpload'), type: 'alert' }) } } } @@ -235,7 +242,7 @@ export const useEstimateController = (planNo) => { if (item.itemId === '') { itemFlg = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredItemId')) + return swalFire({ text: getMessage('estimate.detail.save.requiredItemId'), type: 'alert' }) } } @@ -251,7 +258,7 @@ export const useEstimateController = (planNo) => { if (item.amount < 1) { itemFlg = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredAmount')) + return swalFire({ text: getMessage('estimate.detail.save.requiredAmount'), type: 'alert' }) } if (estimateData.estimateType !== 'YJSS') { @@ -263,7 +270,7 @@ export const useEstimateController = (planNo) => { if (item.salePrice < 1) { itemFlg = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredSalePrice')) + return swalFire({ text: getMessage('estimate.detail.save.requiredSalePrice'), type: 'alert' }) } } @@ -274,7 +281,7 @@ export const useEstimateController = (planNo) => { if (isNaN(item.salePrice)) { itemFlg = false setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredSalePrice')) + return swalFire({ text: getMessage('estimate.detail.save.requiredSalePrice'), type: 'alert' }) } } } @@ -292,7 +299,7 @@ export const useEstimateController = (planNo) => { }) if (delCnt === estimateData.itemList.length) { setIsGlobalLoading(false) - return alert(getMessage('estimate.detail.save.requiredItem')) + return swalFire({ text: getMessage('estimate.detail.save.requiredItem'), type: 'alert' }) } }