From 20800b214145ee6056f94ca18fa1054f145eb977 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Wed, 28 May 2025 00:32:31 +0000
Subject: (대표님) lib 파트 커밋
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/pq/pq-review-table-new/send-results-dialog.tsx | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 lib/pq/pq-review-table-new/send-results-dialog.tsx

(limited to 'lib/pq/pq-review-table-new/send-results-dialog.tsx')

diff --git a/lib/pq/pq-review-table-new/send-results-dialog.tsx b/lib/pq/pq-review-table-new/send-results-dialog.tsx
new file mode 100644
index 00000000..0a423f7f
--- /dev/null
+++ b/lib/pq/pq-review-table-new/send-results-dialog.tsx
@@ -0,0 +1,69 @@
+"use client"
+
+import * as React from "react"
+
+import { Button } from "@/components/ui/button"
+import {
+  Dialog,
+  DialogContent,
+  DialogDescription,
+  DialogFooter,
+  DialogHeader,
+  DialogTitle,
+} from "@/components/ui/dialog"
+
+interface SendResultsDialogProps {
+  isOpen: boolean
+  onClose: () => void
+  onConfirm: () => Promise<void>
+  selectedCount: number
+}
+
+export function SendResultsDialog({
+  isOpen,
+  onClose,
+  onConfirm,
+  selectedCount,
+}: SendResultsDialogProps) {
+  const [isPending, setIsPending] = React.useState(false)
+
+  async function handleConfirm() {
+    setIsPending(true)
+    try {
+      await onConfirm()
+    } finally {
+      setIsPending(false)
+    }
+  }
+
+  return (
+    <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
+      <DialogContent>
+        <DialogHeader>
+          <DialogTitle>실사 결과 발송</DialogTitle>
+          <DialogDescription>
+            선택한 {selectedCount}개 협력업체의 실사 결과를 발송하시겠습니까?
+            완료된 실사만 결과를 발송할 수 있습니다.
+          </DialogDescription>
+        </DialogHeader>
+        <DialogFooter>
+          <Button
+            type="button"
+            variant="outline"
+            onClick={onClose}
+            disabled={isPending}
+          >
+            취소
+          </Button>
+          <Button 
+            type="button" 
+            onClick={handleConfirm} 
+            disabled={isPending}
+          >
+            {isPending ? "처리 중..." : "결과 발송"}
+          </Button>
+        </DialogFooter>
+      </DialogContent>
+    </Dialog>
+  )
+}
\ No newline at end of file
-- 
cgit v1.2.3

