feature/screen-management #195

Merged
kjs merged 14 commits from feature/screen-management into main 2025-11-10 14:38:00 +09:00
1 changed files with 11 additions and 12 deletions
Showing only changes of commit 1d6418ca63 - Show all commits

View File

@ -1,7 +1,7 @@
"use client";
import React, { useState, useEffect } from "react";
import { ResizableDialog, ResizableDialogContent, ResizableDialogHeader, DialogTitle } from "@/components/ui/resizable-dialog";
import { ResizableDialog, ResizableDialogContent, ResizableDialogHeader, ResizableDialogTitle } from "@/components/ui/resizable-dialog";
import { Button } from "@/components/ui/button";
import { X, Save, Loader2 } from "lucide-react";
import { toast } from "sonner";
@ -213,9 +213,9 @@ export const SaveModal: React.FC<SaveModalProps> = ({
const dynamicSize = calculateDynamicSize();
return (
<Dialog open={isOpen} onOpenChange={(open) => !isSaving && !open && onClose()}>
<DialogContent className={`${modalSizeClasses[modalSize]} max-h-[90vh] gap-0 p-0`}>
<DialogHeader className="border-b px-6 py-4">
<ResizableDialog open={isOpen} onOpenChange={(open) => !isSaving && !open && onClose()}>
<ResizableDialogContent className={`${modalSizeClasses[modalSize]} max-h-[90vh] gap-0 p-0`}>
<ResizableDialogHeader className="border-b px-6 py-4">
<div className="flex items-center justify-between">
<ResizableDialogTitle className="text-lg font-semibold">{initialData ? "데이터 수정" : "데이터 등록"}</ResizableDialogTitle>
<div className="flex items-center gap-2">
@ -237,7 +237,7 @@ export const SaveModal: React.FC<SaveModalProps> = ({
</Button>
</div>
</div>
</DialogHeader>
</ResizableDialogHeader>
<div className="overflow-auto p-6">
{loading ? (
@ -246,14 +246,13 @@ export const SaveModal: React.FC<SaveModalProps> = ({
</div>
) : screenData && components.length > 0 ? (
<div
className="relative bg-white"
className="relative bg-white w-full h-full"
style={{
width: dynamicSize.width,
height: dynamicSize.height,
overflow: "hidden",
minWidth: dynamicSize.width,
minHeight: dynamicSize.height,
}}
>
<div className="relative" style={{ minHeight: "300px" }}>
<div className="relative w-full h-full" style={{ minHeight: "300px" }}>
{components.map((component, index) => (
<div
key={component.id}
@ -314,7 +313,7 @@ export const SaveModal: React.FC<SaveModalProps> = ({
<div className="text-muted-foreground py-12 text-center"> .</div>
)}
</div>
</DialogContent>
</Dialog>
</ResizableDialogContent>
</ResizableDialog>
);
};