diff --git a/src/components/accounting/BadDebtCollection/index.tsx b/src/components/accounting/BadDebtCollection/index.tsx index ea8f00ba..96afb0e7 100644 --- a/src/components/accounting/BadDebtCollection/index.tsx +++ b/src/components/accounting/BadDebtCollection/index.tsx @@ -49,7 +49,7 @@ import { deleteBadDebt, toggleBadDebt } from './actions'; // ===== 테이블 컬럼 정의 ===== const tableColumns = [ { key: 'no', label: 'No.', className: 'text-center w-[60px]' }, - { key: 'vendorName', label: '거래처' }, + { key: 'vendorName', label: '거래처', className: 'w-[100px]' }, { key: 'debtAmount', label: '채권금액', className: 'text-right w-[140px]' }, { key: 'occurrenceDate', label: '발생일', className: 'text-center w-[110px]' }, { key: 'overdueDays', label: '연체일수', className: 'text-center w-[100px]' }, diff --git a/src/components/accounting/ReceivablesStatus/index.tsx b/src/components/accounting/ReceivablesStatus/index.tsx index ce9e5231..d2bbbf72 100644 --- a/src/components/accounting/ReceivablesStatus/index.tsx +++ b/src/components/accounting/ReceivablesStatus/index.tsx @@ -448,15 +448,15 @@ export function ReceivablesStatus({ highlightVendorId, initialData, initialSumma
- +
{/* 거래처/연체 - 왼쪽 고정 */} - + 거래처 / 연체 {/* 구분 - 왼쪽 고정 (거래처 옆) */} - + 구분 {/* 동적 월 레이블 - 스크롤 영역 */} @@ -501,7 +501,7 @@ export function ReceivablesStatus({ highlightVendorId, initialData, initialSumma // 구분별 행 (매출, 입금, 어음, 미수금) + 메모 행 = 총 5개 행 const rows = []; - // 구분별 행 렌더링 + // 구분별 행 렌더링 (rowSpan 대신 각 행마다 개별 거래처 셀로 sticky 안정화) categoryOrder.forEach((category, catIndex) => { const categoryData = vendor.categories.find(c => c.category === category); if (!categoryData) return; @@ -512,14 +512,13 @@ export function ReceivablesStatus({ highlightVendorId, initialData, initialSumma ref={catIndex === 0 && isHighlighted ? highlightRowRef : undefined} className={`${catIndex === 0 ? 'border-t-2 border-gray-300' : ''} ${isHighlighted ? 'ring-2 ring-yellow-400 ring-inset' : ''}`} > - {/* 거래처명 + 연체 토글 - 왼쪽 고정 (첫 번째 카테고리에만) */} - {catIndex === 0 && ( - -
- {vendor.vendorName} + {/* 거래처명 - 왼쪽 고정 (매 행마다 개별 셀, 첫 행만 내용 표시) */} + + {catIndex === 0 && ( +
+ {vendor.vendorName}
- - )} + )} + {/* 구분 - 왼쪽 고정 */} - + {CATEGORY_LABELS[category]} @@ -561,8 +560,11 @@ export function ReceivablesStatus({ highlightVendorId, initialData, initialSumma const isMemoExpanded = expandedMemos.has(vendor.id); rows.push( + {/* 거래처명 셀 (빈 셀 - 시각적 병합 유지) */} + + {/* 구분: 메모 + 접기/펼치기 버튼 */} - +
메모 -
- ), + // headerActions: () => ( + //
+ // + //
+ // ), selectionActions: ({ selectedItems, onClearSelection }) => ( <> diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index ecf9a89d..4282a1ad 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -16,6 +16,7 @@ interface SidebarProps { onToggleSubmenu: (menuId: string) => void; onToggleAll?: () => void; onCloseMobileSidebar?: () => void; + onExpandSidebar?: () => void; } // 재귀적 메뉴 아이템 컴포넌트 Props @@ -30,6 +31,7 @@ interface MenuItemComponentProps { onMenuClick: (menuId: string, path: string) => void; onToggleSubmenu: (menuId: string) => void; onCloseMobileSidebar?: () => void; + onExpandSidebar?: () => void; } // 재귀적 메뉴 아이템 컴포넌트 (3depth 이상 지원) @@ -44,6 +46,7 @@ function MenuItemComponent({ onMenuClick, onToggleSubmenu, onCloseMobileSidebar, + onExpandSidebar, }: MenuItemComponentProps) { const IconComponent = item.icon; const hasChildren = item.children && item.children.length > 0; @@ -73,6 +76,10 @@ function MenuItemComponent({ const handleClick = () => { if (hasChildren) { + // 접힌 상태에서 카테고리 클릭 시 사이드바 자동 펼침 + if (sidebarCollapsed && onExpandSidebar) { + onExpandSidebar(); + } onToggleSubmenu(item.id); } else { onMenuClick(item.id, item.path); @@ -171,6 +178,7 @@ function MenuItemComponent({ onMenuClick={onMenuClick} onToggleSubmenu={onToggleSubmenu} onCloseMobileSidebar={onCloseMobileSidebar} + onExpandSidebar={onExpandSidebar} /> ))}
@@ -233,6 +241,7 @@ function MenuItemComponent({ onMenuClick={onMenuClick} onToggleSubmenu={onToggleSubmenu} onCloseMobileSidebar={onCloseMobileSidebar} + onExpandSidebar={onExpandSidebar} /> ))}
@@ -297,6 +306,7 @@ function MenuItemComponent({ onMenuClick={onMenuClick} onToggleSubmenu={onToggleSubmenu} onCloseMobileSidebar={onCloseMobileSidebar} + onExpandSidebar={onExpandSidebar} /> ))} @@ -318,6 +328,7 @@ export default function Sidebar({ onToggleSubmenu, onToggleAll, onCloseMobileSidebar, + onExpandSidebar, }: SidebarProps) { // 활성 메뉴 자동 스크롤을 위한 ref const activeMenuRef = useRef(null); @@ -381,6 +392,7 @@ export default function Sidebar({ onMenuClick={onMenuClick} onToggleSubmenu={onToggleSubmenu} onCloseMobileSidebar={onCloseMobileSidebar} + onExpandSidebar={onExpandSidebar} /> ))} diff --git a/src/components/templates/IntegratedListTemplateV2.tsx b/src/components/templates/IntegratedListTemplateV2.tsx index 42b901f6..58e4665c 100644 --- a/src/components/templates/IntegratedListTemplateV2.tsx +++ b/src/components/templates/IntegratedListTemplateV2.tsx @@ -928,7 +928,7 @@ export function IntegratedListTemplateV2({ showActions={tableColumns.some(col => col.key === 'actions')} /> ) : ( -
+
{renderCustomTableHeader ? ( diff --git a/src/components/ui/table.tsx b/src/components/ui/table.tsx index 2df16788..cb947d4a 100644 --- a/src/components/ui/table.tsx +++ b/src/components/ui/table.tsx @@ -87,7 +87,7 @@ const TableCell = React.forwardRef< >(({ className, ...props }, ref) => (
[role=checkbox]]:translate-y-[2px]", className)} + className={cn("p-2 align-middle whitespace-nowrap overflow-hidden text-ellipsis [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className)} {...props} /> )) diff --git a/src/layouts/AuthenticatedLayout.tsx b/src/layouts/AuthenticatedLayout.tsx index e2034b3f..55b1786e 100644 --- a/src/layouts/AuthenticatedLayout.tsx +++ b/src/layouts/AuthenticatedLayout.tsx @@ -518,6 +518,13 @@ export default function AuthenticatedLayout({ children }: AuthenticatedLayoutPro router.push(path); }; + // 접힌 사이드바 자동 펼침 (아이콘 클릭 시) + const expandSidebar = useCallback(() => { + if (sidebarCollapsed) { + toggleSidebar(); + } + }, [sidebarCollapsed, toggleSidebar]); + // 서브메뉴 토글 함수 const toggleSubmenu = (menuId: string) => { setExpandedMenus(prev => @@ -1264,6 +1271,7 @@ export default function AuthenticatedLayout({ children }: AuthenticatedLayoutPro onMenuClick={handleMenuClick} onToggleSubmenu={toggleSubmenu} onToggleAll={toggleAllMenus} + onExpandSidebar={expandSidebar} />