From 8efda6cb5e70e66bca4d24df9da63c253f23b278 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 3 Feb 2026 13:47:54 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EC=95=84=EC=9D=B4=EB=94=94=20=EC=8B=A0?= =?UTF-8?q?=EC=B2=AD=EC=8B=9C=20=EC=98=81=EB=AC=B8,=20=EC=88=AB=EC=9E=90,?= =?UTF-8?q?=20=ED=8A=B9=EC=88=98=EB=AC=B8=EC=9E=90=EB=A7=8C..=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/auth/Join.jsx | 19 +++++++++++++++++-- src/util/common-utils.js | 11 +++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/components/auth/Join.jsx b/src/components/auth/Join.jsx index 4062d313..94f7fa3e 100644 --- a/src/components/auth/Join.jsx +++ b/src/components/auth/Join.jsx @@ -6,7 +6,7 @@ import { useRouter } from 'next/navigation' import { useMessage } from '@/hooks/useMessage' import Cookies from 'js-cookie' -import { isObjectNotEmpty, inputTelNumberCheck, inputNumberCheck } from '@/util/common-utils' +import { isObjectNotEmpty, inputTelNumberCheck, inputNumberCheck, inputUserIdCheck } from '@/util/common-utils' import GlobalSpinner from '@/components/common/spinner/GlobalSpinner' @@ -133,6 +133,13 @@ export default function Join() { alert(getMessage('common.message.required.data', [getMessage('join.sub2.userId')])) userIdRef.current.focus() return false + } else { + const userIdRegex = /^[A-Za-z0-9!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]+$/ + if (!userIdRegex.test(userId)) { + alert(getMessage('join.validation.check1', [getMessage('join.sub2.userId')])) + userIdRef.current.focus() + return false + } } // 담당자 정보 - 이메일 주소 @@ -436,7 +443,15 @@ export default function Join() {
- +
diff --git a/src/util/common-utils.js b/src/util/common-utils.js index 0a1265fe..2b3fe37d 100644 --- a/src/util/common-utils.js +++ b/src/util/common-utils.js @@ -94,6 +94,17 @@ export const inputNumberCheck = (e) => { } } +// 영문, 숫자, 특수문자(ASCII)만 입력 체크 +export const inputUserIdCheck = (e) => { + const input = e.target + const allowedRegex = /^[A-Za-z0-9!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]*$/g + if (allowedRegex.test(input.value)) { + input.value = input.value + } else { + input.value = input.value.replace(/[^A-Za-z0-9!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]/g, '') + } +} + // 값이 숫자인지 확인 export const numberCheck = (value) => { return !isNaN(value) From 7de45b1ee095b0d82a057fb7d070a4b1a4f2ad72 Mon Sep 17 00:00:00 2001 From: ysCha Date: Tue, 3 Feb 2026 14:34:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[1447]=EC=8B=A4=EC=B8=A1=EA=B0=92=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=EC=9D=98=20=EB=8C=80=EA=B0=81=EC=84=A0=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useAuxiliaryDrawing.js | 4 +++ src/hooks/roofcover/useOuterLineWall.js | 26 +++++++++++++++++++ src/hooks/surface/usePlacementShapeDrawing.js | 26 +++++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/src/hooks/roofcover/useAuxiliaryDrawing.js b/src/hooks/roofcover/useAuxiliaryDrawing.js index ab0af73e..c84e00a7 100644 --- a/src/hooks/roofcover/useAuxiliaryDrawing.js +++ b/src/hooks/roofcover/useAuxiliaryDrawing.js @@ -496,6 +496,10 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { mousePointerArr.current.push({ x: lastPoint.x + length1Value / 10, y: lastPoint.y + length2Value / 10 }) } else if (arrow1Value === '→' && arrow2Value === '↑') { mousePointerArr.current.push({ x: lastPoint.x + length1Value / 10, y: lastPoint.y - length2Value / 10 }) + } else if (arrow1Value === '←' && arrow2Value === '↓') { + mousePointerArr.current.push({ x: lastPoint.x - length1Value / 10, y: lastPoint.y + length2Value / 10 }) + } else if (arrow1Value === '←' && arrow2Value === '↑') { + mousePointerArr.current.push({ x: lastPoint.x - length1Value / 10, y: lastPoint.y - length2Value / 10 }) } drawLine() } diff --git a/src/hooks/roofcover/useOuterLineWall.js b/src/hooks/roofcover/useOuterLineWall.js index 850a761a..dbd9f104 100644 --- a/src/hooks/roofcover/useOuterLineWall.js +++ b/src/hooks/roofcover/useOuterLineWall.js @@ -678,6 +678,32 @@ export function useOuterLineWall(id, propertiesId) { }, ] }) + } else if (arrow1Value === '←' && arrow2Value === '↓') { + setPoints((prev) => { + if (prev.length === 0) { + return [] + } + return [ + ...prev, + { + x: prev[prev.length - 1].x - length1Value / 10, + y: prev[prev.length - 1].y + length2Value / 10, + }, + ] + }) + } else if (arrow1Value === '←' && arrow2Value === '↑') { + setPoints((prev) => { + if (prev.length === 0) { + return [] + } + return [ + ...prev, + { + x: prev[prev.length - 1].x - length1Value / 10, + y: prev[prev.length - 1].y - length2Value / 10, + }, + ] + }) } } } diff --git a/src/hooks/surface/usePlacementShapeDrawing.js b/src/hooks/surface/usePlacementShapeDrawing.js index 3dfea465..ee151307 100644 --- a/src/hooks/surface/usePlacementShapeDrawing.js +++ b/src/hooks/surface/usePlacementShapeDrawing.js @@ -680,6 +680,32 @@ export function usePlacementShapeDrawing(id) { }, ] }) + } else if (arrow1Value === '←' && arrow2Value === '↓') { + setPoints((prev) => { + if (prev.length === 0) { + return [] + } + return [ + ...prev, + { + x: prev[prev.length - 1].x - length1Value / 10, + y: prev[prev.length - 1].y + length2Value / 10, + }, + ] + }) + } else if (arrow1Value === '←' && arrow2Value === '↑') { + setPoints((prev) => { + if (prev.length === 0) { + return [] + } + return [ + ...prev, + { + x: prev[prev.length - 1].x - length1Value / 10, + y: prev[prev.length - 1].y - length2Value / 10, + }, + ] + }) } } }