Spaces:
Running
Running
axeronis commited on
Commit ·
be18371
1
Parent(s): 58353a0
feat: qualification card UI at top of chat summary
Browse files
frontend/components/ClientCard.tsx
CHANGED
|
@@ -197,6 +197,55 @@ export function ClientCard({ lead, onTakeover, isAnalyzing, onRefresh, conversat
|
|
| 197 |
</div>
|
| 198 |
</div>
|
| 199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
{/* Numbered Summary List */}
|
| 201 |
<div className="space-y-4 px-1">
|
| 202 |
{summaryPoints.map((point, i) => (
|
|
|
|
| 197 |
</div>
|
| 198 |
</div>
|
| 199 |
|
| 200 |
+
{/* QUALIFICATION CARD - Quick Info */}
|
| 201 |
+
{(lead as any).qualification_data && Object.keys((lead as any).qualification_data).length > 0 && (
|
| 202 |
+
<div className={cn(
|
| 203 |
+
"rounded-xl p-4 mb-4 border transition-all",
|
| 204 |
+
(lead as any).qualification_complete
|
| 205 |
+
? "bg-emerald-500/5 border-emerald-500/20"
|
| 206 |
+
: "bg-white/5 border-white/10"
|
| 207 |
+
)}>
|
| 208 |
+
<div className="flex items-center justify-between mb-3">
|
| 209 |
+
<div className="flex items-center gap-2">
|
| 210 |
+
<div className={cn(
|
| 211 |
+
"w-6 h-6 rounded-full flex items-center justify-center",
|
| 212 |
+
(lead as any).qualification_complete
|
| 213 |
+
? "bg-emerald-500/20 text-emerald-400"
|
| 214 |
+
: "bg-amber-500/20 text-amber-400"
|
| 215 |
+
)}>
|
| 216 |
+
{(lead as any).qualification_complete
|
| 217 |
+
? <CheckCircle2 className="w-4 h-4" />
|
| 218 |
+
: <Target className="w-4 h-4" />}
|
| 219 |
+
</div>
|
| 220 |
+
<span className="text-sm font-medium text-white">
|
| 221 |
+
{(lead as any).qualification_complete ? 'Квалифицирован' : 'Квалификация'}
|
| 222 |
+
</span>
|
| 223 |
+
</div>
|
| 224 |
+
{(lead as any).qualification_complete && (
|
| 225 |
+
<span className="text-[10px] uppercase tracking-wider text-emerald-400 font-semibold">
|
| 226 |
+
✓ Полная
|
| 227 |
+
</span>
|
| 228 |
+
)}
|
| 229 |
+
</div>
|
| 230 |
+
<div className="space-y-2">
|
| 231 |
+
{Object.entries((lead as any).qualification_data).map(([field, value]: [string, any]) => {
|
| 232 |
+
const isNotFound = !value || value.toLowerCase?.().includes('не выявлено') || value.toLowerCase?.().includes('не указано')
|
| 233 |
+
return (
|
| 234 |
+
<div key={field} className="flex justify-between items-center">
|
| 235 |
+
<span className="text-xs text-slate-400">{field}:</span>
|
| 236 |
+
<span className={cn(
|
| 237 |
+
"text-xs font-medium",
|
| 238 |
+
isNotFound ? "text-slate-500 italic" : "text-white"
|
| 239 |
+
)}>
|
| 240 |
+
{isNotFound ? 'Не выявлено' : String(value)}
|
| 241 |
+
</span>
|
| 242 |
+
</div>
|
| 243 |
+
)
|
| 244 |
+
})}
|
| 245 |
+
</div>
|
| 246 |
+
</div>
|
| 247 |
+
)}
|
| 248 |
+
|
| 249 |
{/* Numbered Summary List */}
|
| 250 |
<div className="space-y-4 px-1">
|
| 251 |
{summaryPoints.map((point, i) => (
|