st: refactor:
- data state 선언 위치 변경 - 데이터 필드 타입 및 format 설정 로직 추가
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SubmitButton from "@/components/button/SumitButton";
|
||||
@@ -9,6 +10,7 @@ import { PrivateSewageFacilityMngColumnInfoList } from "@/components/util/column
|
||||
|
||||
// 하수도 통계 관리 > 08. 개인하수처리시설
|
||||
const PrivateSewageFacilityMng = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const submitFunc = () => {
|
||||
// TODO: 제출 로직 구현
|
||||
@@ -43,7 +45,7 @@ const PrivateSewageFacilityMng = () => {
|
||||
<SubmitButton submitFunc={submitFunc} />
|
||||
</div>
|
||||
|
||||
<TabDataGrid columnInfo={PrivateSewageFacilityMngColumnInfoList} />
|
||||
<TabDataGrid columnInfo={PrivateSewageFacilityMngColumnInfoList} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SubmitButton from "@/components/button/SumitButton";
|
||||
@@ -9,6 +10,7 @@ import { SewagePipeMaintainMngColumnInfoList } from "@/components/util/column/ma
|
||||
|
||||
// 하수도 통계 관리 > 03. 하수관로 유지관리
|
||||
const SewagePipeMaintainMng = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const submitFunc = () => {
|
||||
console.log('제출 로직 실행');
|
||||
@@ -39,7 +41,7 @@ const SewagePipeMaintainMng = () => {
|
||||
<SubmitButton submitFunc={submitFunc} />
|
||||
</div>
|
||||
|
||||
<TabDataGrid columnInfo={SewagePipeMaintainMngColumnInfoList} />
|
||||
<TabDataGrid columnInfo={SewagePipeMaintainMngColumnInfoList} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SubmitButton from "@/components/button/SumitButton";
|
||||
@@ -17,6 +18,7 @@ import {
|
||||
|
||||
// 하수도 통계 관리 > 02. 하수관로
|
||||
const SewagePipeMng = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
// tab List
|
||||
const SewagePipeMngColumnInfoList = [
|
||||
@@ -59,7 +61,7 @@ const SewagePipeMng = () => {
|
||||
<LastYearDataButton getLastYearDataFunc={getLastYearDataFunc} />
|
||||
<SubmitExceptionButton SubmitExceptionFunc={SubmitExceptionFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewagePipeMngColumnInfoList}/>
|
||||
<TabDataGrid columnInfo={SewagePipeMngColumnInfoList} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SubmitButton from "@/components/button/SumitButton";
|
||||
@@ -9,6 +10,8 @@ import { SewageReservoirPumpMngColumnInfoList } from "@/components/util/column/m
|
||||
|
||||
// 하수도 통계 관리 > 04. 하수저류 시설 및 빗물 펌프장
|
||||
const SewageReservoirPumpMng = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const submitFunc = () => {
|
||||
console.log('submit');
|
||||
// 제출 로직
|
||||
@@ -38,7 +41,7 @@ const SewageReservoirPumpMng = () => {
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
<SubmitButton submitFunc={submitFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewageReservoirPumpMngColumnInfoList}/>
|
||||
<TabDataGrid columnInfo={SewageReservoirPumpMngColumnInfoList} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SubmitButton from "@/components/button/SumitButton";
|
||||
@@ -9,6 +10,7 @@ import { SewerageFinanceMngInfoList } from "@/components/util/column/management/
|
||||
|
||||
// 하수도 통계 관리 > 09. 하수도재정
|
||||
const SewerageFinanceMng = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const submitFunc = () => {
|
||||
// TODO: 제출 로직 구현
|
||||
@@ -41,7 +43,7 @@ const SewerageFinanceMng = () => {
|
||||
<SubmitButton submitFunc={submitFunc} />
|
||||
</div>
|
||||
|
||||
<TabDataGrid columnInfo={SewerageFinanceMngInfoList} />
|
||||
<TabDataGrid columnInfo={SewerageFinanceMngInfoList} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -9,6 +10,7 @@ import { PrivateSewageFacilityInfoListRvw } from "@/components/util/column/revie
|
||||
|
||||
|
||||
const PrivateSewageFacilityRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -41,7 +43,7 @@ const PrivateSewageFacilityRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={PrivateSewageFacilityInfoListRvw} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={PrivateSewageFacilityInfoListRvw} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -10,6 +10,7 @@ import { SewageExcretaRelatedInfoListRvw } from "@/components/util/column/review
|
||||
|
||||
|
||||
const SewageExcretaRelatedRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -42,7 +43,7 @@ const SewageExcretaRelatedRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewageExcretaRelatedInfoListRvw} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={SewageExcretaRelatedInfoListRvw} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -9,6 +10,7 @@ import { SewageExcretaSlurgeInfoList } from "@/components/util/column/review/Sew
|
||||
|
||||
|
||||
const SewageExcretaSlurgeRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -41,7 +43,7 @@ const SewageExcretaSlurgeRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewageExcretaSlurgeInfoList} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={SewageExcretaSlurgeInfoList} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -9,6 +10,7 @@ import { SewagePipeMaintainColumnInfoListRvw } from "@/components/util/column/re
|
||||
|
||||
|
||||
const SewagePipeMaintainRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -41,7 +43,7 @@ const SewagePipeMaintainRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewagePipeMaintainColumnInfoListRvw} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={SewagePipeMaintainColumnInfoListRvw} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -9,6 +10,7 @@ import { SewagePipeColumnInfoListRvw } from "@/components/util/column/review/Sew
|
||||
|
||||
|
||||
const SewagePipeRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -41,7 +43,7 @@ const SewagePipeRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewagePipeColumnInfoListRvw} />
|
||||
<TabDataGrid columnInfo={SewagePipeColumnInfoListRvw} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -9,6 +10,7 @@ import { SewageReservoirPumpInfoListRvw } from "@/components/util/column/review/
|
||||
|
||||
|
||||
const SewageReservoirPumpRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -41,7 +43,7 @@ const SewageReservoirPumpRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewageReservoirPumpInfoListRvw} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={SewageReservoirPumpInfoListRvw} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -9,6 +10,7 @@ import { SewerageFinanceInfoListRvw } from "@/components/util/column/review/Sewe
|
||||
|
||||
|
||||
const SewerageFinanceRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -41,7 +43,7 @@ const SewerageFinanceRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewerageFinanceInfoListRvw} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={SewerageFinanceInfoListRvw} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { ValueType } from "realgrid";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
@@ -21,12 +23,12 @@ const SeweragePenetrationRateRvw = () => {
|
||||
{ name: 'lgbsn', fieldName: '중권역', header: { text: '중권역' } },
|
||||
{ name: 'mdmbsn', fieldName: '소권역', header: { text: '소권역' } },
|
||||
{ name: 'specl_cntrpln_ar', fieldName: '특별대책지역', header: { text: '특별대책지역' } },
|
||||
{ name: 'total_popl', fieldName: '총인구', header: { text: '총인구' } },
|
||||
{ name: 'total_popl', fieldName: '총인구', header: { text: '총인구' }, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'popl_sm', fieldName: '내국인', header: { text: '내국인' } },
|
||||
{ name: 'frgnr_popl_sm', fieldName: '외국인', header: { text: '외국인' } },
|
||||
{ name: 'area', fieldName: '행정참고자료면적(㎢)', header: { text: '행정참고자료면적(㎢)' } },
|
||||
{ name: 'popltn_sm', fieldName: '총인구(명)', header: { text: '총인구(명)' } },
|
||||
{ name: 'ar_sm', fieldName: '총면적(㎢)', header: { text: '총면적(㎢)' } },
|
||||
{ name: 'ar_sm', fieldName: '총면적(㎢)', header: { text: '총면적(㎢)' }, valueType: ValueType.NUMBER },
|
||||
{ name: '계', fieldName: '계', header: { text: '계' } },
|
||||
//공공하수처리인구
|
||||
{ name: '합계', fieldName: '합계', header: { text: '합계' } },
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -9,6 +10,7 @@ import { SewerageServiceLevelInfoListRvw } from "@/components/util/column/review
|
||||
|
||||
|
||||
const SewerageServiceLevelRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -41,7 +43,7 @@ const SewerageServiceLevelRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={SewerageServiceLevelInfoListRvw} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={SewerageServiceLevelInfoListRvw} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
@@ -10,6 +10,7 @@ import { WaterReuseInfoList } from "@/components/util/column/review/WaterReuseCo
|
||||
|
||||
|
||||
const WaterReuseRvw = () => {
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
const approveFunc = () => {
|
||||
console.log('approveFunc');
|
||||
@@ -42,7 +43,7 @@ const WaterReuseRvw = () => {
|
||||
<ReturnButton returnFunc={returnFunc} />
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
<TabDataGrid columnInfo={WaterReuseInfoList} isExcelImport={false} />
|
||||
<TabDataGrid columnInfo={WaterReuseInfoList} isExcelImport={false} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user