diff --git a/src/app/api/qna/service.ts b/src/app/api/qna/service.ts index 5558a1e..a9d03d1 100644 --- a/src/app/api/qna/service.ts +++ b/src/app/api/qna/service.ts @@ -1,5 +1,4 @@ import { SessionData } from '@/types/Auth' -import { CommonCode, InquiryRequest } from '@/types/Inquiry' import { ERROR_MESSAGE } from '@/hooks/useAlertMsg' import { HttpStatusCode } from 'axios' import { ApiError } from 'next/dist/server/api-utils' @@ -55,36 +54,6 @@ export class QnaService { 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 문의 목록 조회 파라미터 처리 * @param {URLSearchParams} searchParams URLSearchParams 객체 diff --git a/src/components/inquiry/Detail.tsx b/src/components/inquiry/Detail.tsx index f451d80..8a22621 100644 --- a/src/components/inquiry/Detail.tsx +++ b/src/components/inquiry/Detail.tsx @@ -61,9 +61,9 @@ export default function Detail() {
- {commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsLrgCd)?.name} - {commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsMidCd)?.name} - {commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsSmlCd)?.name} + {commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsLrgCd)?.codeJp} + {commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsMidCd)?.codeJp} + {commonCodeList.find((code) => code.code === inquiryDetail?.qnaClsSmlCd)?.codeJp}
{inquiryDetail?.qstTitle}
{inquiryDetail?.qstContents}