Merge remote-tracking branch 'origin/iipbs/st/dev'
This commit is contained in:
@@ -1992,42 +1992,6 @@ useEffect(() => {
|
||||
footerVerificationResult,
|
||||
]);
|
||||
|
||||
/** footerVerificationResult만 바뀐 경우에도 총계 스타일 즉시 재적용/초기화 */
|
||||
useEffect(() => {
|
||||
const gridView = gridRef.current?.gridView as
|
||||
| {
|
||||
columnByName?: (name: string) => {
|
||||
footer?: { styleName?: string } | Array<{ styleName?: string }>;
|
||||
} | null;
|
||||
refresh?: () => void;
|
||||
}
|
||||
| undefined;
|
||||
if (!gridView?.columnByName) return;
|
||||
|
||||
columns.forEach((col) => {
|
||||
if (!col.footer) return;
|
||||
try {
|
||||
const column = gridView.columnByName?.(col.name);
|
||||
if (!column?.footer) return;
|
||||
const styleName =
|
||||
resolveFooterVerificationStyleName(
|
||||
col,
|
||||
footerVerificationResult,
|
||||
) ?? "";
|
||||
if (Array.isArray(column.footer)) {
|
||||
column.footer.forEach((item) => {
|
||||
item.styleName = styleName;
|
||||
});
|
||||
} else {
|
||||
column.footer.styleName = styleName;
|
||||
}
|
||||
} catch {
|
||||
console.error('총계 스타일 재적용/초기화 error');
|
||||
}
|
||||
});
|
||||
gridView.refresh?.();
|
||||
}, [footerVerificationResult, columns]);
|
||||
|
||||
// 행·셀 클릭 이벤트 (검증 오류 툴팁은 hover만 — onShowTooltip / 빈 셀 오버레이)
|
||||
useEffect(() => {
|
||||
const gridView = gridRef.current?.gridView;
|
||||
|
||||
@@ -63,7 +63,7 @@ const exceptionHistoryTabs: { value: ExceptionHistoryTabKey; label: string }[] =
|
||||
|
||||
const TITLE = "예외처리 내역 조회";
|
||||
/** 예외처리 건만 */
|
||||
const PRCS_YN_LIST = "2";
|
||||
const VRFC_STTS_CD_LIST = "2";
|
||||
|
||||
export type ExceptionRejectSubmitItem = {
|
||||
vrfcSn: number;
|
||||
@@ -196,8 +196,7 @@ export function ExceptionProcessingHistoryDialog({
|
||||
statsYr: queryContext.statsYr,
|
||||
statsCd: queryContext.statsCd,
|
||||
vrfcMthdCd,
|
||||
prcsYnList: PRCS_YN_LIST,
|
||||
rejectCodeList: "0,1,2",
|
||||
vrfcSttsCdList: VRFC_STTS_CD_LIST,
|
||||
page: pageIndex + 1,
|
||||
size: 30,
|
||||
};
|
||||
|
||||
@@ -232,8 +232,7 @@ export function VerificationResultDialog({
|
||||
statsYr: stableQueryContext.statsYr,
|
||||
statsCd: stableQueryContext.statsCd,
|
||||
vrfcMthdCd,
|
||||
prcsYnList: "0",
|
||||
rejectCodeList: "0,1,2",
|
||||
vrfcSttsCdList: "0",
|
||||
page: page + 1,
|
||||
size: 10000,
|
||||
};
|
||||
|
||||
@@ -262,8 +262,7 @@ export function VerificationResultHistoryDialog({
|
||||
statsYr: stableQueryContext.statsYr,
|
||||
statsCd: stableQueryContext.statsCd,
|
||||
vrfcMthdCd,
|
||||
prcsYnList: "0,2",
|
||||
rejectCodeList: "0,1,2",
|
||||
vrfcSttsCdList: "0,2",
|
||||
page: pageIndex + 1,
|
||||
size: PAGE_SIZE,
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ function responseHasVerificationResults(response: VerificationResultListResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* 제출 직후 `VerificationResultDialog`에 표시할 미통과(prcsYn=0) 검증 결과가
|
||||
* 제출 직후 `VerificationResultDialog`에 표시할 미통과(vrfcSttsCd=0) 검증 결과가
|
||||
* 일반검증(NV)·I-MR(IMR)·HB 중 하나라도 있는지 조회합니다.
|
||||
*/
|
||||
export async function hasAnyPostSubmitVerificationResult(
|
||||
@@ -34,8 +34,7 @@ export async function hasAnyPostSubmitVerificationResult(
|
||||
sggNm: ctx.sggNm,
|
||||
statsYr: ctx.statsYr,
|
||||
statsCd: ctx.statsCd,
|
||||
prcsYnList: "0",
|
||||
rejectCodeList: "0,1,2",
|
||||
vrfcSttsCdList: "0",
|
||||
page: 1,
|
||||
size: 1,
|
||||
};
|
||||
|
||||
@@ -81,7 +81,10 @@ import {
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import {
|
||||
getVerificationErrorsForField,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useStatisticsInputFocusStore } from "@/store/statistics-input-focus-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
@@ -219,18 +222,33 @@ const applyPipeTypeStatusEditableColumns = (
|
||||
});
|
||||
};
|
||||
|
||||
/** 2-3 관종별: verificationResult.prlgWhol → 총계 계(pipeByPrstWhol) */
|
||||
const PIPE_TYPE_TOTAL_WHOL_ALIASES = ["pipeWholPrlg", "prlgWhol"] as const;
|
||||
|
||||
/** 2-3 관종별: 총계 검증 키(pipeWholPrlg/prlgWhol) → 총계 계(pipeByPrstWhol) */
|
||||
function remapPipeTypePrlgWholVerification(
|
||||
result?: SeweragePipeInputVerificationResult | null,
|
||||
): SeweragePipeInputVerificationResult | null | undefined {
|
||||
if (!result) return result;
|
||||
const fromAlias = result.prlgWhol;
|
||||
if (!Array.isArray(fromAlias) || fromAlias.length === 0) return result;
|
||||
const existing = result.pipeByPrstWhol;
|
||||
if (Array.isArray(existing) && existing.length > 0) return result;
|
||||
const fromAlias = result.pipeWholPrlg ?? result.prlgWhol;
|
||||
if (!Array.isArray(fromAlias) || fromAlias.length === 0) return result;
|
||||
return { ...result, pipeByPrstWhol: fromAlias };
|
||||
}
|
||||
|
||||
function getSewagePipeRowVerificationErrors(
|
||||
verification: SeweragePipeInputVerificationResult | undefined,
|
||||
fieldName: string,
|
||||
tabKey: string,
|
||||
) {
|
||||
if (!verification) return undefined;
|
||||
const aliases =
|
||||
tabKey === PIPE_TYPE_STATUS_TAB_KEY && fieldName === "pipeByPrstWhol"
|
||||
? PIPE_TYPE_TOTAL_WHOL_ALIASES
|
||||
: undefined;
|
||||
return getVerificationErrorsForField(verification, fieldName, aliases);
|
||||
}
|
||||
|
||||
/** 관종별 신 응답(yearlyStatList) -> 그리드 y{year}* 필드로 정규화 */
|
||||
function normalizePipeTypeStatusRow(
|
||||
row: SeweragePipeInputPipeTypeStatusItem,
|
||||
@@ -2202,8 +2220,11 @@ const SewagePipeInp = () => {
|
||||
}
|
||||
cellStyleCallback={({ row, fieldName }) => {
|
||||
const verification = (row as GridRowWithVerification).verificationResult;
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
const errors = getSewagePipeRowVerificationErrors(
|
||||
verification,
|
||||
fieldName,
|
||||
tabKey,
|
||||
);
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
const hasImr = errors.some((e) => e.vrfcCd === "IMR" || e.vrfcCd === "HB");
|
||||
return hasImr ? "rg-cell-verify-error-imr" : "rg-cell-verify-error";
|
||||
@@ -2214,8 +2235,11 @@ const SewagePipeInp = () => {
|
||||
}
|
||||
cellTooltipCallback={({ row, fieldName }) => {
|
||||
const verification = (row as GridRowWithVerification).verificationResult;
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
const errors = getSewagePipeRowVerificationErrors(
|
||||
verification,
|
||||
fieldName,
|
||||
tabKey,
|
||||
);
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return errors
|
||||
.map((e) => {
|
||||
|
||||
@@ -9,10 +9,10 @@ import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { Form, FormControl,FormField, FormItem } from "@/shared/ui/form";
|
||||
import { Form, FormControl, FormField, FormItem } from "@/shared/ui/form";
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { generalverificationApiService } from '@/entities/statistics/api/general-verification-service';
|
||||
import type { RegistVrfcMasterRequest,UpdateVrfcMasterRequest } from "@/entities/statistics/model/general-verification-interface";
|
||||
import type { RegistVrfcMasterRequest, UpdateVrfcMasterRequest } from "@/entities/statistics/model/general-verification-interface";
|
||||
import { type GeneralVerificationMasterSubmitFormData, generalVerificationMasterSubmitSchema } from '@/entities/statistics/model/general-verification-master-submit-schema';
|
||||
import { UserApi } from "@/entities/user/api/user-service";
|
||||
import {
|
||||
@@ -228,7 +228,7 @@ const RegistDialog = memo(
|
||||
if (mutationBlocked) {
|
||||
alert(
|
||||
blockedMessage ??
|
||||
"입력기간에는 검증항목을 등록하거나 수정할 수 없습니다.",
|
||||
"입력기간에는 검증항목을 등록하거나 수정할 수 없습니다.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -298,14 +298,16 @@ const RegistDialog = memo(
|
||||
<DialogTrigger asChild>{children}</DialogTrigger>
|
||||
<DialogContent className="max-w-[60rem]" aria-describedby={undefined}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
</DialogHeader>
|
||||
<DialogTitle>
|
||||
<div className="pr-8">
|
||||
{isVrfcSn ?
|
||||
detailData ? detailData.data.vrfcNm
|
||||
:
|
||||
<Skeleton className="h-[14px] rounded-xl w-2/3" />
|
||||
: "일반 검증 등록"}
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
</div>
|
||||
</DialogTitle>
|
||||
<Form {...form}>
|
||||
<form
|
||||
className="space-y-4"
|
||||
|
||||
@@ -173,10 +173,8 @@ export interface VerificationResultListRequest {
|
||||
statsCd?: string;
|
||||
/** 검증 방법 코드 (예: NV, IMR, HB) */
|
||||
vrfcMthdCd?: string;
|
||||
/** 처리여부 코드 목록, 콤마 구분 (예: 0,2) */
|
||||
prcsYnList?: string;
|
||||
/** 반려상태 코드 목록, 콤마 구분 (예: 0,1,2) */
|
||||
rejectCodeList?: string;
|
||||
/** 검증결과상태 코드 목록, 콤마 구분 (예: 0, 0,2, 2) */
|
||||
vrfcSttsCdList?: string;
|
||||
/** @deprecated 신규 API에서는 미사용 */
|
||||
pbcpAprvYn?: string;
|
||||
page?: number;
|
||||
|
||||
Reference in New Issue
Block a user