summaryrefslogtreecommitdiff
path: root/lib/rfq-last/vendor-response/editor/vendor-response-editor.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rfq-last/vendor-response/editor/vendor-response-editor.tsx')
-rw-r--r--lib/rfq-last/vendor-response/editor/vendor-response-editor.tsx44
1 files changed, 43 insertions, 1 deletions
diff --git a/lib/rfq-last/vendor-response/editor/vendor-response-editor.tsx b/lib/rfq-last/vendor-response/editor/vendor-response-editor.tsx
index 8c70b8dd..18fc5d50 100644
--- a/lib/rfq-last/vendor-response/editor/vendor-response-editor.tsx
+++ b/lib/rfq-last/vendor-response/editor/vendor-response-editor.tsx
@@ -9,6 +9,14 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/com
import { Button } from "@/components/ui/button"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Badge } from "@/components/ui/badge"
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
import { toast } from "sonner"
import RfqInfoHeader from "./rfq-info-header"
import CommercialTermsForm from "./commercial-terms-form"
@@ -130,6 +138,7 @@ export default function VendorResponseEditor({
const [deletedAttachments, setDeletedAttachments] = useState<any[]>([])
const [uploadProgress, setUploadProgress] = useState(0) // 추가
const [currencyDecimalPlaces, setCurrencyDecimalPlaces] = useState<number>(2) // 통화별 소수점 자리수
+ const [confirmOpen, setConfirmOpen] = useState(false)
console.log(existingResponse,"existingResponse")
@@ -682,7 +691,7 @@ export default function VendorResponseEditor({
<Button
type="button"
variant="default"
- onClick={() => handleFormSubmit(true)} // 직접 핸들러 호출
+ onClick={() => setConfirmOpen(true)} // 제출 전 확인 다이얼로그
disabled={loading || !allContractsSigned || isSubmitted || activeTab !== 'attachments'}
>
{!allContractsSigned ? (
@@ -714,6 +723,39 @@ export default function VendorResponseEditor({
</Button>
</div>
+ {/* 최종 제출 확인 다이얼로그 */}
+ <Dialog open={confirmOpen} onOpenChange={setConfirmOpen}>
+ <DialogContent>
+ <DialogHeader>
+ <DialogTitle>최종 제출</DialogTitle>
+ <DialogDescription>
+ 최종 제출하시겠습니까?
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter className="flex gap-2 sm:justify-end">
+ <Button
+ type="button"
+ variant="outline"
+ onClick={() => setConfirmOpen(false)}
+ disabled={loading}
+ >
+ 취소
+ </Button>
+ <Button
+ type="button"
+ variant="default"
+ onClick={() => {
+ setConfirmOpen(false)
+ handleFormSubmit(true)
+ }}
+ disabled={loading || !allContractsSigned || isSubmitted || activeTab !== 'attachments'}
+ >
+ 제출하기
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
+
</div>
</form>
</FormProvider>