diff options
Diffstat (limited to 'components/form-data/form-data-table.tsx')
| -rw-r--r-- | components/form-data/form-data-table.tsx | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/components/form-data/form-data-table.tsx b/components/form-data/form-data-table.tsx index 25a005d1..b696f45b 100644 --- a/components/form-data/form-data-table.tsx +++ b/components/form-data/form-data-table.tsx @@ -11,19 +11,22 @@ import { DataTableColumnJSON, ColumnType, } from "./form-data-table-columns"; - import type { DataTableAdvancedFilterField } from "@/types/table"; import { Button } from "../ui/button"; import { Download, Loader, Save, Upload } from "lucide-react"; import { toast } from "sonner"; import { syncMissingTags, updateFormDataInDB } from "@/lib/forms/services"; import { UpdateTagSheet } from "./update-form-sheet"; - import ExcelJS from "exceljs"; import { saveAs } from "file-saver"; import { FormDataReportTempUploadDialog } from "./form-data-report-temp-upload-dialog"; import { FormDataReportDialog } from "./form-data-report-dialog"; import { FormDataReportBatchDialog } from "./form-data-report-batch-dialog"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; interface GenericData { [key: string]: any; @@ -44,7 +47,6 @@ export default function DynamicTable({ formCode, formId, }: DynamicTableProps) { - console.log({ columnsJSON }); const params = useParams(); const lng = (params?.lng as string) || "ko"; const { t } = useTranslation(lng, "translation"); @@ -526,20 +528,29 @@ export default function DynamicTable({ {/* 버튼 그룹 */} <div className="flex items-center gap-2"> {/* 태그 불러오기 버튼 */} - <Button - variant="default" - size="sm" - onClick={() => setBatchDownDialog(true)} - > - Batch - </Button> - <Button - variant="default" - size="sm" - onClick={() => setTempUpDialog(true)} - > - Template Upload - </Button> + <Popover> + <PopoverTrigger asChild> + <Button variant="default" size="sm"> + Report + </Button> + </PopoverTrigger> + <PopoverContent className="flex flex-row gap-2"> + <Button + variant="outline" + size="sm" + onClick={() => setTempUpDialog(true)} + > + Template Upload + </Button> + <Button + variant="outline" + size="sm" + onClick={() => setBatchDownDialog(true)} + > + Report Download + </Button> + </PopoverContent> + </Popover> <Button variant="default" size="sm" @@ -611,6 +622,7 @@ export default function DynamicTable({ /> {tempUpDialog && ( <FormDataReportTempUploadDialog + columnsJSON={columnsJSON} open={tempUpDialog} setOpen={setTempUpDialog} packageId={contractItemId} @@ -645,5 +657,3 @@ export default function DynamicTable({ </> ); } - - |
