From c464632b1a12fb4b78e27fd2989d6a6b8a0ddc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Thu, 19 Jun 2025 10:13:43 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[1114]=20:=20[=E3=80=90HANASYS=20DESIGN?= =?UTF-8?q?=E3=80=91HuaweiPCS=E3=81=A7=E4=BD=B5=E8=A8=AD=E7=94=A8=E3=81=AE?= =?UTF-8?q?PCS=E3=82=92=E7=A9=8D=E7=AE=97=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=80=82]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [작업내용] : pscItem 비교시 series조건 추가 --- .../modal/circuitTrestle/step/PowerConditionalSelect.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx b/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx index b7fd39b4..cf79634f 100644 --- a/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx @@ -5,6 +5,7 @@ import { useMasterController } from '@/hooks/common/useMasterController' import { useMessage } from '@/hooks/useMessage' import { useSwal } from '@/hooks/useSwal' import { pcsCheckState } from '@/store/circuitTrestleAtom' +import { sessionStore } from '@/store/commonAtom' import { globalLocaleStore } from '@/store/localeAtom' import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions' import { isNullOrUndefined } from '@/util/common-utils' @@ -38,6 +39,7 @@ export default function PowerConditionalSelect(props) { } = props const [pcsCheck, setPcsCheck] = useRecoilState(pcsCheckState) + const sessionState = useRecoilValue(sessionStore) const { getMessage } = useMessage() const [selectedRow, setSelectedRow] = useState(null) const globalLocale = useRecoilValue(globalLocaleStore) @@ -132,7 +134,7 @@ export default function PowerConditionalSelect(props) { mixMatlNo: item.mixMatlNo, } }) - getPcsModelList({ pcsMkrCd, pcsSerList, moduleItemList }).then((res) => { + getPcsModelList({ pcsMkrCd, pcsSerList, moduleItemList, storeId: sessionState.storeId }).then((res) => { if (res?.result.code === 200 && res?.data) { setModels( res.data.map((model) => { @@ -177,7 +179,7 @@ export default function PowerConditionalSelect(props) { if (selectedMaker.pcsMkrMultiType === PCS_MKR_MULTI_TYPE.MULTI) { setSelectedModels([...selectedModels, { ...selectedRow, id: uuidv4() }]) - } else if (!selectedModels.find((m) => m.itemId === selectedRow.itemId)) { + } else if (!selectedModels.find((m) => m.itemId === selectedRow.itemId && m.pcsSerCd === selectedRow.pcsSerCd)) { setSelectedModels([...selectedModels, { ...selectedRow, id: uuidv4() }]) } setSelectedRow(null) From bddc753e526a42f26f1ac5c47185220b743a177b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Thu, 19 Jun 2025 10:14:34 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[1118]=20:=20[=E3=80=90HANASYS=20DESIGN?= =?UTF-8?q?=E3=80=91CST053=20-=20DT=E3=82=B9=E3=83=AA=E3=83=A0=E3=81=AE?= =?UTF-8?q?=E5=BC=B7=E5=8C=96=E6=96=BD=E5=B7=A5=E3=83=BB=E5=A4=9A=E9=9B=AA?= =?UTF-8?q?=E6=96=BD=E5=B7=A5=E3=81=8C=E8=A8=AD=E7=BD=AE=E5=87=BA=E6=9D=A5?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=80=82]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [작업내용] : 하제비치 수정시 하위 항목 초기화 --- .../floor-plan/modal/basic/step/Trestle.jsx | 15 ++++++++++++++- src/hooks/module/useModuleTrestle.js | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/floor-plan/modal/basic/step/Trestle.jsx b/src/components/floor-plan/modal/basic/step/Trestle.jsx index 070ce979..1ce09bf1 100644 --- a/src/components/floor-plan/modal/basic/step/Trestle.jsx +++ b/src/components/floor-plan/modal/basic/step/Trestle.jsx @@ -174,6 +174,19 @@ const Trestle = forwardRef((props, ref) => { }) } + const onChangeHajebichi = (e) => { + setHajebichi(e) + dispatch({ + type: 'SET_HAJEBICHI', + roof: { + moduleTpCd: selectedModules.itemTp ?? '', + roofMatlCd: selectedRoof?.roofMatlCd ?? '', + raft: selectedRaftBase?.clCode, + hajebichi: e, + }, + }) + } + const onChangeTrestleMaker = (e) => { setSelectedTrestle(e) dispatch({ @@ -578,7 +591,7 @@ const Trestle = forwardRef((props, ref) => { type="text" className="input-origin block" disabled={selectedRoof.roofPchAuth === 'R'} - onChange={(e) => setHajebichi(e.target.value)} + onChange={(e) => onChangeHajebichi(e.target.value)} value={hajebichi} /> diff --git a/src/hooks/module/useModuleTrestle.js b/src/hooks/module/useModuleTrestle.js index a39c8c1d..fc588d09 100644 --- a/src/hooks/module/useModuleTrestle.js +++ b/src/hooks/module/useModuleTrestle.js @@ -12,6 +12,7 @@ const trestleReducer = (state, action) => { switch (action.type) { case 'SET_LENGTH': case 'SET_RAFT_BASE': + case 'SET_HAJEBICHI': case 'SET_TRESTLE_MAKER': case 'SET_CONST_MTHD': case 'SET_ROOF_BASE': From 4056206af728c5a96edb1a8e32f1ed9bfa86bb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Thu, 19 Jun 2025 10:15:01 +0900 Subject: [PATCH 3/9] =?UTF-8?q?api:=20getModuleTypeItemList=EC=97=90=20sto?= =?UTF-8?q?reId=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/common/useMasterController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hooks/common/useMasterController.js b/src/hooks/common/useMasterController.js index dae68c69..2c3dec65 100644 --- a/src/hooks/common/useMasterController.js +++ b/src/hooks/common/useMasterController.js @@ -1,7 +1,9 @@ import { useAxios } from '@/hooks/useAxios' import { useMessage } from '@/hooks/useMessage' import { useSwal } from '@/hooks/useSwal' +import { sessionStore } from '@/store/commonAtom' import { getQueryString } from '@/util/common-utils' +import { useRecoilValue } from 'recoil' /** * 마스터 컨트롤러 훅 @@ -11,6 +13,7 @@ export function useMasterController() { const { get, post, put } = useAxios() const { getMessage } = useMessage() const { swalFire } = useSwal() + const sessionState = useRecoilValue(sessionStore) /** * 지붕재 목록 조회 @@ -34,7 +37,7 @@ export function useMasterController() { return null } const paramString = `?${paramArr.map((item) => `arrRoofMatlCd=${item}`).join('&')}` - return await get({ url: `/api/v1/master/getModuleTypeItemList${paramString}` }).then((res) => { + return await get({ url: `/api/v1/master/getModuleTypeItemList${paramString}&storeId=${sessionState.storeId}` }).then((res) => { // console.log('🚀🚀 ~ getModuleTypeItemList ~ res:', res) return res }) From 0a6d58cba89477f02f484fd4217fe439eaeb3412 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 19 Jun 2025 11:21:53 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=EB=B3=B4=EC=A1=B0=EC=84=A0=EC=9D=98=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=20actualSize=20planeSize=20=EB=8F=99?= =?UTF-8?q?=EC=9D=BC=ED=95=98=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useAuxiliaryDrawing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/roofcover/useAuxiliaryDrawing.js b/src/hooks/roofcover/useAuxiliaryDrawing.js index c854ae77..7b8c2596 100644 --- a/src/hooks/roofcover/useAuxiliaryDrawing.js +++ b/src/hooks/roofcover/useAuxiliaryDrawing.js @@ -887,7 +887,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { line.attributes = { ...line.attributes, roofId: roofBase.id, - actualSize: line.attributes?.actualSize ?? 0, + actualSize: line.attributes?.actualSize ?? line.getLength(), planeSize: line.getLength(), } line.isAuxiliaryFixed = true From 6e873574664b8a73bddebd8c875f67a77d1a02a9 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 19 Jun 2025 11:22:24 +0900 Subject: [PATCH 5/9] =?UTF-8?q?=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useAuxiliaryDrawing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/roofcover/useAuxiliaryDrawing.js b/src/hooks/roofcover/useAuxiliaryDrawing.js index 7b8c2596..c854ae77 100644 --- a/src/hooks/roofcover/useAuxiliaryDrawing.js +++ b/src/hooks/roofcover/useAuxiliaryDrawing.js @@ -887,7 +887,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { line.attributes = { ...line.attributes, roofId: roofBase.id, - actualSize: line.attributes?.actualSize ?? line.getLength(), + actualSize: line.attributes?.actualSize ?? 0, planeSize: line.getLength(), } line.isAuxiliaryFixed = true From af29c83eb421dc5696b3f47007331e496649a445 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Thu, 19 Jun 2025 13:04:02 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[1115]=20:=20[=E8=A6=8B=E7=A9=8D=E6=9B=B8?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E5=BE=8C=E3=81=AE=E5=9B=B3=E9=9D=A2=E3=81=AE?= =?UTF-8?q?=E5=A4=A7=E3=81=8D=E3=81=95=E3=82=92=E8=AA=BF=E6=95=B4=E3=81=97?= =?UTF-8?q?=E3=81=A6=E6=AC=B2=E3=81=97=E3=81=84]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [작업내용] : 엑셀 다운로드 pdf 다운로드 이미지 비율 수정 --- src/app/api/image/canvas/route.js | 64 +++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/src/app/api/image/canvas/route.js b/src/app/api/image/canvas/route.js index 2a20da92..600951fb 100644 --- a/src/app/api/image/canvas/route.js +++ b/src/app/api/image/canvas/route.js @@ -38,10 +38,14 @@ const cropImage = async (Key, width, height, left, top) => { } const buffer = Buffer.concat(chunks) - const image = await Jimp.read(buffer) - + let image = await Jimp.read(buffer) image.autocrop({ tolerance: 0.0002, leaveBorder: 10 }) - return await image.getBuffer('image/png') + + const resizedImage = await resizeImage(image).then((result) => { + return result + }) + + return await resizedImage.getBuffer('image/png') // Convert stream to buffer // const chunks = [] @@ -77,6 +81,60 @@ const cropImage = async (Key, width, height, left, top) => { } } +//크롭된 이미지를 가지고 높이 기준 -> 너비 기준으로 비율 변경 후 이미지에 추가 +const resizeImage = async (image) => { + // //이미지를 cm로 변환 + let imageHeightCm = Math.round((image.bitmap.height * 2.54) / 96) //원본 이미지 센치로 변환 + let imageWidthCm = Math.round((image.bitmap.width * 2.54) / 96) //원본 이미지 센치로 변환 + const calcWidthRatio = 12.89 / imageHeightCm //원본 비율 계산 + + let convertHeightCm = Math.round(imageHeightCm * calcWidthRatio) //변환된 이미지 CM + let convertWidthCm = Math.round(imageWidthCm * calcWidthRatio) //변환된 이미지 CM + + let convertHeightBitmap = Math.round((convertHeightCm * 96) / 2.54) //비트맵 사이즈로 변환 + let convertWidthBitmap = Math.round((convertWidthCm * 96) / 2.54) //비트맵 사이즈로 변환 + + //높이 기준으로 리사이즈를 함 + image.resize({ w: convertWidthBitmap, h: convertHeightBitmap, mode: Jimp.RESIZE_BILINEAR }) + + //높이를 기준으로 변경 후에 가로 폭이 더 넓으면 가로폭 기준으로 다시 사이즈를 조절한다 + if (convertWidthCm > 35.4) { + //너비가 더 클때 + imageHeightCm = Math.round((image.bitmap.height * 2.54) / 96) //높이 기준으로 리사이즈된 이미지 크기 + imageWidthCm = Math.round((image.bitmap.width * 2.54) / 96) //높이 기준으로 리사이즈된 이미지 크기 + + const calcWidthRatio = 35.4 / imageWidthCm //리사이즈된 이미지 가로 비율 계산 + + convertHeightCm = Math.round(imageHeightCm * calcWidthRatio) //너비 기준 이미지 비율 계산 + convertWidthCm = Math.round(imageWidthCm * calcWidthRatio) //변환된 이미지 CM + + convertHeightBitmap = Math.round((convertHeightCm * 96) / 2.54) //비트맵 사이즈로 변환 + convertWidthBitmap = Math.round((convertWidthCm * 96) / 2.54) //비트맵 사이즈로 변환 + + image.resize({ w: convertWidthBitmap, h: convertHeightBitmap, mode: Jimp.RESIZE_BILINEAR }) //이미지 리사이즈 + } + + //엑셀 템플릿 너비 35.4cm, 높이 12.89cm + const convertStandardWidth = Math.round((35.4 * 96) / 2.54) + const convertStandardHeight = Math.round((12.89 * 96) / 2.54) + + //엑셀 템플릿 사이즈로 배경 이미지를 생성 + const mixedImage = new Jimp({ width: convertStandardWidth, height: convertStandardHeight, color: 0xffffffff }) + + //이미지를 중앙에 배치 + const x = Math.floor((mixedImage.bitmap.width - image.bitmap.width) / 2) + const y = Math.floor((mixedImage.bitmap.height - image.bitmap.height) / 2) + + //이미지를 배경 이미지에 합성 + mixedImage.composite(image, x, y, { + mode: Jimp.BLEND_SOURCE_OVER, + opacitySource: 1, // 원본 투명도 유지 + opacityDest: 1, + }) + + return mixedImage +} + export async function POST(req) { try { const formData = await req.formData() From 8853b7ae8617b68fd27a9ce6b112062061091539 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 19 Jun 2025 14:56:14 +0900 Subject: [PATCH 7/9] =?UTF-8?q?=EB=AA=A8=EB=93=A0=20=EA=B0=81=EC=9D=B4=204?= =?UTF-8?q?5=EB=8F=84=EC=9D=98=20=EB=B0=B0=EC=88=98=EC=9D=B8=EC=A7=80=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=ED=95=98=EB=8A=94=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/common.js | 1 + src/hooks/usePolygon.js | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/common/common.js b/src/common/common.js index 0982ba6b..ddd03e99 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -212,6 +212,7 @@ export const SAVE_KEY = [ 'endPoint', 'editable', 'isSortedPoints', + 'isMultipleOf45', ] export const OBJECT_PROTOTYPE = [fabric.Line.prototype, fabric.Polygon.prototype, fabric.Triangle.prototype, fabric.Group.prototype] diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index b83d4ac4..5ceae5f1 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -1162,6 +1162,8 @@ export const usePolygon = () => { pitch: pitch, }) + roof.isMultipleOf45 = calculateDegree(roof) + //allLines중 생성된 roof와 관련있는 line을 찾는다. const roofLines = [...polygonLines, ...polygon.innerLines].filter((line) => { @@ -1208,6 +1210,24 @@ export const usePolygon = () => { canvas.discardActiveObject() } + const calculateDegree = (polygon) => { + const degrees = [] + // polygon.lines를 순회하며 각도를 구해 출력 + polygon.lines.forEach((line, idx) => { + const dx = line.x2 - line.x1 + const dy = line.y2 - line.y1 + const rad = Math.atan2(dy, dx) + const degree = (rad * 180) / Math.PI + degrees.push(degree) + }) + + function isMultipleOf45(degree, epsilon = 1) { + return Math.abs(degree % 45) <= epsilon || Math.abs((degree % 45) - 45) <= epsilon + } + + return degrees.every((degree) => isMultipleOf45(degree)) + } + const getSplitRoofsPoints = (allLines) => { // ==== Utility functions ==== From 9b8727a63a7cbc8a35b62ab63ef44f9fda3ca449 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 19 Jun 2025 15:04:29 +0900 Subject: [PATCH 8/9] =?UTF-8?q?QPolygon=20=EA=B8=B0=EB=B3=B8=20=EC=86=8D?= =?UTF-8?q?=EC=84=B1=20=EC=B6=94=EA=B0=80(isMultipleOf45)=20-=20polygon?= =?UTF-8?q?=EC=9D=B4=20=EC=9D=B4=EB=A3=A8=EB=8A=94=20=EB=AA=A8=EB=93=A0=20?= =?UTF-8?q?=EA=B0=81=EB=8F=84=EA=B0=80=2045=EB=8F=84=EC=9D=98=20=EB=B0=B0?= =?UTF-8?q?=EC=88=98=EC=9D=B8=EC=A7=80=20=ED=99=95=EC=9D=B8=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=BB=AC=EB=9F=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/fabric/QPolygon.js | 18 ++++++++++++++++++ src/hooks/usePolygon.js | 20 -------------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index def5f45e..0315ac76 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -210,8 +210,26 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { line.startPoint = point line.endPoint = nextPoint this.lines.push(line) + this.calculateDegree() }) }, + calculateDegree() { + const degrees = [] + // polygon.lines를 순회하며 각도를 구해 출력 + this.lines.forEach((line, idx) => { + const dx = line.x2 - line.x1 + const dy = line.y2 - line.y1 + const rad = Math.atan2(dy, dx) + const degree = (rad * 180) / Math.PI + degrees.push(degree) + }) + + function isMultipleOf45(degree, epsilon = 1) { + return Math.abs(degree % 45) <= epsilon || Math.abs((degree % 45) - 45) <= epsilon + } + + this.isMultipleOf45 = degrees.every((degree) => isMultipleOf45(degree)) + }, /** * 보조선 그리기 diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index 5ceae5f1..b83d4ac4 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -1162,8 +1162,6 @@ export const usePolygon = () => { pitch: pitch, }) - roof.isMultipleOf45 = calculateDegree(roof) - //allLines중 생성된 roof와 관련있는 line을 찾는다. const roofLines = [...polygonLines, ...polygon.innerLines].filter((line) => { @@ -1210,24 +1208,6 @@ export const usePolygon = () => { canvas.discardActiveObject() } - const calculateDegree = (polygon) => { - const degrees = [] - // polygon.lines를 순회하며 각도를 구해 출력 - polygon.lines.forEach((line, idx) => { - const dx = line.x2 - line.x1 - const dy = line.y2 - line.y1 - const rad = Math.atan2(dy, dx) - const degree = (rad * 180) / Math.PI - degrees.push(degree) - }) - - function isMultipleOf45(degree, epsilon = 1) { - return Math.abs(degree % 45) <= epsilon || Math.abs((degree % 45) - 45) <= epsilon - } - - return degrees.every((degree) => isMultipleOf45(degree)) - } - const getSplitRoofsPoints = (allLines) => { // ==== Utility functions ==== From c25e8b2a4af424d03c5a64fdae850404833ebe0d Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 19 Jun 2025 15:39:23 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[1116]=20=EC=96=91=EB=8B=A8=EC=BC=80?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=EC=98=A4=EC=9E=91=EB=8F=99=20=3D>=20M12,?= =?UTF-8?q?=20S13=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index e59dd9ff..9a3dd74d 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -731,7 +731,7 @@ export default function Estimate({}) { /* 케이블 select 변경시 */ const onChangeDisplayCableItem = (value, itemList) => { itemList.map((item, index) => { - if (item.dispCableFlg === '1' && item.itemTpCd !== 'M12') { + if (item.dispCableFlg === '1' && item.itemTpCd !== 'M12' && item.itemTpCd !== 'S13') { if (value !== '') { onChangeDisplayItem(value, item.dispOrder, index, true) } @@ -743,7 +743,7 @@ export default function Estimate({}) { /* 케이블 select 변경시 */ const onChangeDisplayDoubleCableItem = (value, itemList) => { itemList.map((item, index) => { - if (item.dispCableFlg === '1' && item.itemTpCd === 'M12') { + if (item.dispCableFlg === '1' && (item.itemTpCd === 'M12' || item.itemTpCd === 'S13')) { if (value !== '') { onChangeDisplayItem(value, item.dispOrder, index, true) } @@ -1103,7 +1103,7 @@ export default function Estimate({}) { if (item.dispCableFlg === '1' ) { dispCableFlgCnt++ - if(item.itemTpCd === 'M12') { + if(item.itemTpCd === 'M12' || item.itemTpCd === 'S13') { setCableDbItem(item.itemId) }else{ setCableItem(item.itemId) @@ -1179,7 +1179,7 @@ export default function Estimate({}) { if (item.dispCableFlg === '1'){ - if(item.itemTpCd === 'M12') { + if(item.itemTpCd === 'M12' || item.itemTpCd === 'S13') { setCableDbItem(item.itemId) }else{ setCableItem(item.itemId) @@ -2031,13 +2031,13 @@ export default function Estimate({}) { getOptionValue={(x) => x.clRefChr1} components={{ SingleValue: ({ children, ...props }) => { - return {(item.itemTpCd === 'M12')? item.itemName : props.data.clRefChr3} + return {(item.itemTpCd === 'M12' || item.itemTpCd === 'S13')? item.itemName : props.data.clRefChr3} }, }} isClearable={false} isDisabled={true} value={cableItemList.filter(function (option) { - return (item.itemTpCd === 'M12')? item.itemId : option.clRefChr1 === item.itemId + return (item.itemTpCd === 'M12' || item.itemTpCd === 'S13' )? item.itemId : option.clRefChr1 === item.itemId })} /> )}