From 5e5678f0053739899e6e5aedef62cf27f03f6e44 Mon Sep 17 00:00:00 2001 From: ljpark Date: Fri, 3 Apr 2026 18:07:09 +0900 Subject: [PATCH] =?UTF-8?q?wr:=20=ED=91=9C=EC=A4=80=EA=B3=B5=EC=82=AC?= =?UTF-8?q?=EB=B9=84=20=EC=82=B0=EC=A0=95=20toast=20>=20useConfirm?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/form/coMat/conCostForm/conCostForm.tsx | 42 ++++--------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx index 73b4c036f..6dc075240 100644 --- a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx +++ b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx @@ -22,11 +22,11 @@ import { FormUi, UiTable, } from "@common/business_components/ui"; +import { useConfirm } from "@frontend-opensource/use-react-hooks"; import PopoverUi from "@common/business_components/ui/popover_ui"; import { Button, Checkbox, Input, Label } from "@common/components/ui"; import { useCallback, useEffect, useRef, useState } from "react"; import { type UseFormReturn } from "react-hook-form"; -import toast from "react-hot-toast"; /** * ConCostForm * 호출: (with-layout)/matMng/coMat/coMatRvw 에서 호출 @@ -57,6 +57,7 @@ export default function ConCostForm({ code, } = useWrStore((state) => state); const alert = useAlertStore((state) => state.setMessage); + const { confirm } = useConfirm(); const ref = useRef(false); @@ -233,43 +234,16 @@ export default function ConCostForm({ if(pk !==null){ if (checkFinish) { - toast((t) => ( - - 검토완료 변경시 공사비는 변경할수 없습니다. -
- 진행하시겠습니까? -
- - -
-
- )); + if (await confirm("검토완료 변경시 공사비는 변경할수 없습니다.\n진행하시겠습니까?")) { + const message = await coMatRvwUpdate( pk, form.getValues("dmdInfoId"), data ); + alert(message); + } } else { - const message = await coMatRvwUpdate( - pk, - form.getValues("dmdInfoId"), - data - ); + const message = await coMatRvwUpdate( pk, form.getValues("dmdInfoId"), data ); alert(message); } }else{ - alert('후보지를 먼저 선택해주세요') + alert('후보지를 먼저 선택해주세요'); } } } else if (type === "hist") {