[st] - fix: 오류 수정 및 누락 기능 추가
This commit is contained in:
@@ -4,7 +4,7 @@ import { ValueType } from "realgrid";
|
||||
|
||||
// 하수도 통계 관리 > 02.하수관로 > tab 5. 맨홀 현황
|
||||
// SeweragePipeInputManholeStatusItem + commonInfo.ctpvNm (그리드 행에 병합)
|
||||
// API: yy14=2014년 … yy{(현재연도-1)%100} (필드 접두 yy + 연도 끝자리)
|
||||
// API: yy14=2015년 이전(2014년 데이터) … yy{(현재연도-1)%100} (필드 접두 yy + 연도 끝자리)
|
||||
|
||||
const MANHOLE_START_YEAR = 2014;
|
||||
const MANHOLE_LAST_DATA_YEAR = Math.max(MANHOLE_START_YEAR, new Date().getFullYear() - 1);
|
||||
@@ -12,6 +12,12 @@ const MANHOLE_YY_MIN = MANHOLE_START_YEAR % 100;
|
||||
const MANHOLE_YY_MAX = MANHOLE_LAST_DATA_YEAR % 100;
|
||||
const calendarYearFromYy = (yy: number) => 2000 + yy;
|
||||
|
||||
/** yy14(2014) 구간은 헤더에 「2015년 이전」 표기 (합계·검토 컬럼과 동일) */
|
||||
const manholeYearHeaderText = (yy: number): string => {
|
||||
const y = calendarYearFromYy(yy);
|
||||
return y === MANHOLE_START_YEAR ? "2015년 이전" : `${y}년`;
|
||||
};
|
||||
|
||||
const intCol = (name: string, headerText: string): ColumnConfig => ({
|
||||
name,
|
||||
fieldName: name,
|
||||
@@ -98,7 +104,7 @@ function yyYearLayout(yy: number): ColumnLayoutItem {
|
||||
return {
|
||||
name: `year${y}`,
|
||||
hideChildHeaders: false,
|
||||
header: { text: `${y}년` },
|
||||
header: { text: manholeYearHeaderText(yy) },
|
||||
items: [
|
||||
{
|
||||
name: `year${y}Material`,
|
||||
|
||||
@@ -211,8 +211,9 @@ export const PipeTypeStatusInpColumn = {
|
||||
],
|
||||
},
|
||||
...yearLayoutItems,
|
||||
"rmrk",
|
||||
'rmrk',
|
||||
'admdstCd',
|
||||
'pipeSeCd'
|
||||
] as ColumnLayoutItem[],
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 2,
|
||||
|
||||
Reference in New Issue
Block a user