Compare commits
No commits in common. "ef3adae8d6b5af3e2afad94dcfb85ee0b46014dd" and "244c67ae1e5813cbae266895cb8bf129e3ee83d7" have entirely different histories.
ef3adae8d6
...
244c67ae1e
@ -1,4 +1,5 @@
|
|||||||
import { SessionData } from '@/types/Auth'
|
import { SessionData } from '@/types/Auth'
|
||||||
|
import { CommonCode, InquiryRequest } from '@/types/Inquiry'
|
||||||
import { ERROR_MESSAGE } from '@/hooks/useAlertMsg'
|
import { ERROR_MESSAGE } from '@/hooks/useAlertMsg'
|
||||||
import { HttpStatusCode } from 'axios'
|
import { HttpStatusCode } from 'axios'
|
||||||
import { ApiError } from 'next/dist/server/api-utils'
|
import { ApiError } from 'next/dist/server/api-utils'
|
||||||
@ -54,6 +55,36 @@ export class QnaService {
|
|||||||
return new ApiError(response.result.code, response.result.message)
|
return new ApiError(response.result.code, response.result.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 문의 유형 타입 목록 조회
|
||||||
|
* @param {string[]} responseList 문의 유형 타입 목록
|
||||||
|
* @returns {CommonCode[]} 문의 유형 타입 목록
|
||||||
|
*/
|
||||||
|
getInquiryTypeList(responseList: any): CommonCode[] {
|
||||||
|
const codeList: CommonCode[] = []
|
||||||
|
const headCdList: { headCd: string; headId: string }[] = []
|
||||||
|
responseList.apiHeadCdList.forEach((item: any) => {
|
||||||
|
if (item.headId === 'QNA_CLS_LRG_CD' || item.headId === 'QNA_CLS_MID_CD' || item.headId === 'QNA_CLS_SML_CD') {
|
||||||
|
headCdList.push({
|
||||||
|
headCd: item.headCd,
|
||||||
|
headId: item.headId,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
responseList.apiCommCdList.forEach((item: any) => {
|
||||||
|
if (headCdList.some((headCd) => headCd.headCd === item.headCd)) {
|
||||||
|
codeList.push({
|
||||||
|
headCd: item.headCd,
|
||||||
|
headId: headCdList.find((headCd) => headCd.headCd === item.headCd)?.headId ?? '',
|
||||||
|
code: item.code,
|
||||||
|
name: item.codeJp,
|
||||||
|
refChar1: item.refChr1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return codeList
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 문의 목록 조회 파라미터 처리
|
* @description 문의 목록 조회 파라미터 처리
|
||||||
* @param {URLSearchParams} searchParams URLSearchParams 객체
|
* @param {URLSearchParams} searchParams URLSearchParams 객체
|
||||||
|
|||||||
@ -61,9 +61,9 @@ export default function Detail() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="inquiry-detail-data">
|
<div className="inquiry-detail-data">
|
||||||
<div className="inquiry-detail-category">
|
<div className="inquiry-detail-category">
|
||||||
<span>{commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsLrgCd)?.codeJp}</span>
|
<span>{commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsLrgCd)?.name}</span>
|
||||||
<span>{commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsMidCd)?.codeJp}</span>
|
<span>{commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsMidCd)?.name}</span>
|
||||||
<span>{commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsSmlCd)?.codeJp}</span>
|
<span>{commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsSmlCd)?.name}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="inquiry-detail-tit">{inquiryDetail?.qstTitle}</div>
|
<div className="inquiry-detail-tit">{inquiryDetail?.qstTitle}</div>
|
||||||
<div className="inquiry-detail-txt">{inquiryDetail?.qstContents}</div>
|
<div className="inquiry-detail-txt">{inquiryDetail?.qstContents}</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user