[회로할당] 회로 미할당 모듈 있을 때 캡처 전에 차단 — onApply 진입 시 not.allocation.exist.module 선검증 추가

This commit is contained in:
ysCha 2026-07-07 08:37:33 +09:00
parent 5226e6d3bb
commit 8817e72ddb

View File

@ -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)