diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index 141a2d3f..6588f54c 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -332,7 +332,7 @@ export default function StuffDetail() { //createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기 setShowButton('none') } - + // console.log('상세::', res.data) if (isObjectNotEmpty(res.data)) { let surfaceTypeValue if (res.data.surfaceType === 'Ⅲ・Ⅳ') { diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 9008467f..ad6c3932 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -9,7 +9,7 @@ import { useMessage } from '@/hooks/useMessage' import { useRouter } from 'next/navigation' import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider' import { QcastContext } from '@/app/QcastProvider' - +import { useSwal } from '@/hooks/useSwal' // Constants const ESTIMATE_API_ENDPOINT = '/api/estimate' // API 엔드포인트 정의 @@ -19,6 +19,7 @@ const updateItemInList = (itemList, dispOrder, updates) => { } export const useEstimateController = (planNo) => { + const { swalFire } = useSwal() const [fileList, setFileList] = useState([]) const { setIsGlobalLoading } = useContext(QcastContext) @@ -353,7 +354,6 @@ export const useEstimateController = (planNo) => { estimateData.pkgAsp = estimateData.pkgAsp.replaceAll(',', '') } - console.log('최종저장::', estimateData) //2. 상세데이터 저장 // return try { @@ -361,8 +361,9 @@ export const useEstimateController = (planNo) => { setIsGlobalLoading(true) if (res.status === 201) { estimateData.newFileList = [] - alert(getMessage('estimate.detail.save.alertMsg')) - //어디로 보낼지 + //알럿창 변경 + swalFire({ text: getMessage('estimate.detail.save.alertMsg'), type: 'alert' }) + // alert(getMessage('estimate.detail.save.alertMsg')) fetchSetting(objectRecoil.floorPlanObjectNo, estimateData.planNo) } }) @@ -400,8 +401,14 @@ export const useEstimateController = (planNo) => { if (res.status === 201) { if (isObjectNotEmpty(res.data)) { let newObjectNo = res.data.objectNo - alert(getMessage('estimate.detail.estimateCopyPopup.copy.alertMessage')) - router.push(`/management/stuff/detail?objectNo=${newObjectNo.toString()}`, { scroll: false }) + console.log('newObjectNo::', newObjectNo) + swalFire({ + text: getMessage('estimate.detail.estimateCopyPopup.copy.alertMessage'), + type: 'alert', + confirmFn: () => { + router.push(`/management/stuff/detail?objectNo=${newObjectNo.toString()}`, { scroll: false }) + }, + }) } } })