Compare commits
No commits in common. "4aec4e389fdd51cfd55cc7792ab98f08c09d9f01" and "d886bb135fc60d6b387b9b2ffe3a42bfdec96b1a" have entirely different histories.
4aec4e389f
...
d886bb135f
@ -2,7 +2,7 @@ NEXT_PUBLIC_API_SERVER_PATH="https://api.hanasys.jp/"
|
||||
|
||||
NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000"
|
||||
|
||||
NEXT_PUBLIC_API_HOST_URL="https://www.hanasys.jp"
|
||||
NEXT_PUBLIC_API_HOST_URL="https://www.hanasys.jp/"
|
||||
|
||||
SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y="
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ export default function QnaDetailModal({ qnaNo, setOpen, qnaType }) {
|
||||
<dt>{getMessage('qna.detail.sub.fileList')}</dt>
|
||||
{boardDetail.listFile.map((boardFile) => (
|
||||
<dd key={boardFile.encodeFileNo}>
|
||||
<button type="button" className="down" onClick={() => handleFileDown(boardFile.fileNo, 'NO')}>
|
||||
<button type="button" className="down" onClick={() => handleFileDown(boardFile.fileNo, 'N')}>
|
||||
{boardFile.srcFileNm}
|
||||
</button>
|
||||
</dd>
|
||||
|
||||
@ -428,8 +428,8 @@ let fileCheck = false;
|
||||
|
||||
</div>
|
||||
<div className="footer-btn-wrap">
|
||||
{isBtnDisable === false && <button className="btn-origin navy mr5" onClick={handleQnaSubmit}>{getMessage("qna.reg.header.save")}</button>}
|
||||
<button className="btn-origin grey" onClick={() => {
|
||||
{isBtnDisable === false && <button className="btn-origin grey mr5" onClick={handleQnaSubmit}>{getMessage("qna.reg.header.save")}</button>}
|
||||
<button className="btn-origin navy" onClick={() => {
|
||||
setOpen(false)
|
||||
}}>{getMessage("board.sub.btn.close")}</button>
|
||||
</div>
|
||||
|
||||
@ -76,12 +76,8 @@ export default function CanvasFrame() {
|
||||
}
|
||||
initEvent()
|
||||
})
|
||||
} else {
|
||||
setSelectedMenu(null)
|
||||
}
|
||||
Object.keys(currentCanvasPlan).length > 0 && canvas && handleModuleSelectionTotal()
|
||||
} else {
|
||||
setSelectedMenu(null)
|
||||
}
|
||||
gridInit()
|
||||
}
|
||||
|
||||
@ -50,7 +50,6 @@ import JA from '@/locales/ja.json'
|
||||
import { QcastContext } from '@/app/QcastProvider'
|
||||
import { useRoofFn } from '@/hooks/common/useRoofFn'
|
||||
import { usePolygon } from '@/hooks/usePolygon'
|
||||
import { useTrestle } from '@/hooks/module/useTrestle'
|
||||
export default function CanvasMenu(props) {
|
||||
const { selectedMenu, setSelectedMenu } = props
|
||||
const pathname = usePathname()
|
||||
@ -68,7 +67,6 @@ export default function CanvasMenu(props) {
|
||||
const globalLocale = useRecoilValue(globalLocaleStore)
|
||||
const canvas = useRecoilValue(canvasState)
|
||||
const { handleZoomClear, handleZoom } = useCanvasEvent()
|
||||
const { setAllModuleSurfaceIsComplete, isAllComplete } = useTrestle()
|
||||
const { handleMenu } = useMenu()
|
||||
// const urlParams = useSearchParams()
|
||||
const { handleEstimateSubmit, fetchSetting, estimateContextState, setEstimateContextState } = useEstimateController()
|
||||
@ -196,7 +194,6 @@ export default function CanvasMenu(props) {
|
||||
confirmFn: () => {
|
||||
//해당 메뉴 이동시 배치면 삭제
|
||||
|
||||
setAllModuleSurfaceIsComplete(false)
|
||||
const moduleSurfacesArray = canvas
|
||||
.getObjects()
|
||||
.filter((obj) => [POLYGON_TYPE.MODULE_SETUP_SURFACE, POLYGON_TYPE.MODULE, POLYGON_TYPE.OBJECT_SURFACE].includes(obj.name))
|
||||
@ -236,10 +233,6 @@ export default function CanvasMenu(props) {
|
||||
await reloadCanvasStatus(objectNo, pid)
|
||||
break
|
||||
case 'estimate':
|
||||
if (!isAllComplete()) {
|
||||
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
||||
return
|
||||
}
|
||||
setIsGlobalLoading(true)
|
||||
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => {
|
||||
if (res.status === 200) {
|
||||
|
||||
@ -154,7 +154,6 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
getPcsVoltageChk(pcsVoltageChkParams).then((res) => {
|
||||
if (res.resultCode === 'S') {
|
||||
setTabNum(2)
|
||||
setAllModuleSurfaceIsComplete(false)
|
||||
} else {
|
||||
swalFire({
|
||||
title: res.resultMsg,
|
||||
@ -188,7 +187,6 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
}).then((res) => {
|
||||
if (res?.result.resultCode === 'S' && res?.data) {
|
||||
setTabNum(2)
|
||||
setAllModuleSurfaceIsComplete(false)
|
||||
} else {
|
||||
swalFire({ text: getMessage('common.message.send.error') })
|
||||
}
|
||||
@ -288,8 +286,6 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
setSelectedModels(pcsItemList)
|
||||
getPcsVoltageChk(pcsVoltageChkParams).then((res) => {
|
||||
setAllocationType(ALLOCATION_TYPE.PASSIVITY)
|
||||
setAllModuleSurfaceIsComplete(false)
|
||||
clearTrestle()
|
||||
})
|
||||
} else {
|
||||
swalFire({
|
||||
@ -322,7 +318,6 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
}
|
||||
|
||||
setAllocationType(ALLOCATION_TYPE.PASSIVITY)
|
||||
clearTrestle()
|
||||
}
|
||||
}
|
||||
|
||||
@ -659,7 +654,6 @@ export default function CircuitTrestleSetting({ id }) {
|
||||
return
|
||||
} else {
|
||||
setTabNum(2)
|
||||
setAllModuleSurfaceIsComplete(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -3077,9 +3077,6 @@ export const useTrestle = () => {
|
||||
// 배치면 전체에 가대 설치 여부
|
||||
const isAllComplete = () => {
|
||||
const surfaces = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
|
||||
if (surfaces.length === 0) {
|
||||
return false
|
||||
}
|
||||
return surfaces.every((surface) => surface.isComplete)
|
||||
}
|
||||
|
||||
|
||||
@ -203,6 +203,7 @@ export function useCanvasSetting(executeEffect = true) {
|
||||
return
|
||||
}
|
||||
const selectedRoofMaterial = roofMaterials[0]
|
||||
console.log('selectedRoofMaterial', selectedRoofMaterial)
|
||||
|
||||
if (addedRoofs.length === 0) {
|
||||
const newAddedRoofs = []
|
||||
|
||||
@ -160,7 +160,6 @@ export function useEvent() {
|
||||
const verticalLines = canvas.getObjects().filter((obj) => ['lineGrid', 'tempGrid'].includes(obj.name) && obj.direction === 'vertical')
|
||||
|
||||
if (!horizonLines || !verticalLines) {
|
||||
drawMouseLine(pointer)
|
||||
return
|
||||
}
|
||||
|
||||
@ -184,7 +183,6 @@ export function useEvent() {
|
||||
}
|
||||
|
||||
if (!closestVerticalLine || !closestHorizontalLine) {
|
||||
drawMouseLine(pointer)
|
||||
return
|
||||
}
|
||||
|
||||
@ -273,14 +271,7 @@ export function useEvent() {
|
||||
console.error(e)
|
||||
}
|
||||
|
||||
drawMouseLine(arrivalPoint)
|
||||
|
||||
// 캔버스를 다시 그립니다.
|
||||
canvas?.renderAll()
|
||||
}
|
||||
|
||||
const drawMouseLine = (pointer) => {
|
||||
const horizontalLine = new fabric.Line([-4 * canvas.width, pointer.y, 4 * canvas.width, pointer.y], {
|
||||
const horizontalLine = new fabric.Line([-4 * canvas.width, arrivalPoint.y, 4 * canvas.width, arrivalPoint.y], {
|
||||
stroke: 'red',
|
||||
strokeWidth: 1,
|
||||
selectable: false,
|
||||
@ -288,7 +279,7 @@ export function useEvent() {
|
||||
})
|
||||
|
||||
// 세로선
|
||||
const verticalLine = new fabric.Line([pointer.x, -4 * canvas.height, pointer.x, 4 * canvas.height], {
|
||||
const verticalLine = new fabric.Line([arrivalPoint.x, -4 * canvas.height, arrivalPoint.x, 4 * canvas.height], {
|
||||
stroke: 'red',
|
||||
strokeWidth: 1,
|
||||
selectable: false,
|
||||
@ -297,6 +288,9 @@ export function useEvent() {
|
||||
|
||||
// 선들을 캔버스에 추가합니다.
|
||||
canvas?.add(horizontalLine, verticalLine)
|
||||
|
||||
// 캔버스를 다시 그립니다.
|
||||
canvas?.renderAll()
|
||||
}
|
||||
|
||||
const removeMouseLine = () => {
|
||||
|
||||
@ -3,17 +3,9 @@
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
import { usePathname, useRouter } from 'next/navigation'
|
||||
|
||||
import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil'
|
||||
import { useRecoilState, useResetRecoilState } from 'recoil'
|
||||
|
||||
import {
|
||||
canvasState,
|
||||
currentCanvasPlanState,
|
||||
plansState,
|
||||
canvasSettingState,
|
||||
currentObjectState,
|
||||
moduleSetupSurfaceState,
|
||||
currentMenuState,
|
||||
} from '@/store/canvasAtom'
|
||||
import { canvasState, currentCanvasPlanState, plansState, canvasSettingState, currentObjectState, moduleSetupSurfaceState } from '@/store/canvasAtom'
|
||||
import { useAxios } from '@/hooks/useAxios'
|
||||
import { useMessage } from '@/hooks/useMessage'
|
||||
import { useSwal } from '@/hooks/useSwal'
|
||||
@ -41,7 +33,7 @@ export function usePlan(params = {}) {
|
||||
const { floorPlanState } = useContext(FloorPlanContext)
|
||||
|
||||
const [selectedPlan, setSelectedPlan] = useState(null)
|
||||
const setCurrentMenu = useSetRecoilState(currentMenuState)
|
||||
|
||||
const [canvas, setCanvas] = useRecoilState(canvasState)
|
||||
|
||||
const [currentCanvasPlan, setCurrentCanvasPlan] = useRecoilState(currentCanvasPlanState)
|
||||
@ -585,10 +577,8 @@ export function usePlan(params = {}) {
|
||||
* plan canvasStatus 초기화
|
||||
*/
|
||||
const resetCanvasStatus = () => {
|
||||
setCurrentCanvasPlan((prev) => ({ ...prev, canvasStatus: null, objectNo: null, planNo: null, id: null }))
|
||||
setCurrentCanvasPlan((prev) => ({ ...prev, canvasStatus: null }))
|
||||
setPlans((plans) => plans.map((plan) => ({ ...plan, canvasStatus: null })))
|
||||
setCurrentMenu(null)
|
||||
setSelectedMenu(null)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -956,7 +956,7 @@
|
||||
"estimate.detail.dragFileGuide": "(※北面設置の場合、ファイル添付が必須です。)",
|
||||
"estimate.detail.header.fileList1": "ファイル添付",
|
||||
"estimate.detail.fileList.btn": "ファイル選択",
|
||||
"estimate.detail.fileList.extCheck": "画像、PDF、Excel ファイルのみ添付できます。",
|
||||
"estimate.detail.fileList.extCheck": "画像ファイルのみ添付可能です。",
|
||||
"estimate.detail.header.fileList2": "添付ファイル一覧",
|
||||
"estimate.detail.fileList2.btn.return": "復元",
|
||||
"estimate.detail.header.specialEstimate": "見積特記事項",
|
||||
@ -1078,7 +1078,6 @@
|
||||
"module.not.found": "インストールモジュールを選択してください。",
|
||||
"module.circuit.minimun.error": "回路番号は1以上の数値を入力してください。",
|
||||
"module.already.exist.error": "回路番号が同じで異なるパワーコンディショナのモジュールがあります。 別の回路番号を設定してください。",
|
||||
"module.circuit.fix.not.same.roof.error": "異なる屋根面のモジュールが選択されています。 モジュールの選択をや直してください。",
|
||||
"construction.length.difference": "屋根面工法をすべて選択してください。",
|
||||
"menu.validation.canvas.roof": "パネルを配置するには、屋根面を入力する必要があります。",
|
||||
"batch.object.outside.roof": "オブジェクトは屋根に設置する必要があります。",
|
||||
|
||||
@ -447,11 +447,10 @@
|
||||
border-top: none;
|
||||
.community_detail-file-wrap{
|
||||
padding-top: 0;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.community_detail-inner{
|
||||
max-height: 110px;
|
||||
margin-top: 0;
|
||||
margin-top: 24px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@ -462,14 +461,12 @@
|
||||
border: 1px solid #101010;
|
||||
.community_detail-inner{
|
||||
max-height: 110px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
|
||||
}
|
||||
.community_detail-file-wrap{
|
||||
border-top: 1px solid #D4DCE7;
|
||||
padding: 16px 0 0 0;
|
||||
border-bottom: none;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user