저장후 시각적 효과 표시
This commit is contained in:
@@ -210,6 +210,29 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
// "나중에 할당" 처리 - 시각적 효과 포함
|
||||
const handleAssignLater = () => {
|
||||
if (!screenInfo) return;
|
||||
|
||||
// 성공 상태 설정 (나중에 할당 메시지)
|
||||
setAssignmentSuccess(true);
|
||||
setAssignmentMessage(`"${screenInfo.screenName}" 화면이 저장되었습니다. 나중에 메뉴에 할당할 수 있습니다.`);
|
||||
|
||||
// 할당 완료 콜백 호출
|
||||
if (onAssignmentComplete) {
|
||||
onAssignmentComplete();
|
||||
}
|
||||
|
||||
// 3초 후 자동으로 화면 목록으로 이동
|
||||
setTimeout(() => {
|
||||
if (onBackToList) {
|
||||
onBackToList();
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
// 필터된 메뉴 목록
|
||||
const filteredMenus = menus.filter((menu) => {
|
||||
if (!searchTerm) return true;
|
||||
@@ -268,9 +291,13 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
</div>
|
||||
화면 할당 완료
|
||||
{assignmentMessage.includes("나중에") ? "화면 저장 완료" : "화면 할당 완료"}
|
||||
</DialogTitle>
|
||||
<DialogDescription>화면이 성공적으로 메뉴에 할당되었습니다.</DialogDescription>
|
||||
<DialogDescription>
|
||||
{assignmentMessage.includes("나중에")
|
||||
? "화면이 성공적으로 저장되었습니다. 나중에 메뉴에 할당할 수 있습니다."
|
||||
: "화면이 성공적으로 메뉴에 할당되었습니다."}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="space-y-4">
|
||||
@@ -427,17 +454,7 @@ export const MenuAssignmentModal: React.FC<MenuAssignmentModalProps> = ({
|
||||
</div>
|
||||
|
||||
<DialogFooter className="flex gap-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
if (onBackToList) {
|
||||
onBackToList();
|
||||
} else {
|
||||
onClose();
|
||||
}
|
||||
}}
|
||||
disabled={assigning}
|
||||
>
|
||||
<Button variant="outline" onClick={handleAssignLater} disabled={assigning}>
|
||||
<X className="mr-2 h-4 w-4" />
|
||||
나중에 할당
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user