summaryrefslogtreecommitdiff
path: root/lib/avl/table/avl-table.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/avl/table/avl-table.tsx')
-rw-r--r--lib/avl/table/avl-table.tsx26
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>