Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into dev
This commit is contained in:
commit
a38e5245e5
@ -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} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
9
src/app/floor-plan/estimate/[mid]/page.jsx
Normal file
9
src/app/floor-plan/estimate/[mid]/page.jsx
Normal file
@ -0,0 +1,9 @@
|
||||
import Estimate from '@/components/estimate/Estimate'
|
||||
|
||||
export default function EstimatePage({}) {
|
||||
return (
|
||||
<>
|
||||
<Estimate />
|
||||
</>
|
||||
)
|
||||
}
|
||||
@ -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)
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user