외벽선 속성 설정 완료 문구 추가
This commit is contained in:
parent
57b3a9e38b
commit
bc0655c8e2
@ -18,7 +18,7 @@ export default function FloorPlan({ children }) {
|
|||||||
|
|
||||||
const { closeAll } = usePopup()
|
const { closeAll } = usePopup()
|
||||||
const { selectedMenu, setSelectedMenu } = useCanvasMenu()
|
const { selectedMenu, setSelectedMenu } = useCanvasMenu()
|
||||||
const { fetchSettings } = useCanvasSetting(false)
|
const { fetchSettings } = useCanvasSetting()
|
||||||
const resetCurrentMenu = useResetRecoilState(currentMenuState)
|
const resetCurrentMenu = useResetRecoilState(currentMenuState)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
@ -11,6 +11,8 @@ import PropertiesSetting from '@/components/floor-plan/modal/outerlinesetting/Pr
|
|||||||
import RoofShapeSetting from '@/components/floor-plan/modal/roofShape/RoofShapeSetting'
|
import RoofShapeSetting from '@/components/floor-plan/modal/roofShape/RoofShapeSetting'
|
||||||
import RoofAllocationSetting from '@/components/floor-plan/modal/roofAllocation/RoofAllocationSetting'
|
import RoofAllocationSetting from '@/components/floor-plan/modal/roofAllocation/RoofAllocationSetting'
|
||||||
import { settingModalFirstOptionsState } from '@/store/settingAtom'
|
import { settingModalFirstOptionsState } from '@/store/settingAtom'
|
||||||
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
|
|
||||||
// 외벽선 속성 설정
|
// 외벽선 속성 설정
|
||||||
export function usePropertiesSetting(id) {
|
export function usePropertiesSetting(id) {
|
||||||
@ -25,6 +27,8 @@ export function usePropertiesSetting(id) {
|
|||||||
const { addPolygonByLines } = usePolygon()
|
const { addPolygonByLines } = usePolygon()
|
||||||
const { removeLine, hideLine } = useLine()
|
const { removeLine, hideLine } = useLine()
|
||||||
const { addPopup, closePopup } = usePopup()
|
const { addPopup, closePopup } = usePopup()
|
||||||
|
const { swalFire } = useSwal()
|
||||||
|
const { getMessage } = useMessage()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
|
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
|
||||||
@ -125,8 +129,10 @@ export function usePropertiesSetting(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleFix = () => {
|
const handleFix = () => {
|
||||||
const isClose = confirm('외벽선 속성 설정을 완료하시겠습니까?')
|
swalFire({
|
||||||
if (isClose) {
|
text: getMessage('outerLine.property.fix'),
|
||||||
|
type: 'confirm',
|
||||||
|
confirmFn: async () => {
|
||||||
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
|
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
|
||||||
|
|
||||||
const notSetAttributes = lines.filter((line) => !line.attributes?.type)
|
const notSetAttributes = lines.filter((line) => !line.attributes?.type)
|
||||||
@ -164,8 +170,11 @@ export function usePropertiesSetting(id) {
|
|||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
roof.drawHelpLine(settingModalFirstOptions)
|
roof.drawHelpLine(settingModalFirstOptions)
|
||||||
addPopup(id, 1, <RoofAllocationSetting id={id} pos={{ x: 50, y: 230 }} />)
|
addPopup(id, 1, <RoofAllocationSetting id={id} pos={{ x: 50, y: 230 }} />)
|
||||||
|
},
|
||||||
|
denyFn: async () => {
|
||||||
return
|
return
|
||||||
}
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeModal = (fn) => {
|
const closeModal = (fn) => {
|
||||||
|
|||||||
@ -1030,5 +1030,6 @@
|
|||||||
"roof.is.not.selected": "屋根の選択をお願いします。",
|
"roof.is.not.selected": "屋根の選択をお願いします。",
|
||||||
"length.direction.is.required": "長さと方向を入力します。",
|
"length.direction.is.required": "長さと方向を入力します。",
|
||||||
"canvas.infomation.text": "数字は [半角] 入力のみ可能です。",
|
"canvas.infomation.text": "数字は [半角] 入力のみ可能です。",
|
||||||
"roof.exceed.count": "屋根材は4つまで選択可能です。"
|
"roof.exceed.count": "屋根材は4つまで選択可能です。",
|
||||||
|
"outerLine.property.fix": "外壁線の属性設定 を完了しますか?"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1030,5 +1030,6 @@
|
|||||||
"roof.is.not.selected": "지붕을 선택해주세요.",
|
"roof.is.not.selected": "지붕을 선택해주세요.",
|
||||||
"length.direction.is.required": "길이와 방향을 입력하세요.",
|
"length.direction.is.required": "길이와 방향을 입력하세요.",
|
||||||
"canvas.infomation.text": "숫자는 [반각] 입력만 가능합니다.",
|
"canvas.infomation.text": "숫자는 [반각] 입력만 가능합니다.",
|
||||||
"roof.exceed.count": "지붕재는 4개까지 선택 가능합니다."
|
"roof.exceed.count": "지붕재는 4개까지 선택 가능합니다.",
|
||||||
|
"outerLine.property.fix": "외벽선 속성 설정을 완료하시겠습니까?"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user