From 1245bbb663ae49e62a24bfe54e1e1d7326c7e1d3 Mon Sep 17 00:00:00 2001 From: basssy Date: Thu, 20 Feb 2025 15:56:53 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=94=EC=84=B8=EC=A7=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/popup/EstimateCopyPop.jsx | 2 +- src/hooks/floorPlan/estimate/useEstimateController.js | 10 +++++++--- src/locales/ja.json | 6 +++--- src/locales/ko.json | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/estimate/popup/EstimateCopyPop.jsx b/src/components/estimate/popup/EstimateCopyPop.jsx index 6ff2e540..3bc25c74 100644 --- a/src/components/estimate/popup/EstimateCopyPop.jsx +++ b/src/components/estimate/popup/EstimateCopyPop.jsx @@ -296,7 +296,7 @@ export default function EstimateCopyPop({ planNo, setEstimateCopyPopupOpen }) { type="button" className="btn-origin navy mr5" onClick={() => { - handleEstimateCopy(sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId) + handleEstimateCopy(sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId, setEstimateCopyPopupOpen) }} > {getMessage('estimate.detail.estimateCopyPopup.copyBtn')} diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 10d90416..4a3bf0c2 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -83,6 +83,10 @@ export const useEstimateController = (planNo, flag) => { res.data.pkgAsp = roundedNumber.toString() } setEstimateContextState(res.data) + } else { + swalFire({ text: getMessage('stuff.detail.header.notExistObjectNo'), type: 'alert', icon: 'error' }) + setIsLoading(true) + setIsGlobalLoading(false) } } }) @@ -90,8 +94,7 @@ export const useEstimateController = (planNo, flag) => { setIsGlobalLoading(false) } catch (error) { console.error('견적서 상세조회 Error: ', error) - - swalFire({ text: getMessage('estimate.menu.move.valid1') }) + swalFire({ text: getMessage('stuff.detail.header.notExistObjectNo'), type: 'alert', icon: 'error' }) setIsLoading(true) setIsGlobalLoading(false) } @@ -415,7 +418,7 @@ export const useEstimateController = (planNo, flag) => { * (견적서 번호(estimateData.docNo)가 생성된 이후 버튼 활성화 ) * T01관리자 계정 및 1차판매점에게만 제공 */ - const handleEstimateCopy = async (sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId) => { + const handleEstimateCopy = async (sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId, setEstimateCopyPopupOpen) => { //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 if (estimateData.estimateType === 'YJSS') { return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) @@ -455,6 +458,7 @@ export const useEstimateController = (planNo, flag) => { text: getMessage('estimate.detail.estimateCopyPopup.copy.alertMessage'), type: 'alert', confirmFn: () => { + setEstimateCopyPopupOpen(false) //팝업닫고 router.push(`/management/stuff/detail?objectNo=${newObjectNo.toString()}`, { scroll: false }) }, }) diff --git a/src/locales/ja.json b/src/locales/ja.json index 2baee42f..677f9cab 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -663,9 +663,9 @@ "stuff.planReqPopup.title": "設計依頼のインポート", "stuff.temp.subTitle": "商品情報", "stuff.temp.subTitle2": "作図", - "stuff.detail.header.notExistObjectNo": "存在しないものです。", - "stuff.detail.header.successCopy": "物件番号がコピーされました。", - "stuff.detail.header.failCopy": "物件番号のコピーに失敗しました。", + "stuff.detail.header.notExistObjectNo": "存在しないもの番号です.", + "stuff.detail.header.successCopy": "物件番号がコピーされました.", + "stuff.detail.header.failCopy": "物件番号のコピーに失敗しました.", "stuff.detail.header.objectNo": "物件番号", "stuff.detail.header.specificationConfirmDate": "仕様確認日", "stuff.detail.header.lastEditDatetime": "更新日時", diff --git a/src/locales/ko.json b/src/locales/ko.json index 563ab7f2..67b4b301 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -663,7 +663,7 @@ "stuff.planReqPopup.title": "설계의뢰 불러오기", "stuff.temp.subTitle": "물건정보", "stuff.temp.subTitle2": "도면작성", - "stuff.detail.header.notExistObjectNo": "존재하지 않는 물건입니다.", + "stuff.detail.header.notExistObjectNo": "존재하지 않는 물건번호 입니다.", "stuff.detail.header.successCopy": "물건번호가 복사되었습니다.", "stuff.detail.header.failCopy": "물건번호 복사에 실패했습니다.", "stuff.detail.header.objectNo": "물건번호",