Merge branch 'feature/v2-renewal' of http://39.117.244.52:3000/kjs/ERP-node into feat/multilang
This commit is contained in:
commit
14f8714ea1
|
|
@ -59,6 +59,7 @@ import {
|
||||||
ArrowRight,
|
ArrowRight,
|
||||||
Eye,
|
Eye,
|
||||||
Settings2,
|
Settings2,
|
||||||
|
Settings,
|
||||||
Monitor,
|
Monitor,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
Type,
|
Type,
|
||||||
|
|
@ -68,6 +69,7 @@ import {
|
||||||
FileText,
|
FileText,
|
||||||
Search,
|
Search,
|
||||||
List,
|
List,
|
||||||
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import {
|
import {
|
||||||
getFieldJoins,
|
getFieldJoins,
|
||||||
|
|
@ -79,7 +81,7 @@ import {
|
||||||
import { tableManagementApi, ColumnTypeInfo, TableInfo } from "@/lib/api/tableManagement";
|
import { tableManagementApi, ColumnTypeInfo, TableInfo } from "@/lib/api/tableManagement";
|
||||||
import { screenApi } from "@/lib/api/screen";
|
import { screenApi } from "@/lib/api/screen";
|
||||||
import { INPUT_TYPE_OPTIONS } from "@/types/input-types";
|
import { INPUT_TYPE_OPTIONS } from "@/types/input-types";
|
||||||
import { CreateTableModal } from "@/components/admin/CreateTableModal";
|
import TableManagementPage from "@/app/(main)/admin/systemMng/tableMngList/page";
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// 타입 정의
|
// 타입 정의
|
||||||
|
|
@ -277,8 +279,8 @@ export function TableSettingModal({
|
||||||
const [refTableColumns, setRefTableColumns] = useState<Record<string, ColumnTypeInfo[]>>({});
|
const [refTableColumns, setRefTableColumns] = useState<Record<string, ColumnTypeInfo[]>>({});
|
||||||
const [loadingRefColumns, setLoadingRefColumns] = useState(false);
|
const [loadingRefColumns, setLoadingRefColumns] = useState(false);
|
||||||
|
|
||||||
// 테이블 생성 모달
|
// 테이블 타입 관리 모달 상태
|
||||||
const [showCreateTableModal, setShowCreateTableModal] = useState(false);
|
const [showTableManagementModal, setShowTableManagementModal] = useState(false);
|
||||||
|
|
||||||
// 테이블 컬럼 정보 로드
|
// 테이블 컬럼 정보 로드
|
||||||
const loadTableData = useCallback(async () => {
|
const loadTableData = useCallback(async () => {
|
||||||
|
|
@ -517,6 +519,7 @@ export function TableSettingModal({
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
<Dialog open={isOpen} onOpenChange={onClose}>
|
<Dialog open={isOpen} onOpenChange={onClose}>
|
||||||
<DialogContent className="flex h-[85vh] max-h-[900px] w-[95vw] max-w-[1200px] flex-col">
|
<DialogContent className="flex h-[85vh] max-h-[900px] w-[95vw] max-w-[1200px] flex-col">
|
||||||
<DialogHeader className="flex-shrink-0">
|
<DialogHeader className="flex-shrink-0">
|
||||||
|
|
@ -533,11 +536,11 @@ export function TableSettingModal({
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => setShowCreateTableModal(true)}
|
onClick={() => setShowTableManagementModal(true)}
|
||||||
className="gap-1 text-xs"
|
className="gap-1 text-xs"
|
||||||
>
|
>
|
||||||
<Plus className="h-3.5 w-3.5" />
|
<Settings className="h-3.5 w-3.5" />
|
||||||
새 테이블 생성
|
테이블 타입 관리
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<DialogDescription className="text-sm">
|
<DialogDescription className="text-sm">
|
||||||
|
|
@ -649,21 +652,44 @@ export function TableSettingModal({
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 테이블 생성 모달 */}
|
|
||||||
<CreateTableModal
|
|
||||||
isOpen={showCreateTableModal}
|
|
||||||
onClose={() => setShowCreateTableModal(false)}
|
|
||||||
onSuccess={async (result) => {
|
|
||||||
setShowCreateTableModal(false);
|
|
||||||
toast.success("새 테이블이 성공적으로 생성되었습니다!");
|
|
||||||
// 테이블 목록 새로고침
|
|
||||||
await loadTableData();
|
|
||||||
}}
|
|
||||||
mode="create"
|
|
||||||
/>
|
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
{/* 테이블 타입 관리 전체 화면 모달 */}
|
||||||
|
<Dialog open={showTableManagementModal} onOpenChange={setShowTableManagementModal}>
|
||||||
|
<DialogContent className="max-w-[98vw] h-[95vh] p-0 overflow-hidden">
|
||||||
|
<div className="flex flex-col h-full">
|
||||||
|
{/* 헤더 */}
|
||||||
|
<div className="flex items-center justify-between px-4 py-3 border-b bg-background">
|
||||||
|
<div>
|
||||||
|
<DialogTitle className="text-lg font-semibold">
|
||||||
|
테이블 타입 관리
|
||||||
|
</DialogTitle>
|
||||||
|
<p className="text-xs text-muted-foreground">
|
||||||
|
데이터베이스 테이블과 컬럼의 타입을 관리합니다
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
onClick={() => {
|
||||||
|
setShowTableManagementModal(false);
|
||||||
|
// 테이블 데이터 새로고침
|
||||||
|
loadTableData();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<X className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* TableManagementPage */}
|
||||||
|
<div className="flex-1 overflow-hidden">
|
||||||
|
<TableManagementPage />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue