From a8674e6b91fb4d356c311fad0251878de154da53 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 24 Nov 2025 11:16:32 +0000 Subject: (최겸) 구매 입찰 수정(폐찰, 낙찰 결재 기능 추가 등) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wbs-code/wbs-code-single-selector.tsx | 40 ++++++---------------- 1 file changed, 11 insertions(+), 29 deletions(-) (limited to 'components/common/selectors/wbs-code/wbs-code-single-selector.tsx') diff --git a/components/common/selectors/wbs-code/wbs-code-single-selector.tsx b/components/common/selectors/wbs-code/wbs-code-single-selector.tsx index 77a32afe..5c84b8c2 100644 --- a/components/common/selectors/wbs-code/wbs-code-single-selector.tsx +++ b/components/common/selectors/wbs-code/wbs-code-single-selector.tsx @@ -49,7 +49,6 @@ export interface WbsCodeSingleSelectorProps { title?: string description?: string showConfirmButtons?: boolean - projNo?: string // 프로젝트 번호 필터 } export function WbsCodeSingleSelector({ @@ -61,8 +60,7 @@ export function WbsCodeSingleSelector({ onCancel, title = "WBS 코드 선택", description = "WBS 코드를 선택하세요", - showConfirmButtons = false, - projNo + showConfirmButtons = false }: WbsCodeSingleSelectorProps) { const [codes, setCodes] = useState([]) const [sorting, setSorting] = useState([]) @@ -77,7 +75,7 @@ export function WbsCodeSingleSelector({ const handleCodeSelect = useCallback((code: WbsCode) => { // 이미 선택된 코드를 다시 선택하면 선택 해제 const currentSelected = showConfirmButtons ? tempSelectedCode : selectedCode - if (currentSelected && currentSelected.WBS_ELMT === code.WBS_ELMT && currentSelected.PROJ_NO === code.PROJ_NO) { + if (currentSelected && currentSelected.WBS_ELMT === code.WBS_ELMT) { if (showConfirmButtons) { setTempSelectedCode(undefined) } else { @@ -113,41 +111,27 @@ export function WbsCodeSingleSelector({ // 테이블 컬럼 정의 const columns: ColumnDef[] = useMemo(() => [ - { - accessorKey: 'PROJ_NO', - header: '프로젝트 번호', - cell: ({ row }) => ( -
{row.getValue('PROJ_NO')}
- ), - }, { accessorKey: 'WBS_ELMT', - header: 'WBS 요소', + header: 'WBS_ELMT', cell: ({ row }) => (
{row.getValue('WBS_ELMT')}
), }, { accessorKey: 'WBS_ELMT_NM', - header: 'WBS 요소명', + header: 'WBS_ELMT_NM', cell: ({ row }) => (
{row.getValue('WBS_ELMT_NM')}
), }, - { - accessorKey: 'WBS_LVL', - header: '레벨', - cell: ({ row }) => ( -
{row.getValue('WBS_LVL')}
- ), - }, { id: 'actions', header: '선택', cell: ({ row }) => { const isSelected = showConfirmButtons - ? tempSelectedCode?.WBS_ELMT === row.original.WBS_ELMT && tempSelectedCode?.PROJ_NO === row.original.PROJ_NO - : selectedCode?.WBS_ELMT === row.original.WBS_ELMT && selectedCode?.PROJ_NO === row.original.PROJ_NO + ? tempSelectedCode?.WBS_ELMT === row.original.WBS_ELMT + : selectedCode?.WBS_ELMT === row.original.WBS_ELMT return (
- [{currentSelectedCode.PROJ_NO}] - {currentSelectedCode.WBS_ELMT} + [{currentSelectedCode.WBS_ELMT}] {currentSelectedCode.WBS_ELMT_NM}
@@ -278,7 +261,7 @@ export function WbsCodeSingleSelector({
handleSearchChange(e.target.value)} className="flex-1" @@ -311,8 +294,7 @@ export function WbsCodeSingleSelector({ {table.getRowModel().rows?.length ? ( table.getRowModel().rows.map((row) => { - const isRowSelected = currentSelectedCode?.WBS_ELMT === row.original.WBS_ELMT && - currentSelectedCode?.PROJ_NO === row.original.PROJ_NO + const isRowSelected = currentSelectedCode?.WBS_ELMT === row.original.WBS_ELMT return (