Merge pull request 'fix: 카테고리 타입 컬럼 라벨 표시 및 빌드 오류 수정' (#187) from feature/screen-management into main

Reviewed-on: http://39.117.244.52:3000/kjs/ERP-node/pulls/187
This commit is contained in:
kjs 2025-11-06 12:04:19 +09:00
commit 4b2514d9da
2 changed files with 36 additions and 32 deletions

View File

@ -168,7 +168,7 @@ export default function CopyScreenModal({ isOpen, onClose, sourceScreen, onCopyS
</div> </div>
</div> </div>
<DialogFooter> <ResizableDialogFooter>
<Button variant="outline" onClick={handleClose} disabled={isCopying}> <Button variant="outline" onClick={handleClose} disabled={isCopying}>
</Button> </Button>

View File

@ -2,8 +2,12 @@
import React, { useState, useEffect, useRef } from "react"; import React, { useState, useEffect, useRef } from "react";
import { import {
Dialog, ResizableDialog,
DialogContent, ResizableDialogContent,
ResizableDialogFooter,
ResizableResizableDialogHeader,
ResizableResizableDialogTitle,
ResizableResizableDialogDescription,
} from "@/components/ui/resizable-dialog"; } from "@/components/ui/resizable-dialog";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge"; import { Badge } from "@/components/ui/badge";
@ -111,7 +115,7 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
autoRedirectTimerRef.current = null; autoRedirectTimerRef.current = null;
} }
} }
// 컴포넌트 언마운트 시 타이머 정리 // 컴포넌트 언마운트 시 타이머 정리
return () => { return () => {
if (autoRedirectTimerRef.current) { if (autoRedirectTimerRef.current) {
@ -341,26 +345,26 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
return ( return (
<> <>
<Dialog open={isOpen} onOpenChange={onClose}> <ResizableDialog open={isOpen} onOpenChange={onClose}>
<DialogContent className="max-w-2xl"> <ResizableDialogContent className="max-w-2xl">
{assignmentSuccess ? ( {assignmentSuccess ? (
// 성공 화면 // 성공 화면
<> <>
<DialogHeader> <ResizableDialogHeader>
<DialogTitle className="flex items-center gap-2"> <ResizableDialogTitle className="flex items-center gap-2">
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-green-100"> <div className="flex h-8 w-8 items-center justify-center rounded-full bg-green-100">
<svg className="h-5 w-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg className="h-5 w-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
</svg> </svg>
</div> </div>
{assignmentMessage.includes("나중에") ? "화면 저장 완료" : "화면 할당 완료"} {assignmentMessage.includes("나중에") ? "화면 저장 완료" : "화면 할당 완료"}
</DialogTitle> </ResizableDialogTitle>
<DialogDescription> <ResizableDialogDescription>
{assignmentMessage.includes("나중에") {assignmentMessage.includes("나중에")
? "화면이 성공적으로 저장되었습니다. 나중에 메뉴에 할당할 수 있습니다." ? "화면이 성공적으로 저장되었습니다. 나중에 메뉴에 할당할 수 있습니다."
: "화면이 성공적으로 메뉴에 할당되었습니다."} : "화면이 성공적으로 메뉴에 할당되었습니다."}
</DialogDescription> </ResizableDialogDescription>
</DialogHeader> </ResizableDialogHeader>
<div className="space-y-4"> <div className="space-y-4">
<div className="rounded-lg border bg-green-50 p-4"> <div className="rounded-lg border bg-green-50 p-4">
@ -390,7 +394,7 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
clearTimeout(autoRedirectTimerRef.current); clearTimeout(autoRedirectTimerRef.current);
autoRedirectTimerRef.current = null; autoRedirectTimerRef.current = null;
} }
// 화면 목록으로 이동 // 화면 목록으로 이동
if (onBackToList) { if (onBackToList) {
onBackToList(); onBackToList();
@ -408,14 +412,14 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
) : ( ) : (
// 기본 할당 화면 // 기본 할당 화면
<> <>
<DialogHeader> <ResizableDialogHeader>
<DialogTitle className="flex items-center gap-2"> <ResizableDialogTitle className="flex items-center gap-2">
<Settings className="h-5 w-5" /> <Settings className="h-5 w-5" />
</DialogTitle> </ResizableDialogTitle>
<DialogDescription> <ResizableDialogDescription>
. .
</DialogDescription> </ResizableDialogDescription>
{screenInfo && ( {screenInfo && (
<div className="bg-accent mt-2 rounded-lg border p-3"> <div className="bg-accent mt-2 rounded-lg border p-3">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@ -428,7 +432,7 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
{screenInfo.description && <p className="mt-1 text-sm text-blue-700">{screenInfo.description}</p>} {screenInfo.description && <p className="mt-1 text-sm text-blue-700">{screenInfo.description}</p>}
</div> </div>
)} )}
</DialogHeader> </ResizableDialogHeader>
<div className="space-y-4"> <div className="space-y-4">
{/* 메뉴 선택 (검색 기능 포함) */} {/* 메뉴 선택 (검색 기능 포함) */}
@ -568,22 +572,22 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
</> </>
)} )}
</Button> </Button>
</DialogFooter> </ResizableDialogFooter>
</> </>
)} )}
</DialogContent> </ResizableDialogContent>
</Dialog> </ResizableDialog>
{/* 화면 교체 확인 대화상자 */} {/* 화면 교체 확인 대화상자 */}
<Dialog open={showReplaceDialog} onOpenChange={setShowReplaceDialog}> <ResizableDialog open={showReplaceDialog} onOpenChange={setShowReplaceDialog}>
<DialogContent className="max-w-md"> <ResizableDialogContent className="max-w-md">
<DialogHeader> <ResizableDialogHeader>
<DialogTitle className="flex items-center gap-2"> <ResizableDialogTitle className="flex items-center gap-2">
<Monitor className="h-5 w-5 text-orange-600" /> <Monitor className="h-5 w-5 text-orange-600" />
</DialogTitle> </ResizableDialogTitle>
<DialogDescription> .</DialogDescription> <ResizableDialogDescription> .</ResizableDialogDescription>
</DialogHeader> </ResizableDialogHeader>
<div className="space-y-4"> <div className="space-y-4">
{/* 기존 화면 목록 */} {/* 기존 화면 목록 */}
@ -648,9 +652,9 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
</> </>
)} )}
</Button> </Button>
</DialogFooter> </ResizableDialogFooter>
</DialogContent> </ResizableDialogContent>
</Dialog> </ResizableDialog>
</> </>
); );
}; };