diff --git a/apps/cs/src/entities/link/model/link-interface.ts b/apps/cs/src/entities/link/model/link-interface.ts index f8cf82016..244bb4c63 100644 --- a/apps/cs/src/entities/link/model/link-interface.ts +++ b/apps/cs/src/entities/link/model/link-interface.ts @@ -20,6 +20,7 @@ export interface Link { mdfcn_dt: string; mdfr_id_id: string; link_cycle_mi: string; + link_key_expry_ymd: string; } export interface LinkLog { @@ -50,6 +51,7 @@ export interface LinkInfo extends LinkFormData { mdfcn_dt: string; mdfr_id: string; link_cycle_mi: number; + link_key_expry_ymd: string; } export interface LinkStats { @@ -125,6 +127,7 @@ export const linkFormSchema = z.object({ }, { message: "연계 주기는 5분 이상이어야 합니다." }), + link_key_expry_ymd: z.string().nullable().optional(), }); export const linkVrblFormSchema = z.object({ diff --git a/apps/cs/src/pages/link/model/table-columns.tsx b/apps/cs/src/pages/link/model/table-columns.tsx index 81b86b570..800801277 100644 --- a/apps/cs/src/pages/link/model/table-columns.tsx +++ b/apps/cs/src/pages/link/model/table-columns.tsx @@ -68,7 +68,7 @@ const columns = [ header: '연계상태', cell: (info) => { const resultCd = info.row.original.last_link_rslt_cd; - return {resultCd === 'SUCC' ? '성공' : (resultCd === 'FAIL' ? '실패' : '대기')} + return {resultCd === 'SUCC' ? '성공' : (resultCd === 'FAIL' ? '실패' : (resultCd === 'RUNN' ? '진행중' : '대기'))} }, }), columnHelper.accessor('last_link_excn_dt', { diff --git a/apps/cs/src/pages/link/ui/LinkExpiredAlert.tsx b/apps/cs/src/pages/link/ui/LinkExpiredAlert.tsx new file mode 100644 index 000000000..92628a755 --- /dev/null +++ b/apps/cs/src/pages/link/ui/LinkExpiredAlert.tsx @@ -0,0 +1,90 @@ +import type { Link, LinkList } from "@/entities/link/model/link-interface"; +import { + Button, + DropdownMenu, + DropdownMenuTrigger, + DropdownMenuContent, + DropdownMenuItem +} from "@common/components"; +import type { UseQueryResult } from "@tanstack/react-query"; +import { useState, useEffect } from "react"; +import dayjs from "dayjs"; +import { useRouter } from "next/navigation"; + +const LinkExpiredAlert = ({ linkList }: { linkList: UseQueryResult }) => { + const [expriedLinkList, setExpriedLinkLikst] = useState([]); + const router = useRouter(); + + useEffect(() => { + if (linkList?.data?.content) { + const expriedLinks = linkList.data.content.filter((l) => { + if (l.link_key_expry_ymd === 'none' || !l.link_key_expry_ymd) { + return false; + } + + const expryDate = dayjs(l.link_key_expry_ymd, 'YYMMDD'); + const today = dayjs(); + + const daysDiff = expryDate.diff(today, 'day'); + + return daysDiff <= 7 + }); + + setExpriedLinkLikst(expriedLinks); + } + }, [linkList]); + + return ( +
+ + +
+ + {expriedLinkList.length > 0 && + + NEW + + } +
+
+ {expriedLinkList.length > 0 ? + + {expriedLinkList.map((l) => { + const expryDate = dayjs(l.link_key_expry_ymd, 'YYMMDD'); + const today = dayjs(); + const daysDiff = expryDate.diff(today, 'day'); + + return router.push(`link/register/${l.link_sn}`)}> +
+ {daysDiff > 0 ? +

{l.link_nm} API KEY 만료 {daysDiff}일전

+ : +

{l.link_nm} API KEY 만료됨

+ } +

만료일자: {expryDate.format('YYYY-MM-DD')}

+
+
+ })} +
+ : + + +
+ + 새로운 알림이 없습니다. +
+
+
+ } +
+
+ ); +}; + +export default LinkExpiredAlert; \ No newline at end of file diff --git a/apps/cs/src/pages/link/ui/QuickStartButton.tsx b/apps/cs/src/pages/link/ui/QuickStartButton.tsx index a322ee678..8c443884e 100644 --- a/apps/cs/src/pages/link/ui/QuickStartButton.tsx +++ b/apps/cs/src/pages/link/ui/QuickStartButton.tsx @@ -22,7 +22,7 @@ const QuickStartButton: React.FC<{ linkSn: string }> = ({ linkSn }) => { return ( diff --git a/apps/cs/src/pages/link/ui/modify-page.tsx b/apps/cs/src/pages/link/ui/modify-page.tsx index c690b8aa7..88a83f47b 100644 --- a/apps/cs/src/pages/link/ui/modify-page.tsx +++ b/apps/cs/src/pages/link/ui/modify-page.tsx @@ -7,7 +7,7 @@ import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import LinkForm from "./link-form"; import { useAlertStore } from "@/shared/lib/use-alert-store"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { getUserInfo } from "../../../../../../packages/common/components/src/api"; import { AUTH_USER_ID } from "@/shared/config"; import { getCookie } from "@common/components"; @@ -18,6 +18,8 @@ function ModifyLinkPage({ linkSn }: { linkSn: string }) { const { setMessage: alert } = useAlertStore((state) => state); const userUniqId = getCookie(AUTH_USER_ID) ?? ""; + const [initialIsNoExprie, setInitialIsNoExprie] = useState(true); + // 컴포넌트 마운트 시 캐시 초기화 useEffect(() => { queryClient.removeQueries({ @@ -82,7 +84,8 @@ function ModifyLinkPage({ linkSn }: { linkSn: string }) { } form.reset(newData); - + + setInitialIsNoExprie(newData.link_key_expry_ymd === 'none'); } }; @@ -101,6 +104,7 @@ function ModifyLinkPage({ linkSn }: { linkSn: string }) { updateLinkInfo={updateLinkInfo} deleteLink={deleteLink} updateLinkResultCode={updateLinkResultCode} + initialIsNoExprie={initialIsNoExprie} /> diff --git a/apps/dm/.env.development b/apps/dm/.env.development index 833207ed0..f850f1bcf 100644 --- a/apps/dm/.env.development +++ b/apps/dm/.env.development @@ -15,7 +15,7 @@ NEXT_PUBLIC_REFRESH_TOKEN = refresh-token NEXT_PUBLIC_REUSE_API_URL= http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1 NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api - +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://devqueen.hasuon.or.kr/auth/login NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do diff --git a/apps/dm/.env.local b/apps/dm/.env.local index 9609f33f6..ebfbfeedb 100644 --- a/apps/dm/.env.local +++ b/apps/dm/.env.local @@ -18,7 +18,7 @@ NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr/openapi/Gettile.do?apiKey=04trYP9_ NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service/api # 개발 서버 API #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성 #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정 - +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do diff --git a/apps/dm/.env.mindone b/apps/dm/.env.mindone index c9d033442..0f855c1c4 100644 --- a/apps/dm/.env.mindone +++ b/apps/dm/.env.mindone @@ -15,7 +15,7 @@ NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr/openapi/Gettile.do?apiKey=04trYP9_ NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service/api # 개발 서버 API # NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성 #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정 - +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do diff --git a/apps/dm/.env.production b/apps/dm/.env.production index e627195cb..607304e50 100644 --- a/apps/dm/.env.production +++ b/apps/dm/.env.production @@ -15,7 +15,7 @@ NEXT_PUBLIC_REFRESH_TOKEN = refresh-token NEXT_PUBLIC_REUSE_API_URL= http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1 NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api - +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://queen.hasuon.or.kr/auth/login NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do diff --git a/apps/fo/.env.development b/apps/fo/.env.development index ffaf99feb..d289900bd 100644 --- a/apps/fo/.env.development +++ b/apps/fo/.env.development @@ -14,4 +14,5 @@ NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1 NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api -NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service \ No newline at end of file +NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://devqueen.hasuon.or.kr/auth/login \ No newline at end of file diff --git a/apps/fo/.env.local b/apps/fo/.env.local index 3ebe251c3..ebc8b9338 100644 --- a/apps/fo/.env.local +++ b/apps/fo/.env.local @@ -16,6 +16,7 @@ NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr/openapi/Gettile.do?apiKey=04trYP9_xwLAfALjwZ-B8g NEXT_PUBLIC_SEWERAGE_API_URL = http://con.mind-one.co.kr:11083/sewerage-service/api # 개발 서버 API NEXT_PUBLIC_DC_URL = https://apigateway.apps.rsonesoft.com/dc-service +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login #NEXT_PUBLIC_SERVER_API_URL = http://localhost:8883/operation-service diff --git a/apps/fo/.env.mindone b/apps/fo/.env.mindone index 379bfb11e..71dbcc351 100644 --- a/apps/fo/.env.mindone +++ b/apps/fo/.env.mindone @@ -12,4 +12,5 @@ NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000 NEXT_PUBLIC_GEOSERVER_URL = https://hasudo.geo.rsonesoft.com/geoserver NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr/openapi/Gettile.do?apiKey=04trYP9_xwLAfALjwZ-B8g -NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service/api \ No newline at end of file +NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service/api +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login \ No newline at end of file diff --git a/apps/fo/.env.production b/apps/fo/.env.production index 3f5cf8bea..5977e610e 100644 --- a/apps/fo/.env.production +++ b/apps/fo/.env.production @@ -14,4 +14,5 @@ NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1 NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api -NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service \ No newline at end of file +NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://queen.hasuon.or.kr/auth/login \ No newline at end of file diff --git a/apps/sn/.env.development b/apps/sn/.env.development index cd4879013..19cf54032 100644 --- a/apps/sn/.env.development +++ b/apps/sn/.env.development @@ -12,3 +12,4 @@ NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000 NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://devqueen.hasuon.or.kr/auth/login \ No newline at end of file diff --git a/apps/sn/.env.production b/apps/sn/.env.production index 87927af72..1bad3486b 100644 --- a/apps/sn/.env.production +++ b/apps/sn/.env.production @@ -12,4 +12,4 @@ NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl NEXT_PUBLIC_NGII_URL = http://172.29.143.87:80/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000 NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/dc-service -NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://queen.hasuon.or.kr/auth/login diff --git a/apps/wr/.env.development b/apps/wr/.env.development index 34ea78105..258d7e025 100644 --- a/apps/wr/.env.development +++ b/apps/wr/.env.development @@ -15,6 +15,7 @@ NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1 NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://devqueen.hasuon.or.kr/auth/login NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do NEXT_PRIVATE_WR_ADDRESS_KEY = U01TXOFVVEgyMDI1MDgyODE0MTAxNzExNjEyMjA= \ No newline at end of file diff --git a/apps/wr/.env.production b/apps/wr/.env.production index 7086521c6..d1529b42a 100644 --- a/apps/wr/.env.production +++ b/apps/wr/.env.production @@ -15,6 +15,7 @@ NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1 NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC +NEXT_PUBLIC_CM_LOGIN_PAGE_URL = https://queen.hasuon.or.kr/auth/login NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do NEXT_PRIVATE_WR_ADDRESS_KEY = U01TXOFVVEgyMDI1MDgyODE0MTAxNzExNjEyMjA= \ No newline at end of file