refactor: 04.하수저류시설 및 빗물펌프 tab 구조 분리 & footer 적용
- tab별 컬럼 정의 파일 분리 (SewageReservoirColumn, RainfallPumpStationColumn) - 저장 로직에서 필요한 컬럼은 hidden 컬럼으로 변경, footer 적용
This commit is contained in:
@@ -6,11 +6,28 @@ import SaveButton from "@/components/button/SaveButton";
|
||||
import LastYearDataButton from "@/components/button/LastYearDataButton";
|
||||
import SubmitExceptionButton from "@/components/button/SubmitExceptionButton";
|
||||
|
||||
import { SewageReservoirPumpMngColumnInfoList } from "@/components/util/column/management/SewageReservoirPumpMngColumn";
|
||||
import { SewageReservoirColumn } from "@/components/util/column/management/sewageReservoirPump/SewageReservoirColumn";
|
||||
import { RainfallPumpStationColumn } from "@/components/util/column/management/sewageReservoirPump/RainfallPumpStationColumn";
|
||||
|
||||
// 하수도 통계 관리 > 04. 하수저류 시설 및 빗물 펌프장
|
||||
const SewageReservoirPumpMng = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
// tab List
|
||||
const SewageReservoirPumpMngColumnInfoList = [
|
||||
SewageReservoirColumn,
|
||||
RainfallPumpStationColumn
|
||||
];
|
||||
|
||||
const submitExceptionFunc = () => {
|
||||
console.log('submit exception');
|
||||
// 예외 제출 로직
|
||||
};
|
||||
|
||||
const getLastYearDataFunc = () => {
|
||||
console.log('get last year data');
|
||||
// 지난연도 데이터 가져오기 로직
|
||||
};
|
||||
|
||||
const submitFunc = () => {
|
||||
console.log('submit');
|
||||
@@ -22,24 +39,14 @@ const SewageReservoirPumpMng = () => {
|
||||
// 저장 로직
|
||||
};
|
||||
|
||||
const getLastYearDataFunc = () => {
|
||||
console.log('get last year data');
|
||||
// 지난연도 데이터 가져오기 로직
|
||||
};
|
||||
|
||||
const submitExceptionFunc = () => {
|
||||
console.log('submit exception');
|
||||
// 예외 제출 로직
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<SearchForm userMenual={true} />
|
||||
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
||||
<SubmitExceptionButton SubmitExceptionFunc={submitExceptionFunc} />
|
||||
<LastYearDataButton getLastYearDataFunc={getLastYearDataFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
<SubmitButton submitFunc={submitFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewageReservoirPumpMngColumnInfoList} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user