[as frontend] 시도, 군구 추가

This commit is contained in:
2026-06-08 18:06:01 +09:00
parent 84013993c9
commit 7c6c43b334
4 changed files with 10 additions and 9 deletions
@@ -22,6 +22,8 @@ export interface InstlSncnMngSearchParams {
}
export interface InstlSncnMng {
gugun: string;
sido: string;
instlSncnDocNo: string;
admdstCd: string;
sidoNm?: string;
@@ -253,8 +253,8 @@ function CnfmListPage() {
className="cnfm-row-clickable"
onClick={() => router.push(`/instl-sncn/${row.instlSncnDocNo}`)}
>
<td>{row.sidoNm || "-"}</td>
<td>{row.sggNm || "-"}</td>
<td>{row.sido || "-"}</td>
<td>{row.gugun|| "-"}</td>
<td className="text-left">{row.bizNm || "-"}</td>
<td>{row.taskSeCdNm || row.taskSeComCd || "-"}</td>
<td>{row.chrgrNm || row.aplcntNm || "-"}</td>
@@ -204,7 +204,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
const [docSeComCd] = useState("INSTL");
const [taskSeComCdNm, setTaskSeComCdNm] = useState<string>(
() => (currentDet?.taskSeComCdNm as string) ?? "재이용수",
() => (currentDet?.taskSeComCdNm as string) ?? "",
);
const [taskSeComCd, setTaskSeComCd] = useState<string>(() => (currentDet?.taskSeComCd as string) ?? "RE");
@@ -212,7 +212,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
// do not override server-provided initialData (modify mode)
if (currentDet) return;
const raw = sessionStorage.getItem(INSTL_SNCN_REGISTER_SELECTION_KEY);
const raw = sessionStorage.getItem(INSTL_SNCN_REGISTER_SELECTION_KEY);
if (!raw) return;
try {
@@ -220,7 +220,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
taskSeComCdList?: string[];
taskSeComCdNmList?: string[];
};
setTaskSeComCd(parsed.taskSeComCdList?.join(",") || "RE");
setTaskSeComCdNm(parsed.taskSeComCdNmList?.join(",") || "재이용수");
} catch {
@@ -436,7 +436,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
// 수정모드인 경우 서버가 전달한 업무구분(단일 혹은 콤마로 결합된 복수)을 상태로 복원
setTaskSeComCd(det.taskSeComCd);
setTaskSeComCdNm(det.taskSeComCdNm );
setTaskSeComCdNm(det.taskSeCdNm );
// 매핑 완료 플래그 설정 — 이후 동일 컴포넌트 인스턴스에서 재매핑 방지
initialMappedRef.current = true;
@@ -634,7 +634,6 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
const { data: cklstTree = [] } = useQuery<CklstTreeNode[]>({
queryKey: ["cklstTree", docSeComCd, taskSeComCd],
queryFn: async () => {
console.log("Fetching checklist tree with", { docSeComCd, taskSeComCd });
// support comma-separated task codes (e.g. "RE,SP") by splitting
const raw = taskSeComCd ?? "";
const codes = raw
@@ -287,13 +287,13 @@ function CnfmViewPage({ id }: { id: string }) {
<td colSpan={3}>{det.bizCn || "-"}</td>
</tr>
<tr>
<th>업무구분</th>
<th>구분</th>
<td>{det.taskSeCdNm || det.taskSeComCd || "-"}</td>
<th>행정동ID</th>
<td>{det.admdstCd || "-"}</td>
</tr>
<tr>
<th>사업구분(인가구분)</th>
<th>사업구분</th>
<td colSpan={3}>{det.sncnSeComCd || "-"}</td>
</tr>
<tr>