diff options
| author | joonhoekim <26rote@gmail.com> | 2025-09-24 17:36:08 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-09-24 17:36:08 +0900 |
| commit | bf2db28586569499e44b58999f2e0f33ed4cdeb5 (patch) | |
| tree | 9ef9305829fdec30ec7a442f2ba0547a62dba7a9 /lib/avl/table/avl-table.tsx | |
| parent | 1bda7f20f113737f4af32495e7ff24f6022dc283 (diff) | |
(김준회) 구매 요청사항 반영 - vendor-pool 및 avl detail (이진용 프로)
Diffstat (limited to 'lib/avl/table/avl-table.tsx')
| -rw-r--r-- | lib/avl/table/avl-table.tsx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/avl/table/avl-table.tsx b/lib/avl/table/avl-table.tsx index 61db658d..9b6ac90b 100644 --- a/lib/avl/table/avl-table.tsx +++ b/lib/avl/table/avl-table.tsx @@ -100,9 +100,9 @@ export function AvlTable({ data, pageCount, isLoading, onRegistrationModeChange, const handleAction = React.useCallback(async (action: string, data?: Partial<AvlListItem>) => { try { switch (action) { - case 'standard-registration': - // 표준 AVL 등록 - const result = await handleAvlActionAction('standard-registration') + case 'avl-registration': + // AVL 등록 (통합된 기능) + const result = await handleAvlActionAction('avl-registration') if (result.success) { toast.success(result.message) onRegistrationModeChange?.('standard') // 등록 모드 변경 콜백 호출 @@ -112,9 +112,10 @@ export function AvlTable({ data, pageCount, isLoading, onRegistrationModeChange, break case 'view-detail': - // 상세 조회 (페이지 이동) + // 상세 조회 (페이지 이동) - 원래 방식으로 복원 if (data?.id && !String(data.id).startsWith('temp-')) { - window.location.href = `/evcp/avl/${data.id}` + console.log('AVL 상세보기 이동:', data.id) // 디버깅용 + window.location.href = `/ko/evcp/avl/${data.id}` } break @@ -177,6 +178,9 @@ export function AvlTable({ data, pageCount, isLoading, onRegistrationModeChange, columnSizing: {}, }, getRowId: (row) => String(row.id), + meta: { + onAction: handleAction, + }, }) return ( @@ -191,17 +195,9 @@ export function AvlTable({ data, pageCount, isLoading, onRegistrationModeChange, <Button variant="outline" size="sm" - onClick={() => handleAction('standard-registration')} - > - 표준AVL등록 - </Button> - - <Button - variant="outline" - size="sm" - onClick={() => handleAction('project-registration')} + onClick={() => handleAction('avl-registration')} > - 프로젝트AVL등록 + AVL 등록 </Button> </div> |
