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

60 lines
1.7 KiB
TypeScript

/**
* ➡️ 경로 : 하수관망도 메인 페이지 (시설물 클릭) - 오른쪽 팝업창 (하수처리시설)
*
* 📄 SwtrmtFclt
* 하수처리시설 정보 컴포넌트
*
* - 하수처리시설의 디지털 자료관 연계 정보 표시
* - VerticalTable을 통한 테이블 렌더링
* - 조회 버튼을 통한 모달 표시 및 ReportTab 연동
*/
'use client'
import React from 'react'
import { VerticalTable } from '@/components/ui/verticalTable';
import { Button } from '@common/components/ui';
import { openWindowPopup } from '@/features/windowPopup/lib/openWindowPopup';
// 하수처리시설
const headList = [
{ id: "title", title: "하수도정비 기본계획보고서" },
];
const SwtrmtFclt = ({ gisObject }: { gisObject: any }) => {
const ctpvNm = gisObject?.ctpv_nm;
const sggNm = gisObject?.sgg_nm;
const handleOpenReportPopup = () => {
const popupWindow = openWindowPopup("reportTab", {
ctpvNm,
sggNm,
sourcePath: window.location.pathname,
});
if (!popupWindow) {
alert('팝업이 차단되었습니다. 브라우저 팝업 허용 설정을 확인해주세요.');
}
};
return (
<div>
<VerticalTable
children={{
title: <Button className="gray" onClick={handleOpenReportPopup}>조회</Button>
}}
headName='디지털 자료관 연계정보'
tableData={[]}
headlist={headList}
pageSize={20}
total={0}
cellClick={undefined}
isEditable={true}
onPageChange={function (page: number): void {
throw new Error("Function not implemented.");
}}
/>
</div >
)
}
export default SwtrmtFclt