[st] chore: 통계 검증 리포트 수정
This commit is contained in:
@@ -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[]) => (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user