From b45889ec0a86f466e1eb69aac78a774be02e0375 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Thu, 18 Jun 2026 18:45:17 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20negodata:=20chats.meta=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC=20=EC=B6=94=EA=B0=80=20+=20=EA=B2=AC=EC=A0=81?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EC=97=90=EB=9F=AC=20=EC=9D=91=EB=8B=B5?= =?UTF-8?q?=ED=8C=A8=ED=82=B7=20=EA=B7=9C=EC=95=BD=EB=8C=80=EB=A1=9C=20?= =?UTF-8?q?=ED=91=9C=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - negotiation.chats 에 meta(JSONB) 추가 — 말풍선 표현 데이터(script/step/input_mode 등) - 견적생성 실패 토스트를 result.code/desc + msg 규약대로 표시(HTTP 200·success=false 포함) Co-Authored-By: Claude Opus 4.8 (1M context) --- negodata/backend/common/database/model/models.py | 1 + .../front/src/features/quotations/hooks/useQuotations.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/negodata/backend/common/database/model/models.py b/negodata/backend/common/database/model/models.py index 8d4d2d1..6aaf8da 100644 --- a/negodata/backend/common/database/model/models.py +++ b/negodata/backend/common/database/model/models.py @@ -230,3 +230,4 @@ class chats(MainTableMixin, MAIN_BASE): card_used_yn = Column(Boolean, nullable=True) # 카드 사용 여부 indicator_value = Column(Numeric(8, 6), nullable=True) card_type = Column(SmallInteger, nullable=True) # 1=nego_card, 2=wild_card + meta = Column(JSONB, nullable=True) # 말풍선 표현 데이터(script/step/client_step/input_mode/input_options/chat_end) diff --git a/negodata/front/src/features/quotations/hooks/useQuotations.ts b/negodata/front/src/features/quotations/hooks/useQuotations.ts index 4c111d8..b4e636e 100644 --- a/negodata/front/src/features/quotations/hooks/useQuotations.ts +++ b/negodata/front/src/features/quotations/hooks/useQuotations.ts @@ -172,9 +172,11 @@ export function useQuotations() { try { const res = await createQuotationMutation.mutateAsync({ data: payload }); const qtId = res?.quotation?.qt_id ?? null; - // 서버가 result.success=false 거나 qt_id 가 없으면 실패로 처리(HTTP 200 이어도). 모달은 그대로 유지. + // 에러는 응답 패킷 규약(result.success/code/desc + msg)대로 표시한다. HTTP 200 이어도 success=false면 실패. if (!res?.result?.success || !qtId) { - showToast(`견적 생성 실패: ${res?.result?.desc ?? '서버 오류'}`, 'error'); + const reason = res?.msg ?? res?.result?.desc ?? '서버 오류'; + const code = res?.result?.code; + showToast(`견적 생성 실패${code ? ` [${code}]` : ''}: ${reason}`, 'error'); return null; } // 목록 재조회가 끝나야 새 견적이 정본 목록에 들어온다(상세 자동오픈이 그 행을 찾을 수 있게).