[ST] - fix: 2-3 매설연장 관리자일시 수정 가능하도록 적용, SearchFrom 로직 수정

This commit is contained in:
2026-09-03 11:26:23 +09:00
parent 261941452a
commit afca685fd4
2 changed files with 53 additions and 31 deletions
@@ -175,12 +175,13 @@ const applyPipeTypeStatusColumnLayout = (
return walk(layout ?? []);
};
/** ST00020003: 입력기간 통과 시 조회 연도의 매설연장(y{year}LyngPrlg)만 편집 가능, 해당 연도 철거연장 컬럼 숨김 */
/** ST00020003: 일반 사용자는 조회 연도 매설연장만, 관리자는 매설연장 컬럼 전체 편집 가능. 해당 연도 철거연장 컬럼 숨김 */
const applyPipeTypeStatusEditableColumns = (
cols: ColumnConfig[] | undefined,
canEdit: boolean,
periodEnterable: boolean,
statsYr: string | null,
isAdmin: boolean,
): ColumnConfig[] => {
const hideDmltnYear = shouldHidePipeTypeEditableYearDmltn(canEdit, periodEnterable, statsYr);
@@ -205,11 +206,12 @@ const applyPipeTypeStatusEditableColumns = (
if (fieldName === "lyngPrlg" || isYearLyngField) {
const editableLyngField = periodEnterable ? resolvePipeTypeEditableLyngField(statsYr) : null;
const isTargetYear = editableLyngField !== null && fieldName === editableLyngField;
if (isTargetYear) {
const { styleName: _readonlyStyle, ...rest } = col;
if (isAdmin || isTargetYear) {
const { styleName, ...rest } = col;
return {
...rest,
editable: true as const,
...(styleName && styleName !== "rg-cell-readonly" ? { styleName } : {}),
};
}
return { ...col, editable: false as const, styleName: col.styleName ?? "rg-cell-readonly" };
@@ -640,6 +642,7 @@ const SewagePipeInp = () => {
canEdit,
inputPeriodEnterable,
lastSearchedYear,
isAdminInfo,
)
: (cols ?? []).map((col: ColumnConfig) =>
canEdit