Files
frontend/apps/sn/app/(map-layout)/map/components/popupComponent/stormWaterPump.tsx
T

37 lines
1.3 KiB
TypeScript

/**
* ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (빗물펌프)
*
* 📄 StormWaterPump
* 빗물펌프 정보 컴포넌트
*
* - 빗물펌프의 자체입력정보 표시 및 편집 기능
* - VerticalTable을 통한 입력 폼 렌더링
*/
import { VerticalTable } from '@/components/ui/verticalTable';
import React from 'react'
const inputColumn = [
{ id: "swtrmtZoneNm", title: "처리구역", type: "input" },
{ id: "mltvDtdvNm", title: "배수분구", type: "input" },
]
// 빗물펌프
const StormWaterPump = ({ featureData }: { featureData: Record<string, any> }) => {
const validKey = inputColumn.map((item) => item.id);
const filteredData = featureData && Object.entries(featureData).filter(([key]) => validKey.includes(key)).reduce((obj: Record<string, any>, [key, value]) => { obj[key] = value; return obj; }, {});
return (
<VerticalTable
headName='입력정보'
tableData={[filteredData]}
headlist={inputColumn}
pageSize={0}
total={0}
children={undefined}
cellClick={undefined}
isEditable={true}
onPageChange={function (page: number): void {
throw new Error('Function not implemented.');
}}
/>
)
}
export default StormWaterPump