diff --git a/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx b/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx index 6cd57b4f1..36274ddcd 100644 --- a/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx +++ b/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx @@ -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 ?? []} /> 0 ? list.join(",") : undefined); }} > - + {(values: string[]) => ( <> diff --git a/apps/st/src/entities/statistics/model/general-verification-interface.ts b/apps/st/src/entities/statistics/model/general-verification-interface.ts index c4ef996d4..a3fcd66c0 100644 --- a/apps/st/src/entities/statistics/model/general-verification-interface.ts +++ b/apps/st/src/entities/statistics/model/general-verification-interface.ts @@ -230,6 +230,7 @@ export interface VerifyResultItem { nowVlCn?: string; compVlCn?: string; prcsYn?: string; + prcsYnNm?: string; prcsOpnnExpln?: string; prcrId?: string; rjctOpnnCn?: string; diff --git a/apps/st/src/entities/statistics/model/statistics-verification-report/statistics-verification-report-columns.ts b/apps/st/src/entities/statistics/model/statistics-verification-report/statistics-verification-report-columns.ts index 1ebf0337c..969d3c6b3 100644 --- a/apps/st/src/entities/statistics/model/statistics-verification-report/statistics-verification-report-columns.ts +++ b/apps/st/src/entities/statistics/model/statistics-verification-report/statistics-verification-report-columns.ts @@ -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",