This commit is contained in:
yoosangwook 2025-01-07 15:56:22 +09:00
commit a38e5245e5
4 changed files with 23 additions and 24 deletions

View File

@ -1,12 +0,0 @@
import Estimate from '@/components/estimate/Estimate'
export default function EstimatePage({ params }) {
//floor-plan/estimate/mid/pid
//mid :5
//pid :
return (
<>
<Estimate params={params} />
</>
)
}

View File

@ -0,0 +1,9 @@
import Estimate from '@/components/estimate/Estimate'
export default function EstimatePage({}) {
return (
<>
<Estimate />
</>
)
}

View File

@ -21,7 +21,7 @@ import { v4 as uuidv4 } from 'uuid'
import { correntObjectNoState } from '@/store/settingAtom'
import { useSearchParams } from 'next/navigation'
export default function Estimate({ params }) {
export default function Estimate({}) {
const [uniqueData, setUniqueData] = useState([])
const [handlePricingFlag, setHandlePricingFlag] = useState(false)
const [specialNoteFirstFlg, setSpecialNoteFirstFlg] = useState(false)
@ -58,11 +58,16 @@ export default function Estimate({ params }) {
startDate,
setStartDate,
}
/**
* objectNo 셋팅
* url로 넘어온 objectNo을 리코일에 세팅
*/
const setCurrentObjectNo = useSetRecoilState(correntObjectNoState)
const searchParams = useSearchParams()
const objectRecoil = useRecoilValue(floorPlanObjectState)
const currentPid = searchParams.get('pid')
//
const { estimateContextState, setEstimateContextState, addItem, handleEstimateFileDownload } = useEstimateController(params.pid)
const { estimateContextState, setEstimateContextState, addItem, handleEstimateFileDownload } = useEstimateController(currentPid)
// List
const [specialNoteList, setSpecialNoteList] = useState([])
@ -75,12 +80,6 @@ export default function Estimate({ params }) {
const { setMenuNumber } = useCanvasMenu()
/**
* objectNo 셋팅
* url로 넘어온 objectNo을 리코일에 세팅
*/
const setCurrentObjectNo = useSetRecoilState(correntObjectNoState)
const searchParams = useSearchParams()
const currentObjectNo = searchParams.get('objectNo')
setCurrentObjectNo(currentObjectNo)
@ -93,7 +92,8 @@ export default function Estimate({ params }) {
useEffect(() => {
setMenuNumber(5)
setObjectNo(objectRecoil.floorPlanObjectNo)
setPlanNo(params.pid)
setPlanNo(currentPid)
//
const code1 = findCommonCode(200800)

View File

@ -282,7 +282,9 @@ export default function StuffDetail() {
onClick={() => {
//mid:5(), /pid:
setFloorPlanObjectNo({ floorPlanObjectNo: params.data.objectNo })
router.push(`/floor-plan/estimate/5/${params.data.planNo}`)
// router.push(`/floor-plan/estimate/5/${params.data.planNo}`)
// /floor-plan/estimate/5?pid=&objectNo=
router.push(`/floor-plan/estimate/5?pid=${params.data.planNo}&objectNo=${objectNo}`)
}}
>
<span className="file"></span>