[st] feat: 통계 검증 리포트 시도/시군구 셀렉트 로직 수정
This commit is contained in:
@@ -213,7 +213,14 @@ function StatisticsVerificationReport() {
|
||||
})),
|
||||
});
|
||||
|
||||
const statisticsVerificationReportQuery = useStatsVrfcRptData(filters);
|
||||
const {
|
||||
ctpvSewerBzmnCd: _,
|
||||
sggSewerBzmnCd: __,
|
||||
...statisticsVerificationReportFilters
|
||||
} = filters;
|
||||
const statisticsVerificationReportQuery = useStatsVrfcRptData(
|
||||
statisticsVerificationReportFilters,
|
||||
);
|
||||
const statisticsVerificationResultQuery =
|
||||
useStatsVrfcRsltData(detailParams);
|
||||
|
||||
@@ -399,12 +406,16 @@ function StatisticsVerificationReport() {
|
||||
optionData?: { label: string; value: string },
|
||||
) => {
|
||||
resetReportState();
|
||||
if (key === "sewerBzmnCd") {
|
||||
|
||||
// 시도 변경 시
|
||||
if (key === "ctpvNm") {
|
||||
setFilters((prev) => ({
|
||||
...prev,
|
||||
sewerBzmnCd: value,
|
||||
ctpvNm: optionData?.label,
|
||||
sewerBzmnCd: optionData?.value,
|
||||
ctpvSewerBzmnCd: value,
|
||||
sggNm: "",
|
||||
sggSewerBzmnCd: "",
|
||||
}));
|
||||
setSubFilters((prev) => ({
|
||||
...prev,
|
||||
@@ -414,6 +425,18 @@ function StatisticsVerificationReport() {
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
// 시군구 변경 시
|
||||
if (key === "sggNm") {
|
||||
setFilters((prev) => ({
|
||||
...prev,
|
||||
sewerBzmnCd: value,
|
||||
sggNm: optionData?.label,
|
||||
sggSewerBzmnCd: value,
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
if (key === "statsCd") {
|
||||
setSubFilters((prev) => ({ ...prev, statsCd: "" }));
|
||||
}
|
||||
@@ -540,8 +563,8 @@ function StatisticsVerificationReport() {
|
||||
<div className="flex items-center gap-6">
|
||||
<FilterSelect
|
||||
label="시도"
|
||||
value={filters.sewerBzmnCd ?? ""}
|
||||
onChange={handleFilterChange("sewerBzmnCd")}
|
||||
value={filters.ctpvSewerBzmnCd ?? ""}
|
||||
onChange={handleFilterChange("ctpvNm")}
|
||||
options={
|
||||
sidoData?.map((item) => ({
|
||||
label: item.adstNm,
|
||||
@@ -551,7 +574,7 @@ function StatisticsVerificationReport() {
|
||||
/>
|
||||
<FilterSelect
|
||||
label="시군구"
|
||||
value={filters.sggNm ?? ""}
|
||||
value={filters.sggSewerBzmnCd ?? ""}
|
||||
onChange={handleFilterChange("sggNm")}
|
||||
options={
|
||||
sigunguData?.map((item) => ({
|
||||
|
||||
+5
-1
@@ -2,7 +2,11 @@ import type { VerifyResultSearchRequest } from "../general-verification-interfac
|
||||
import type { StatsInputStatusListRequestParams } from "../input/statistics-input-status-interface";
|
||||
|
||||
export type StatisticsVerificationFilterState =
|
||||
StatsInputStatusListRequestParams;
|
||||
StatsInputStatusListRequestParams & {
|
||||
// 셀렉트 표시용 시도, 시군구 코드
|
||||
ctpvSewerBzmnCd?: string | null;
|
||||
sggSewerBzmnCd?: string | null;
|
||||
};
|
||||
|
||||
export type StatisticsVerificationSubFilterState = VerifyResultSearchRequest;
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ export function ScheduleInfoPanel({ params }: ScheduleInfoPanelProps) {
|
||||
size="lg"
|
||||
className="font-semibold"
|
||||
>
|
||||
{data.inptSeCd}차 입력기간
|
||||
입력기간
|
||||
</Badge>
|
||||
<p className="text-2xl">
|
||||
{dayjs(data.inptBgngYmd).format(
|
||||
@@ -119,7 +119,7 @@ export function ScheduleInfoPanel({ params }: ScheduleInfoPanelProps) {
|
||||
color="gray"
|
||||
className="font-semibold"
|
||||
>
|
||||
{data.vrfcSeCd}차 검증기간
|
||||
검증기간
|
||||
</Badge>
|
||||
<p className="text-2xl">
|
||||
{dayjs(data.vrfcBgngYmd).format(
|
||||
|
||||
Reference in New Issue
Block a user