Compare commits
No commits in common. "31a63cb643289a7346ba01e134f66ef237434557" and "333f06bb642e0e2aaf4a8136d27e3299c87abfb8" have entirely different histories.
31a63cb643
...
333f06bb64
@ -1,4 +1,3 @@
|
|||||||
NEXT_PUBLIC_RUN_MODE=development
|
|
||||||
# 모바일 디바이스로 로컬 서버 확인하려면 자신 IP 주소로 변경
|
# 모바일 디바이스로 로컬 서버 확인하려면 자신 IP 주소로 변경
|
||||||
# 다시 로컬에서 개발할때는 localhost로 변경
|
# 다시 로컬에서 개발할때는 localhost로 변경
|
||||||
#route handler
|
#route handler
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
NEXT_PUBLIC_RUN_MODE=local
|
|
||||||
# 모바일 디바이스로 로컬 서버 확인하려면 자신 IP 주소로 변경
|
|
||||||
# 다시 로컬에서 개발할때는 localhost로 변경
|
|
||||||
#route handler
|
|
||||||
NEXT_PUBLIC_API_URL=http://localhost:3000
|
|
||||||
|
|
||||||
#qsp 로그인 api
|
|
||||||
NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120
|
|
||||||
|
|
||||||
#1:1문의 api
|
|
||||||
NEXT_PUBLIC_INQUIRY_API_URL=http://1.248.227.176:38080
|
|
||||||
|
|
||||||
#QPARTNER 로그인 api
|
|
||||||
DB_HOST=202.218.61.226
|
|
||||||
DB_USER=readonly
|
|
||||||
DB_PASSWORD=aAjmFW12iHKW84l1
|
|
||||||
DB_DATABASE=qpartners
|
|
||||||
DB_PORT=3306
|
|
||||||
@ -1,6 +1,5 @@
|
|||||||
NEXT_PUBLIC_RUN_MODE=production
|
|
||||||
#route handler
|
#route handler
|
||||||
NEXT_PUBLIC_API_URL=http://1.248.227.176:3000
|
NEXT_PUBLIC_API_URL=http://172.30.1.35:3000
|
||||||
|
|
||||||
#qsp 로그인 api
|
#qsp 로그인 api
|
||||||
NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120
|
NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120
|
||||||
|
|||||||
@ -3,15 +3,9 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "env-cmd -f .env.localhost next dev --turbopack",
|
"dev": "next dev --turbopack",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"build:local": "env-cmd -f .env.localhost next build",
|
|
||||||
"build:dev": "env-cmd -f .env.development next build",
|
|
||||||
"build:prod": "env-cmd -f .env.production next build",
|
|
||||||
"start:local": "env-cmd -f .env.localhost next start",
|
|
||||||
"start:dev": "env-cmd -f .env.development next start",
|
|
||||||
"start:prod": "env-cmd -f .env.production next start",
|
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -19,7 +13,6 @@
|
|||||||
"@tanstack/react-query": "^5.71.0",
|
"@tanstack/react-query": "^5.71.0",
|
||||||
"@tanstack/react-query-devtools": "^5.71.0",
|
"@tanstack/react-query-devtools": "^5.71.0",
|
||||||
"axios": "^1.8.4",
|
"axios": "^1.8.4",
|
||||||
"env-cmd": "^10.1.0",
|
|
||||||
"iron-session": "^8.0.4",
|
"iron-session": "^8.0.4",
|
||||||
"lucide": "^0.503.0",
|
"lucide": "^0.503.0",
|
||||||
"mssql": "^11.0.1",
|
"mssql": "^11.0.1",
|
||||||
|
|||||||
63
pnpm-lock.yaml
generated
63
pnpm-lock.yaml
generated
@ -20,9 +20,6 @@ importers:
|
|||||||
axios:
|
axios:
|
||||||
specifier: ^1.8.4
|
specifier: ^1.8.4
|
||||||
version: 1.8.4
|
version: 1.8.4
|
||||||
env-cmd:
|
|
||||||
specifier: ^10.1.0
|
|
||||||
version: 10.1.0
|
|
||||||
iron-session:
|
iron-session:
|
||||||
specifier: ^8.0.4
|
specifier: ^8.0.4
|
||||||
version: 8.0.4
|
version: 8.0.4
|
||||||
@ -804,10 +801,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}
|
resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}
|
||||||
engines: {node: '>=16'}
|
engines: {node: '>=16'}
|
||||||
|
|
||||||
commander@4.1.1:
|
|
||||||
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
|
|
||||||
engines: {node: '>= 6'}
|
|
||||||
|
|
||||||
cookie@0.7.2:
|
cookie@0.7.2:
|
||||||
resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}
|
resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}
|
||||||
engines: {node: '>= 0.6'}
|
engines: {node: '>= 0.6'}
|
||||||
@ -815,10 +808,6 @@ packages:
|
|||||||
core-js@3.41.0:
|
core-js@3.41.0:
|
||||||
resolution: {integrity: sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==}
|
resolution: {integrity: sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==}
|
||||||
|
|
||||||
cross-spawn@7.0.6:
|
|
||||||
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
|
|
||||||
engines: {node: '>= 8'}
|
|
||||||
|
|
||||||
css-line-break@2.1.0:
|
css-line-break@2.1.0:
|
||||||
resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
|
resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
|
||||||
|
|
||||||
@ -877,11 +866,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==}
|
resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==}
|
||||||
engines: {node: '>=10.13.0'}
|
engines: {node: '>=10.13.0'}
|
||||||
|
|
||||||
env-cmd@10.1.0:
|
|
||||||
resolution: {integrity: sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==}
|
|
||||||
engines: {node: '>=8.0.0'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
es-define-property@1.0.1:
|
es-define-property@1.0.1:
|
||||||
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
|
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@ -1037,9 +1021,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==}
|
resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==}
|
||||||
engines: {node: '>=16'}
|
engines: {node: '>=16'}
|
||||||
|
|
||||||
isexe@2.0.0:
|
|
||||||
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
|
|
||||||
|
|
||||||
jiti@2.4.2:
|
jiti@2.4.2:
|
||||||
resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==}
|
resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@ -1236,10 +1217,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==}
|
resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
path-key@3.1.1:
|
|
||||||
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
|
||||||
engines: {node: '>=8'}
|
|
||||||
|
|
||||||
performance-now@2.1.0:
|
performance-now@2.1.0:
|
||||||
resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
|
resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
|
||||||
|
|
||||||
@ -1347,14 +1324,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==}
|
resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==}
|
||||||
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
||||||
|
|
||||||
shebang-command@2.0.0:
|
|
||||||
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
|
|
||||||
engines: {node: '>=8'}
|
|
||||||
|
|
||||||
shebang-regex@3.0.0:
|
|
||||||
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
|
|
||||||
engines: {node: '>=8'}
|
|
||||||
|
|
||||||
simple-swizzle@0.2.2:
|
simple-swizzle@0.2.2:
|
||||||
resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==}
|
resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==}
|
||||||
|
|
||||||
@ -1454,11 +1423,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
which@2.0.2:
|
|
||||||
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
|
|
||||||
engines: {node: '>= 8'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
zustand@5.0.3:
|
zustand@5.0.3:
|
||||||
resolution: {integrity: sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==}
|
resolution: {integrity: sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==}
|
||||||
engines: {node: '>=12.20.0'}
|
engines: {node: '>=12.20.0'}
|
||||||
@ -2106,19 +2070,11 @@ snapshots:
|
|||||||
|
|
||||||
commander@11.1.0: {}
|
commander@11.1.0: {}
|
||||||
|
|
||||||
commander@4.1.1: {}
|
|
||||||
|
|
||||||
cookie@0.7.2: {}
|
cookie@0.7.2: {}
|
||||||
|
|
||||||
core-js@3.41.0:
|
core-js@3.41.0:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
cross-spawn@7.0.6:
|
|
||||||
dependencies:
|
|
||||||
path-key: 3.1.1
|
|
||||||
shebang-command: 2.0.0
|
|
||||||
which: 2.0.2
|
|
||||||
|
|
||||||
css-line-break@2.1.0:
|
css-line-break@2.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
utrie: 1.0.2
|
utrie: 1.0.2
|
||||||
@ -2167,11 +2123,6 @@ snapshots:
|
|||||||
graceful-fs: 4.2.11
|
graceful-fs: 4.2.11
|
||||||
tapable: 2.2.1
|
tapable: 2.2.1
|
||||||
|
|
||||||
env-cmd@10.1.0:
|
|
||||||
dependencies:
|
|
||||||
commander: 4.1.1
|
|
||||||
cross-spawn: 7.0.6
|
|
||||||
|
|
||||||
es-define-property@1.0.1: {}
|
es-define-property@1.0.1: {}
|
||||||
|
|
||||||
es-errors@1.3.0: {}
|
es-errors@1.3.0: {}
|
||||||
@ -2346,8 +2297,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-inside-container: 1.0.0
|
is-inside-container: 1.0.0
|
||||||
|
|
||||||
isexe@2.0.0: {}
|
|
||||||
|
|
||||||
jiti@2.4.2: {}
|
jiti@2.4.2: {}
|
||||||
|
|
||||||
js-md4@0.3.2: {}
|
js-md4@0.3.2: {}
|
||||||
@ -2551,8 +2500,6 @@ snapshots:
|
|||||||
is-inside-container: 1.0.0
|
is-inside-container: 1.0.0
|
||||||
is-wsl: 3.1.0
|
is-wsl: 3.1.0
|
||||||
|
|
||||||
path-key@3.1.1: {}
|
|
||||||
|
|
||||||
performance-now@2.1.0:
|
performance-now@2.1.0:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
@ -2675,12 +2622,6 @@ snapshots:
|
|||||||
'@img/sharp-win32-x64': 0.33.5
|
'@img/sharp-win32-x64': 0.33.5
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
shebang-command@2.0.0:
|
|
||||||
dependencies:
|
|
||||||
shebang-regex: 3.0.0
|
|
||||||
|
|
||||||
shebang-regex@3.0.0: {}
|
|
||||||
|
|
||||||
simple-swizzle@0.2.2:
|
simple-swizzle@0.2.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-arrayish: 0.3.2
|
is-arrayish: 0.3.2
|
||||||
@ -2762,10 +2703,6 @@ snapshots:
|
|||||||
|
|
||||||
uuid@8.3.2: {}
|
uuid@8.3.2: {}
|
||||||
|
|
||||||
which@2.0.2:
|
|
||||||
dependencies:
|
|
||||||
isexe: 2.0.0
|
|
||||||
|
|
||||||
zustand@5.0.3(@types/react@19.0.12)(react@19.1.0):
|
zustand@5.0.3(@types/react@19.0.12)(react@19.1.0):
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/react': 19.0.12
|
'@types/react': 19.0.12
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
import { NextResponse } from 'next/server'
|
|
||||||
import axios from 'axios'
|
|
||||||
import { CommonCode } from '@/types/Inquiry'
|
|
||||||
|
|
||||||
export async function GET() {
|
|
||||||
const response = await axios.get(`${process.env.NEXT_PUBLIC_INQUIRY_API_URL}/api/system/commonCodeListData`)
|
|
||||||
const codeList: CommonCode[] = []
|
|
||||||
response.data.data.apiCommCdList.forEach((item: any) => {
|
|
||||||
if (item.headCd === '204200' || item.headCd === '204300' || item.headCd === '204400') {
|
|
||||||
codeList.push({
|
|
||||||
headCd: item.headCd,
|
|
||||||
code: item.code,
|
|
||||||
name: item.codeJp,
|
|
||||||
refChar1: item.refChr1,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return NextResponse.json({ data: codeList })
|
|
||||||
}
|
|
||||||
@ -113,10 +113,6 @@ export default function page() {
|
|||||||
<input type="checkbox" id="ch06" disabled />
|
<input type="checkbox" id="ch06" disabled />
|
||||||
<label htmlFor="ch06">Check Box</label>
|
<label htmlFor="ch06">Check Box</label>
|
||||||
</div>
|
</div>
|
||||||
<div className="check-form-box space">
|
|
||||||
<input type="checkbox" id="ch07" defaultChecked />
|
|
||||||
<label htmlFor="ch07">Check Box</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="design-box">
|
<div className="design-box">
|
||||||
|
|||||||
@ -5,8 +5,9 @@ import { useEffect, useReducer, useState } from 'react'
|
|||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { useLocalStorage } from 'usehooks-ts'
|
import { useLocalStorage } from 'usehooks-ts'
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
|
import { axiosInstance } from '@/libs/axios'
|
||||||
import { useSessionStore } from '@/store/session'
|
import { useSessionStore } from '@/store/session'
|
||||||
import { useAxios } from '@/hooks/useAxios'
|
|
||||||
interface AccountState {
|
interface AccountState {
|
||||||
loginId: string
|
loginId: string
|
||||||
pwd: string
|
pwd: string
|
||||||
@ -23,8 +24,6 @@ export default function Login() {
|
|||||||
//로그인 상태
|
//로그인 상태
|
||||||
const [isLogin, setIsLogin] = useState(false)
|
const [isLogin, setIsLogin] = useState(false)
|
||||||
|
|
||||||
const { axiosInstance } = useAxios()
|
|
||||||
|
|
||||||
const { session, setSession } = useSessionStore()
|
const { session, setSession } = useSessionStore()
|
||||||
const [value, setValue, removeValue] = useLocalStorage<{ indivisualData: string }>('hanasysIndivisualState', { indivisualData: '' })
|
const [value, setValue, removeValue] = useLocalStorage<{ indivisualData: string }>('hanasysIndivisualState', { indivisualData: '' })
|
||||||
|
|
||||||
|
|||||||
@ -40,8 +40,6 @@ export default function RegistForm() {
|
|||||||
}
|
}
|
||||||
}, [session])
|
}, [session])
|
||||||
|
|
||||||
const { commonCodeList } = useInquiry()
|
|
||||||
|
|
||||||
const [attachedFiles, setAttachedFiles] = useState<File[]>([])
|
const [attachedFiles, setAttachedFiles] = useState<File[]>([])
|
||||||
|
|
||||||
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
@ -115,14 +113,9 @@ export default function RegistForm() {
|
|||||||
value={inquiryRequest.qnaClsLrgCd}
|
value={inquiryRequest.qnaClsLrgCd}
|
||||||
onChange={(e) => setInquiryRequest({ ...inquiryRequest, qnaClsLrgCd: e.target.value })}
|
onChange={(e) => setInquiryRequest({ ...inquiryRequest, qnaClsLrgCd: e.target.value })}
|
||||||
>
|
>
|
||||||
<option value="" hidden>選択してください</option>
|
<option value="">選択してください</option>
|
||||||
{commonCodeList
|
<option value="A01">A01</option>
|
||||||
.filter((code) => code.headCd === '204200')
|
<option value="204200">204200</option>
|
||||||
.map((code) => (
|
|
||||||
<option key={code.code} value={code.code}>
|
|
||||||
{code.name}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className="data-input mt5">
|
<div className="data-input mt5">
|
||||||
@ -133,14 +126,9 @@ export default function RegistForm() {
|
|||||||
value={inquiryRequest.qnaClsMidCd}
|
value={inquiryRequest.qnaClsMidCd}
|
||||||
onChange={(e) => setInquiryRequest({ ...inquiryRequest, qnaClsMidCd: e.target.value })}
|
onChange={(e) => setInquiryRequest({ ...inquiryRequest, qnaClsMidCd: e.target.value })}
|
||||||
>
|
>
|
||||||
<option value="" hidden>選択してください</option>
|
<option value="">選択してください</option>
|
||||||
{commonCodeList
|
<option value="B02">B02</option>
|
||||||
.filter((code) => code.refChar1 === inquiryRequest.qnaClsLrgCd)
|
<option value="204300">204300</option>
|
||||||
.map((code) => (
|
|
||||||
<option key={code.code} value={code.code}>
|
|
||||||
{code.name}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className="data-input mt5">
|
<div className="data-input mt5">
|
||||||
@ -151,14 +139,9 @@ export default function RegistForm() {
|
|||||||
value={inquiryRequest.qnaClsSmlCd ?? ''}
|
value={inquiryRequest.qnaClsSmlCd ?? ''}
|
||||||
onChange={(e) => setInquiryRequest({ ...inquiryRequest, qnaClsSmlCd: e.target.value })}
|
onChange={(e) => setInquiryRequest({ ...inquiryRequest, qnaClsSmlCd: e.target.value })}
|
||||||
>
|
>
|
||||||
<option value="" hidden>選択してください</option>
|
<option value="">選択してください</option>
|
||||||
{commonCodeList
|
<option value="C05">C05</option>
|
||||||
.filter((code) => code.refChar1 === inquiryRequest.qnaClsMidCd)
|
<option value="204400">204400</option>
|
||||||
.map((code) => (
|
|
||||||
<option key={code.code} value={code.code}>
|
|
||||||
{code.name}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -46,7 +46,9 @@ export default function ListTable() {
|
|||||||
if (!session.isLoggedIn || !inquiryList) return
|
if (!session.isLoggedIn || !inquiryList) return
|
||||||
if (session.isLoggedIn) {
|
if (session.isLoggedIn) {
|
||||||
setInquiryListRequest({ ...inquiryListRequest, storeId: session.storeId ?? '', loginId: session.userId ?? '' })
|
setInquiryListRequest({ ...inquiryListRequest, storeId: session.storeId ?? '', loginId: session.userId ?? '' })
|
||||||
|
// setInquiryListRequest({ ...inquiryListRequest, storeId: 'X112', loginId: 'x112' })
|
||||||
}
|
}
|
||||||
|
console.log('inquiryListRequest', inquiryListRequest)
|
||||||
if (inquiryList.length > 0 && inquiryList[0].totCnt > 0) {
|
if (inquiryList.length > 0 && inquiryList[0].totCnt > 0) {
|
||||||
if (inquiryListRequest.startRow > 1) {
|
if (inquiryListRequest.startRow > 1) {
|
||||||
const isDuplicate = inquiryList.every((newItem) => heldInquiryList.some((existingItem) => existingItem.qnaNo === newItem.qnaNo))
|
const isDuplicate = inquiryList.every((newItem) => heldInquiryList.some((existingItem) => existingItem.qnaNo === newItem.qnaNo))
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import Config from '@/config/config.export'
|
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
return (
|
return (
|
||||||
@ -12,9 +11,6 @@ export default function Footer() {
|
|||||||
<span>
|
<span>
|
||||||
<Link href="/pdf">PDF</Link>
|
<Link href="/pdf">PDF</Link>
|
||||||
</span>
|
</span>
|
||||||
<span>{Config().mode}</span>
|
|
||||||
<span>{Config().baseUrl}</span>
|
|
||||||
<span>{process.env.NEXT_PUBLIC_API_URL}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -13,13 +13,14 @@ import { useSessionStore } from '@/store/session'
|
|||||||
import { usePopupController } from '@/store/popupController'
|
import { usePopupController } from '@/store/popupController'
|
||||||
|
|
||||||
import { useTitle } from '@/hooks/useTitle'
|
import { useTitle } from '@/hooks/useTitle'
|
||||||
import { useAxios } from '@/hooks/useAxios'
|
|
||||||
|
import { axiosInstance } from '@/libs/axios'
|
||||||
|
|
||||||
import 'swiper/css'
|
import 'swiper/css'
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const { axiosInstance } = useAxios()
|
|
||||||
const [value, setValue, removeValue] = useLocalStorage<{ indivisualData: string }>('hanasysIndivisualState', { indivisualData: '' })
|
const [value, setValue, removeValue] = useLocalStorage<{ indivisualData: string }>('hanasysIndivisualState', { indivisualData: '' })
|
||||||
const { sideNavIsOpen, setSideNavIsOpen } = useSideNavState()
|
const { sideNavIsOpen, setSideNavIsOpen } = useSideNavState()
|
||||||
const { backBtn } = useHeaderStore()
|
const { backBtn } = useHeaderStore()
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
export declare namespace ICommonConfig {
|
|
||||||
export type Mode = 'local' | 'development' | 'production'
|
|
||||||
|
|
||||||
export interface Params {
|
|
||||||
baseUrl: string
|
|
||||||
mode: Mode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// local, development, production 과 관계없이 동일한 값으로 반환되는 부분은 해당 함수의 return 되는 부분만 수정하면 됩니다. (달라져야 하는 값이 아닌, 같은 값에 대해서는 local, development, production 파일을 모두 수정할 필요가 없어지게 됩니다.)
|
|
||||||
export default function getConfigs(params: ICommonConfig.Params) {
|
|
||||||
// local, development, production 마다 달라지는 값
|
|
||||||
const { baseUrl, mode } = params
|
|
||||||
|
|
||||||
// 공통으로 반환되는 구조
|
|
||||||
return {
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import getConfigs from '@/config/config.common'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 변수, 값들을 정의합니다. (여기는 development 환경에 맞는 값을 지정합니다.)
|
|
||||||
const baseUrl = 'http://1.248.227.176:3000'
|
|
||||||
const mode = 'development'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 값들을 getConfig 함수에 전달합니다.
|
|
||||||
const configDevelopment = getConfigs({
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
})
|
|
||||||
|
|
||||||
export default configDevelopment
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
import configDevelopment from './config.development'
|
|
||||||
import configLocal from './config.local'
|
|
||||||
import configProduction from './config.production'
|
|
||||||
|
|
||||||
// 클라이언트에서는 이 함수를 사용하여 config 값을 참조합니다.
|
|
||||||
const Config = () => {
|
|
||||||
switch (process.env.NEXT_PUBLIC_RUN_MODE) {
|
|
||||||
case 'local':
|
|
||||||
return configLocal
|
|
||||||
case 'development':
|
|
||||||
return configDevelopment
|
|
||||||
case 'production':
|
|
||||||
return configProduction
|
|
||||||
default:
|
|
||||||
return configLocal
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Config
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import getConfigs from '@/config/config.common'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 변수, 값들을 정의합니다. (여기는 local 환경에 맞는 값을 지정합니다.)
|
|
||||||
const baseUrl = 'http://localhost:3000'
|
|
||||||
const mode = 'local'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 값들을 getConfig 함수에 전달합니다.
|
|
||||||
const configLocal = getConfigs({
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
})
|
|
||||||
|
|
||||||
export default configLocal
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import getConfigs from '@/config/config.common'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 변수, 값들을 정의합니다. (여기는 production 환경에 맞는 값을 지정합니다.)
|
|
||||||
const baseUrl = 'http://localhost.prod:3000'
|
|
||||||
const mode = 'production'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 값들을 getConfig 함수에 전달합니다.
|
|
||||||
const configProduction = getConfigs({
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
})
|
|
||||||
|
|
||||||
export default configProduction
|
|
||||||
@ -1,65 +1,39 @@
|
|||||||
import axios, { AxiosResponse, InternalAxiosRequestConfig } from 'axios'
|
import axios from 'axios'
|
||||||
import Config from '@/config/config.export'
|
|
||||||
import { useSpinnerStore } from '@/store/spinnerStore'
|
import { useSpinnerStore } from '@/store/spinnerStore'
|
||||||
|
|
||||||
export function useAxios() {
|
export const useAxios = () => {
|
||||||
// const { setIsShow } = useSpinnerStore()
|
const { setIsShow } = useSpinnerStore()
|
||||||
|
|
||||||
const requestHandler = (config: InternalAxiosRequestConfig) => {
|
|
||||||
// setIsShow(true)
|
|
||||||
return config
|
|
||||||
}
|
|
||||||
|
|
||||||
const responseHandler = (response: AxiosResponse) => {
|
|
||||||
// setIsShow(false)
|
|
||||||
response.data = transferResponse(response)
|
|
||||||
return response
|
|
||||||
}
|
|
||||||
|
|
||||||
const errorHandler = (error: any) => {
|
|
||||||
// setIsShow(false)
|
|
||||||
return Promise.reject(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
const createAxiosInstance = (url: string | null | undefined) => {
|
|
||||||
const baseURL = url || Config().baseUrl
|
|
||||||
return axios.create({
|
|
||||||
baseURL,
|
|
||||||
headers: {
|
|
||||||
Accept: 'application/json',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const axiosInstance = (url: string | null | undefined) => {
|
const axiosInstance = (url: string | null | undefined) => {
|
||||||
|
const baseURL = url || process.env.NEXT_PUBLIC_API_URL
|
||||||
const instance = axios.create({
|
const instance = axios.create({
|
||||||
baseURL: url || Config().baseUrl,
|
baseURL,
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/json',
|
Accept: 'application/json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
instance.interceptors.request.use(
|
instance.interceptors.request.use(
|
||||||
// (config) => {
|
(config) => {
|
||||||
// return config
|
// console.log('🚀 ~ config:', config)
|
||||||
// },
|
setIsShow(true)
|
||||||
// (error) => {
|
return config
|
||||||
// return Promise.reject(error)
|
},
|
||||||
// },
|
(error) => {
|
||||||
(config) => requestHandler(config),
|
return Promise.reject(error)
|
||||||
(error) => errorHandler(error),
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
instance.interceptors.response.use(
|
instance.interceptors.response.use(
|
||||||
// (response) => {
|
(response) => {
|
||||||
// response.data = transferResponse(response)
|
response.data = transferResponse(response)
|
||||||
// return response
|
setIsShow(false)
|
||||||
// },
|
return response
|
||||||
// (error) => {
|
},
|
||||||
// return Promise.reject(error)
|
(error) => {
|
||||||
// },
|
// 에러 처리 로직
|
||||||
(response) => responseHandler(response),
|
return Promise.reject(error)
|
||||||
(error) => errorHandler(error),
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { InquiryList, Inquiry, InquirySaveResponse, CommonCode } from '@/types/Inquiry'
|
import { InquiryList, Inquiry, InquirySaveResponse } from '@/types/Inquiry'
|
||||||
import { useAxios } from '@/hooks/useAxios'
|
import { useAxios } from '@/hooks/useAxios'
|
||||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||||
import { useInquiryFilterStore } from '@/store/inquiryFilterStore'
|
import { useInquiryFilterStore } from '@/store/inquiryFilterStore'
|
||||||
@ -16,7 +16,6 @@ export function useInquiry(
|
|||||||
isSavingInquiry: boolean
|
isSavingInquiry: boolean
|
||||||
saveInquiry: (formData: FormData) => Promise<InquirySaveResponse>
|
saveInquiry: (formData: FormData) => Promise<InquirySaveResponse>
|
||||||
downloadFile: (encodeFileNo: number) => Promise<File>
|
downloadFile: (encodeFileNo: number) => Promise<File>
|
||||||
commonCodeList: CommonCode[]
|
|
||||||
} {
|
} {
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const { inquiryListRequest } = useInquiryFilterStore()
|
const { inquiryListRequest } = useInquiryFilterStore()
|
||||||
@ -79,16 +78,6 @@ export function useInquiry(
|
|||||||
return resp.data
|
return resp.data
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: commonCodeList, isLoading: isLoadingCommonCodeList } = useQuery({
|
|
||||||
queryKey: ['commonCodeList'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const resp = await axiosInstance(null).get<{ data: CommonCode[] }>(`/api/qna`)
|
|
||||||
return resp.data
|
|
||||||
},
|
|
||||||
staleTime: Infinity,
|
|
||||||
gcTime: Infinity,
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
inquiryList: inquriyListData.inquiryList,
|
inquiryList: inquriyListData.inquiryList,
|
||||||
inquiryDetail: inquiryDetail ?? null,
|
inquiryDetail: inquiryDetail ?? null,
|
||||||
@ -97,6 +86,5 @@ export function useInquiry(
|
|||||||
isSavingInquiry,
|
isSavingInquiry,
|
||||||
saveInquiry,
|
saveInquiry,
|
||||||
downloadFile,
|
downloadFile,
|
||||||
commonCodeList: commonCodeList?.data ?? [],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
import { useAxios } from '@/hooks/useAxios'
|
import { axiosInstance } from './axios'
|
||||||
|
|
||||||
export const tracking = async (params: { url: string; data: string }) => {
|
export const tracking = async (params: { url: string; data: string }) => {
|
||||||
const { url, data } = params
|
const { url, data } = params
|
||||||
const { axiosInstance } = useAxios()
|
|
||||||
const result = await axiosInstance(null).post('/api/tracking', {
|
const result = await axiosInstance(null).post('/api/tracking', {
|
||||||
url,
|
url,
|
||||||
data,
|
data,
|
||||||
|
|||||||
@ -10,9 +10,9 @@ export async function middleware(request: NextRequest) {
|
|||||||
const session = await getIronSession<SessionData>(cookieStore, sessionOptions)
|
const session = await getIronSession<SessionData>(cookieStore, sessionOptions)
|
||||||
|
|
||||||
// todo: 로그인 기능 추가 시 주석 해제
|
// todo: 로그인 기능 추가 시 주석 해제
|
||||||
// if (!session.isLoggedIn) {
|
if (!session.isLoggedIn) {
|
||||||
// return NextResponse.redirect(new URL('/login', request.url))
|
return NextResponse.redirect(new URL('/login', request.url))
|
||||||
// }
|
}
|
||||||
|
|
||||||
return NextResponse.next()
|
return NextResponse.next()
|
||||||
}
|
}
|
||||||
@ -22,5 +22,5 @@ export async function middleware(request: NextRequest) {
|
|||||||
// 2. /admin/* (exclude all routes under /admin)
|
// 2. /admin/* (exclude all routes under /admin)
|
||||||
// 3. /_next/* (exclude Next.js static and image assets)
|
// 3. /_next/* (exclude Next.js static and image assets)
|
||||||
export const config = {
|
export const config = {
|
||||||
matcher: ['/((?!login|assets).*)', '/((?!_next/static|_next/image|favicon.ico).*)'],
|
matcher: ['/((?!dashboard|login|admin|api|_next/static|_next/image|favicon.ico).*)'],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,12 +74,6 @@ export default function EdgeProvider({ children, sessionData }: EdgeProviderProp
|
|||||||
router.push('/')
|
router.push('/')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathname === '/') {
|
|
||||||
if (!session?.isLoggedIn) {
|
|
||||||
router.push('/login')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//alert 함수 변경해서 바인딩
|
//alert 함수 변경해서 바인딩
|
||||||
window.alert = function (msg, alertBtn = () => setAlert(false)) {
|
window.alert = function (msg, alertBtn = () => setAlert(false)) {
|
||||||
alertFunc(msg, alertBtn)
|
alertFunc(msg, alertBtn)
|
||||||
|
|||||||
@ -98,23 +98,6 @@
|
|||||||
color: #8595A7;
|
color: #8595A7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.space{
|
|
||||||
label{
|
|
||||||
&::after{
|
|
||||||
top: 8px;
|
|
||||||
left: 0px;
|
|
||||||
width: 10px;
|
|
||||||
height: 2px;
|
|
||||||
border: none;
|
|
||||||
background-color: transparent;
|
|
||||||
transform: translate(50%, 50%);
|
|
||||||
-ms-transform: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
input[type="checkbox"]:checked + label::after{
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// radio box
|
// radio box
|
||||||
|
|||||||
@ -89,10 +89,3 @@ export type InquirySaveResponse = {
|
|||||||
qnaNo: number //qna number
|
qnaNo: number //qna number
|
||||||
mailYn: string //mail yn - Y / N
|
mailYn: string //mail yn - Y / N
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CommonCode = {
|
|
||||||
headCd: string
|
|
||||||
code: string
|
|
||||||
name: string
|
|
||||||
refChar1: string
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user