49 lines
2.1 KiB
TypeScript
49 lines
2.1 KiB
TypeScript
import Modal from '@/components/ui/modal';
|
|
import { VerticalTable } from '@/components/ui/verticalTable';
|
|
import { UiTable } from '@common/business_components/ui';
|
|
import { Button, TableCell } from '@common/components/ui';
|
|
import React, { useState } from 'react'
|
|
|
|
// 하수처리시설
|
|
const headList = [
|
|
{ id: "title", title: "하수도정비 기본계획보고서" },
|
|
{ id: "cad", title: "하수도대장 평면도" },]
|
|
const modalHeadList = [
|
|
{ id: "no", title: "번호" },
|
|
{ id: "year", title: "승인연도" },
|
|
{ id: "cad", title: '평면도'},
|
|
{ id: "fileNm", title: "파일명" },
|
|
{ id: "date", title: "입력시간" },
|
|
]
|
|
|
|
const SwtrmtFclt = () => {
|
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
const [modalTitle, setModalTitle] = useState<string>('');
|
|
const openModal = (title:string) => {
|
|
setIsModalOpen(true);
|
|
setModalTitle(title)
|
|
};
|
|
const closeModal = () => {
|
|
setIsModalOpen(false);
|
|
};
|
|
return (
|
|
<div>
|
|
<VerticalTable children={{
|
|
title: <Button onClick={() => openModal('하수도정비 기본계획보고서')}>보고서</Button>,
|
|
cad: <Button onClick={() => openModal('하수도대장 평면도')}>평면도</Button>,
|
|
}} headName='디지털 자료관 연계정보' tableData={[]} headlist={headList} pageSize={20} total={0} cellClick={undefined} isEditable={true} onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
}}></VerticalTable>
|
|
<Modal isModalOpen={isModalOpen} setIsModalOpen={setIsModalOpen} closeModal={closeModal}>
|
|
<div className='grid grid-col-2'>
|
|
<UiTable headName={modalTitle} tableData={[]} headlist={modalHeadList} pageSize={20} total={0} cellClick={undefined} children={undefined} onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
}
|
|
}></UiTable>
|
|
</div>
|
|
</Modal>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default SwtrmtFclt |