dev #742
@ -359,6 +359,10 @@ export function useMasterController() {
|
||||
})
|
||||
}
|
||||
|
||||
const quotationErrSave = async (params) => {
|
||||
return await post({ url: '/api/v1/master/quotationErrSave', data: params })
|
||||
}
|
||||
|
||||
return {
|
||||
getRoofMaterialList,
|
||||
getModuleTypeItemList,
|
||||
@ -374,5 +378,6 @@ export function useMasterController() {
|
||||
updateObjectDate,
|
||||
getQuotationItem,
|
||||
getPcsConnOptionItemList,
|
||||
quotationErrSave,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { canvasState, currentAngleTypeSelector } from '@/store/canvasAtom'
|
||||
import { canvasState, currentAngleTypeSelector, currentCanvasPlanState } from '@/store/canvasAtom'
|
||||
import { POLYGON_TYPE, TRESTLE_MATERIAL } from '@/common/common'
|
||||
import { moduleSelectionDataState } from '@/store/selectedModuleOptions'
|
||||
import { getDegreeByChon } from '@/util/canvas-util'
|
||||
@ -11,6 +11,7 @@ import { useContext } from 'react'
|
||||
import { QcastContext } from '@/app/QcastProvider'
|
||||
import { useCircuitTrestle } from '@/hooks/useCirCuitTrestle'
|
||||
import { useMessage } from '@/hooks/useMessage'
|
||||
import { loginUserStore } from '@/store/commonAtom'
|
||||
|
||||
// 모듈간 같은 행, 열의 마진이 10 이하인 경우는 같은 행, 열로 간주
|
||||
const MODULE_MARGIN = 10
|
||||
@ -18,7 +19,9 @@ const MODULE_MARGIN = 10
|
||||
export const useTrestle = () => {
|
||||
const canvas = useRecoilValue(canvasState)
|
||||
const moduleSelectionData = useRecoilValue(moduleSelectionDataState) //다음으로 넘어가는 최종 데이터
|
||||
const { getQuotationItem } = useMasterController()
|
||||
const { getQuotationItem, quotationErrSave } = useMasterController()
|
||||
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
||||
const loginUserState = useRecoilValue(loginUserStore)
|
||||
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
||||
const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet
|
||||
const isTrestleDisplay = useRecoilValue(trestleDisplaySelector)
|
||||
@ -757,6 +760,12 @@ export const useTrestle = () => {
|
||||
text: result.resultMsg || getMessage('common.message.noData'),
|
||||
icon: 'error'
|
||||
})
|
||||
quotationErrSave({
|
||||
objectNo: currentCanvasPlan.objectNo,
|
||||
planNo: currentCanvasPlan.planNo,
|
||||
rejectRsn: result.resultMsg,
|
||||
regId: loginUserState.userId,
|
||||
})
|
||||
clear()
|
||||
setViewCircuitNumberTexts(true)
|
||||
setIsGlobalLoading(false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user