[회로할당] 회로 미할당 모듈 있을 때 캡처 전에 차단 — onApply 진입 시 not.allocation.exist.module 선검증 추가
This commit is contained in:
parent
5226e6d3bb
commit
8817e72ddb
@ -685,6 +685,18 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
|
|
||||||
// 회로할당(승압설정) 저장 버튼 클릭 시
|
// 회로할당(승압설정) 저장 버튼 클릭 시
|
||||||
const onApply = async () => {
|
const onApply = async () => {
|
||||||
|
// [NOT-ALLOC-GUARD 2026-07-03] 회로 미할당 모듈이 있으면 캡처(capture) 전에 차단.
|
||||||
|
// apply() 는 검증+가대설치가 묶여 있어 캡처 뒤에 실행되므로, 여기서 먼저 막지 않으면 이미지가 먼저 생성된다.
|
||||||
|
const notAllocationModules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE && !obj.circuit)
|
||||||
|
if (notAllocationModules.length > 0) {
|
||||||
|
swalFire({
|
||||||
|
text: getMessage('not.allocation.exist.module'),
|
||||||
|
type: 'alert',
|
||||||
|
icon: 'warning',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
setAllModuleSurfaceIsComplete(false)
|
setAllModuleSurfaceIsComplete(false)
|
||||||
|
|
||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user