From 935fd22e17afc034a472bc2d159de7b9f5e5dcae Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Thu, 20 Nov 2025 19:36:01 +0900
Subject: (김준회) PO, POS, swp - PO: 발주서출력기능 초안 - 벤더측 POS 다운로드
 기능 추가 - Contract 생성시 Status 설정 (mapper) - swp document registration
 table 로직 리팩터링 - swp: 입력가능 문서번호 validation 추가 (리스트 메뉴에서
 Completed 된 건)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/swp/table/swp-table.tsx | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

(limited to 'lib/swp/table/swp-table.tsx')

diff --git a/lib/swp/table/swp-table.tsx b/lib/swp/table/swp-table.tsx
index b6c3558b..6f810415 100644
--- a/lib/swp/table/swp-table.tsx
+++ b/lib/swp/table/swp-table.tsx
@@ -75,6 +75,8 @@ export function SwpTable({
     data: filteredDocuments,
     columns: swpDocumentColumns,
     getCoreRowModel: getCoreRowModel(),
+    enableColumnResizing: false,
+    columnResizeMode: 'onChange',
   });
 
   // 문서 클릭 핸들러 - Dialog 열기
@@ -109,13 +111,20 @@ export function SwpTable({
       </div>
 
       {/* 테이블 */}
-      <div className="rounded-md border">
-        <Table>
+      <div className="rounded-md border overflow-x-auto">
+        <Table className="min-w-[1700px]">
           <TableHeader>
             {table.getHeaderGroups().map((headerGroup) => (
               <TableRow key={headerGroup.id}>
                 {headerGroup.headers.map((header) => (
-                  <TableHead key={header.id}>
+                  <TableHead 
+                    key={header.id}
+                    style={{
+                      width: header.column.getSize(),
+                      minWidth: header.column.getSize(),
+                      maxWidth: header.column.getSize(),
+                    }}
+                  >
                     {header.isPlaceholder
                       ? null
                       : flexRender(
@@ -137,7 +146,14 @@ export function SwpTable({
                   onClick={() => handleDocumentClick(row.original)}
                 >
                   {row.getVisibleCells().map((cell) => (
-                    <TableCell key={cell.id}>
+                    <TableCell 
+                      key={cell.id}
+                      style={{
+                        width: cell.column.getSize(),
+                        minWidth: cell.column.getSize(),
+                        maxWidth: cell.column.getSize(),
+                      }}
+                    >
                       {flexRender(cell.column.columnDef.cell, cell.getContext())}
                     </TableCell>
                   ))}
-- 
cgit v1.2.3

