중점우수토실 여부 props로 넘기도록 수정
iipbs_sn / build (push) Waiting to run

This commit is contained in:
JIeunhuh
2025-06-04 16:19:44 +09:00
parent 17f9c3c5a9
commit 2e47bca8d3
2 changed files with 6 additions and 4 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import Ssc from "../popupComponent/Ssc";
import StormWaterPump from "../popupComponent/stormWaterPump";
import SwtrmtFclt from "../popupComponent/SwtrmtFclt";
type LayerComponentProps = { featureData: any };
type LayerComponentProps = { featureData: any; chkMainSsc?: boolean };
type LayerContentMap = {
[key: string]: {
component?: React.FC<LayerComponentProps>;
@@ -21,7 +21,7 @@ const layerContentMap: LayerContentMap = {
},
"하수처리구역": { },
"우수토실":{component: Ssc,},
"중점우수토실":{component: Ssc, props: { chkMainSsc: true } }, // 중점우수토실 여부 설정
"중점우수토실":{component: Ssc, }, // 중점우수토실 여부 설정
"하수관로":{component: MsSwagePpl,},
"하수맨홀":{component: smh,},
"빗물펌프":{component:StormWaterPump},
@@ -35,7 +35,7 @@ export const getLayerContentComponent = (layerNm: string): React.FC<LayerCompone
// component가 없으면 null 반환
return () => null;
}
return component.component, component.props;
return component.component
};
// 사용자 입력 필드 (보수 및 갱신, 청소 및 준설, 점검 및 진단)
export const handleInputChange = (section: string,
+3 -1
View File
@@ -21,6 +21,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
const [fetchData, setfetchData] = useState<any>(); // api 호출여부
const contentRef = useRef<HTMLDivElement>(null);
const [isModalOpen, setIsModalOpen] = useState(false); // 모달 열기 상태
const [chkMainSsc, setChkMainSsc] = useState(false); // 중점우수토실 여부
// 피쳐데이터의 현재 레이어 이름 가져오는 함수
const getSelectedLayers = () => {
let result = null;
@@ -62,6 +63,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
break;
case '중점우수토실':
setButtonChk(false)
setChkMainSsc(true)
break;
case '우수토실':
setButtonChk(true)
@@ -155,7 +157,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
</Button> : null}
</div>
<Modal isModalOpen={isModalOpen} title="자체입력정보 저장" setIsModalOpen={setIsModalOpen} closeModal={handleModalClose} saveModal={handleModalSave}><div className="text-lg">정보를 저장하시겠습니까?</div></Modal>
{ContentComponent && <ContentComponent featureData={fetchData} />}
{ContentComponent && <ContentComponent featureData={fetchData} chkMainSsc={chkMainSsc} />}
</div>
</div>
)