o2o-negosium-original/negodata/front/src/features/quotations/components/QuotationDetailSheet/QuotationCardsTab.tsx
Mina Choi 019f3dbeac [feat] negodata: 견적 목표가 산정 개편 + 협상 초청메일 + 카드 사용구분
[견적·목표가]
- 목표가 산정 KTC 기준 정비(MD 우선, 없으면 인터넷최저가·매입가·판매가 중 최저 / 신규는 인터넷최저가만)
- 인터넷 평균 수수료 0.078 상수화(견적설정 컬럼 제거)
- 앵커링가 세션 저장 + 목표가 클릭 시 산정내역 모달
- 재생성 시 목표가·앵커링가 재계산 없이 직전 값 상속(KTC)
- MD 제시가·협력사 유형(유통·제조·총판·기타) 입력

[협상카드]
- 사용 구분(공통/신규견적전용/재견적전용)

[협상 진행]
- 협력사 초청 메일 발송(일괄/개별·재발송, 발송상태 표시)

[기타]
- 견적상세 창 닫기 버그 수정, 불필요한 컬럼 주석 정리
- DB: 기존 DB는 postgres-init/04-alter.sql 적용 필요(자동 마이그레이션 없음)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 13:33:08 +09:00

59 lines
2.6 KiB
TypeScript

import { Link } from 'react-router';
import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from '@/components/ui/table';
import { typographyVariants } from '@/components/ui/typography';
import { StatusPill } from './StatusPill';
import { mapServerCardView } from '../../types';
type CardView = ReturnType<typeof mapServerCardView>;
export function QuotationCardsTab({ quotationCardViews }: { quotationCardViews: CardView[] }) {
return (
<div className="space-y-4">
<div className="border border-border rounded-lg bg-card overflow-hidden">
<Table className="w-full text-left text-xs border-collapse font-mono">
<TableHeader className="bg-muted text-muted-foreground text-[10px] border-b border-border">
<TableRow>
<TableHead className="p-3 font-semibold">세션 카드 ID</TableHead>
<TableHead className="p-3 font-semibold font-sans">카드 이름</TableHead>
<TableHead className="p-3 font-semibold font-sans">타입</TableHead>
</TableRow>
</TableHeader>
<TableBody className="divide-y divide-border">
{quotationCardViews.length > 0 ? (
quotationCardViews.map((qc) => (
<TableRow key={qc.session_card_id} className="hover:bg-muted/30 transition-colors text-[11px]">
<TableCell className="p-3 text-muted-foreground">{qc.session_card_id}</TableCell>
<TableCell className="p-3 text-foreground font-sans font-semibold">
{qc.card_id ? (
<Link
to={`/cards?detail=${qc.card_id}`}
className={typographyVariants({ variant: 'link' })}
title={`${qc.card_name} — 협상카드 상세로 이동`}
>
{qc.card_name}
</Link>
) : (
qc.card_name
)}
</TableCell>
<TableCell className="p-3">
<StatusPill tone={qc.type === '와일드 카드' ? 'amber' : 'zinc'} className="rounded">
{qc.type}
</StatusPill>
</TableCell>
</TableRow>
))
) : (
<TableRow>
<TableCell colSpan={3} className="p-12 text-center text-muted-foreground">
사용된 협상 카드가 없습니다. (리스트가 비어 있습니다)
</TableCell>
</TableRow>
)}
</TableBody>
</Table>
</div>
</div>
);
}