feat(prospecting): show per-category score breakdown on prospect detail
- Restructure score_breakdown from flat dict to grouped by category:
{technical_health: {flag: pts}, modernity: {...}, ...}
- Each category row shows score/max with progress bar + per-flag detail
(e.g. Technical Health 15/40 → "very slow: 15 pts")
- Color-coded: green for positive flags, orange for issues
- "No issues detected" shown for clean categories
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,9 +123,17 @@ function prospectDetail(prospectId) {
|
||||
return 'text-gray-600';
|
||||
},
|
||||
|
||||
isPositiveFlag(flag) {
|
||||
var positive = ['has_website', 'has_contacts', 'has_email', 'has_phone', 'has_ssl', 'modern_cms', 'fast_site', 'mobile_friendly'];
|
||||
return positive.indexOf(flag) !== -1;
|
||||
scoreCategories() {
|
||||
var s = this.prospect?.score;
|
||||
if (!s) return [];
|
||||
var bd = s.score_breakdown || {};
|
||||
var positive = ['has_website', 'has_contacts', 'has_email', 'has_phone', 'has_ssl', 'modern_cms', 'fast_site', 'mobile_friendly', 'has_ecommerce', 'short_domain', 'met_in_person'];
|
||||
return [
|
||||
{ key: 'technical_health', label: 'Technical Health', score: s.technical_health_score, max: 40, flags: Object.entries(bd.technical_health || {}), positive: positive },
|
||||
{ key: 'modernity', label: 'Modernity', score: s.modernity_score, max: 25, flags: Object.entries(bd.modernity || {}), positive: positive },
|
||||
{ key: 'business_value', label: 'Business Value', score: s.business_value_score, max: 25, flags: Object.entries(bd.business_value || {}), positive: positive },
|
||||
{ key: 'engagement', label: 'Engagement', score: s.engagement_score, max: 10, flags: Object.entries(bd.engagement || {}), positive: positive },
|
||||
];
|
||||
},
|
||||
|
||||
techProfileEntries() {
|
||||
|
||||
Reference in New Issue
Block a user