From 32c36c770ca76baf409a04013c725e9ba6f2f583 Mon Sep 17 00:00:00 2001 From: swcho Date: Fri, 8 Aug 2025 15:30:37 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=8F=84=EC=8B=9C=EC=B9=A8=EC=88=98?= =?UTF-8?q?=EC=98=88=EB=B0=A9=EC=82=AC=EC=97=85,=20=EB=85=B8=ED=9B=84?= =?UTF-8?q?=ED=95=98=EC=88=98=EA=B4=80=EB=A1=9C=20=EB=93=B1=EB=A1=9D=20?= =?UTF-8?q?=EC=8B=9C=20=EB=93=B1=EB=A1=9D=EC=9E=90=20=EC=A0=95=EB=B3=B4=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 --- .../(with-base-layout)/oper/floodPre/page.tsx | 21 ++++++++++++++++--- .../(with-base-layout)/oper/oldPp/page.tsx | 15 ++++++++++++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx index 4ea485821..141f2652a 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx @@ -9,6 +9,11 @@ import { Button, DatePicker, Input, Label } from '@common/components/ui' import { useEffect, useState } from 'react' import { tableHeadlist } from '..' import OperFileUploadForm from '../../../components/ui/operFileUploadForm' +import { tokenManager } from '@/entities/auth/lib/token-manager'; +import { AUTH_USER_ID } from "@/shared/config"; +import { useQuery } from "@tanstack/react-query"; +import { ENDPOINT } from "@common/components/config"; +import { getUserInfo } from "@common/components/api"; const Page = () => { @@ -29,6 +34,12 @@ const Page = () => { const [resetSelection, setResetSelection] = useState(false); // 선택 초기화 상태 const [isResetPage, setIsResetPage] = useState(false); + const { data: userInfo } = useQuery({ + queryKey: [ENDPOINT.USER_SERVICE.USERS], + queryFn: () => getUserInfo(), + enabled: true, + }); + useEffect(() => { setCurPage(1) fetchData() @@ -109,14 +120,18 @@ const Page = () => { // 현황 등록 const registFile = async (fileName: string, year: string, quater: string, cd: string, id: string) => { - const data = await postData('v1/sbmrgPrevnt', { + const json = { atflNm: fileName, mngYr: year, mngQu: quater, atflCd: cd, atflId: id, - sbmrgPrevntBizNm: fileName - }) + sbmrgPrevntBizNm: fileName, + rgtr: tokenManager.getToken(AUTH_USER_ID) || null, + rgtrNm: userInfo?.userName, + } + console.log('request DTO', json); + const data = await postData('v1/sbmrgPrevnt', json) if (data) { alert('파일이 등록되었습니다.'); setIsModalOpen(false); diff --git a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx index de7695636..1fbb536a5 100644 --- a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx @@ -9,6 +9,11 @@ import { Button, DatePicker, Input, Label } from '@common/components/ui' import { useEffect, useState } from 'react' import { tableHeadlistOldPp } from '..' import OperFileUploadForm from '../../../components/ui/operFileUploadForm' +import { tokenManager } from '@/entities/auth/lib/token-manager'; +import { AUTH_USER_ID } from "@/shared/config"; +import { useQuery } from "@tanstack/react-query"; +import { ENDPOINT } from "@common/components/config"; +import { getUserInfo } from "@common/components/api"; const Page = () => { @@ -27,6 +32,12 @@ const Page = () => { const [resetSelection, setResetSelection] = useState(false); // 선택 초기화 상태 const [isResetPage, setIsResetPage] = useState(false); + const { data: userInfo } = useQuery({ + queryKey: [ENDPOINT.USER_SERVICE.USERS], + queryFn: () => getUserInfo(), + enabled: true, + }); + useEffect(() => { setCurPage(1) fetchData() @@ -112,7 +123,9 @@ const Page = () => { mngQu: quater, atflCd: cd, atflId: id, - dcrpPplMtncBizNm: fileNm + dcrpPplMtncBizNm: fileNm, + rgtr: tokenManager.getToken(AUTH_USER_ID) || null, + rgtrNm: userInfo?.userName, }) if (data) { alert('파일이 등록되었습니다.');