Merge branch 'dev' into dev-yj
This commit is contained in:
commit
652516146b
@ -46,7 +46,6 @@ export default function Estimate({}) {
|
|||||||
|
|
||||||
const [selection, setSelection] = useState(new Set())
|
const [selection, setSelection] = useState(new Set())
|
||||||
//견적특이사항 접고 펼치기
|
//견적특이사항 접고 펼치기
|
||||||
// const [hidden, setHidden] = useState(false)
|
|
||||||
const [hidden, setHidden] = useState(true)
|
const [hidden, setHidden] = useState(true)
|
||||||
|
|
||||||
//아이템 자동완성 리스트
|
//아이템 자동완성 리스트
|
||||||
@ -569,7 +568,7 @@ export default function Estimate({}) {
|
|||||||
return selection.size === getAbledItems(estimateContextState.itemList).length
|
return selection.size === getAbledItems(estimateContextState.itemList).length
|
||||||
}
|
}
|
||||||
|
|
||||||
//row 체크박스 컨트롤
|
//아이템row 체크박스 컨트롤
|
||||||
const onChangeSelect = (dispOrder) => {
|
const onChangeSelect = (dispOrder) => {
|
||||||
const newSelection = new Set(selection)
|
const newSelection = new Set(selection)
|
||||||
if (newSelection.has(dispOrder)) {
|
if (newSelection.has(dispOrder)) {
|
||||||
@ -581,10 +580,6 @@ export default function Estimate({}) {
|
|||||||
setSelection(newSelection)
|
setSelection(newSelection)
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumberWithComma(number) {
|
|
||||||
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
|
||||||
}
|
|
||||||
|
|
||||||
//주택PKG input 변경
|
//주택PKG input 변경
|
||||||
const onChangePkgAsp = (value) => {
|
const onChangePkgAsp = (value) => {
|
||||||
if (estimateContextState.estimateType === 'YJSS') {
|
if (estimateContextState.estimateType === 'YJSS') {
|
||||||
@ -1140,6 +1135,7 @@ export default function Estimate({}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [estimateContextState])
|
}, [estimateContextState])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="sub-content estimate">
|
<div className="sub-content estimate">
|
||||||
<div className="sub-content-inner">
|
<div className="sub-content-inner">
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { useContextMenu } from '@/hooks/useContextMenu'
|
|||||||
import { useCanvasConfigInitialize } from '@/hooks/common/useCanvasConfigInitialize'
|
import { useCanvasConfigInitialize } from '@/hooks/common/useCanvasConfigInitialize'
|
||||||
import { currentMenuState } from '@/store/canvasAtom'
|
import { currentMenuState } from '@/store/canvasAtom'
|
||||||
import { totalDisplaySelector } from '@/store/settingAtom'
|
import { totalDisplaySelector } from '@/store/settingAtom'
|
||||||
import { MENU } from '@/common/common'
|
import { MENU, POLYGON_TYPE } from '@/common/common'
|
||||||
import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider'
|
import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider'
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
import {
|
import {
|
||||||
@ -27,6 +27,7 @@ import {
|
|||||||
} from '@/store/circuitTrestleAtom'
|
} from '@/store/circuitTrestleAtom'
|
||||||
import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupStatusController'
|
import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupStatusController'
|
||||||
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
|
import { useCanvasSetting } from '@/hooks/option/useCanvasSetting'
|
||||||
|
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
||||||
|
|
||||||
export default function CanvasFrame() {
|
export default function CanvasFrame() {
|
||||||
const canvasRef = useRef(null)
|
const canvasRef = useRef(null)
|
||||||
@ -47,6 +48,7 @@ export default function CanvasFrame() {
|
|||||||
const resetPcsCheckState = useResetRecoilState(pcsCheckState)
|
const resetPcsCheckState = useResetRecoilState(pcsCheckState)
|
||||||
const { handleModuleSelectionTotal } = useCanvasPopupStatusController()
|
const { handleModuleSelectionTotal } = useCanvasPopupStatusController()
|
||||||
const { fetchBasicSettings } = useCanvasSetting()
|
const { fetchBasicSettings } = useCanvasSetting()
|
||||||
|
const { setSelectedMenu } = useCanvasMenu()
|
||||||
|
|
||||||
const loadCanvas = () => {
|
const loadCanvas = () => {
|
||||||
if (!canvas) return
|
if (!canvas) return
|
||||||
@ -58,6 +60,10 @@ export default function CanvasFrame() {
|
|||||||
canvas?.loadFromJSON(JSON.parse(plan.canvasStatus), function () {
|
canvas?.loadFromJSON(JSON.parse(plan.canvasStatus), function () {
|
||||||
canvasLoadInit() //config된 상태로 캔버스 객체를 그린다
|
canvasLoadInit() //config된 상태로 캔버스 객체를 그린다
|
||||||
canvas?.renderAll() // 캔버스를 다시 그립니다.
|
canvas?.renderAll() // 캔버스를 다시 그립니다.
|
||||||
|
|
||||||
|
if (canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE).length > 0) {
|
||||||
|
setSelectedMenu('module')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -186,6 +186,7 @@ export default function CanvasMenu(props) {
|
|||||||
const modules = canvas
|
const modules = canvas
|
||||||
.getObjects()
|
.getObjects()
|
||||||
.filter((obj) => [POLYGON_TYPE.MODULE_SETUP_SURFACE, POLYGON_TYPE.MODULE, POLYGON_TYPE.OBJECT_SURFACE].includes(obj.name))
|
.filter((obj) => [POLYGON_TYPE.MODULE_SETUP_SURFACE, POLYGON_TYPE.MODULE, POLYGON_TYPE.OBJECT_SURFACE].includes(obj.name))
|
||||||
|
initRoofs()
|
||||||
|
|
||||||
if (modules.length > 0) {
|
if (modules.length > 0) {
|
||||||
swalFire({
|
swalFire({
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<i className="edit-ico"></i>
|
<i className="edit-ico"></i>
|
||||||
{getMessage('modal.common.add')}
|
{getMessage('modal.roof.alloc.add.roof.material')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-option-overflow">
|
<div className="grid-option-overflow">
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export default function RoofAllocationSetting(props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<i className="edit-ico"></i>
|
<i className="edit-ico"></i>
|
||||||
{getMessage('modal.common.add')}
|
{getMessage('modal.roof.alloc.add.roof.material')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-option-overflow">
|
<div className="grid-option-overflow">
|
||||||
|
|||||||
@ -119,7 +119,11 @@ export default function ChangePasswordPop(props) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
alert(res?.result?.resultMsg)
|
swalFire({
|
||||||
|
text: getMessage(res?.result?.resultMsg),
|
||||||
|
type: 'alert',
|
||||||
|
icon: 'error',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
|
|||||||
@ -75,7 +75,10 @@ export default function Stuff() {
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert(getMessage('stuff.detail.header.failCopy'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.header.failCopy'),
|
||||||
|
type: 'alert',
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
textArea.remove()
|
textArea.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,6 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
const [areaIdList, setAreaIdList] = useState([]) //발전시뮬레이션 리스트
|
const [areaIdList, setAreaIdList] = useState([]) //발전시뮬레이션 리스트
|
||||||
|
|
||||||
const [isFormValid, setIsFormValid] = useState(false) //임시저장, 진짜저장 버튼 컨트롤
|
|
||||||
const [showAddressButtonValid, setShowAddressButtonValid] = useState(false) //주소검색팝업 활성화 컨트롤
|
const [showAddressButtonValid, setShowAddressButtonValid] = useState(false) //주소검색팝업 활성화 컨트롤
|
||||||
const [showDesignRequestButtonValid, setShowDesignRequestButtonValid] = useState(false) //설계의뢰팝업 활성화 컨트롤
|
const [showDesignRequestButtonValid, setShowDesignRequestButtonValid] = useState(false) //설계의뢰팝업 활성화 컨트롤
|
||||||
const [showWindSpeedButtonValid, setShowWindSpeedButtonValid] = useState(false) //풍속선택팝업 활성화 컨트롤
|
const [showWindSpeedButtonValid, setShowWindSpeedButtonValid] = useState(false) //풍속선택팝업 활성화 컨트롤
|
||||||
@ -1094,8 +1093,6 @@ export default function StuffDetail() {
|
|||||||
if (!formData.installHeight) {
|
if (!formData.installHeight) {
|
||||||
errors.installHeight = true
|
errors.installHeight = true
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsFormValid(Object.keys(errors).length === 0 ? true : false)
|
|
||||||
} else {
|
} else {
|
||||||
//상세일떄 폼체크
|
//상세일떄 폼체크
|
||||||
const formData = form.getValues()
|
const formData = form.getValues()
|
||||||
@ -1140,8 +1137,6 @@ export default function StuffDetail() {
|
|||||||
if (!formData.installHeight) {
|
if (!formData.installHeight) {
|
||||||
errors.installHeight = true
|
errors.installHeight = true
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsFormValid(Object.keys(errors).length === 0 ? true : false)
|
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
_receiveUser,
|
_receiveUser,
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import { useContext, useEffect } from 'react'
|
|||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
||||||
// import { ManagementContext } from '@/app/management/ManagementProvider'
|
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
export default function StuffHeader() {
|
export default function StuffHeader() {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -23,7 +22,10 @@ export default function StuffHeader() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
alert(getMessage('stuff.detail.header.failCopy'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.header.failCopy'),
|
||||||
|
type: 'alert',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// Use the 'out of viewport hidden text area' trick
|
// Use the 'out of viewport hidden text area' trick
|
||||||
@ -44,7 +46,10 @@ export default function StuffHeader() {
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert(getMessage('stuff.detail.header.failCopy'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.header.failCopy'),
|
||||||
|
type: 'alert',
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
textArea.remove()
|
textArea.remove()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import { isObjectNotEmpty } from '@/util/common-utils'
|
|||||||
import { SessionContext } from '@/app/SessionProvider'
|
import { SessionContext } from '@/app/SessionProvider'
|
||||||
|
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
|
||||||
export default function StuffSearchCondition() {
|
export default function StuffSearchCondition() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -73,17 +74,24 @@ export default function StuffSearchCondition() {
|
|||||||
const [otherSaleStoreId, setOtherSaleStoreId] = useState('')
|
const [otherSaleStoreId, setOtherSaleStoreId] = useState('')
|
||||||
|
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
|
const { swalFire } = useSwal()
|
||||||
|
|
||||||
// 조회
|
// 조회
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
let diff = dayjs(endDate).diff(startDate, 'day')
|
let diff = dayjs(endDate).diff(startDate, 'day')
|
||||||
|
|
||||||
if (diff > 366) {
|
if (diff > 366) {
|
||||||
return alert(getMessage('stuff.message.periodError'))
|
return swalFire({
|
||||||
|
text: getMessage('stuff.message.periodError'),
|
||||||
|
type: 'alert',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNaN(diff)) {
|
if (isNaN(diff)) {
|
||||||
return alert(getMessage('stuff.message.periodError'))
|
return swalFire({
|
||||||
|
text: getMessage('stuff.message.periodError'),
|
||||||
|
type: 'alert',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
|
|||||||
@ -221,6 +221,14 @@ export function useCanvasSetting(executeEffect = true) {
|
|||||||
}
|
}
|
||||||
const { column } = corridorDimension
|
const { column } = corridorDimension
|
||||||
const lengthTexts = canvas.getObjects().filter((obj) => obj.name === 'lengthText')
|
const lengthTexts = canvas.getObjects().filter((obj) => obj.name === 'lengthText')
|
||||||
|
const group = canvas.getObjects().filter((obj) => obj.type === 'group')
|
||||||
|
group.forEach((obj) => {
|
||||||
|
obj._objects
|
||||||
|
.filter((obj2) => obj2.name === 'lengthText')
|
||||||
|
.forEach((obj3) => {
|
||||||
|
lengthTexts.push(obj3)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case 'corridorDimension':
|
case 'corridorDimension':
|
||||||
|
|||||||
@ -48,6 +48,7 @@ export const usePolygon = () => {
|
|||||||
canvas.remove(text)
|
canvas.remove(text)
|
||||||
})
|
})
|
||||||
const lines = polygon.lines
|
const lines = polygon.lines
|
||||||
|
polygon.texts = []
|
||||||
|
|
||||||
lines.forEach((line, i) => {
|
lines.forEach((line, i) => {
|
||||||
const length = line.getLength()
|
const length = line.getLength()
|
||||||
@ -102,7 +103,7 @@ export const usePolygon = () => {
|
|||||||
parent: polygon,
|
parent: polygon,
|
||||||
name: 'lengthText',
|
name: 'lengthText',
|
||||||
})
|
})
|
||||||
|
polygon.texts.push(text)
|
||||||
canvas.add(text)
|
canvas.add(text)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -174,6 +174,7 @@
|
|||||||
"modal.roof.alloc.info": "※配置面初期設定で保存した[基本屋根材]を変更したり、屋根材を追加して割り当てることができます。",
|
"modal.roof.alloc.info": "※配置面初期設定で保存した[基本屋根材]を変更したり、屋根材を追加して割り当てることができます。",
|
||||||
"modal.roof.alloc.default.roof.material": "基本屋根材",
|
"modal.roof.alloc.default.roof.material": "基本屋根材",
|
||||||
"modal.roof.alloc.select.roof.material": "屋根材の選択",
|
"modal.roof.alloc.select.roof.material": "屋根材の選択",
|
||||||
|
"modal.roof.alloc.add.roof.material": "지붕재 추가(JA)",
|
||||||
"modal.roof.alloc.select.parallel": "筋配置",
|
"modal.roof.alloc.select.parallel": "筋配置",
|
||||||
"modal.roof.alloc.select.stairs": "千鳥配置",
|
"modal.roof.alloc.select.stairs": "千鳥配置",
|
||||||
"modal.roof.alloc.apply": "選択した屋根材として割り当て",
|
"modal.roof.alloc.apply": "選択した屋根材として割り当て",
|
||||||
|
|||||||
@ -174,6 +174,7 @@
|
|||||||
"modal.roof.alloc.info": "※ 배치면 초기설정에서 저장한 [기본 지붕재]를 변경하거나 지붕재를 추가하여 할당할 수 있습니다.",
|
"modal.roof.alloc.info": "※ 배치면 초기설정에서 저장한 [기본 지붕재]를 변경하거나 지붕재를 추가하여 할당할 수 있습니다.",
|
||||||
"modal.roof.alloc.default.roof.material": "기본 지붕재",
|
"modal.roof.alloc.default.roof.material": "기본 지붕재",
|
||||||
"modal.roof.alloc.select.roof.material": "지붕재 선택",
|
"modal.roof.alloc.select.roof.material": "지붕재 선택",
|
||||||
|
"modal.roof.alloc.add.roof.material": "지붕재 추가",
|
||||||
"modal.roof.alloc.select.parallel": "병렬식",
|
"modal.roof.alloc.select.parallel": "병렬식",
|
||||||
"modal.roof.alloc.select.stairs": "계단식",
|
"modal.roof.alloc.select.stairs": "계단식",
|
||||||
"modal.roof.alloc.apply": "선택한 지붕재로 할당",
|
"modal.roof.alloc.apply": "선택한 지붕재로 할당",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user