feat(chat): 협상 유의사항 안내 팝업 2종 이식 + 팝업 숨김 저장 API
KT-NEGOWIZ fe_v2 의 서비스 안내 팝업을 우리 구조로 이식.
- frontend: GuideContent(공용 본문, VAT/배송비는 chat init 메타로 동적 표시)
+ ServiceInfoPopup(채팅 진입 시 자동 — 안내 보지 않기/오늘 하루 보지 않기)
+ ServiceGuidePopup(메뉴 유의사항·이용 가이드 버튼 수동 — X/배경/ESC 닫기)
+ useServiceInfoPopup 훅(서버 상태 + localStorage 오늘 하루)
+ apis/auth 에 popupStatus 쿼리·hidePopup 뮤테이션, 헬프데스크 연락처 반영,
한국어 단어 잘림 방지(break-keep)
- backend: GET /v1/auth/popup/status, POST /v1/auth/popup/hide
(authenticate 공통 인증 + supplier_users.hide_service_info 영구 저장), 테스트 4건
- db: supplier_users.hide_service_info 컬럼 — 00-init 테이블 정의 갱신,
기존 DB 보정은 alters/2026-07-07-supplier-users-hide-service-info.sql 별도 파일
(기준선 이후 보정 ALTER 는 alters/ 파일로 관리하도록 규칙 변경)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc0e78ec73
commit
3c8923c075
21 files changed
+488
-21
No files matched your search
@@ -56,6 +56,14 @@ class IUserCRUD(ABC):
|
||||
async def update_last_accessed(self, cdb: AsyncSession, su_id) -> ErrorType:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_hide_service_info(self, cdb: AsyncSession, su_id) -> Tuple[ErrorType, bool]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def set_hide_service_info(self, cdb: AsyncSession, su_id) -> ErrorType:
|
||||
pass
|
||||
|
||||
|
||||
class UserCRUD(IUserCRUD):
|
||||
async def get_account_by_id(self, cdb: AsyncSession, login_id: str) -> Tuple[ErrorType, supplier_users]:
|
||||
@@ -195,3 +203,34 @@ class UserCRUD(IUserCRUD):
|
||||
except Exception as ex:
|
||||
LOG.e_no_callstack(ex)
|
||||
return ErrorType.DB_RUN_FAILED
|
||||
|
||||
async def get_hide_service_info(self, cdb: AsyncSession, su_id) -> Tuple[ErrorType, bool]:
|
||||
# 서비스 안내 팝업 "안내 보지 않기" 여부만 조회한다.
|
||||
try:
|
||||
query = (
|
||||
select(supplier_users.hide_service_info)
|
||||
.where(supplier_users.su_id == su_id, supplier_users.deleted == False) # noqa: E712
|
||||
.limit(1)
|
||||
)
|
||||
err_type, row_list = await DB_SESSION_MNG.execute(cdb, query, f"get_hide_service_info(su_id:{su_id}) failed.")
|
||||
if err_type != ErrorType.SUCCESS:
|
||||
return err_type, None
|
||||
if len(row_list) != 1:
|
||||
return ErrorType.DB_INVALID_KEY, None
|
||||
return ErrorType.SUCCESS, bool(row_list[0])
|
||||
except Exception as ex:
|
||||
LOG.e_no_callstack(ex)
|
||||
return ErrorType.DB_RUN_FAILED, None
|
||||
|
||||
async def set_hide_service_info(self, cdb: AsyncSession, su_id) -> ErrorType:
|
||||
# "안내 보지 않기" 는 켜기만 있다(해제 API 없음).
|
||||
try:
|
||||
query = (
|
||||
update(supplier_users)
|
||||
.where(supplier_users.su_id == su_id, supplier_users.deleted == False) # noqa: E712
|
||||
.values(hide_service_info=True)
|
||||
)
|
||||
return await DB_SESSION_MNG.add(cdb, query)
|
||||
except Exception as ex:
|
||||
LOG.e_no_callstack(ex)
|
||||
return ErrorType.DB_RUN_FAILED
|
||||
Reference in new issue
Block a user