isComplete 컬럼 추가

This commit is contained in:
hyojun.choi 2025-02-07 16:07:42 +09:00
parent 831bac6f1b
commit 5e50f16f88
2 changed files with 9 additions and 1 deletions

View File

@ -181,6 +181,7 @@ export const SAVE_KEY = [
'quotationParam',
'pcses',
'roofMaterial',
'isComplete',
]
export const OBJECT_PROTOTYPE = [fabric.Line.prototype, fabric.Polygon.prototype, fabric.Triangle.prototype]

View File

@ -586,7 +586,7 @@ export const useTrestle = () => {
const quotationParam = getTrestleParams(surface)
surface.set({ quotationParam })
surface.set({ quotationParam, isComplete: true })
})
return setEstimateData()
@ -2228,6 +2228,13 @@ export const useTrestle = () => {
}
const clear = () => {
canvas
.getObjects()
.filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
.forEach((obj) => {
obj.isComplete = false
})
canvas.getObjects().forEach((obj) => {
if (obj.name === 'eaveBar' || obj.name === 'rack' || obj.name === 'halfEaveBar' || obj.name === 'smartRack' || obj.name === 'bracket') {
canvas.remove(obj)