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