diff --git a/src/components/common/color-picker/ColorPickerModal.jsx b/src/components/common/color-picker/ColorPickerModal.jsx index 94f24f42..f6176bdb 100644 --- a/src/components/common/color-picker/ColorPickerModal.jsx +++ b/src/components/common/color-picker/ColorPickerModal.jsx @@ -33,54 +33,43 @@ export default function ColorPickerModal(props) { }, [isShow]) return ( - -
-
-

{getMessage('modal.color.picker.title')}

+ + { + if (setIsShow) { + setIsShow(false) + } + closePopup(id, isConfig) + }} + /> + +
+
+ +
+
+
-
-
-
-
-
- -
-
-
- -
-
-
-
+ ) } diff --git a/src/components/common/draggable/WithDraggable.jsx b/src/components/common/draggable/WithDraggable.jsx index 732d8ff7..e2f769cc 100644 --- a/src/components/common/draggable/WithDraggable.jsx +++ b/src/components/common/draggable/WithDraggable.jsx @@ -3,7 +3,16 @@ import { useState } from 'react' import Draggable from 'react-draggable' -export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 }, handle = '' }) { +export default function WithDraggable({ + isShow, + children, + pos = { x: 0, y: 0 }, + handle = '', + className = '', + isModal = true, + hasFooter = true, + isHidden = false, +}) { const [position, setPosition] = useState(pos) const handleOnDrag = (e, data) => { @@ -22,9 +31,52 @@ export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 }, onDrag={(e, data) => handleOnDrag(e, data)} handle={handle === '' ? '.modal-handle' : handle} > - {children} + {isModal ? ( +
+ {children} + {hasFooter && } +
+ ) : ( + <>{children} + )} )} ) } + +function WithDraggableHeader({ title, onClose, children }) { + return ( +
+

{title}

+ {onClose && ( + + )} +
+ ) +} + +function WithDraggableBody({ children }) { + return ( +
+
+
+ <>{children} +
+ ) +} + +function WithDraggablePanel({ children }) { + return <>{children} +} + +function WithDraggableFooter() { + return
+} + +WithDraggable.Header = WithDraggableHeader +WithDraggable.Body = WithDraggableBody +WithDraggable.Panel = WithDraggablePanel +WithDraggable.Footer = WithDraggableFooter diff --git a/src/components/common/font/FontSetting.jsx b/src/components/common/font/FontSetting.jsx index beb31aa3..0c3623f6 100644 --- a/src/components/common/font/FontSetting.jsx +++ b/src/components/common/font/FontSetting.jsx @@ -67,111 +67,101 @@ export default function FontSetting(props) { } return ( - -
-
-

{getMessage('modal.font')}

-
-
-
-
-
-
-
-
{getMessage('modal.font')}(F)
-
- { - setSelectedFont(e) - }} - showKey={'name'} - sourceKey={'value'} - targetKey={'value'} - /> -
-
-
-
{getMessage('modal.font.style')}(Y)
-
- { - setSelectedFontWeight(e) - }} - showKey={'name'} - targetKey={'id'} - sourceKey={'id'} - /> -
-
-
-
{getMessage('modal.font.size')}(S)
-
- setSelectedFontSize(e)} - showKey={'name'} - sourceKey={'value'} - targetKey={'value'} - /> -
-
-
-
{getMessage('modal.font.color')}
-
- { - setSelectedFontColor(e) - }} - /> -
-
-
-
-
{getMessage('modal.font.setting.display')}
-
- - Aaあぁアァ - -
-
-
{getMessage('modal.font.setting.info')}
-
-
- -
-
-
-
+
) } diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 3126f5bc..8b8b38bc 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -58,6 +58,9 @@ export default function Estimate({}) { const [storePriceList, setStorePriceList] = useState([]) //가격표시 option + const [cableItemList, setCableItemList] = useState([]) //케이블 리스트 + const [cableItem, setCableItem] = useState('') //케이블 선택값 + const [startDate, setStartDate] = useState(new Date()) const singleDatePickerProps = { startDate, @@ -96,6 +99,7 @@ export default function Estimate({}) { const initEstimate = (currPid = currentPid) => { console.log('🚀 ~ initEstimate ~ currPid:', currPid) + setCableItem('') closeAll() setObjectNo(objectRecoil.floorPlanObjectNo) @@ -107,6 +111,16 @@ export default function Estimate({}) { setHonorificCodeList(code1) } + // 케이블제품 공통코드 + const code2 = findCommonCode(117900) + if (code2 != null) { + code2.map((item) => { + item.value = item.clRefChr1 + item.label = item.clRefChr2 + }) + setCableItemList(code2) + } + //아이템 자동완성 목록 가져오기 const param = { saleStoreId: session.storeId, @@ -551,7 +565,7 @@ export default function Estimate({}) { } const getAbledItems = (items) => { - return items.filter((items) => items.paDispOrder === null) + return items.filter((items) => items.dispCableFlg !== '1' && items.paDispOrder === null) } const onChangeSelectAll = (e) => { @@ -684,6 +698,22 @@ export default function Estimate({}) { setItemChangeYn(true) } + /* 케이블 select 변경시 */ + const onChangeDisplayCableItem = (value, itemList) => { + //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 + if (estimateContextState.estimateType === 'YJSS') { + return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) + } + itemList.map((item, index) => { + if (item.dispCableFlg === '1') { + if (value !== '') { + onChangeDisplayItem(value, item.dispOrder, index) + } + } + }) + setCableItem(value) + } + // 아이템 자동완성 검색시 아이템 추가/변경시 const onChangeDisplayItem = (itemId, dispOrder, index) => { //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 @@ -1679,6 +1709,25 @@ export default function Estimate({}) { {getMessage('estimate.detail.showPrice.pricingBtn')}
+
+
+ +
+