[feat] negodata/front: 협상대화 카드내용 렌더 + 견적상세 헤더·테이블 UI 정리
- 협상대화: 사용 카드 번호/멘트(Slate 서식본)/와일드 조건·메모 표시, SlateRenderer
밑줄·헥스색·{변수} 치환 보정, 말풍선 우측정렬·발신자 아바타 제거
- 견적상세 헤더: DB 컬럼명 라벨 제거, 견적정보/(진행상태+세팅)/상품(이미지) 2열 재배치,
협상카드 탭에 사용 카드 수 표시
- DataTable 행 패딩 축소, 협력사명 아바타 제거, 카드관리 본인 카드 안내문
- orval 재생성(QuotationCardData 신규 필드)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
df68609c49
commit
7186446068
114 files changed
+4731
-5537
No files matched your search
@@ -1,14 +1,12 @@
|
||||
import { Edit3, Trash2 } from 'lucide-react';
|
||||
import { DataTable } from '@/components/ui/data-table';
|
||||
import type { NegotiationCard } from '../types';
|
||||
|
||||
type CardTableProps = {
|
||||
data: NegotiationCard[];
|
||||
onEdit: (card: NegotiationCard) => void;
|
||||
onDelete: (id: string, title: string) => void;
|
||||
};
|
||||
|
||||
export function CardTable({ data, onEdit, onDelete }: CardTableProps) {
|
||||
export function CardTable({ data, onEdit }: CardTableProps) {
|
||||
return (
|
||||
<DataTable
|
||||
data={data}
|
||||
@@ -39,6 +37,7 @@ export function CardTable({ data, onEdit, onDelete }: CardTableProps) {
|
||||
{
|
||||
header: '카드이름',
|
||||
headClassName: 'w-52',
|
||||
mobileHeader: true, // 모바일 카드뷰 제목(첫 컬럼 '구분' 배지 대신)
|
||||
cell: (card) => (
|
||||
<>
|
||||
<div className="font-semibold text-foreground text-sm">{card.title}</div>
|
||||
@@ -53,8 +52,9 @@ export function CardTable({ data, onEdit, onDelete }: CardTableProps) {
|
||||
{
|
||||
header: '스크립트',
|
||||
cellClassName: 'font-mono text-muted-foreground',
|
||||
mobileBlock: true, // 긴 미리보기 블록 → 모바일 카드뷰에서 라벨 아래 풀폭
|
||||
cell: (card) => (
|
||||
<div className="line-clamp-2 bg-muted/20 p-2.5 rounded border border-border/30 text-[11px] leading-relaxed">
|
||||
<div className="line-clamp-1 bg-muted/20 px-2 py-1 rounded border border-border/30 text-[11px] leading-snug">
|
||||
{card.scriptPreview}
|
||||
</div>
|
||||
),
|
||||
@@ -84,35 +84,6 @@ export function CardTable({ data, onEdit, onDelete }: CardTableProps) {
|
||||
<span className="text-muted-foreground font-mono font-medium opacity-65">-</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
header: '관리',
|
||||
align: 'center',
|
||||
headClassName: 'w-24',
|
||||
cell: (card) => (
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onEdit(card);
|
||||
}}
|
||||
className="p-1.5 text-foreground hover:bg-muted rounded cursor-pointer transition-colors"
|
||||
title="수정"
|
||||
>
|
||||
<Edit3 size={14} />
|
||||
</button>
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onDelete(card.id, card.title);
|
||||
}}
|
||||
className="p-1.5 text-muted-foreground hover:bg-red-50 hover:text-red-500 rounded cursor-pointer transition-colors"
|
||||
title="삭제"
|
||||
>
|
||||
<Trash2 size={14} />
|
||||
</button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user