[feat] negodata: chats.meta 컬럼 추가 + 견적생성 에러 응답패킷 규약대로 표기

- 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) <noreply@anthropic.com>
This commit is contained in:
Mina Choi 2026-06-18 18:45:17 +09:00
parent 06c2481fe7
commit b45889ec0a
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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;
}
// 목록 재조회가 끝나야 새 견적이 정본 목록에 들어온다(상세 자동오픈이 그 행을 찾을 수 있게).