마지막 merge #315

Merged
hyeonsu merged 7 commits from reportMng into main 2025-12-29 17:53:25 +09:00
1 changed files with 21 additions and 1 deletions
Showing only changes of commit 386ce629ac - Show all commits

View File

@ -285,7 +285,18 @@ export function ReportDesignerProvider({ reportId, children }: { reportId: strin
// 복사 (Ctrl+C)
const copyComponents = useCallback(() => {
if (selectedComponentIds.length > 0) {
const componentsToCopy = components.filter((comp) => selectedComponentIds.includes(comp.id));
// 잠긴 컴포넌트는 복사에서 제외
const componentsToCopy = components.filter(
(comp) => selectedComponentIds.includes(comp.id) && !comp.locked
);
if (componentsToCopy.length === 0) {
toast({
title: "복사 불가",
description: "잠긴 컴포넌트는 복사할 수 없습니다.",
variant: "destructive",
});
return;
}
setClipboard(componentsToCopy);
toast({
title: "복사 완료",
@ -294,6 +305,15 @@ export function ReportDesignerProvider({ reportId, children }: { reportId: strin
} else if (selectedComponentId) {
const componentToCopy = components.find((comp) => comp.id === selectedComponentId);
if (componentToCopy) {
// 잠긴 컴포넌트는 복사 불가
if (componentToCopy.locked) {
toast({
title: "복사 불가",
description: "잠긴 컴포넌트는 복사할 수 없습니다.",
variant: "destructive",
});
return;
}
setClipboard([componentToCopy]);
toast({
title: "복사 완료",