From f7f5069a2209cfa39b65f492f32270a5f554bed0 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Thu, 23 Oct 2025 10:10:21 +0000
Subject: (대표님) EDP 해양 관련 개발 사항들
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../form-data-report-temp-upload-dialog.tsx        | 101 +++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 components/form-data-plant/form-data-report-temp-upload-dialog.tsx

(limited to 'components/form-data-plant/form-data-report-temp-upload-dialog.tsx')

diff --git a/components/form-data-plant/form-data-report-temp-upload-dialog.tsx b/components/form-data-plant/form-data-report-temp-upload-dialog.tsx
new file mode 100644
index 00000000..59ea6ade
--- /dev/null
+++ b/components/form-data-plant/form-data-report-temp-upload-dialog.tsx
@@ -0,0 +1,101 @@
+"use client";
+
+import React, { FC, Dispatch, SetStateAction, useState } from "react";
+import { useParams } from "next/navigation";
+import { useTranslation } from "@/i18n/client";
+import {
+  Dialog,
+  DialogContent,
+  DialogHeader,
+  DialogTitle,
+  DialogDescription,
+} from "@/components/ui/dialog";
+import { Button } from "@/components/ui/button";
+import { Label } from "@/components/ui/label";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
+import { VarListDownloadBtn } from "./var-list-download-btn";
+import { FormDataReportTempUploadTab } from "./form-data-report-temp-upload-tab";
+import { FormDataReportTempUploadedListTab } from "./form-data-report-temp-uploaded-list-tab";
+import { DataTableColumnJSON } from "./form-data-table-columns";
+import { FileActionsDropdown } from "../ui/file-actions";
+
+interface FormDataReportTempUploadDialogProps {
+  columnsJSON: DataTableColumnJSON[];
+  open: boolean;
+  setOpen: Dispatch<SetStateAction<boolean>>;
+  packageId: number;
+  formCode: string;
+  formId: number;
+  uploaderType: string;
+}
+
+export const FormDataReportTempUploadDialog: FC<
+  FormDataReportTempUploadDialogProps
+> = ({
+  columnsJSON,
+  open,
+  setOpen,
+  packageId,
+  formId,
+  formCode,
+  uploaderType,
+}) => {
+  const params = useParams();
+  const lng = (params?.lng as string) || "ko";
+  const { t } = useTranslation(lng, "engineering");
+
+  const [tabValue, setTabValue] = useState<"upload" | "uploaded">("upload");
+
+  return (
+    <Dialog open={open} onOpenChange={setOpen}>
+      <DialogContent className="w-[600px]" style={{ maxWidth: "none" }}>
+        <DialogHeader className="gap-2">
+          <DialogTitle>{t("templateUpload.dialogTitle")}</DialogTitle>
+          <DialogDescription className="flex justify-around gap-[16px] ">
+            <FileActionsDropdown
+              filePath={"/vendorFormReportSample/sample_template_file.docx"}
+              fileName={"sample_template_file.docx"}
+              variant="ghost"
+              size="icon"
+              description={t("templateUpload.sampleFile")}
+            />
+            <VarListDownloadBtn columnsJSON={columnsJSON} formCode={formCode} />
+          </DialogDescription>
+        </DialogHeader>
+        <Tabs value={tabValue}>
+          <div className="flex justify-between items-center">
+            <TabsList className="w-full">
+              <TabsTrigger
+                value="upload"
+                onClick={() => setTabValue("upload")}
+                className="flex-1"
+              >
+                {t("templateUpload.uploadTab")}
+              </TabsTrigger>
+              <TabsTrigger
+                value="uploaded"
+                onClick={() => setTabValue("uploaded")}
+                className="flex-1"
+              >
+                {t("templateUpload.uploadedListTab")}
+              </TabsTrigger>
+            </TabsList>
+          </div>
+          <TabsContent value="upload">
+            <FormDataReportTempUploadTab
+              packageId={packageId}
+              formId={formId}
+              uploaderType={uploaderType}
+            />
+          </TabsContent>
+          <TabsContent value="uploaded">
+            <FormDataReportTempUploadedListTab
+              packageId={packageId}
+              formId={formId}
+            />
+          </TabsContent>
+        </Tabs>
+      </DialogContent>
+    </Dialog>
+  );
+};
\ No newline at end of file
-- 
cgit v1.2.3

