Compare commits
No commits in common. "2315bb5ecafa8670fe900e1b1785270d52335d6f" and "87e70d51c11ad0e091469e7a711705c2363bfde2" have entirely different histories.
2315bb5eca
...
87e70d51c1
@ -16,7 +16,7 @@ import { useSwal } from '@/hooks/useSwal'
|
|||||||
import { canvasState, canvasZoomState } from '@/store/canvasAtom'
|
import { canvasState, canvasZoomState } from '@/store/canvasAtom'
|
||||||
|
|
||||||
import { useTrestle } from '@/hooks/module/useTrestle'
|
import { useTrestle } from '@/hooks/module/useTrestle'
|
||||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
import { selectedModuleState } from '@/store/selectedModuleOptions'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
|
||||||
import { useEstimate } from '@/hooks/useEstimate'
|
import { useEstimate } from '@/hooks/useEstimate'
|
||||||
@ -60,7 +60,7 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
const [seletedSubOption, setSeletedSubOption] = useState(null)
|
const [seletedSubOption, setSeletedSubOption] = useState(null)
|
||||||
const { setModuleStatisticsData } = useCircuitTrestle()
|
const { setModuleStatisticsData } = useCircuitTrestle()
|
||||||
const { handleCanvasToPng } = useImgLoader()
|
const { handleCanvasToPng } = useImgLoader()
|
||||||
const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
|
|
||||||
const passivityCircuitAllocationRef = useRef()
|
const passivityCircuitAllocationRef = useRef()
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
|
|
||||||
@ -340,15 +340,8 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
|
|
||||||
const target = pcsCheck.max ? moduleMaxQty : moduleStdQty
|
const target = pcsCheck.max ? moduleMaxQty : moduleStdQty
|
||||||
const placementModules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
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 (moduleAmount > target) {
|
if (placementModules.length > target) {
|
||||||
swalFire({
|
swalFire({
|
||||||
title: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.all.power.conditional.validation.error01'),
|
title: getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.all.power.conditional.validation.error01'),
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
|
|||||||
@ -952,18 +952,9 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
//팝업에서 넘어온 우편정보
|
//팝업에서 넘어온 우편정보
|
||||||
const setZipInfo = (info) => {
|
const setZipInfo = (info) => {
|
||||||
|
setPrefValue(info.prefId)
|
||||||
prefCodeList.map((row) => {
|
form.setValue('prefId', info.prefId)
|
||||||
if (row.prefName == info.address1) {
|
form.setValue('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('address', info.address2 + info.address3)
|
||||||
form.setValue('zipNo', info.zipNo)
|
form.setValue('zipNo', info.zipNo)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2568,10 +2568,6 @@ export const useTrestle = () => {
|
|||||||
const getSameLineModules = (surface) => {
|
const getSameLineModules = (surface) => {
|
||||||
const { direction, modules, isChidory } = surface
|
const { direction, modules, isChidory } = surface
|
||||||
|
|
||||||
if (!modules || modules.length === 0) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 같은 단에 있는 모듈들의 리스트
|
// 같은 단에 있는 모듈들의 리스트
|
||||||
let sameLineModuleList = []
|
let sameLineModuleList = []
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user