Spaces:
Running
Running
axeronis commited on
Commit ·
0c6ab01
1
Parent(s): e9aa757
fix: Improve analyze button behavior and remove non-functional UI buttons
Browse files- Changed analyze to reload page after completion (shows updated summary)
- Removed non-functional Call/Email/Archive buttons from ClientCard
- Updated success message to be more accurate
Now after clicking 'Analyze', summary section updates correctly
frontend/components/ClientCard.tsx
CHANGED
|
@@ -53,8 +53,9 @@ export function ClientCard({ lead, onTakeover, isAnalyzing, onRefresh, conversat
|
|
| 53 |
}
|
| 54 |
})
|
| 55 |
if (!res.ok) throw new Error('Failed')
|
| 56 |
-
success('Анализ за
|
| 57 |
-
|
|
|
|
| 58 |
} catch {
|
| 59 |
error('Ошибка', 'Не удалось запустить анализ')
|
| 60 |
} finally {
|
|
@@ -176,21 +177,7 @@ export function ClientCard({ lead, onTakeover, isAnalyzing, onRefresh, conversat
|
|
| 176 |
{/* Content */}
|
| 177 |
<div className="flex-1 overflow-y-auto p-4 space-y-4 scrollbar-thin scrollbar-thumb-slate-200">
|
| 178 |
|
| 179 |
-
{/* Action Buttons */}
|
| 180 |
-
<div className="grid grid-cols-3 gap-2">
|
| 181 |
-
<button className="flex flex-col items-center justify-center gap-1.5 p-3 rounded-xl bg-white border border-slate-200 shadow-sm hover:shadow-md hover:border-indigo-200 hover:bg-indigo-50/30 transition-all group">
|
| 182 |
-
<PhoneCall className="w-4 h-4 text-slate-500 group-hover:text-indigo-600" />
|
| 183 |
-
<span className="text-[10px] font-semibold text-slate-600 group-hover:text-indigo-700">Call</span>
|
| 184 |
-
</button>
|
| 185 |
-
<button className="flex flex-col items-center justify-center gap-1.5 p-3 rounded-xl bg-white border border-slate-200 shadow-sm hover:shadow-md hover:border-indigo-200 hover:bg-indigo-50/30 transition-all group">
|
| 186 |
-
<Mail className="w-4 h-4 text-slate-500 group-hover:text-indigo-600" />
|
| 187 |
-
<span className="text-[10px] font-semibold text-slate-600 group-hover:text-indigo-700">Email</span>
|
| 188 |
-
</button>
|
| 189 |
-
<button className="flex flex-col items-center justify-center gap-1.5 p-3 rounded-xl bg-white border border-slate-200 shadow-sm hover:shadow-md hover:border-indigo-200 hover:bg-indigo-50/30 transition-all group">
|
| 190 |
-
<Archive className="w-4 h-4 text-slate-500 group-hover:text-indigo-600" />
|
| 191 |
-
<span className="text-[10px] font-semibold text-slate-600 group-hover:text-indigo-700">Archive</span>
|
| 192 |
-
</button>
|
| 193 |
-
</div>
|
| 194 |
|
| 195 |
{/* Profile Info */}
|
| 196 |
<div className="bg-white rounded-xl border border-slate-200 shadow-sm p-4 space-y-3">
|
|
|
|
| 53 |
}
|
| 54 |
})
|
| 55 |
if (!res.ok) throw new Error('Failed')
|
| 56 |
+
success('Анализ завершен', 'Данные обновлены')
|
| 57 |
+
// Reload page to show updated summary
|
| 58 |
+
window.location.reload()
|
| 59 |
} catch {
|
| 60 |
error('Ошибка', 'Не удалось запустить анализ')
|
| 61 |
} finally {
|
|
|
|
| 177 |
{/* Content */}
|
| 178 |
<div className="flex-1 overflow-y-auto p-4 space-y-4 scrollbar-thin scrollbar-thumb-slate-200">
|
| 179 |
|
| 180 |
+
{/* Action Buttons - Removed non-functional buttons */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
|
| 182 |
{/* Profile Info */}
|
| 183 |
<div className="bg-white rounded-xl border border-slate-200 shadow-sm p-4 space-y-3">
|