Merge branch 'qcast-pub' into dev

This commit is contained in:
김민식 2025-02-11 16:33:04 +09:00
commit b2df12c438
7 changed files with 34 additions and 21 deletions

View File

@ -21,23 +21,34 @@ export default function AuxiliaryEdit(props) {
const currentObject = useRecoilValue(currentObjectState) const currentObject = useRecoilValue(currentObjectState)
const { swalFire } = useSwal() const { swalFire } = useSwal()
const handleSave = () => { const handleSave = () => {
if (!horizonSize || !verticalSize || !arrow1 || !arrow2) { if ((!arrow1 && !arrow2) || (+verticalSize === 0 && +horizonSize === 0)) {
swalFire({ title: '길이와 방향을 입력하세요.', type: 'alert' }) swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
return 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 (type === 'copy') {
if (currentObject) { if (currentObject) {
copy( copy(
currentObject, currentObject,
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize), arrow2 ? (arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize)) : 0,
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize), arrow1 ? (arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize)) : 0,
) )
} }
} else { } else {
move( move(
currentObject, currentObject,
arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize), arrow2 ? (arrow2 === '←' ? Number(horizonSize) * -1 : Number(horizonSize)) : 0,
arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize), arrow1 ? (arrow1 === '↑' ? Number(verticalSize) * -1 : Number(verticalSize)) : 0,
) )
} }

View File

@ -368,6 +368,7 @@ export default function CircuitTrestleSetting({ id }) {
circuitModules.forEach((obj) => { circuitModules.forEach((obj) => {
obj.circuit = null obj.circuit = null
obj.pcsItemId = null obj.pcsItemId = null
obj.circuitNumber = null
}) })
if (allocationType === ALLOCATION_TYPE.PASSIVITY) { if (allocationType === ALLOCATION_TYPE.PASSIVITY) {

View File

@ -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) => { selectedData.roofSurfaceList.forEach((roofSurface) => {
const targetSurface = canvas.getObjects().filter((obj) => obj.id === roofSurface.roofSurfaceId)[0] const targetSurface = canvas.getObjects().filter((obj) => obj.id === roofSurface.roofSurfaceId)[0]
const moduleIds = targetSurface.modules.map((module) => { const moduleIds = targetSurface.modules.map((module) => {
return module.id return module.id
}) })
targetSurface.modules.map((module) => {
module.circuit = null
module.circuitNumber = null
module.pcsItemId = null
})
// //
canvas canvas
.getObjects() .getObjects()

View File

@ -38,12 +38,12 @@ export default function GridMove(props) {
const handleApply = () => { const handleApply = () => {
if (currentObject?.direction === 'vertical') { if (currentObject?.direction === 'vertical') {
if (!horizonSize || !arrow2) { if (!horizonSize || !arrow2) {
swalFire({ title: '길이와 방향을 입력하세요.', type: 'alert' }) swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
return return
} }
} else { } else {
if (!verticalSize || !arrow1) { if (!verticalSize || !arrow1) {
swalFire({ title: '길이와 방향을 입력하세요.', type: 'alert' }) swalFire({ title: getMessage('length.direction.is.required'), type: 'alert' })
} }
} }

View File

@ -130,11 +130,7 @@ export function useContextMenu() {
name: getMessage('contextmenu.roof.material.placement'), name: getMessage('contextmenu.roof.material.placement'),
component: <RoofAllocationSetting id={popupId} />, component: <RoofAllocationSetting id={popupId} />,
}, },
{
id: 'roofMaterialRemove',
name: getMessage('contextmenu.roof.material.remove'),
fn: () => removeRoofMaterial(),
},
{ {
id: 'roofMaterialRemoveAll', id: 'roofMaterialRemoveAll',
name: getMessage('contextmenu.roof.material.remove.all'), name: getMessage('contextmenu.roof.material.remove.all'),

View File

@ -1014,5 +1014,6 @@
"max.select": "최대 {0}개까지 선택할 수 있습니다.(JA)", "max.select": "최대 {0}개까지 선택할 수 있습니다.(JA)",
"not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.(JA)", "not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.(JA)",
"roof.is.not.selected": "지붕을 선택해주세요.(JA)", "roof.is.not.selected": "지붕을 선택해주세요.(JA)",
"module.delete.confirm": "パネルを削除して面入力に戻ります。正しいですか?\nはいを選択すると削除し、面入力に戻ります。\nいいえ」を選択すると、削除せずに現在の状態を維持します。" "module.delete.confirm": "パネルを削除して面入力に戻ります。正しいですか?\nはいを選択すると削除し、面入力に戻ります。\nいいえ」を選択すると、削除せずに現在の状態を維持します。",
"length.direction.is.required": "길이와 방향을 입력하세요.(JA)"
} }

View File

@ -1015,5 +1015,6 @@
"max.select": "최대 {0}개까지 선택할 수 있습니다.", "max.select": "최대 {0}개까지 선택할 수 있습니다.",
"module.delete.confirm": "패널을 삭제하고 면입력으로 돌아갑니다. 맞습니까?\n[예]를 선택하면 삭제하고, 면 입력으로 돌아갑니다.\n[아니오]를 선택하면 삭제하지 않고 현재 상태를 유지합니다.", "module.delete.confirm": "패널을 삭제하고 면입력으로 돌아갑니다. 맞습니까?\n[예]를 선택하면 삭제하고, 면 입력으로 돌아갑니다.\n[아니오]를 선택하면 삭제하지 않고 현재 상태를 유지합니다.",
"not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.", "not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.",
"roof.is.not.selected": "지붕을 선택해주세요." "roof.is.not.selected": "지붕을 선택해주세요.",
"length.direction.is.required": "길이와 방향을 입력하세요."
} }