[refactor] negodata: 목표가 산정내역을 백엔드 /target-breakdown 엔드포인트로 이관
- 생성(_calc_target_price)과 표시(get_target_breakdown)가 _candidates 헬퍼를 공유 → 프론트 재계산 제거, 저장된 목표가와 항상 일치 - TargetPriceModal: useGetTargetBreakdown 으로 후보·채택·앵커링가 '표시만' - QuotationType.is_new() 한 곳에서 신규유형 판단(생성·산정 공통) - enum 라벨 단일출처(lib/enumLabels.ts): 협력사유형/카드 사용구분/유저상태 members·CardFormSheet 는 거기서 re-export Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
019f3dbeac
commit
33ce82997a
22 files changed
+471
-175
No files matched your search
@@ -180,3 +180,25 @@ class Res_QuotationCards(Res_WebPacketProtocol):
|
||||
class Res_LastSupplierType(Res_WebPacketProtocol):
|
||||
supplier_type: Optional[SupplierType] = None # 협력사 직전 견적의 유형(없으면 None)
|
||||
qt_number: Optional[str] = None # 그 견적의 번호(이전 견적 값임을 표시용)
|
||||
|
||||
|
||||
class TargetCandidate(WebPacketProtocol):
|
||||
basis: str
|
||||
label: str
|
||||
value: int
|
||||
|
||||
|
||||
class Res_TargetBreakdown(Res_WebPacketProtocol):
|
||||
is_new: bool = False
|
||||
is_inherited: bool = False
|
||||
md_price: Optional[int] = None
|
||||
internet_lowest: Optional[int] = None
|
||||
purchase: Optional[int] = None
|
||||
selling: Optional[int] = None
|
||||
fee: float = 0.0
|
||||
margin: float = 0.0
|
||||
anchoring_value: float = 0.0
|
||||
candidates: list[TargetCandidate] = []
|
||||
chosen_basis: Optional[str] = None
|
||||
target_price: int = 0
|
||||
target_anchoring_price: Optional[int] = None
|
||||
Reference in new issue
Block a user