diff --git a/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx b/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx
index d0de96c69..a6b13b323 100644
--- a/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx
+++ b/apps/st/src/components/module/SidoSggFacilityNameSearchForm.tsx
@@ -695,6 +695,20 @@ const SidoSggFacilityNameSearchForm = ({
)}
+
+
+ 처리시설 정보
+
+
+
@@ -712,20 +726,6 @@ const SidoSggFacilityNameSearchForm = ({
// compactGridHeightClass="h-[min(40vh,28rem)] min-h-[16rem]"
/>
-
-
- 처리시설 정보
-
-
-
);
diff --git a/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx b/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx
index f5daa4888..5588ba8cb 100644
--- a/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx
+++ b/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx
@@ -5,7 +5,7 @@ import { useConfirm } from "@frontend-opensource/use-react-hooks";
import { ValueType } from "realgrid";
import type { RealGridReact } from "realgrid-react";
-import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGate, useSearchConditionSidoList } from "@/shared/lib";
+import { useAlertStore, useGlobalProgressStore, useStatisticsInputToolbarGroupGate, useSearchConditionSidoList, useUserStore } from "@/shared/lib";
import { STATISTICS_INPUT_URL_PATH } from "@/shared/lib/stats-cd-input-navigation";
import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics-input-pending-navigation";
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
@@ -42,6 +42,7 @@ import type {
import {
filterBySelectedAdmdstCd,
isGugunOkForToolbar,
+ isJeonnamGwangjuSidoAllToolbarException,
isSubmitOkForToolbar,
resolveNoApplicableForRequest,
toInputSearchRegion,
@@ -174,12 +175,43 @@ const computeTabEnterable = (
};
const sidoListRef: { current: Sido[] } = { current: [] };
+const relatedToolbarUserIdRef: { current: string } = { current: "" };
-function buildGugunOkForToolbar(values: SearchFormValues | null): boolean {
+function isJeonnamGwangjuSidoAllToolbarTab(tabKey: string | null | undefined): boolean {
+ return Boolean(tabKey && ARTICLE_EDIT_TAB_KEYS.has(tabKey));
+}
+
+function buildGugunOkForToolbar(
+ values: SearchFormValues | null,
+ tabKey?: string | null,
+): boolean {
+ if (
+ isJeonnamGwangjuSidoAllToolbarTab(tabKey) &&
+ isJeonnamGwangjuSidoAllToolbarException(
+ sidoListRef.current,
+ values,
+ relatedToolbarUserIdRef.current,
+ )
+ ) {
+ return true;
+ }
return isGugunOkForToolbar(sidoListRef.current, values);
}
-function buildSubmitOkForToolbar(values: SearchFormValues | null): boolean {
+function buildSubmitOkForToolbar(
+ values: SearchFormValues | null,
+ tabKey?: string | null,
+): boolean {
+ if (
+ isJeonnamGwangjuSidoAllToolbarTab(tabKey) &&
+ isJeonnamGwangjuSidoAllToolbarException(
+ sidoListRef.current,
+ values,
+ relatedToolbarUserIdRef.current,
+ )
+ ) {
+ return true;
+ }
return isSubmitOkForToolbar(sidoListRef.current, values);
}
@@ -198,8 +230,9 @@ function computeTabToolbarSnapshot(
searchContext: SearchFormValues | null,
periodEnterable: boolean,
isAdminInfo: boolean,
+ tabKey?: string | null,
): TabToolbarSnapshot {
- const gugunOk = buildGugunOkForToolbar(searchContext);
+ const gugunOk = buildGugunOkForToolbar(searchContext, tabKey);
const enterable = computeTabEnterable(statusInfo, periodEnterable);
const isSubmitted = statusInfo?.lclgvSbmsnSttsCd === "2";
const showSaveInToolbar = (enterable || isAdminInfo) && periodEnterable && gugunOk;
@@ -616,6 +649,8 @@ async function waitForImrJobCompleted(
const SewageExcretaRelatedInp = () => {
const { sidoList } = useSearchConditionSidoList({ isInput: true });
sidoListRef.current = sidoList;
+ const userId = useUserStore((state) => state.userInfo?.userId ?? "");
+ relatedToolbarUserIdRef.current = userId;
const { setMessage: alert } = useAlertStore((state) => state);
const { confirm } = useConfirm();
const isAdminInfo = useAdminStore((state) => state.isAdminInfo);
@@ -679,6 +714,8 @@ const SewageExcretaRelatedInp = () => {
/** ST00120001·ST00120002 — 전년도(PRE) 조회로 로드된 ognzSn */
const preYearArticleOgnzSnByTabRef = useRef