summaryrefslogtreecommitdiff
path: root/components/form-data/spreadJS-dialog.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-06-19 09:44:28 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-06-19 09:44:28 +0000
commit95bbe9c583ff841220da1267630e7b2025fc36dc (patch)
tree5e3d5bb3302530bbaa7f7abbe8c9cf8193ccbd4c /components/form-data/spreadJS-dialog.tsx
parent0eb030580b5cbe5f03d570c3c9d8c519bac3b783 (diff)
(대표님) 20250619 1844 KST 작업사항
Diffstat (limited to 'components/form-data/spreadJS-dialog.tsx')
-rw-r--r--components/form-data/spreadJS-dialog.tsx69
1 files changed, 69 insertions, 0 deletions
diff --git a/components/form-data/spreadJS-dialog.tsx b/components/form-data/spreadJS-dialog.tsx
new file mode 100644
index 00000000..69232508
--- /dev/null
+++ b/components/form-data/spreadJS-dialog.tsx
@@ -0,0 +1,69 @@
+import * as React from "react";
+import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogDescription } from "@/components/ui/dialog";
+import { Button } from "@/components/ui/button";
+import { GenericData } from "./export-excel-form";
+import { SpreadSheets, Worksheet, Column } from "@mescius/spread-sheets-react";
+import * as GC from "@mescius/spread-sheets";
+
+
+interface TemplateViewDialogProps {
+ isOpen: boolean;
+ onClose: () => void;
+ templateData: any;
+ selectedRow: GenericData;
+ formCode: string;
+ }
+
+export function TemplateViewDialog({
+ isOpen,
+ onClose,
+ templateData,
+ selectedRow,
+ formCode
+ }: TemplateViewDialogProps) {
+ return (
+ <Dialog open={isOpen} onOpenChange={onClose}>
+ <DialogContent className="w-[80%] max-w-none h-[80vh] flex flex-col" style={{maxWidth:"80vw"}}>
+ <DialogHeader className="flex-shrink-0">
+ <DialogTitle>SEDP Template - {formCode}</DialogTitle>
+ <DialogDescription>
+ {selectedRow && `Selected TAG_NO: ${selectedRow.TAG_NO || 'N/A'}`}
+ </DialogDescription>
+ </DialogHeader>
+
+ {/* 스크롤 가능한 콘텐츠 영역 */}
+ <div className="flex-1 overflow-y-auto space-y-4 py-4">
+ {/* 여기에 템플릿 데이터나 다른 콘텐츠가 들어갈 예정 */}
+ <div className="space-y-4">
+ <p className="text-sm text-muted-foreground">
+ Template content will be displayed here...
+ </p>
+
+ {/* 임시로 templateData 표시 */}
+ {templateData && (
+ <pre className="bg-muted p-4 rounded text-sm overflow-auto">
+ {JSON.stringify(templateData, null, 2)}
+ </pre>
+ )}
+ </div>
+ </div>
+
+ <DialogFooter className="flex-shrink-0">
+ <Button variant="outline" onClick={onClose}>
+ Close
+ </Button>
+ <Button
+ variant="default"
+ onClick={() => {
+ // 여기에 Template 적용 로직 추가 가능
+ console.log('Apply template logic here');
+ onClose();
+ }}
+ >
+ Apply Template
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+ );
+ } \ No newline at end of file