From 52c52d13f4fc7556d29c213121fbed96fbbce101 Mon Sep 17 00:00:00 2001 From: keyy1315 Date: Thu, 7 Aug 2025 15:18:45 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=AC=B8=EC=9D=98=20=EC=9C=A0=ED=98=95?= =?UTF-8?q?=20=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20=EA=B0=9C=EB=B3=84=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EB=A1=9C=EC=A7=81=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 문의 공통코드 타입 변경으로 인한 오류 수정 --- src/app/api/qna/service.ts | 31 ------------------------------- src/components/inquiry/Detail.tsx | 6 +++--- 2 files changed, 3 insertions(+), 34 deletions(-) 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}
-- 2.47.2