Compare commits
8 Commits
fed817c6d0
...
2e6fef951c
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e6fef951c | |||
| 2315bb5eca | |||
| 13547f8a2a | |||
|
|
aafa5f5948 | ||
|
|
b74f847f76 | ||
| 87e70d51c1 | |||
| daf5ec9ce2 | |||
| 351df68762 |
@ -16,7 +16,7 @@ import { useSwal } from '@/hooks/useSwal'
|
||||
import { canvasState, canvasZoomState } from '@/store/canvasAtom'
|
||||
|
||||
import { useTrestle } from '@/hooks/module/useTrestle'
|
||||
import { selectedModuleState } from '@/store/selectedModuleOptions'
|
||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
import { useEstimate } from '@/hooks/useEstimate'
|
||||
@ -60,7 +60,7 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
const [seletedSubOption, setSeletedSubOption] = useState(null)
|
||||
const { setModuleStatisticsData } = useCircuitTrestle()
|
||||
const { handleCanvasToPng } = useImgLoader()
|
||||
|
||||
const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
|
||||
const passivityCircuitAllocationRef = useRef()
|
||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||
|
||||
@ -340,8 +340,15 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
|
||||
const target = pcsCheck.max ? moduleMaxQty : moduleStdQty
|
||||
const placementModules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
let moduleAmount = placementModules.reduce((acc, module) => {
|
||||
if (moduleSelectionData.module.itemList.length === 1 || module.moduleInfo.itemId === moduleSelectionData.module.itemList[0].itemId) {
|
||||
return acc + 1
|
||||
} else {
|
||||
return acc + 0.66
|
||||
}
|
||||
}, 0)
|
||||
|
||||
if (placementModules.length > target) {
|
||||
if (moduleAmount > target) {
|
||||
swalFire({
|
||||
title: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.all.power.conditional.validation.error01'),
|
||||
type: 'alert',
|
||||
|
||||
@ -952,9 +952,18 @@ export default function StuffDetail() {
|
||||
|
||||
//팝업에서 넘어온 우편정보
|
||||
const setZipInfo = (info) => {
|
||||
setPrefValue(info.prefId)
|
||||
form.setValue('prefId', info.prefId)
|
||||
form.setValue('prefName', info.address1)
|
||||
|
||||
prefCodeList.map((row) => {
|
||||
if (row.prefName == info.address1) {
|
||||
setPrefValue(row.prefId)
|
||||
form.setValue('prefId', row.prefId)
|
||||
form.setValue('prefName', info.address1)
|
||||
}
|
||||
})
|
||||
|
||||
//setPrefValue(info.prefId)
|
||||
// form.setValue('prefId', info.prefId)
|
||||
// form.setValue('prefName', info.address1)
|
||||
form.setValue('address', info.address2 + info.address3)
|
||||
form.setValue('zipNo', info.zipNo)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user