Compare commits
No commits in common. "14aa4227f4e7a801767e1990b27ae0839453d420" and "134becaa9391f09cf009e66540c9b3d1cf4df3e2" have entirely different histories.
14aa4227f4
...
134becaa93
@ -2057,17 +2057,15 @@ export default function Estimate({}) {
|
||||
</div>
|
||||
</td>
|
||||
<td className="al-r">
|
||||
{item?.openFlg === '1'
|
||||
? 'OPEN'
|
||||
: convertNumberToPriceDecimal(
|
||||
item?.showSaleTotPrice === '0'
|
||||
{convertNumberToPriceDecimal(
|
||||
item?.showSaleTotPrice === '0'
|
||||
? null
|
||||
: item?.amount === ''
|
||||
? null
|
||||
: item?.saleTotPrice === '0'
|
||||
? null
|
||||
: item?.amount === ''
|
||||
? null
|
||||
: item?.saleTotPrice === '0'
|
||||
? null
|
||||
: item?.saleTotPrice?.replaceAll(',', ''),
|
||||
)}
|
||||
: item?.saleTotPrice?.replaceAll(',', ''),
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
|
||||
@ -239,7 +239,6 @@ const Trestle = forwardRef((props, ref) => {
|
||||
if (i === selectedRoof.index) {
|
||||
return {
|
||||
...selectedRoof,
|
||||
hajebichi,
|
||||
eavesMargin,
|
||||
ridgeMargin,
|
||||
kerabaMargin,
|
||||
@ -269,6 +268,8 @@ const Trestle = forwardRef((props, ref) => {
|
||||
}
|
||||
|
||||
const isComplete = async () => {
|
||||
console.log('roofs', roofs)
|
||||
|
||||
const newAddedRoofs = roofs.map((roof, i) => {
|
||||
if (i === selectedRoof?.index) {
|
||||
return {
|
||||
@ -291,8 +292,6 @@ const Trestle = forwardRef((props, ref) => {
|
||||
snowGdPossYn,
|
||||
cvrChecked,
|
||||
snowGdChecked,
|
||||
setupCover: cvrChecked,
|
||||
setupSnowCover: snowGdChecked,
|
||||
},
|
||||
trestleDetail: trestleDetail,
|
||||
}
|
||||
@ -301,6 +300,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
})
|
||||
|
||||
let result = true
|
||||
console.log('newAddedRoofs', newAddedRoofs)
|
||||
newAddedRoofs.forEach((roof) => {
|
||||
if (!roof?.eavesMargin || !roof?.ridgeMargin || !roof?.kerabaMargin) result = false
|
||||
if (!roof.trestle?.trestleMkrCd) result = false
|
||||
@ -367,8 +367,8 @@ const Trestle = forwardRef((props, ref) => {
|
||||
// ...constructionList.find((construction) => newAddedRoofs[index].construction.constTp === construction.constTp),
|
||||
...roof.construction,
|
||||
roofIndex: roof.index,
|
||||
setupCover: cvrChecked,
|
||||
setupSnowCover: snowGdChecked,
|
||||
setupCover: roof.cvrYn === 'Y',
|
||||
setupSnowCover: roof.snowGdYn === 'Y',
|
||||
selectedIndex: roof.index,
|
||||
},
|
||||
trestleDetail: roof.trestleDetail,
|
||||
@ -461,7 +461,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
type="text"
|
||||
className="input-origin block"
|
||||
disabled={selectedRoof.roofPchAuth === 'R'}
|
||||
onChange={(e) => setHajebichi(e.target.value)}
|
||||
onChange={(e) => handleHajebichiAndLength(e, 'hajebichi')}
|
||||
value={hajebichi}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -23,7 +23,6 @@ const trestleReducer = (state, action) => {
|
||||
return {
|
||||
moduleTpCd: action.roof.module?.itemTp ?? '',
|
||||
roofMatlCd: action.roof?.roofMatlCd ?? '',
|
||||
hajebichi: action.roof?.hajebichi ?? 0,
|
||||
raftBaseCd: action.roof?.raftBaseCd ?? null,
|
||||
trestleMkrCd: action.roof.trestle?.trestleMkrCd ?? null,
|
||||
constMthdCd: action.roof.trestle?.constMthdCd ?? null,
|
||||
@ -81,7 +80,7 @@ export function useModuleTrestle(props) {
|
||||
// setRidgeMargin(selectedRoof?.addRoof?.ridgeMargin ?? 0)
|
||||
// setKerabaMargin(selectedRoof?.addRoof?.kerabaMargin ?? 0)
|
||||
|
||||
setHajebichi(selectedRoof?.hajebichi ?? 0)
|
||||
setHajebichi(selectedRoof?.trestle?.hajebichi ?? 0)
|
||||
setEavesMargin(selectedRoof?.eavesMargin ?? 0)
|
||||
setRidgeMargin(selectedRoof?.ridgeMargin ?? 0)
|
||||
setKerabaMargin(selectedRoof?.kerabaMargin ?? 0)
|
||||
|
||||
@ -717,9 +717,6 @@ export const useTrestle = () => {
|
||||
|
||||
if (result.resultCode === 'E') {
|
||||
swalFire({ text: result.resultMsg, icon: 'error' })
|
||||
clear()
|
||||
setViewCircuitNumberTexts(true)
|
||||
setIsGlobalLoading(false)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@ import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupSta
|
||||
import { outerLinePointsState } from '@/store/outerLineAtom'
|
||||
import { QcastContext } from '@/app/QcastProvider'
|
||||
import { usePlan } from '@/hooks/usePlan'
|
||||
import { roofsState } from '@/store/roofAtom'
|
||||
|
||||
export function useRoofAllocationSetting(id) {
|
||||
const canvas = useRecoilValue(canvasState)
|
||||
@ -55,7 +54,7 @@ export function useRoofAllocationSetting(id) {
|
||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||
const { setSurfaceShapePattern } = useRoofFn()
|
||||
const { saveCanvas } = usePlan()
|
||||
const [roofsStore, setRoofsStore] = useRecoilState(roofsState)
|
||||
|
||||
const [moduleSelectionData, setModuleSelectionData] = useRecoilState(moduleSelectionDataState)
|
||||
const resetPoints = useResetRecoilState(outerLinePointsState)
|
||||
|
||||
@ -266,8 +265,6 @@ export function useRoofAllocationSetting(id) {
|
||||
newRoofList[0].selected = true
|
||||
}
|
||||
setCurrentRoofList(newRoofList)
|
||||
setRoofsStore(newRoofList)
|
||||
setModuleSelectionData({ ...moduleSelectionData, roofConstructions: newRoofList })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -308,14 +305,12 @@ export function useRoofAllocationSetting(id) {
|
||||
|
||||
setRoofList(newRoofList)
|
||||
setRoofMaterials(newRoofList)
|
||||
setRoofsStore(newRoofList)
|
||||
const selectedRoofMaterial = newRoofList.find((roof) => roof.selected)
|
||||
setSurfaceShapePattern(currentObject, roofDisplay.column, false, selectedRoofMaterial, true)
|
||||
drawDirectionArrow(currentObject)
|
||||
modifyModuleSelectionData()
|
||||
closeAll()
|
||||
basicSettingSave()
|
||||
setModuleSelectionData({ ...moduleSelectionData, roofConstructions: newRoofList })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -424,7 +419,7 @@ export function useRoofAllocationSetting(id) {
|
||||
})
|
||||
|
||||
setRoofMaterials(newRoofList)
|
||||
setRoofsStore(newRoofList)
|
||||
|
||||
/** 외곽선 삭제 */
|
||||
const removeTargets = canvas.getObjects().filter((obj) => obj.name === 'outerLinePoint' || obj.name === 'outerLine')
|
||||
removeTargets.forEach((obj) => {
|
||||
|
||||
@ -77,10 +77,10 @@ export function useEvent() {
|
||||
setCanvasZoom(Number((zoom * 100).toFixed(0)))
|
||||
|
||||
// 마우스 위치 기준으로 확대/축소
|
||||
canvas.zoomToPoint(new fabric.Point(opt.e.offsetX, opt.e.offsetY), zoom)
|
||||
canvas.calcOffset()
|
||||
canvas.setViewportTransform(canvas.viewportTransform)
|
||||
canvas.zoomToPoint({ x: opt.e.offsetX, y: opt.e.offsetY }, zoom)
|
||||
|
||||
canvas.requestRenderAll()
|
||||
canvas.calcOffset()
|
||||
|
||||
// 이벤트의 기본 동작 방지 (스크롤 방지)
|
||||
opt.e.preventDefault()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user