Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into dev
This commit is contained in:
commit
28e39a9366
@ -23,6 +23,7 @@ import { useSearchParams } from 'next/navigation'
|
|||||||
import { usePlan } from '@/hooks/usePlan'
|
import { usePlan } from '@/hooks/usePlan'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
|
||||||
export default function Estimate({}) {
|
export default function Estimate({}) {
|
||||||
const [uniqueData, setUniqueData] = useState([])
|
const [uniqueData, setUniqueData] = useState([])
|
||||||
@ -81,6 +82,7 @@ export default function Estimate({}) {
|
|||||||
const [specialNoteList, setSpecialNoteList] = useState([])
|
const [specialNoteList, setSpecialNoteList] = useState([])
|
||||||
const [popShowSpecialNoteList, setPopShowSpecialNoteList] = useState([])
|
const [popShowSpecialNoteList, setPopShowSpecialNoteList] = useState([])
|
||||||
|
|
||||||
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
const { get, post, promisePost } = useAxios(globalLocaleState)
|
const { get, post, promisePost } = useAxios(globalLocaleState)
|
||||||
|
|
||||||
@ -490,6 +492,7 @@ export default function Estimate({}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setIsGlobalLoading(true)
|
||||||
await promisePost({ url: '/api/estimate/price/item-price-list', data: param }).then((res) => {
|
await promisePost({ url: '/api/estimate/price/item-price-list', data: param }).then((res) => {
|
||||||
let updateList = []
|
let updateList = []
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -537,6 +540,7 @@ export default function Estimate({}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setIsGlobalLoading(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,7 @@ import { menuTypeState } from '@/store/menuAtom'
|
|||||||
import { usePopup } from '../usePopup'
|
import { usePopup } from '../usePopup'
|
||||||
import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider'
|
import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider'
|
||||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||||
|
import { useCommonCode } from '@/hooks/common/useCommonCode'
|
||||||
|
|
||||||
const defaultDotLineGridSetting = {
|
const defaultDotLineGridSetting = {
|
||||||
INTERVAL: {
|
INTERVAL: {
|
||||||
@ -119,6 +120,10 @@ export function useCanvasSetting() {
|
|||||||
const resetModuleSelectionData = useResetRecoilState(moduleSelectionDataState) //다음으로 넘어가는 최종 데이터
|
const resetModuleSelectionData = useResetRecoilState(moduleSelectionDataState) //다음으로 넘어가는 최종 데이터
|
||||||
const resetSelectedModules = useResetRecoilState(selectedModuleState) //선택된 모듈
|
const resetSelectedModules = useResetRecoilState(selectedModuleState) //선택된 모듈
|
||||||
|
|
||||||
|
const [raftCodes, setRaftCodes] = useState([]) // 서까래 정보
|
||||||
|
const { findCommonCode } = useCommonCode()
|
||||||
|
const [currentRoof, setCurrentRoof] = useState(null) // 현재 선택된 지붕재 정보
|
||||||
|
|
||||||
const SelectOptions = [
|
const SelectOptions = [
|
||||||
{ id: 1, name: getMessage('modal.canvas.setting.grid.dot.line.setting.line.origin'), value: 1 },
|
{ id: 1, name: getMessage('modal.canvas.setting.grid.dot.line.setting.line.origin'), value: 1 },
|
||||||
{ id: 2, name: '1/2', value: 1 / 2 },
|
{ id: 2, name: '1/2', value: 1 / 2 },
|
||||||
@ -133,10 +138,11 @@ export function useCanvasSetting() {
|
|||||||
const { closeAll } = usePopup()
|
const { closeAll } = usePopup()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('correntObjectNo', correntObjectNo)
|
const tempFetchRoofMaterials = !fetchRoofMaterials
|
||||||
|
|
||||||
setFetchRoofMaterials(!fetchRoofMaterials)
|
//최초 1회만 실행하도록 처리
|
||||||
if (fetchRoofMaterials) {
|
setFetchRoofMaterials(tempFetchRoofMaterials)
|
||||||
|
if (tempFetchRoofMaterials) {
|
||||||
addRoofMaterials()
|
addRoofMaterials()
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
@ -197,6 +203,16 @@ export function useCanvasSetting() {
|
|||||||
}
|
}
|
||||||
}, [roofMaterials, correntObjectNo])
|
}, [roofMaterials, correntObjectNo])
|
||||||
|
|
||||||
|
//배치면 초기설정 화면이 열리지 않아도 데이터 set 하기 위해서 추가
|
||||||
|
useEffect(() => {
|
||||||
|
if (addedRoofs.length > 0) {
|
||||||
|
const raftCodeList = findCommonCode('203800')
|
||||||
|
setRaftCodes(raftCodeList)
|
||||||
|
|
||||||
|
setCurrentRoof({ ...addedRoofs[0] })
|
||||||
|
}
|
||||||
|
}, [addedRoofs])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!canvas) {
|
if (!canvas) {
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user