diff --git a/lib/features/agents/data/models/agent_profile.dart b/lib/features/agents/data/models/agent_profile.dart index 11fea66..918fc78 100644 --- a/lib/features/agents/data/models/agent_profile.dart +++ b/lib/features/agents/data/models/agent_profile.dart @@ -153,21 +153,12 @@ class AgentProfile { } /// Get specializations / expertise from field values. - /// Matches web's getExpertiseTags slugs exactly. + /// Strictly reads about_me_expertise only (matches web + admin filter source). List get specializations { final tags = []; - // Must match web's expertiseFieldSlugs exactly (exact match, not contains) - const expertiseSlugs = [ - 'about_me_expertise', - 'expertise_areas', - 'specializations', - 'areas_of_expertise', - 'expertise', - ]; for (final fv in fieldValues) { - final slug = fv.fieldSlug.toLowerCase(); - if (!expertiseSlugs.contains(slug)) continue; + if (fv.fieldSlug.toLowerCase() != 'about_me_expertise') continue; if (fv.jsonValue is List) { for (final v in (fv.jsonValue as List)) { @@ -187,16 +178,6 @@ class AgentProfile { } } - // Add from legacy specializations array - for (final spec in legacySpecializations) { - if (spec.isNotEmpty && !tags.contains(spec)) tags.add(spec); - } - - // Add from languages array - for (final lang in languages) { - if (lang.isNotEmpty && !tags.contains(lang)) tags.add(lang); - } - return tags; }