80 lines
2.8 KiB
TypeScript
80 lines
2.8 KiB
TypeScript
import { useState } from "react";
|
|
|
|
import SearchForm from "@/components/module/SearchForm";
|
|
import { DataGrid } from '@rsone/components';
|
|
import SubmitButton from "@/components/button/SumitButton";
|
|
import SaveButton from "@/components/button/SaveButton";
|
|
import LastYearDataButton from "@/components/button/LastYearDataButton";
|
|
import SubmitExceptionButton from "@/components/button/SubmitExceptionButton";
|
|
import AddArticleButton from "@/components/button/AddArticleButton";
|
|
import DeleteArticleButton from "@/components/button/DeleteArticleButton";
|
|
import NotApplicableCheckButton from "@/components/button/NotApplicableCheckButton";
|
|
|
|
import { PumpingStationInpColumn } from "@/components/util/column/input/PumpingStationInpColumn"
|
|
|
|
// 하수도 통계 관리 > 05. 펌프장
|
|
const PumpingStationInp = () => {
|
|
|
|
const SubmitExceptionFunc = () => {
|
|
console.log('submit exception');
|
|
// 예외 제출 로직
|
|
};
|
|
|
|
const getLastYearDataFunc = () => {
|
|
console.log('get last year data');
|
|
// 지난연도 데이터 가져오기 로직
|
|
};
|
|
|
|
const submitFunc = () => {
|
|
console.log('submit');
|
|
// 제출 로직
|
|
};
|
|
|
|
const saveFunc = () => {
|
|
console.log('save');
|
|
// 저장 로직
|
|
};
|
|
|
|
const addArticleFunc = () => {
|
|
console.log('save');
|
|
// 항목 추가 로직
|
|
};
|
|
|
|
const deleteArticleFunc = () => {
|
|
console.log('save');
|
|
// 항목 제외 로직
|
|
};
|
|
|
|
const [rowData, setRowData] = useState<Record<string, string | number>[]>([]);
|
|
const [isNotApplicable, setIsNotApplicable] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
<SearchForm fctName={true} />
|
|
<div className="card !py-0">
|
|
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
|
<SubmitExceptionButton SubmitExceptionFunc={SubmitExceptionFunc} />
|
|
<LastYearDataButton getLastYearDataFunc={getLastYearDataFunc} />
|
|
<SubmitButton submitFunc={submitFunc} />
|
|
<SaveButton saveFunc={saveFunc} />
|
|
</div>
|
|
</div>
|
|
<div className="card !py-0">
|
|
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
|
<NotApplicableCheckButton isCheck={isNotApplicable} setIsCheck={setIsNotApplicable} />
|
|
<AddArticleButton addArticleFunc={addArticleFunc} />
|
|
<DeleteArticleButton deleteArticleFunc={deleteArticleFunc} />
|
|
</div>
|
|
</div>
|
|
<DataGrid
|
|
columnInfo={ PumpingStationInpColumn }
|
|
rowStartNum={3}
|
|
fixedColumns={3}
|
|
rowData={rowData}
|
|
setRowData={setRowData}
|
|
/>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default PumpingStationInp; |