This commit is contained in:
@@ -872,6 +872,7 @@ const ExcretaTreatmentFacilityInp = () => {
|
||||
flushSync(() => {
|
||||
setSggOptions(list);
|
||||
setRowData([...currentRows, newRow]);
|
||||
setIsNotApplicable(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -856,6 +856,7 @@ const PumpingStationInp = () => {
|
||||
flushSync(() => {
|
||||
setSggOptions(list);
|
||||
setRowData([...currentRows, newRow]);
|
||||
setIsNotApplicable(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1681,12 +1681,6 @@ const SewageExcretaRelatedInp = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const noApplicable = isNotApplicableByTab.get(tabKey) ?? false;
|
||||
if (noApplicable) {
|
||||
alert("해당사항 없음이 체크된 상태에서는 항목을 추가할 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
let list = sggOptions;
|
||||
if (sggOptionsSidoRef.current !== ctx.sido || list.length === 0) {
|
||||
list = await loadSggOptions(ctx.sido);
|
||||
@@ -1715,6 +1709,7 @@ const SewageExcretaRelatedInp = () => {
|
||||
next.set(tabKey, [...currentRows, newRow]);
|
||||
return next;
|
||||
});
|
||||
setIsNotApplicableForTab(tabKey, false);
|
||||
});
|
||||
|
||||
commitToolbarSnapshotForLoadedTab(
|
||||
|
||||
@@ -1809,6 +1809,7 @@ const SewageExcretaSlurgeInp = () => {
|
||||
next.set(tabKey, [...currentRows, newRow]);
|
||||
return next;
|
||||
});
|
||||
setIsNotApplicableForTab(tabKey, false);
|
||||
});
|
||||
|
||||
const statusInfo = tabStatusInfoMap.get(tabKey) ?? null;
|
||||
|
||||
@@ -1426,6 +1426,7 @@ const SewageReservoirPumpInp = () => {
|
||||
next.set(tabKey, [...currentRows, newRow]);
|
||||
return next;
|
||||
});
|
||||
setIsNotApplicableForTab(tabKey, false);
|
||||
});
|
||||
|
||||
const statusInfo = tabStatusInfoMap.get(tabKey) ?? null;
|
||||
|
||||
@@ -44,6 +44,9 @@ const StatisticsReviewHistory = () => {
|
||||
statsYr: values.year.trim(),
|
||||
...(values.bsnmCd?.trim() ? { sewerBzmnCd: values.bsnmCd.trim() } : {}),
|
||||
...(values.sido && values.sido !== "ALL" ? { ctpvNm: values.sido } : {}),
|
||||
...(values.gugun?.trim() && values.gugun !== "ALL"
|
||||
? { sggNm: values.gugun.trim() }
|
||||
: {}),
|
||||
});
|
||||
|
||||
if (res.status === "success" && Array.isArray(res.data)) {
|
||||
|
||||
@@ -117,7 +117,10 @@ const ARTICLE_EDIT_TAB_KEYS = new Set<string>([
|
||||
TreatWaterReuseBusinessApprStatusInpColumn.tabKey,
|
||||
]);
|
||||
|
||||
const NO_APPLICABLE_TAB_KEYS = ARTICLE_EDIT_TAB_KEYS;
|
||||
const NO_APPLICABLE_TAB_KEYS = new Set<string>([
|
||||
PublicSewageTreatWaterReuseInpColumn.tabKey,
|
||||
...ARTICLE_EDIT_TAB_KEYS,
|
||||
]);
|
||||
|
||||
const WATER_REUSE_TAB_BY_KEY = new Map(
|
||||
WaterReuseInpTabList.map((tab) => [tab.tabKey, tab]),
|
||||
@@ -1073,19 +1076,11 @@ const WaterReuseInp = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isPublicSewageTab) {
|
||||
const currentData = getTabGridRows(tabKey);
|
||||
if (currentData.length === 0) {
|
||||
alert("제출할 데이터가 없습니다.");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
const noApplicable = isNotApplicableByTab.get(tabKey) ?? false;
|
||||
const currentData = getTabGridRows(tabKey);
|
||||
if (!noApplicable && currentData.length === 0) {
|
||||
alert("해당사항 없음을 체크해주세요.");
|
||||
return;
|
||||
}
|
||||
const noApplicable = isNotApplicableByTab.get(tabKey) ?? false;
|
||||
const currentData = getTabGridRows(tabKey);
|
||||
if (!noApplicable && currentData.length === 0) {
|
||||
alert("해당사항 없음을 체크해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (await confirm("제출 하시겠습니까?")) {
|
||||
@@ -1179,17 +1174,20 @@ const WaterReuseInp = () => {
|
||||
};
|
||||
|
||||
if (isPublicSewageTab) {
|
||||
const noApplicable = isNotApplicableByTab.get(tabKey) ?? false;
|
||||
const currentData = getTabGridRows(tabKey);
|
||||
const submitList = currentData.map(buildPublicSewageTreatWaterReuseSaveItem);
|
||||
if (submitList.length === 0) {
|
||||
alert("제출할 데이터가 없습니다.");
|
||||
const submitList = noApplicable
|
||||
? []
|
||||
: currentData.map(buildPublicSewageTreatWaterReuseSaveItem);
|
||||
if (!noApplicable && submitList.length === 0) {
|
||||
alert("해당사항 없음을 체크해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
response = await statisticsInputWaterReuseApi.submitPublicSewageTreatWaterReuse({
|
||||
...submitRequestBase,
|
||||
userId: userInfo.userUnqId,
|
||||
noApplicable: false,
|
||||
noApplicable,
|
||||
submitList,
|
||||
});
|
||||
} else {
|
||||
@@ -1420,9 +1418,13 @@ const WaterReuseInp = () => {
|
||||
};
|
||||
|
||||
if (tabKey === PublicSewageTreatWaterReuseInpColumn.tabKey) {
|
||||
const noApplicable = isNotApplicableByTab.get(tabKey) ?? false;
|
||||
const currentData = getTabGridRows(tabKey);
|
||||
if (currentData.length === 0) {
|
||||
alert("저장할 데이터가 없습니다.");
|
||||
const saveList = noApplicable
|
||||
? []
|
||||
: currentData.map(buildPublicSewageTreatWaterReuseSaveItem);
|
||||
if (!noApplicable && saveList.length === 0) {
|
||||
alert("해당사항 없음을 체크해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1433,8 +1435,8 @@ const WaterReuseInp = () => {
|
||||
await statisticsInputWaterReuseApi.savePublicSewageTreatWaterReuse({
|
||||
...requestBase,
|
||||
userId: userInfo.userUnqId,
|
||||
noApplicable: false,
|
||||
saveList: currentData.map(buildPublicSewageTreatWaterReuseSaveItem),
|
||||
noApplicable,
|
||||
saveList,
|
||||
});
|
||||
|
||||
if (response.status === "success") {
|
||||
@@ -1792,6 +1794,7 @@ const WaterReuseInp = () => {
|
||||
next.set(tabKey, [...currentRows, newRow]);
|
||||
return next;
|
||||
});
|
||||
setIsNotApplicableForTab(tabKey, false);
|
||||
});
|
||||
|
||||
const statusInfo = tabStatusInfoMap.get(tabKey) ?? null;
|
||||
|
||||
@@ -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) => ({
|
||||
|
||||
@@ -455,6 +455,7 @@ export interface StatiscicsManagementReviewHistoryRequest {
|
||||
statsYr: string;
|
||||
sewerBzmnCd?: string;
|
||||
ctpvNm?: string;
|
||||
sggNm?: string;
|
||||
statsCd?: string;
|
||||
}
|
||||
|
||||
|
||||
+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