Merge branch 'qcast-pub' into dev
This commit is contained in:
commit
b2df12c438
@ -21,23 +21,34 @@ export default function AuxiliaryEdit(props) {
|
||||
const currentObject = useRecoilValue(currentObjectState)
|
||||
const { swalFire } = useSwal()
|
||||
const handleSave = () => {
|
||||
if (!horizonSize || !verticalSize || !arrow1 || !arrow2) {
|
||||
swalFire({ title: '길이와 방향을 입력하세요.', type: 'alert' })
|
||||
if ((!arrow1 && !arrow2) || (+verticalSize === 0 && +horizonSize === 0)) {
|
||||
swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
|
||||
return
|
||||
}
|
||||
|
||||
if ((verticalSize && +verticalSize === 0) || !arrow1) {
|
||||
swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
|
||||
return
|
||||
}
|
||||
|
||||
if ((horizonSize && +horizonSize === 0) || !arrow2) {
|
||||
swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
|
||||
return
|
||||
}
|
||||
|
||||
if (type === 'copy') {
|
||||
if (currentObject) {
|
||||
copy(
|
||||
currentObject,
|
||||
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize),
|
||||
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize),
|
||||
arrow2 ? (arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize)) : 0,
|
||||
arrow1 ? (arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize)) : 0,
|
||||
)
|
||||
}
|
||||
} else {
|
||||
move(
|
||||
currentObject,
|
||||
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize),
|
||||
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize),
|
||||
arrow2 ? (arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize)) : 0,
|
||||
arrow1 ? (arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize)) : 0,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -368,6 +368,7 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
circuitModules.forEach((obj) => {
|
||||
obj.circuit = null
|
||||
obj.pcsItemId = null
|
||||
obj.circuitNumber = null
|
||||
})
|
||||
|
||||
if (allocationType === ALLOCATION_TYPE.PASSIVITY) {
|
||||
|
||||
@ -392,18 +392,21 @@ export default function StepUp(props) {
|
||||
}
|
||||
}
|
||||
|
||||
canvas
|
||||
.getObjects()
|
||||
.filter((obj) => obj.name === POLYGON_TYPE.MODULE)
|
||||
.forEach((module) => {
|
||||
module.circuit = null
|
||||
module.circuitNumber = null
|
||||
module.pcsItemId = null
|
||||
})
|
||||
|
||||
selectedData.roofSurfaceList.forEach((roofSurface) => {
|
||||
const targetSurface = canvas.getObjects().filter((obj) => obj.id === roofSurface.roofSurfaceId)[0]
|
||||
const moduleIds = targetSurface.modules.map((module) => {
|
||||
return module.id
|
||||
})
|
||||
|
||||
targetSurface.modules.map((module) => {
|
||||
module.circuit = null
|
||||
module.circuitNumber = null
|
||||
module.pcsItemId = null
|
||||
})
|
||||
|
||||
// 모듈 목록 삭제
|
||||
canvas
|
||||
.getObjects()
|
||||
|
||||
@ -38,12 +38,12 @@ export default function GridMove(props) {
|
||||
const handleApply = () => {
|
||||
if (currentObject?.direction === 'vertical') {
|
||||
if (!horizonSize || !arrow2) {
|
||||
swalFire({ title: '길이와 방향을 입력하세요.', type: 'alert' })
|
||||
swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (!verticalSize || !arrow1) {
|
||||
swalFire({ title: '길이와 방향을 입력하세요.', type: 'alert' })
|
||||
swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -130,11 +130,7 @@ export function useContextMenu() {
|
||||
name: getMessage('contextmenu.roof.material.placement'),
|
||||
component: <RoofAllocationSetting id={popupId} />,
|
||||
},
|
||||
{
|
||||
id: 'roofMaterialRemove',
|
||||
name: getMessage('contextmenu.roof.material.remove'),
|
||||
fn: () => removeRoofMaterial(),
|
||||
},
|
||||
|
||||
{
|
||||
id: 'roofMaterialRemoveAll',
|
||||
name: getMessage('contextmenu.roof.material.remove.all'),
|
||||
|
||||
@ -1014,5 +1014,6 @@
|
||||
"max.select": "최대 {0}개까지 선택할 수 있습니다.(JA)",
|
||||
"not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.(JA)",
|
||||
"roof.is.not.selected": "지붕을 선택해주세요.(JA)",
|
||||
"module.delete.confirm": "パネルを削除して面入力に戻ります。正しいですか?\nはい]を選択すると削除し、面入力に戻ります。\nいいえ」を選択すると、削除せずに現在の状態を維持します。"
|
||||
"module.delete.confirm": "パネルを削除して面入力に戻ります。正しいですか?\nはい]を選択すると削除し、面入力に戻ります。\nいいえ」を選択すると、削除せずに現在の状態を維持します。",
|
||||
"length.direction.is.required": "길이와 방향을 입력하세요.(JA)"
|
||||
}
|
||||
|
||||
@ -1015,5 +1015,6 @@
|
||||
"max.select": "최대 {0}개까지 선택할 수 있습니다.",
|
||||
"module.delete.confirm": "패널을 삭제하고 면입력으로 돌아갑니다. 맞습니까?\n[예]를 선택하면 삭제하고, 면 입력으로 돌아갑니다.\n[아니오]를 선택하면 삭제하지 않고 현재 상태를 유지합니다.",
|
||||
"not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.",
|
||||
"roof.is.not.selected": "지붕을 선택해주세요."
|
||||
"roof.is.not.selected": "지붕을 선택해주세요.",
|
||||
"length.direction.is.required": "길이와 방향을 입력하세요."
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user