diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/form-data/form-data-table.tsx | 24 | ||||
| -rw-r--r-- | components/form-data/guide-dialog.tsx | 116 |
2 files changed, 137 insertions, 3 deletions
diff --git a/components/form-data/form-data-table.tsx b/components/form-data/form-data-table.tsx index 58cd1933..70e93a68 100644 --- a/components/form-data/form-data-table.tsx +++ b/components/form-data/form-data-table.tsx @@ -1,7 +1,7 @@ "use client"; import * as React from "react"; -import { useParams, useRouter, usePathname } from "next/navigation"; +import { useParams, useRouter } from "next/navigation"; import { useTranslation } from "@/i18n/client"; import { ClientDataTable } from "../client-data-table/data-table"; @@ -28,10 +28,10 @@ import { Trash2, Eye, FileText, - Target, CheckCircle2, AlertCircle, - Clock + Clock, + BookOpen } from "lucide-react"; import { toast } from "sonner"; import { @@ -52,6 +52,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { AddFormTagDialog } from "./add-formTag-dialog"; +import { GuideDialog } from "./guide-dialog"; import { importExcelData } from "./import-excel-form"; import { exportExcelData } from "./export-excel-form"; import { SEDPConfirmationDialog, SEDPStatusDialog } from "./sedp-components"; @@ -280,6 +281,7 @@ export default function DynamicTable({ const [batchDownDialog, setBatchDownDialog] = React.useState(false); const [tempCount, setTempCount] = React.useState(0); const [addTagDialogOpen, setAddTagDialogOpen] = React.useState(false); + const [guideDialogOpen, setGuideDialogOpen] = React.useState(false); // TAG_NO가 있는 첫 번째 행의 shi 값 확인 const isAddTagDisabled = React.useMemo(() => { @@ -1010,6 +1012,16 @@ export default function DynamicTable({ </DropdownMenuContent> </DropdownMenu> + {/* Guide 버튼 */} + <Button + variant="outline" + size="sm" + onClick={() => setGuideDialogOpen(true)} + > + <BookOpen className="mr-2 size-4" /> + Guide + </Button> + {/* 리포트 관리 드롭다운 */} <DropdownMenu> <DropdownMenuTrigger asChild> @@ -1273,6 +1285,12 @@ export default function DynamicTable({ formId={formId} /> )} + + {/* Guide Dialog */} + <GuideDialog + open={guideDialogOpen} + onOpenChange={setGuideDialogOpen} + /> </> ); }
\ No newline at end of file diff --git a/components/form-data/guide-dialog.tsx b/components/form-data/guide-dialog.tsx new file mode 100644 index 00000000..2b00093e --- /dev/null +++ b/components/form-data/guide-dialog.tsx @@ -0,0 +1,116 @@ +"use client"; + +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; + +interface GuideDialogProps { + open: boolean; + onOpenChange: (open: boolean) => void; +} + +export function GuideDialog({ open, onOpenChange }: GuideDialogProps) { + return ( + <Dialog open={open} onOpenChange={onOpenChange}> + <DialogContent className="max-w-3xl max-h-[80vh]"> + <DialogHeader> + <DialogTitle>Guide</DialogTitle> + </DialogHeader> + <div className="overflow-auto max-h-[60vh] pr-4"> + <div className="space-y-4 text-sm"> + <section> + <h3 className="font-semibold text-base mb-2">2. Fire Alarm/Detection cabinet ; EA51-001</h3> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">3. Fire Repeater Panel ; EA51-101, 102, 103</h3> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">4. Timer ; EA51-002</h3> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">2. Smoke detector 구분</h3> + <ul className="list-none space-y-1 ml-6"> + <li>a. S11 ; SMOKE DETECTOR(NWT), EA51-XXX-S11-자동채번</li> + <li>b. S12 ; SMOKE DETECTOR(WT), EA51-XXX-S12-자동채번</li> + <li>c. S13 ; SMOKE DETECTOR(IS), EA51-XXX-S13-자동채번</li> + </ul> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">2.1 Smoke and Head detecto구분</h3> + <ul className="list-none space-y-1 ml-6"> + <li>a. SMOKE AND HEAT DETECTOR NWT" = "SH11"</li> + <li>b. SMOKE?AND HEAT?DETECTOR WT" = "SH12"</li> + <li>c. SMOKE?AND HEAT?DETECTOR WT IS" = "SH13"</li> + </ul> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">3. Manual Call Point</h3> + <ul className="list-none space-y-1 ml-6"> + <li>a. M11 ; Manual Call Point(NWT), EA51-XXX-M11-자동채번</li> + <li>b. M12 ; Manual Call Point R(WT), EA51-XXX-M12-자동채번</li> + <li>c. M13 ; Manual Call Point(IS), EA51-XXX-M13-자동채번</li> + </ul> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">4. Heat Detector</h3> + <ul className="list-none space-y-1 ml-6"> + <li>a. H11 ; Heat detector(NWT), EA51-XXX-H11-자동채번</li> + <li>b. H12A ; Heat detector(WT, 54 Deg), EA51-XXX-H12A-자동채번</li> + <li>c. H12B; Heat detector(WT, 84 Deg), EA51-XXX-H12B-자동채번</li> + <li>d. H13 ; Heat detector(IS), EA51-XXX-H13-자동채번</li> + </ul> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">5. Flame Detector</h3> + <ul className="list-none space-y-1 ml-6"> + <li>a. F11 ; Flame detector(NWT), EA51-XXX-F11-자동채번</li> + <li>b. F12 ; Flame detector(WT), EA51-XXX-H12-자동채번</li> + <li>c. F13 ; Flame detector(EX), EA51-XXX-H13-자동채번</li> + </ul> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">5.1 Visual Detector</h3> + <ul className="list-none space-y-1 ml-6"> + <li>a. VISUAL FLAME IR DETECTOR NWT" = "VF11"</li> + <li>b. VISUAL FLAME IR DETECTOR WT" = "VF12"</li> + <li>c. VISUAL FLAME IR DETECTOR WT EX" = "VF13"</li> + </ul> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">6. Magnetic Door Holder ; EA51-XXX-MDH-자동채번</h3> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">7. SCI ; Short Circuit Isolator</h3> + <p className="ml-6">EA51-XXX-SCI-자동채번</p> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">8. LM ; Limit Switch</h3> + <p className="ml-6">EA51-XXX-LM-자동채번</p> + </section> + + <section> + <h3 className="font-semibold text-base mb-2">9. ADDR ; Address Unit</h3> + <p className="ml-6">EA51-XXX-ADD-자동채번</p> + </section> + </div> + </div> + </DialogContent> + </Dialog> + ); +} + |
