From fe96acebecdfa4951aed5e2c37607f3bdb16ec27 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Fri, 30 May 2025 17:42:11 +0900 Subject: [PATCH 1/3] refactor: add builderNm field to session management - Added builderNm field to both SessionData interface and initial state for enhanced session tracking. - Ensured consistency across session management structures. --- src/libs/session.ts | 1 + src/store/session.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libs/session.ts b/src/libs/session.ts index 5036e4e..a11eaf1 100644 --- a/src/libs/session.ts +++ b/src/libs/session.ts @@ -45,6 +45,7 @@ export const defaultSession: SessionData = { storeLvl: null, custCd: null, builderNo: null, + builderNm: null, isLoggedIn: false, role: null, } diff --git a/src/store/session.ts b/src/store/session.ts index f96926a..0ad5b81 100644 --- a/src/store/session.ts +++ b/src/store/session.ts @@ -41,6 +41,7 @@ const initialState: InitialState = { storeLvl: null, custCd: null, builderNo: null, + builderNm: null, isLoggedIn: false, role: null, }, From 8a1313a9647a25ff9ff4bceb03e7345762750922 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Mon, 2 Jun 2025 10:11:22 +0900 Subject: [PATCH 2/3] chore: update environment configuration files to include EMAIL_TITLE_PREFIX - Added EMAIL_TITLE_PREFIX variable to .env.development for system test identification. - Cleared EMAIL_TITLE_PREFIX in .env.localhost and .env.production for consistency across environments. --- .env.development | 1 + .env.localhost | 2 ++ .env.production | 2 ++ 3 files changed, 5 insertions(+) diff --git a/.env.development b/.env.development index d821f10..d4d77fb 100644 --- a/.env.development +++ b/.env.development @@ -11,6 +11,7 @@ NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120 #1:1문의 api NEXT_PUBLIC_INQUIRY_API_URL=https://jp-dev.qsalesplatform.com +EMAIL_TITLE_PREFIX=(System Test) #QPARTNER 로그인 api DB_HOST=202.218.61.226 diff --git a/.env.localhost b/.env.localhost index 1480c7a..eb993b5 100644 --- a/.env.localhost +++ b/.env.localhost @@ -11,6 +11,8 @@ NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120 #1:1문의 api NEXT_PUBLIC_INQUIRY_API_URL=https://jp-dev.qsalesplatform.com +EMAIL_TITLE_PREFIX= + #QPARTNER 로그인 api DB_HOST=202.218.61.226 DB_USER=readonly diff --git a/.env.production b/.env.production index fc11d33..1835dc5 100644 --- a/.env.production +++ b/.env.production @@ -9,6 +9,8 @@ NEXT_PUBLIC_QSP_API_URL=https://jp.qsalesplatform.com #1:1문의 api NEXT_PUBLIC_INQUIRY_API_URL=http://172.23.4.129:8110 +EMAIL_TITLE_PREFIX= + #QPARTNER 로그인 api DB_HOST=202.218.61.226 DB_USER=readonly From ca45c68b9dc47a77c6ce5bab877aed3b12dbcf1b Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Mon, 2 Jun 2025 10:15:50 +0900 Subject: [PATCH 3/3] refactor: update builderNm field in session management - Set builderNm in session and response payload based on user data for improved session tracking. - Ensured consistency in session management structures. --- src/app/api/auth/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/auth/route.ts b/src/app/api/auth/route.ts index bb64208..2ad1416 100644 --- a/src/app/api/auth/route.ts +++ b/src/app/api/auth/route.ts @@ -57,7 +57,7 @@ export async function POST(request: Request) { session.storeLvl = result.data.data.storeLvl session.custCd = result.data.data.custCd session.builderNo = result.data.data.builderNo - session.builderNm = '' + session.builderNm = result.data.data.builderNm session.isLoggedIn = true if (result.data.data.userId === 'T01') { @@ -105,7 +105,7 @@ export async function POST(request: Request) { STORE_LVL: result.data.data.storeLvl, CUST_CD: result.data.data.custCd, BUILDER_NO: result.data.data.builderNo, - BUILDER_NM: '', + BUILDER_NM: result.data.data.builderNm, IS_LOGGED_IN: true, ROLE: '', }