diff --git a/apps/st/app/(main)/(with-base-layout)/layout.tsx b/apps/st/app/(main)/(with-base-layout)/layout.tsx index 19190c901..d5f5074f5 100644 --- a/apps/st/app/(main)/(with-base-layout)/layout.tsx +++ b/apps/st/app/(main)/(with-base-layout)/layout.tsx @@ -97,7 +97,7 @@ function WithBaseLayoutInner({ children }: { children: React.ReactNode }) { useEffect(() => { if (!getToken(CLAIM_NAME)) return; - void statisticsApi.refreshCommonCodes().catch(() => { + void statisticsApi.refreshAllCommonCodes().catch(() => { // 캐시 동기화 실패는 화면 진입을 막지 않음 }); }, []); diff --git a/apps/st/app/global-not-found.tsx b/apps/st/app/global-not-found.tsx new file mode 100644 index 000000000..9e06ffaa1 --- /dev/null +++ b/apps/st/app/global-not-found.tsx @@ -0,0 +1,45 @@ +import type { Metadata } from "next"; +import Image from "next/image"; + +import "@/app/styles/base.css"; + +export const metadata: Metadata = { + title: "유역하수도 통합 정보플랫폼", + description: "페이지가 존재하지 않습니다. 관리자에게 문의하여 주십시오.", +}; + +export default function GlobalNotFound() { + return ( + + +
+
+

+ 유역하수도 통합 정보플랫폼에 + 오신 것을 환영합니다. +

+

+ 오류가 발생하였습니다. +

+
+ +
+ +

+ 페이지가 존재하지 않습니다. +

+

+ 관리자에게 문의하여 주십시오 +

+
+
+ + + ); +} diff --git a/apps/st/next.config.ts b/apps/st/next.config.ts index 743a29bdd..b306b2eff 100644 --- a/apps/st/next.config.ts +++ b/apps/st/next.config.ts @@ -5,6 +5,9 @@ const subDomain = const nextConfig: NextConfig = { output: "standalone", + experimental: { + globalNotFound: true, + }, async headers() { return [ { diff --git a/apps/st/public/images/magnifying-glass-with-warning.png b/apps/st/public/images/magnifying-glass-with-warning.png new file mode 100644 index 000000000..b184da207 Binary files /dev/null and b/apps/st/public/images/magnifying-glass-with-warning.png differ diff --git a/apps/st/src/components/statistics/management/NotEnteredStatus.tsx b/apps/st/src/components/statistics/management/NotEnteredStatus.tsx index ea0c0aaf4..4a897589e 100644 --- a/apps/st/src/components/statistics/management/NotEnteredStatus.tsx +++ b/apps/st/src/components/statistics/management/NotEnteredStatus.tsx @@ -279,7 +279,6 @@ const NotEnteredStatus = () => { return; } const params = buildUnSubmitDataRequest(values, userInfo); - console.log(params); if (!params.dtlInstCd) { alert("기관 정보를 확인할 수 없습니다."); return; diff --git a/apps/st/src/entities/statistics/api/statistics-service.ts b/apps/st/src/entities/statistics/api/statistics-service.ts index c987a9a23..4c55bd556 100644 --- a/apps/st/src/entities/statistics/api/statistics-service.ts +++ b/apps/st/src/entities/statistics/api/statistics-service.ts @@ -370,7 +370,7 @@ export class StatisticsApiService implements StatisticsService { return response.data; } - /** 공통 코드 메모리 캐시 동기화 */ + /** 입력 서비스 공통 코드 메모리 캐시 동기화 */ public async refreshCommonCodes(): Promise { const response = await stClient.post( `${ENDPOINT.ST_SERVICE.INPUTCOMMON}/codes-refresh`, @@ -379,6 +379,26 @@ export class StatisticsApiService implements StatisticsService { ); return response.data; } + + /** 관리 서비스 공통 코드 메모리 캐시 동기화 */ + public async refreshManagementCommonCodes(): Promise { + const response = await stClient.post( + `${ENDPOINT.ST_SERVICE.COMMON}/codes/refresh`, + null, + withAuthHeader(), + ); + return response.data; + } + + /** 입력/관리 공통 코드 캐시 동기화 (한쪽 실패해도 다른 쪽은 완료) */ + public async refreshAllCommonCodes(): Promise< + PromiseSettledResult[] + > { + return Promise.allSettled([ + this.refreshCommonCodes(), + this.refreshManagementCommonCodes(), + ]); + } } export const statisticsApi = new StatisticsApiService(); diff --git a/apps/st/src/entities/statistics/model/statistics-interface.ts b/apps/st/src/entities/statistics/model/statistics-interface.ts index f73185eb4..faaca31ca 100644 --- a/apps/st/src/entities/statistics/model/statistics-interface.ts +++ b/apps/st/src/entities/statistics/model/statistics-interface.ts @@ -572,4 +572,6 @@ export interface StatisticsService { CheckStatusCode(param: CheckStatusCodeRequest): Promise; getUnSubmitData(param: unSubmitDataRequest): Promise; refreshCommonCodes(): Promise; + refreshManagementCommonCodes(): Promise; + refreshAllCommonCodes(): Promise[]>; } \ No newline at end of file diff --git a/apps/st/src/pages/auth/login/ui/login-page.tsx b/apps/st/src/pages/auth/login/ui/login-page.tsx index 0b2f115e3..7d07803ba 100644 --- a/apps/st/src/pages/auth/login/ui/login-page.tsx +++ b/apps/st/src/pages/auth/login/ui/login-page.tsx @@ -23,7 +23,7 @@ function LoginPage() { try { await authService.login({ userId, password }); try { - await statisticsApi.refreshCommonCodes(); + await statisticsApi.refreshAllCommonCodes(); } catch { // 로그인 성공 후 캐시 동기화 실패는 진입을 막지 않음 } diff --git a/apps/st/tailwind.config.ts b/apps/st/tailwind.config.ts index c7fec33e1..accbdccf2 100644 --- a/apps/st/tailwind.config.ts +++ b/apps/st/tailwind.config.ts @@ -5,6 +5,7 @@ import presetConfig from "../../tailwind.config.preset"; export default { presets: [presetConfig], content: [ + "./app/**/*.{js,ts,jsx,tsx}", "./src/**/*.{js,ts,jsx,tsx}", "../../packages/common/components/src/ui/**/*.{js,ts,jsx,tsx}", ],