From 84525b7e87e97dfa6b7b245b15015facb2d7cca2 Mon Sep 17 00:00:00 2001 From: rsone001 Date: Fri, 27 Nov 2026 17:19:46 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[ST]=20-=20refactor:=20=EC=A0=84=EB=82=A8?= =?UTF-8?q?=EA=B4=91=EC=A3=BC=ED=86=B5=ED=95=A9=ED=8A=B9=EB=B3=84=EC=8B=9C?= =?UTF-8?q?=20=EB=B3=B8=EC=B2=AD=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=A0=80=EC=9E=A5&=EC=A0=9C=EC=B6=9C=20alert=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../input/SewageExcretaRelatedInp.tsx | 16 ++++++++++++++-- .../statistics/input/SewerageFinanceInp.tsx | 18 ++++++++++++++++-- apps/st/src/entities/statistics/index.ts | 2 ++ .../lib/jeonnam-gwangju-sido-all-toolbar.ts | 12 +++++++++++- 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx b/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx index 5588ba8cb..dab2b251c 100644 --- a/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx +++ b/apps/st/src/components/statistics/input/SewageExcretaRelatedInp.tsx @@ -42,8 +42,10 @@ import type { import { filterBySelectedAdmdstCd, isGugunOkForToolbar, + isJeonnamGwangjuSidoAllSearch, isJeonnamGwangjuSidoAllToolbarException, isSubmitOkForToolbar, + JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE, resolveNoApplicableForRequest, toInputSearchRegion, } from "@/entities/statistics"; @@ -1340,7 +1342,12 @@ const SewageExcretaRelatedInp = () => { return; } - if (await confirm("제출 하시겠습니까?")) { + const submitConfirmMessage = + ARTICLE_EDIT_TAB_KEYS.has(tabKey) && + isJeonnamGwangjuSidoAllSearch(sidoListRef.current, lastSearchedValues) + ? JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE + : "제출 하시겠습니까?"; + if (await confirm(submitConfirmMessage)) { setShowSubmitDialog(true); } })(); @@ -1622,7 +1629,12 @@ const SewageExcretaRelatedInp = () => { alert("해당 탭은 저장 기능이 준비되지 않았습니다."); return; } - if (!(await confirm("저장 하시겠습니까?"))) return; + const saveConfirmMessage = + ARTICLE_EDIT_TAB_KEYS.has(tabKey) && + isJeonnamGwangjuSidoAllSearch(sidoListRef.current, lastSearchedValues) + ? JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE + : "저장 하시겠습니까?"; + if (!(await confirm(saveConfirmMessage))) return; commitActiveGrid(); diff --git a/apps/st/src/components/statistics/input/SewerageFinanceInp.tsx b/apps/st/src/components/statistics/input/SewerageFinanceInp.tsx index 9083b505e..02aa95d69 100644 --- a/apps/st/src/components/statistics/input/SewerageFinanceInp.tsx +++ b/apps/st/src/components/statistics/input/SewerageFinanceInp.tsx @@ -41,8 +41,10 @@ import type { import { filterBySelectedAdmdstCd, isGugunOkForToolbar, + isJeonnamGwangjuSidoAllSearch, isJeonnamGwangjuSidoAllToolbarException, isSubmitOkForToolbar, + JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE, toInputSearchRegion, } from "@/entities/statistics"; @@ -846,7 +848,13 @@ const SewerageFinanceInp = () => { alert("제출할 데이터가 없습니다."); return; } - if (await confirm("제출 하시겠습니까?")) { + const submitConfirmMessage = isJeonnamGwangjuSidoAllSearch( + sidoListRef.current, + lastSearchedValues, + ) + ? JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE + : "제출 하시겠습니까?"; + if (await confirm(submitConfirmMessage)) { setShowSubmitDialog(true); } })(); @@ -1043,7 +1051,13 @@ const SewerageFinanceInp = () => { return; } - if (!(await confirm("저장 하시겠습니까?"))) return; + const saveConfirmMessage = isJeonnamGwangjuSidoAllSearch( + sidoListRef.current, + lastSearchedValues, + ) + ? JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE + : "저장 하시겠습니까?"; + if (!(await confirm(saveConfirmMessage))) return; const currentData = getTabGridRows(tabKey); if (!currentData.length) { diff --git a/apps/st/src/entities/statistics/index.ts b/apps/st/src/entities/statistics/index.ts index 047388249..06fb0dbd3 100644 --- a/apps/st/src/entities/statistics/index.ts +++ b/apps/st/src/entities/statistics/index.ts @@ -11,6 +11,8 @@ export { useScheduleInfo } from "./api/dashboard/schedule-info-queries"; export { scheduleInfoApi } from "./api/dashboard/schedule-info-service"; export { imrApi } from "./api/imr-api"; export { + JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE, + isJeonnamGwangjuSidoAllSearch, isJeonnamGwangjuSidoAllToolbarException, } from "./lib/jeonnam-gwangju-sido-all-toolbar"; export { diff --git a/apps/st/src/entities/statistics/lib/jeonnam-gwangju-sido-all-toolbar.ts b/apps/st/src/entities/statistics/lib/jeonnam-gwangju-sido-all-toolbar.ts index 423827128..28f1eff3a 100644 --- a/apps/st/src/entities/statistics/lib/jeonnam-gwangju-sido-all-toolbar.ts +++ b/apps/st/src/entities/statistics/lib/jeonnam-gwangju-sido-all-toolbar.ts @@ -23,6 +23,16 @@ function isJeonnamGwangjuUnifiedSido( return (values.sido ?? "").trim() === "전남광주통합특별시"; } +export const JEONNAM_GWANGJU_SIDO_ALL_SAVE_SUBMIT_MESSAGE = + "전남광주통합특별시는 시군구를 선택하지 않고 저장 및 제출 시 본청 데이터만 반영됩니다.\n각 시군구의 데이터는 선택 후 새로 조회하여 작성해주세요."; + +export function isJeonnamGwangjuSidoAllSearch( + sidoList: readonly Sido[] | undefined, + values: SidoGugunLookup | null | undefined, +): boolean { + return isJeonnamGwangjuUnifiedSido(sidoList, values) && isEmptyOrAllGugun(values); +} + export function isJeonnamGwangjuSidoAllToolbarException( sidoList: readonly Sido[] | undefined, values: SidoGugunLookup | null | undefined, @@ -31,5 +41,5 @@ export function isJeonnamGwangjuSidoAllToolbarException( if (!SIDO_ALL_TOOLBAR_USER_IDS.has((userId ?? "").trim().toUpperCase())) { return false; } - return isJeonnamGwangjuUnifiedSido(sidoList, values) && isEmptyOrAllGugun(values); + return isJeonnamGwangjuSidoAllSearch(sidoList, values); } From 5e4924b5e31b1c66347aa0e0cf9f0ca13c298a99 Mon Sep 17 00:00:00 2001 From: jcchoi Date: Mon, 30 Nov 2026 10:44:56 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EC=9E=90=20Guid=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/vendor-development-guide.md | 154 +++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 docs/vendor-development-guide.md diff --git a/docs/vendor-development-guide.md b/docs/vendor-development-guide.md new file mode 100644 index 000000000..a53fdeda6 --- /dev/null +++ b/docs/vendor-development-guide.md @@ -0,0 +1,154 @@ +# Frontend 개발 가이드 (외부 업체용) + +이 프로젝트의 프론트엔드는 개발 완료 후 **인터넷이 차단된 환경(폐쇄망)** 에 반영됩니다. 반영 과정에서 빌드 실패나 버전 불일치가 생기지 않도록, 개발 중 아래 규칙을 지켜 주세요. + +> 문의: **[담당자 이름 / 연락처 기입]** + +--- + +## 1. 개발 환경 + +| 항목 | 버전 | 비고 | +|---|---|---| +| Node.js | `22.23.4` | 루트 `.nvmrc` 참고. 다른 버전으로 빌드하지 마세요. | +| 패키지 매니저 | `pnpm 10.12.1` | `npm`, `yarn`은 사용 불가 (루트 `preinstall`에서 차단됨) | + +```bash +nvm use # .nvmrc 기준 Node 선택 +corepack enable +pnpm install +``` + +- `pnpm-lock.yaml`은 저장소에 포함하지 않습니다(`.gitignore` 대상). 커밋 대상이 아니므로 `git status`에 나타나도 올리지 마세요. +- Node, pnpm 버전을 임의로 올리지 마세요. 버전 변경은 담당자와 협의 후 진행합니다. + +--- + +## 2. 의존성(패키지) 규칙 + +폐쇄망에서는 npm 공식 저장소가 아닌 사내 저장소를 거쳐 패키지를 받습니다. 아래에 해당하는 패키지는 설치가 실패할 수 있습니다. + +### 반드시 지킬 것 +- 패키지는 **작업 중인 앱의 `package.json`**(`apps/<앱>/package.json`)에만 추가하세요. 다른 앱이나 루트 `package.json`은 수정하지 않습니다. +- 새 패키지는 `pnpm add -E <패키지>`로 **정확한 버전**을 지정해 추가하는 것을 권장합니다. 폐쇄망에 반영할 때 담당자가 `package.json`을 기준으로 버전을 확정하므로, `latest`나 넓은 범위(`*`)는 피하세요. + +### 사용하면 안 되는 형태 +| 금지 | 이유 | +|---|---| +| git 주소·tarball URL 의존성 (`github:...`, `https://...tgz`) | 폐쇄망에서 받을 수 없음 | +| 설치 중(`postinstall`) 인터넷에서 바이너리를 내려받는 패키지 (예: Puppeteer, Playwright 브라우저 다운로드 등) | 설치 단계에서 실패 | +| 빌드 시 외부 사이트에서 폰트·리소스를 받는 방식 (예: `next/font/google`) | 빌드 실패 | + +### 새 패키지를 추가할 때 +PR 설명에 **패키지명, 버전, 추가 이유, 라이선스**를 적어 주세요. 네이티브 모듈(C/C++ 빌드가 필요한 패키지)은 반입 전에 별도 확인이 필요하므로 **미리 담당자에게 알려 주세요.** + +--- + +## 3. 외부 인터넷 접근 금지 + +운영 환경은 외부 인터넷에 연결되지 않습니다. 화면이 동작하는 데 필요한 모든 리소스는 **프로젝트 안에 포함**되어야 합니다. + +- 폰트: `next/font/local` 또는 `public/`에 포함. Google Fonts, CDN 폰트 사용 금지 +- 스크립트·스타일: CDN `