diff --git a/.env.production b/.env.production index 990adb32..09bb27d3 100644 --- a/.env.production +++ b/.env.production @@ -7,5 +7,7 @@ SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" # NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_yAS4QDalL9jgQ7vS" -NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="https://q-order.q-cells.jp/eos/login/autoLogin" -NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="https://q-musubi.q-cells.jp/qm/login/autoLogin" \ No newline at end of file +# NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="https://q-order.q-cells.jp/eos/login/autoLogin" +# NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="https://q-musubi.q-cells.jp/qm/login/autoLogin" +NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="http://q-order-stg.q-cells.jp:8120/eos/login/autoLogin" +NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="http://q-musubi-stg.q-cells.jp:8120/qm/login/autoLogin" \ No newline at end of file diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index b6bdbfef..c9a38727 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -1780,7 +1780,7 @@ export default function Estimate({}) { onChangeDisplayItem(e.itemId, item.dispOrder, index) } }} - // defaultInputValue={item.itemName} + menuPlacement={'auto'} getOptionLabel={(x) => x.itemName} getOptionValue={(x) => x.itemId} isClearable={false} diff --git a/src/components/floor-plan/CanvasFrame.jsx b/src/components/floor-plan/CanvasFrame.jsx index 68e5cf7a..ddce32a6 100644 --- a/src/components/floor-plan/CanvasFrame.jsx +++ b/src/components/floor-plan/CanvasFrame.jsx @@ -29,6 +29,7 @@ import { useCanvasPopupStatusController } from '@/hooks/common/useCanvasPopupSta import { useCanvasSetting } from '@/hooks/option/useCanvasSetting' import { useCanvasMenu } from '@/hooks/common/useCanvasMenu' import { useEvent } from '@/hooks/useEvent' +import { compasDegAtom } from '@/store/orientationAtom' export default function CanvasFrame() { const canvasRef = useRef(null) @@ -45,6 +46,7 @@ export default function CanvasFrame() { const resetSelectedMakerState = useResetRecoilState(selectedMakerState) const resetSeriesState = useResetRecoilState(seriesState) const resetModelsState = useResetRecoilState(modelsState) + const resetCompasDeg = useResetRecoilState(compasDegAtom) const resetSelectedModelsState = useResetRecoilState(selectedModelsState) const resetPcsCheckState = useResetRecoilState(pcsCheckState) const { handleModuleSelectionTotal } = useCanvasPopupStatusController() @@ -103,6 +105,7 @@ export default function CanvasFrame() { resetSelectedMakerState() resetSeriesState() resetModelsState() + resetCompasDeg() resetSelectedModelsState() resetPcsCheckState() } diff --git a/src/hooks/module/useModuleBasicSetting.js b/src/hooks/module/useModuleBasicSetting.js index aa008fc8..3ebee741 100644 --- a/src/hooks/module/useModuleBasicSetting.js +++ b/src/hooks/module/useModuleBasicSetting.js @@ -2693,12 +2693,13 @@ export function useModuleBasicSetting(tabNum) { if (turf.booleanWithin(tempTurfModule, turfPolygon)) { //마우스 클릭시 set으로 해당 위치에 셀을 넣음 - const isOverlap = manualDrawModules.some((module) => turf.booleanOverlap(tempTurfModule, polygonToTurfPolygon(module))) //겹치는지 확인 + const isOverlap = manualDrawModules.some((module) => turf.booleanOverlap(tempTurfModule, polygonToTurfPolygon(module, true))) //겹치는지 확인 if (!isOverlap) { moduleOptions.surfaceId = trestlePolygon.id let manualModule = new QPolygon(tempModule.points, { ...moduleOptions, moduleInfo: checkedModule[0] }) canvas?.add(manualModule) - manualDrawModules.push(tempModule) + manualDrawModules.push(manualModule) + setModuleStatisticsData() } else { swalFire({ text: getMessage('module.place.overlab') }) } @@ -3114,62 +3115,6 @@ export function useModuleBasicSetting(tabNum) { return isDisjoint } - const getModuleStatistics = () => { - const surfaces = canvas.getObjects().filter((obj) => POLYGON_TYPE.MODULE_SETUP_SURFACE === obj.name) - // console.log('🚀 ~ getModuleStatistics ~ surfaces:', surfaces) - let totalWpout = 0 - let moduleInfo = {} - const rows = surfaces.map((surface) => { - let wpOut = 0 - moduleInfo = {} - surface.modules.forEach((module) => { - if (!moduleInfo[module.moduleInfo.itemId]) { - moduleInfo[module.moduleInfo.itemId] = { name: module.moduleInfo.itemNm, amount: 0, id: module.moduleInfo.itemId } - } - wpOut += +module.moduleInfo.wpOut - - moduleInfo[module.moduleInfo.itemId].amount++ - }) - totalWpout += wpOut - // console.log('🚀 ~ moduleData.rows=surfaces.map ~ module:', module) - const rowObject = {} - Object.keys(moduleInfo).forEach((key) => { - rowObject[key] = moduleInfo[key].amount - }) - return { - ...rowObject, // 총 발전량 = 발전량 * 모듈 개수 - ...surface, - name: canvas.getObjects().filter((obj) => obj.id === surface.parentId)[0].directionText, // 지붕면 - // powerGeneration: wpOut.toLocaleString('ko-KR', { maximumFractionDigits: 4 }), - wpOut: (wpOut / 1000).toFixed(3), - } - }) - - // console.log('🚀 ~ getModuleStatistics ~ rows:', rows) - // console.log('🚀 ~ getModuleStatistics ~ moduleInfo:', moduleInfo) - const header = [ - { name: getMessage('modal.panel.batch.statistic.roof.shape'), prop: 'name' }, - ...Object.keys(moduleInfo).map((key) => { - return { name: moduleInfo[key].name, prop: key } - }), - { name: `${getMessage('modal.panel.batch.statistic.power.generation.amount')}(kW)`, prop: 'wpOut' }, - ] - let footer = [getMessage('modal.panel.batch.statistic.total')] - let footerData = {} - rows.forEach((row) => { - Object.keys(moduleInfo).map((key) => { - if (!footerData[key]) footerData[key] = 0 - footerData[key] += row[key] - }) - }) - Object.keys(footerData).forEach((key) => { - footer.push(footerData[key]) - }) - footer.push((totalWpout / 1000).toFixed(3)) - // console.log({ header: header, rows, footer: footer }) - setModuleStatistics({ header: header, rows, footer: footer }) - } - /** * 모듈의 너비와 높이를 계산하는 함수 * @param {object} maxLengthLine 최대 길이 라인 diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 8abbae3c..da4e8a30 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -2157,6 +2157,18 @@ export const useTrestle = () => { rackRows: rack.rackRowsCd, } }) + + let smartRackParams = Object.values(smartRackGroup).map((smartRack, index) => { + return { + seq: index, + itemId: smartRack[0].rackId, + rackFittingCnt: smartRack[0].supFitQty, + rackRows: smartRack[0].rackRowsCd, + } + }) + + rackParams = [...rackParams, ...smartRackParams] + const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId) const roofMaterialIndex = parent.roofMaterial.index const moduleSelection = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex) diff --git a/src/locales/ja.json b/src/locales/ja.json index 927287e8..a42f9cec 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -907,7 +907,7 @@ "estimate.detail.header.specialEstimateProductInfo": "製品情報", "estimate.detail.sepcialEstimateProductInfo.totAmount": "数量(PCS)", "estimate.detail.sepcialEstimateProductInfo.totVolKw": "容量(kW)", - "estimate.detail.sepcialEstimateProductInfo.supplyPrice": "供給価格", + "estimate.detail.sepcialEstimateProductInfo.supplyPrice": "見積価格", "estimate.detail.sepcialEstimateProductInfo.vatPrice": "税(10%)", "estimate.detail.sepcialEstimateProductInfo.totPrice": "総額", "estimate.detail.sepcialEstimateProductInfo.pkgUnitPrice": "住宅PKG単価(W)", @@ -920,7 +920,7 @@ "estimate.detail.showPrice.description1": "製品価格OPEN", "estimate.detail.showPrice.description2": "追加の変更品目", "estimate.detail.showPrice.description3": "添付必須", - "estimate.detail.showPrice.description4": "クリックして製品の特異性を確認する", + "estimate.detail.showPrice.description4": "クリックで製品特記事項を確認できます", "estimate.detail.showPrice.addItem": "製品追加", "estimate.detail.showPrice.delItem": "製品の削除", "estimate.detail.itemTableHeader.dispOrder": "アイテム",