From 77ec18c05bc2ef74c802e03f64964a1bcd3e2ab4 Mon Sep 17 00:00:00 2001 From: basssy Date: Fri, 28 Feb 2025 16:44:09 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EB=B3=B5?= =?UTF-8?q?=EC=82=AC=20=EB=8B=B4=EB=8B=B9=EC=9E=90=20=EC=9E=90=EB=A6=AC?= =?UTF-8?q?=EC=88=98=20=EC=B2=B4=ED=81=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../estimate/useEstimateController.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 4a3bf0c2..9c00d5bb 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -437,7 +437,12 @@ export const useEstimateController = (planNo, flag) => { type: 'alert', icon: 'warning', }) + } else { + if (checkLength(copyReceiveUser.trim()) > 10) { + return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' }) + } } + const params = { saleStoreId: session.storeId, sapSalesStoreCd: session.custCd, @@ -469,6 +474,22 @@ export const useEstimateController = (planNo, flag) => { }) } + const checkLength = (value) => { + let str = new String(value) + let _byte = 0 + if (str.length !== 0) { + for (let i = 0; i < str.length; i++) { + let str2 = str.charAt(i) + if (encodeURIComponent(str2).length > 4) { + _byte += 2 + } else { + _byte++ + } + } + } + return _byte + } + return { estimateContextState, setEstimateContextState,