From b8dfa3d88742141c3672ff32550857900fe647d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=B3=91=EC=B2=A0?= Date: Tue, 24 Feb 2026 13:01:41 +0900 Subject: [PATCH] =?UTF-8?q?feat(WEB):=20CEO=20=EB=8C=80=EC=8B=9C=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=20=EC=BA=98=EB=A6=B0=EB=8D=94=20=EA=B0=95=ED=99=94=20?= =?UTF-8?q?=EB=B0=8F=20validation=20=EB=AA=A8=EB=93=88=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CalendarSection 일정 CRUD 기능 확장 (상세 모달 연동) - ScheduleDetailModal 개선 - CEO 대시보드 섹션별 API 키 통일 - validation.ts → validation/ 모듈 분리 (item-schemas, utils) - formatters.ts 확장 - date.ts 유틸 추가 - SignupPage/EmployeeForm/AddCompanyDialog 등 소규모 개선 - PaymentHistory/PopupManagement utils 정리 Co-Authored-By: Claude Opus 4.6 --- src/components/auth/SignupPage.tsx | 5 +- .../dialogs/DashboardSettingsDialog.tsx | 2 +- .../modals/ScheduleDetailModal.tsx | 77 ++-- .../CEODashboard/sections/CalendarSection.tsx | 293 +++++++++++---- .../sections/DailyAttendanceSection.tsx | 2 +- .../sections/DebtCollectionSection.tsx | 2 +- .../sections/EnhancedSections.tsx | 6 +- .../sections/PurchaseStatusSection.tsx | 2 +- .../sections/SalesStatusSection.tsx | 2 +- .../sections/StatusBoardSection.tsx | 12 +- .../sections/TodayIssueSection.tsx | 10 +- .../sections/UnshippedSection.tsx | 2 +- .../CEODashboard/sections/VatSection.tsx | 2 +- .../hr/EmployeeManagement/EmployeeForm.tsx | 5 +- .../AddCompanyDialog.tsx | 3 +- .../PaymentHistoryManagement/utils.ts | 8 +- .../settings/PopupManagement/utils.ts | 7 +- src/lib/formatters.ts | 39 +- src/lib/utils/date.ts | 11 + src/lib/utils/validation/common.ts | 110 ++++++ src/lib/utils/validation/form-schemas.ts | 191 ++++++++++ src/lib/utils/validation/index.ts | 31 ++ .../item-schemas.ts} | 342 +----------------- src/lib/utils/validation/utils.ts | 64 ++++ 24 files changed, 726 insertions(+), 502 deletions(-) create mode 100644 src/lib/utils/validation/common.ts create mode 100644 src/lib/utils/validation/form-schemas.ts create mode 100644 src/lib/utils/validation/index.ts rename src/lib/utils/{validation.ts => validation/item-schemas.ts} (52%) create mode 100644 src/lib/utils/validation/utils.ts diff --git a/src/components/auth/SignupPage.tsx b/src/components/auth/SignupPage.tsx index a7fc3465..17412831 100644 --- a/src/components/auth/SignupPage.tsx +++ b/src/components/auth/SignupPage.tsx @@ -25,6 +25,7 @@ import { } from "lucide-react"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { isNextRedirectError } from '@/lib/utils/redirect-error'; +import { extractDigits } from '@/lib/formatters'; export function SignupPage() { const router = useRouter(); @@ -64,7 +65,7 @@ export function SignupPage() { // 사업자등록번호 자동 포맷팅 (000-00-00000) const formatBusinessNumber = (value: string) => { // 숫자만 추출 - const numbers = value.replace(/[^\d]/g, ''); + const numbers = extractDigits(value); // 최대 10자리까지만 const limited = numbers.slice(0, 10); @@ -87,7 +88,7 @@ export function SignupPage() { // 핸드폰 번호 자동 포맷팅 (010-1111-1111 or 010-111-1111) const formatPhoneNumber = (value: string) => { // 숫자만 추출 - const numbers = value.replace(/[^\d]/g, ''); + const numbers = extractDigits(value); // 최대 11자리까지만 const limited = numbers.slice(0, 11); diff --git a/src/components/business/CEODashboard/dialogs/DashboardSettingsDialog.tsx b/src/components/business/CEODashboard/dialogs/DashboardSettingsDialog.tsx index 85ddff71..96d0b139 100644 --- a/src/components/business/CEODashboard/dialogs/DashboardSettingsDialog.tsx +++ b/src/components/business/CEODashboard/dialogs/DashboardSettingsDialog.tsx @@ -889,7 +889,7 @@ export function DashboardSettingsDialog({ ))} - +