From 519d01ed0a2e40c353d0afcccd4b7a83483f7eaf Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Wed, 12 Nov 2025 18:58:10 +0900
Subject: (김준회) Document Numbering Rule(해양): DOC_CLASS 1글자로 제한 (SWP측
 제약), DOC_CLASS에서 코드 컬럼 제거
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/document-class-edit-sheet.tsx            | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

(limited to 'lib/docu-list-rule/document-class/table/document-class-edit-sheet.tsx')

diff --git a/lib/docu-list-rule/document-class/table/document-class-edit-sheet.tsx b/lib/docu-list-rule/document-class/table/document-class-edit-sheet.tsx
index 32c1976d..03bded67 100644
--- a/lib/docu-list-rule/document-class/table/document-class-edit-sheet.tsx
+++ b/lib/docu-list-rule/document-class/table/document-class-edit-sheet.tsx
@@ -31,7 +31,10 @@ import { updateDocumentClassCodeGroup } from "@/lib/docu-list-rule/document-clas
 import { documentClasses } from "@/db/schema/docu-list-rule"
 
 const updateDocumentClassSchema = z.object({
-  value: z.string().min(1, "Value는 필수입니다."),
+  value: z.string()
+    .min(1, "Value는 필수입니다.")
+    .max(1, "Value는 1자리만 입력 가능합니다. (예: A, B, 0, 1)")
+    .regex(/^[A-Z0-9]$/, "대문자 알파벳 또는 숫자 1자리만 입력 가능합니다. (예: A, B, 0, 1)"),
   description: z.string().optional(),
 })
 
@@ -111,10 +114,19 @@ export function DocumentClassEditSheet({
               name="value"
               render={({ field }) => (
                 <FormItem>
-                  <FormLabel>Value</FormLabel>
+                  <FormLabel>Value *</FormLabel>
                   <FormControl>
-                    <Input placeholder="예: A Class" {...field} />
+                    <Input 
+                      {...field} 
+                      placeholder="예: A" 
+                      maxLength={1}
+                      className="uppercase"
+                      onChange={(e) => field.onChange(e.target.value.toUpperCase())}
+                    />
                   </FormControl>
+                  <div className="text-xs text-muted-foreground mt-1">
+                    대문자 알파벳 1자리 또는 숫자 1자리 (A, B, 0, 1 등)
+                  </div>
                   <FormMessage />
                 </FormItem>
               )}
@@ -126,8 +138,11 @@ export function DocumentClassEditSheet({
                 <FormItem>
                   <FormLabel>Description</FormLabel>
                   <FormControl>
-                    <Input placeholder="예: Document Class_1 (선택사항)" {...field} />
+                    <Input placeholder="예: General Documents (선택사항)" {...field} />
                   </FormControl>
+                  <div className="text-xs text-muted-foreground mt-1">
+                    선택사항: Document Class에 대한 추가 설명
+                  </div>
                   <FormMessage />
                 </FormItem>
               )}
-- 
cgit v1.2.3

