fix(batch): 빈 화면 원인이던 openTab 키명 정정 + 본문 풀폭 적용
문제 1: 배치 수정/생성 탭이 빈 화면 - Tab type 정의는 admin_url (snake_case) 인데 호출자가 adminUrl (camelCase) 로 전달 → TabPageRenderer 매칭 실패 → null 렌더 → 빈 화면 - 콘솔 경고: "[TabPageRenderer] 렌더링 불가 — 매칭 조건 없음" (TabContent.tsx:268) - 11곳 (4파일) 의 adminUrl → admin_url 정정 문제 2: 리스트/편집 본문이 좁은 가운데 컬럼에 박혀있음 - batchmngList/page.tsx: max-w-[720px] → w-full - batchmngList/edit/[id]/page.tsx: max-w-[640px] → w-full 해당 파일: - batchmngList/page.tsx - batchmngList/edit/[id]/page.tsx - batchmngList/create/page.tsx - batch-management-new/page.tsx Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -213,7 +213,7 @@ export default function BatchCreatePage() {
|
|||||||
toast.success("매핑을 삭제했어요");
|
toast.success("매핑을 삭제했어요");
|
||||||
};
|
};
|
||||||
|
|
||||||
const goBack = () => openTab({ type: "admin", title: "배치 관리", adminUrl: "/admin/automaticMng/batchmngList" });
|
const goBack = () => openTab({ type: "admin", title: "배치 관리", admin_url: "/admin/automaticMng/batchmngList" });
|
||||||
|
|
||||||
const saveBatchConfig = async () => {
|
const saveBatchConfig = async () => {
|
||||||
if (!batchName.trim()) { toast.error("배치 이름을 입력해주세요"); return; }
|
if (!batchName.trim()) { toast.error("배치 이름을 입력해주세요"); return; }
|
||||||
|
|||||||
@@ -676,7 +676,7 @@ export default function BatchEditPage() {
|
|||||||
nodeFlowContext: parsedContext,
|
nodeFlowContext: parsedContext,
|
||||||
});
|
});
|
||||||
toast.success("배치 설정이 저장되었습니다!");
|
toast.success("배치 설정이 저장되었습니다!");
|
||||||
openTab({ type: "admin", title: "배치 관리", adminUrl: "/admin/automaticMng/batchmngList" });
|
openTab({ type: "admin", title: "배치 관리", admin_url: "/admin/automaticMng/batchmngList" });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("배치 저장 실패:", error);
|
console.error("배치 저장 실패:", error);
|
||||||
toast.error("배치 저장에 실패했습니다.");
|
toast.error("배치 저장에 실패했습니다.");
|
||||||
@@ -759,7 +759,7 @@ export default function BatchEditPage() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
toast.success("배치 설정이 성공적으로 수정되었습니다.");
|
toast.success("배치 설정이 성공적으로 수정되었습니다.");
|
||||||
openTab({ type: "admin", title: "배치 관리", adminUrl: "/admin/automaticMng/batchmngList" });
|
openTab({ type: "admin", title: "배치 관리", admin_url: "/admin/automaticMng/batchmngList" });
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("배치 설정 수정 실패:", error);
|
console.error("배치 설정 수정 실패:", error);
|
||||||
@@ -769,7 +769,7 @@ export default function BatchEditPage() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const goBack = () => openTab({ type: "admin", title: "배치 관리", adminUrl: "/admin/automaticMng/batchmngList" });
|
const goBack = () => openTab({ type: "admin", title: "배치 관리", admin_url: "/admin/automaticMng/batchmngList" });
|
||||||
const selectedFlow = nodeFlows.find(f => f.flow_id === selectedFlowId);
|
const selectedFlow = nodeFlows.find(f => f.flow_id === selectedFlowId);
|
||||||
|
|
||||||
if (loading && !batchConfig) {
|
if (loading && !batchConfig) {
|
||||||
@@ -784,7 +784,7 @@ export default function BatchEditPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto h-full max-w-[640px] space-y-7 overflow-y-auto p-4 sm:p-6">
|
<div className="h-full w-full space-y-7 overflow-y-auto p-4 sm:p-6">
|
||||||
{/* 헤더 */}
|
{/* 헤더 */}
|
||||||
<div>
|
<div>
|
||||||
<button onClick={goBack} className="mb-2 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground">
|
<button onClick={goBack} className="mb-2 flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground">
|
||||||
|
|||||||
@@ -427,12 +427,12 @@ export default function BatchManagementPage() {
|
|||||||
setIsBatchTypeModalOpen(false);
|
setIsBatchTypeModalOpen(false);
|
||||||
if (type === "db-to-db") {
|
if (type === "db-to-db") {
|
||||||
sessionStorage.setItem("batch_create_type", "mapping");
|
sessionStorage.setItem("batch_create_type", "mapping");
|
||||||
openTab({ type: "admin", title: "배치 생성 (DB→DB)", adminUrl: "/admin/automaticMng/batchmngList/create" });
|
openTab({ type: "admin", title: "배치 생성 (DB→DB)", admin_url: "/admin/automaticMng/batchmngList/create" });
|
||||||
} else if (type === "restapi-to-db") {
|
} else if (type === "restapi-to-db") {
|
||||||
openTab({ type: "admin", title: "배치 생성 (API→DB)", adminUrl: "/admin/batch-management-new" });
|
openTab({ type: "admin", title: "배치 생성 (API→DB)", admin_url: "/admin/batch-management-new" });
|
||||||
} else {
|
} else {
|
||||||
sessionStorage.setItem("batch_create_type", "node_flow");
|
sessionStorage.setItem("batch_create_type", "node_flow");
|
||||||
openTab({ type: "admin", title: "배치 생성 (노드플로우)", adminUrl: "/admin/automaticMng/batchmngList/create" });
|
openTab({ type: "admin", title: "배치 생성 (노드플로우)", admin_url: "/admin/automaticMng/batchmngList/create" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -450,7 +450,7 @@ export default function BatchManagementPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-screen flex-col bg-background">
|
<div className="flex min-h-screen flex-col bg-background">
|
||||||
<div className="mx-auto w-full max-w-[720px] space-y-4 px-4 py-6 sm:px-6">
|
<div className="w-full space-y-4 px-4 py-6 sm:px-6">
|
||||||
|
|
||||||
{/* 헤더 */}
|
{/* 헤더 */}
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
@@ -638,7 +638,7 @@ export default function BatchManagementPage() {
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className="flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
className="flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||||
onClick={(e) => { e.stopPropagation(); openTab({ type: "admin", title: `배치 편집 #${batchId}`, adminUrl: `/admin/automaticMng/batchmngList/edit/${batchId}` }); }}
|
onClick={(e) => { e.stopPropagation(); openTab({ type: "admin", title: `배치 편집 #${batchId}`, admin_url: `/admin/automaticMng/batchmngList/edit/${batchId}` }); }}
|
||||||
title="수정하기"
|
title="수정하기"
|
||||||
>
|
>
|
||||||
<Pencil className="h-3.5 w-3.5" />
|
<Pencil className="h-3.5 w-3.5" />
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ export default function BatchManagementNewPage() {
|
|||||||
if (result.success) {
|
if (result.success) {
|
||||||
toast.success(result.message || "REST API 배치 설정이 저장되었습니다.");
|
toast.success(result.message || "REST API 배치 설정이 저장되었습니다.");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
openTab({ type: "admin", title: "배치 관리", adminUrl: "/admin/automaticMng/batchmngList" });
|
openTab({ type: "admin", title: "배치 관리", admin_url: "/admin/automaticMng/batchmngList" });
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
toast.error(result.message || "배치 저장에 실패했습니다.");
|
toast.error(result.message || "배치 저장에 실패했습니다.");
|
||||||
@@ -556,7 +556,7 @@ export default function BatchManagementNewPage() {
|
|||||||
if (result.success) {
|
if (result.success) {
|
||||||
toast.success(result.message || "DB → REST API 배치 설정이 저장되었습니다.");
|
toast.success(result.message || "DB → REST API 배치 설정이 저장되었습니다.");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
openTab({ type: "admin", title: "배치 관리", adminUrl: "/admin/automaticMng/batchmngList" });
|
openTab({ type: "admin", title: "배치 관리", admin_url: "/admin/automaticMng/batchmngList" });
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
toast.error(result.message || "배치 저장에 실패했습니다.");
|
toast.error(result.message || "배치 저장에 실패했습니다.");
|
||||||
@@ -573,7 +573,7 @@ export default function BatchManagementNewPage() {
|
|||||||
toast.error("지원하지 않는 배치 타입입니다.");
|
toast.error("지원하지 않는 배치 타입입니다.");
|
||||||
};
|
};
|
||||||
|
|
||||||
const goBack = () => openTab({ type: "admin", title: "배치 관리", adminUrl: "/admin/automaticMng/batchmngList" });
|
const goBack = () => openTab({ type: "admin", title: "배치 관리", admin_url: "/admin/automaticMng/batchmngList" });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
<div className="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||||
|
|||||||
Reference in New Issue
Block a user