[st] chore: 통계 검증 리포트 수정

This commit is contained in:
2026-05-14 14:03:52 +09:00
parent 1cde3b0998
commit 25320d43c4
3 changed files with 33 additions and 12 deletions
@@ -4,11 +4,13 @@ import type { Dispatch, SetStateAction } from "react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useConfirm } from "@frontend-opensource/use-react-hooks";
import { useQuery } from "@tanstack/react-query";
import dayjs from "dayjs";
import type { RealGridReact } from "realgrid-react";
import { ENDPOINT } from "@/shared/config";
import { useAlertStore, useMutationWrapper, useUserStore } from "@/shared/lib";
import { CodeSelect } from "@/entities/code";
import { CodeApi, CodeSelect } from "@/entities/code";
import {
type ApproveRequest,
type RejectRequest,
@@ -138,12 +140,6 @@ const DEFAULT_SUB_FILTERS: StatisticsVerificationSubFilterState = {
pbcpAprvYn: "N",
};
const STATUS_OPTIONS = [
{ label: "수정완료", value: "1" },
{ label: "예외통과", value: "2" },
{ label: "반려", value: "3" },
];
const APPROVAL_STATUS_OPTIONS = [
{ label: "승인", value: "Y" },
{ label: "미승인", value: "N" },
@@ -195,6 +191,18 @@ function StatisticsVerificationReport() {
[filters, subFilters],
);
const { data: statusOptions } = useQuery({
queryKey: [ENDPOINT.CMS_SERVICE.CODE, "STINPTEXCT"],
queryFn: () => CodeApi.getCode("STINPTEXCT"),
select: (data) =>
data
.filter(({ lwpoCd }) => !["0", "4"].includes(lwpoCd))
.map(({ lwpoCdNm: label, lwpoCd: value }) => ({
label,
value,
})),
});
const statisticsVerificationReportQuery = useStatsVrfcRptData(filters);
const statisticsVerificationResultQuery =
useStatsVrfcRsltData(detailParams);
@@ -594,7 +602,7 @@ function StatisticsVerificationReport() {
label="상태"
value={subFilters.prcsYnList}
onChange={handleSubFilterChange("prcsYnList")}
options={STATUS_OPTIONS}
options={statusOptions ?? []}
/>
<FilterSelect
label="승인상태"
@@ -691,7 +699,7 @@ function FilterCombobox({
onChange(list.length > 0 ? list.join(",") : undefined);
}}
>
<ComboboxChips ref={anchor} className="max-w-[26rem]">
<ComboboxChips ref={anchor} className="max-w-[32rem]">
<ComboboxValue>
{(values: string[]) => (
<>
@@ -230,6 +230,7 @@ export interface VerifyResultItem {
nowVlCn?: string;
compVlCn?: string;
prcsYn?: string;
prcsYnNm?: string;
prcsOpnnExpln?: string;
prcrId?: string;
rjctOpnnCn?: string;
@@ -9,12 +9,14 @@ export const statisticsVerificationReportColumnInfo: ColumnInfo = {
fieldName: "ctpvNm",
header: { text: "시도" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "sggNm",
fieldName: "sggNm",
header: { text: "시군구" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "menuTabName",
@@ -22,6 +24,7 @@ export const statisticsVerificationReportColumnInfo: ColumnInfo = {
header: { text: "구분" },
width: 150,
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "locgStatusNm",
@@ -29,12 +32,14 @@ export const statisticsVerificationReportColumnInfo: ColumnInfo = {
header: { text: "진행상태" },
width: 120,
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "laePicNm",
fieldName: "laePicNm",
header: { text: "작성자" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "laePicTelNo",
@@ -42,36 +47,42 @@ export const statisticsVerificationReportColumnInfo: ColumnInfo = {
header: { text: "작성자연락처" },
width: 130,
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "laeKbrdrDeptNm",
fieldName: "laeKbrdrDeptNm",
header: { text: "부서" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "laeKbrdrJbgdNm",
fieldName: "laeKbrdrJbgdNm",
header: { text: "직급" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "laeIdfrNm",
fieldName: "laeIdfrNm",
header: { text: "승인자" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "laeIdfrDeptNm",
fieldName: "laeIdfrDeptNm",
header: { text: "부서" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "laeIdfrJbgdNm",
fieldName: "laeIdfrJbgdNm",
header: { text: "직급" },
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "rjctOpnnCn",
@@ -79,6 +90,7 @@ export const statisticsVerificationReportColumnInfo: ColumnInfo = {
header: { text: "반려사유" },
width: 220,
styleName: READ_ONLY_STYLE,
editable: false,
},
{
name: "sewerBzmnCd",
@@ -176,8 +188,8 @@ export const statisticsVerificationResultColumnInfo: ColumnInfo = {
editable: false,
},
{
name: "prcsYn",
fieldName: "prcsYn",
name: "prcsYnNm",
fieldName: "prcsYnNm",
header: { text: "상태" },
width: 90,
styleName: READ_ONLY_STYLE,
@@ -223,7 +235,7 @@ export const statisticsVerificationResultColumnInfo: ColumnInfo = {
"rsnExpln",
"nowVlCn",
"compVlCn",
"prcsYn",
"prcsYnNm",
"prcsOpnnExpln",
"rjctOpnnCn",
"pbcpAprvYn",