diff --git a/apps/st/src/components/module/SearchForm.tsx b/apps/st/src/components/module/SearchForm.tsx index c1a1d2fd9..afed3d920 100644 --- a/apps/st/src/components/module/SearchForm.tsx +++ b/apps/st/src/components/module/SearchForm.tsx @@ -136,7 +136,7 @@ const SearchForm = (props: SearchFormProps = {}) => { const { setMessage: alert } = useAlertStore((state) => state); const userInfo = useUserStore((state) => state.userInfo); const mergedProps = { ...defaultSearchFormProps, ...props }; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd ?? ""; const sidoSelectText = props.sidoSelectText && props.sidoSelectText.trim() !== "" ? props.sidoSelectText diff --git a/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx b/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx index a99d8a3f8..2b9bd34d6 100644 --- a/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx +++ b/apps/st/src/components/statistics/input/PublicSewageFacilityInp.tsx @@ -310,7 +310,6 @@ const PublicSewageFacilityInp = () => { swtrmtFcltCd: nullableTrimmedString(d.swtrmtFcltCd), swtrmtFcltNm: nullableTrimmedString(d.swtrmtFcltNm), fcltSn: nullableTrimmedString(d.fcltSn), - fcltPstnCn: nullableTrimmedString(d.fcltPstnCn), inflwSwagePhysQnt: toNumber(d.inflwSwagePhysQnt), inflwSwageBoilQnt: toNumber(d.inflwSwageBoilQnt), inflwSwageAltdQnt: toNumber(d.inflwSwageAltdQnt), diff --git a/apps/st/src/components/statistics/review/ExcretaTreatmentFacilityRvw.tsx b/apps/st/src/components/statistics/review/ExcretaTreatmentFacilityRvw.tsx index 9f8bc2ad2..045559b67 100644 --- a/apps/st/src/components/statistics/review/ExcretaTreatmentFacilityRvw.tsx +++ b/apps/st/src/components/statistics/review/ExcretaTreatmentFacilityRvw.tsx @@ -97,7 +97,7 @@ const ExcretaTreatmentFacilityRvw = () => { return null; } - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!instSeCd) { return null; } @@ -108,7 +108,7 @@ const ExcretaTreatmentFacilityRvw = () => { statsCd: reviewOpinionContext.statsCd, instSeCd, }; - }, [reviewOpinionContext, userInfo?.instSeCd]); + }, [reviewOpinionContext, userInfo?.laeSeCd]); const handleReset = () => { setRowData([]); diff --git a/apps/st/src/components/statistics/review/PrivateSewageFacilityRvw.tsx b/apps/st/src/components/statistics/review/PrivateSewageFacilityRvw.tsx index 13a55c8b3..fef67b4d9 100644 --- a/apps/st/src/components/statistics/review/PrivateSewageFacilityRvw.tsx +++ b/apps/st/src/components/statistics/review/PrivateSewageFacilityRvw.tsx @@ -109,7 +109,7 @@ const PrivateSewageFacilityRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -121,7 +121,7 @@ const PrivateSewageFacilityRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx b/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx index 5b749aa77..f75c276b1 100644 --- a/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx +++ b/apps/st/src/components/statistics/review/PublicSewageFacilityRvw.tsx @@ -81,7 +81,7 @@ const PublicSewageFacilityRvw = () => { return null; } - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!instSeCd) { return null; } @@ -92,7 +92,7 @@ const PublicSewageFacilityRvw = () => { statsCd: reviewOpinionContext.statsCd, instSeCd, }; - }, [reviewOpinionContext, userInfo?.instSeCd]); + }, [reviewOpinionContext, userInfo?.laeSeCd]); const handleReset = () => { setRowData([]); diff --git a/apps/st/src/components/statistics/review/PumpingStationRvw.tsx b/apps/st/src/components/statistics/review/PumpingStationRvw.tsx index 6aea889f2..cf4674da7 100644 --- a/apps/st/src/components/statistics/review/PumpingStationRvw.tsx +++ b/apps/st/src/components/statistics/review/PumpingStationRvw.tsx @@ -92,7 +92,7 @@ const PumpingStationRvw = () => { return null; } - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!instSeCd) { return null; } @@ -103,7 +103,7 @@ const PumpingStationRvw = () => { statsCd: reviewOpinionContext.statsCd, instSeCd, }; - }, [reviewOpinionContext, userInfo?.instSeCd]); + }, [reviewOpinionContext, userInfo?.laeSeCd]); const handleReset = () => { setRowData([]); diff --git a/apps/st/src/components/statistics/review/SewageExcretaRelatedRvw.tsx b/apps/st/src/components/statistics/review/SewageExcretaRelatedRvw.tsx index 5c2b803c9..deab7446e 100644 --- a/apps/st/src/components/statistics/review/SewageExcretaRelatedRvw.tsx +++ b/apps/st/src/components/statistics/review/SewageExcretaRelatedRvw.tsx @@ -112,7 +112,7 @@ const SewageExcretaRelatedRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -124,7 +124,7 @@ const SewageExcretaRelatedRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/SewageExcretaSlurgeRvw.tsx b/apps/st/src/components/statistics/review/SewageExcretaSlurgeRvw.tsx index d19e36628..9fbdd0071 100644 --- a/apps/st/src/components/statistics/review/SewageExcretaSlurgeRvw.tsx +++ b/apps/st/src/components/statistics/review/SewageExcretaSlurgeRvw.tsx @@ -112,7 +112,7 @@ const SewageExcretaSlurgeRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -124,7 +124,7 @@ const SewageExcretaSlurgeRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/SewagePipeMaintainRvw.tsx b/apps/st/src/components/statistics/review/SewagePipeMaintainRvw.tsx index b7d2e05be..041614c2a 100644 --- a/apps/st/src/components/statistics/review/SewagePipeMaintainRvw.tsx +++ b/apps/st/src/components/statistics/review/SewagePipeMaintainRvw.tsx @@ -127,7 +127,7 @@ const SewagePipeMaintainRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -139,7 +139,7 @@ const SewagePipeMaintainRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/SewagePipeRvw.tsx b/apps/st/src/components/statistics/review/SewagePipeRvw.tsx index 1cb5c084f..71c800129 100644 --- a/apps/st/src/components/statistics/review/SewagePipeRvw.tsx +++ b/apps/st/src/components/statistics/review/SewagePipeRvw.tsx @@ -187,7 +187,7 @@ const SewagePipeRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -199,7 +199,7 @@ const SewagePipeRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/SewageReservoirPumpRvw.tsx b/apps/st/src/components/statistics/review/SewageReservoirPumpRvw.tsx index 7a3101e6d..25b0da262 100644 --- a/apps/st/src/components/statistics/review/SewageReservoirPumpRvw.tsx +++ b/apps/st/src/components/statistics/review/SewageReservoirPumpRvw.tsx @@ -133,7 +133,7 @@ const SewageReservoirPumpRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsCd; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -145,7 +145,7 @@ const SewageReservoirPumpRvw = () => { statsCd, instSeCd, }; - }, [activeStatsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/SewerageFinanceRvw.tsx b/apps/st/src/components/statistics/review/SewerageFinanceRvw.tsx index 2d0e52354..11dcf7dd7 100644 --- a/apps/st/src/components/statistics/review/SewerageFinanceRvw.tsx +++ b/apps/st/src/components/statistics/review/SewerageFinanceRvw.tsx @@ -112,7 +112,7 @@ const SewerageFinanceRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -124,7 +124,7 @@ const SewerageFinanceRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/SeweragePenetrationRateRvw.tsx b/apps/st/src/components/statistics/review/SeweragePenetrationRateRvw.tsx index 1872baabf..cf1275a28 100644 --- a/apps/st/src/components/statistics/review/SeweragePenetrationRateRvw.tsx +++ b/apps/st/src/components/statistics/review/SeweragePenetrationRateRvw.tsx @@ -81,7 +81,7 @@ const SeweragePenetrationRateRvw = () => { return null; } - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!instSeCd) { return null; } @@ -92,7 +92,7 @@ const SeweragePenetrationRateRvw = () => { statsCd: reviewOpinionContext.statsCd, instSeCd, }; - }, [reviewOpinionContext, userInfo?.instSeCd]); + }, [reviewOpinionContext, userInfo?.laeSeCd]); const handleReset = () => { setRowData([]); diff --git a/apps/st/src/components/statistics/review/SewerageServiceLevelRvw.tsx b/apps/st/src/components/statistics/review/SewerageServiceLevelRvw.tsx index 4176bbb8e..5e257e107 100644 --- a/apps/st/src/components/statistics/review/SewerageServiceLevelRvw.tsx +++ b/apps/st/src/components/statistics/review/SewerageServiceLevelRvw.tsx @@ -110,7 +110,7 @@ const SewerageServiceLevelRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -122,7 +122,7 @@ const SewerageServiceLevelRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/review/StatsInputStatusRvw.tsx b/apps/st/src/components/statistics/review/StatsInputStatusRvw.tsx index 360706821..e3e972a9d 100644 --- a/apps/st/src/components/statistics/review/StatsInputStatusRvw.tsx +++ b/apps/st/src/components/statistics/review/StatsInputStatusRvw.tsx @@ -271,7 +271,7 @@ const StatsInputStatusRvw = () => { const statsYr = lastSearchedValues.year ?? ""; const sewerBzmnCd = lastSearchedValues.bsnmCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !instSeCd) { return null; @@ -282,7 +282,7 @@ const StatsInputStatusRvw = () => { sewerBzmnCd, instSeCd, }; - }, [lastSearchedValues, userInfo?.instSeCd]); + }, [lastSearchedValues, userInfo?.laeSeCd]); const submitFunc = () => { if (submitDialogContext == null) { diff --git a/apps/st/src/components/statistics/review/WaterReuseRvw.tsx b/apps/st/src/components/statistics/review/WaterReuseRvw.tsx index 2b91e32ba..c12478edd 100644 --- a/apps/st/src/components/statistics/review/WaterReuseRvw.tsx +++ b/apps/st/src/components/statistics/review/WaterReuseRvw.tsx @@ -115,7 +115,7 @@ const WaterReuseRvw = () => { const statsYr = lastSearchValues.year ?? ""; const sewerBzmnCd = lastSearchValues.bsnmCd ?? ""; const statsCd = activeStatsStatusInfo.statsCd ?? ""; - const instSeCd = userInfo?.instSeCd ?? ""; + const instSeCd = userInfo?.laeSeCd?? ""; if (!statsYr || !sewerBzmnCd || !statsCd || !instSeCd) { return null; @@ -127,7 +127,7 @@ const WaterReuseRvw = () => { statsCd, instSeCd, }; - }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.instSeCd]); + }, [activeStatsStatusInfo.statsCd, lastSearchValues, userInfo?.laeSeCd]); const { showReviewOpinionButton, showReturnButton, showSubmitButton } = useMemo(() => { const statsStatusInfo = activeStatsStatusInfo; diff --git a/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx b/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx index a160cb203..81cacd686 100644 --- a/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx +++ b/apps/st/src/components/statistics/verification/ImrVerificationHistory.tsx @@ -158,7 +158,7 @@ const ImrVerificationHistory = () => { }); const userInfo = useUserStore((state) => state.userInfo); - const userInstSeCd = userInfo?.instSeCd; + const userInstSeCd = userInfo?.laeSeCd; const { data: sidoData } = useSidoList({ instSeCd: userInstSeCd }); const sidoOptions = sidoData?.sidoList ?? []; const selectedSidoBsnmCd = diff --git a/apps/st/src/components/statistics/verification/RejectReasonInputDialog.tsx b/apps/st/src/components/statistics/verification/RejectReasonInputDialog.tsx new file mode 100644 index 000000000..8d72df8aa --- /dev/null +++ b/apps/st/src/components/statistics/verification/RejectReasonInputDialog.tsx @@ -0,0 +1,113 @@ +"use client"; + +import { useEffect, useState } from "react"; + +import { + Button, + Dialog, + DialogClose, + DialogContent, + DialogFooter, + DialogHeader, + DialogTitle, + Label, + Textarea, +} from "@common/components"; + +export interface RejectReasonInputDialogProps { + open: boolean; + onOpenChange: (open: boolean) => void; + onConfirm?: (reason: string) => void | Promise; +} + +export function RejectReasonInputDialog({ + open, + onOpenChange, + onConfirm, +}: RejectReasonInputDialogProps) { + const [reason, setReason] = useState(""); + const [reasonError, setReasonError] = useState(false); + const [isSubmitting, setIsSubmitting] = useState(false); + + const resetForm = () => { + setReason(""); + setReasonError(false); + }; + + const handleDialogOpenChange = (nextOpen: boolean) => { + if (!nextOpen) resetForm(); + onOpenChange(nextOpen); + }; + + useEffect(() => { + if (!open) resetForm(); + }, [open]); + + const handleConfirm = async () => { + const trimmed = reason.trim(); + if (!trimmed) { + setReasonError(true); + return; + } + try { + setIsSubmitting(true); + await onConfirm?.(trimmed); + } finally { + setIsSubmitting(false); + } + }; + + const canSubmit = reason.trim().length > 0 && !isSubmitting; + + return ( + + + + 반려 + +
+
+ +