[refactor] negodata/front: 전역 타입 정리 — 공유(2+) 타입만 글로벌, 중복 제거
- src/types.ts: DB 미러 중복 제거, generated DTO 기반 별칭만(Product/Partner/NegotiationCard/PageType) - products/partners 의 로컬 Product/Partner 중복 → 글로벌 단일 정본 재수출 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
eb6612af1c
commit
ae103fd0f1
3 files changed
+27
-315
No files matched your search
@@ -1,11 +1,4 @@
|
||||
import type { SupplierData } from '@/api/generated/model/supplierData';
|
||||
|
||||
// UI에서 쓰는 협력사 타입. 서버 SupplierData에 화면 전용 파생 필드만 얹는다.
|
||||
// (level/rank/status 등 서버 미연동 가짜 필드는 두지 않는다 — 표시 가능한 건 priority뿐.)
|
||||
export type Partner = SupplierData & {
|
||||
deleted?: boolean;
|
||||
id?: string;
|
||||
};
|
||||
export type { Partner } from '@/types';
|
||||
|
||||
// 우선순위 필터 목록. 'ALL'은 필터 전용(폼에서는 제외).
|
||||
export const prioritiesList = ['ALL', 'HIGH', 'MEDIUM', 'LOW'];
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
import type { ItemData } from '@/api/generated/model/itemData';
|
||||
|
||||
// UI에서 쓰는 상품 타입. 서버 ItemData에 화면 전용 파생 필드를 얹는다.
|
||||
export type Product = ItemData & {
|
||||
deleted?: boolean;
|
||||
id?: string;
|
||||
minPrice?: number;
|
||||
status?: string;
|
||||
};
|
||||
|
||||
// 분류 카테고리는 서버 items 에서 distinct 로 파생한다(useProducts). 하드코딩 상수 제거됨.
|
||||
export type { Product } from '@/types';
|
||||
|
||||
// 인터넷 최저가 데모 산정(표준 단가의 83%). 서버 미연동 — 표시/초기값 용도.
|
||||
export const toMinPrice = (price?: number | null) => Math.round((price || 0) * 0.83);
|
||||
Reference in new issue
Block a user