diff --git a/backend/routers/institutional.py b/backend/routers/institutional.py index 2ea349a..a8fcd16 100644 --- a/backend/routers/institutional.py +++ b/backend/routers/institutional.py @@ -114,7 +114,19 @@ def list_reports( conditions.append("report_type = ?") params.append(report_type) if category: - conditions.append("category = ?") + # For categories that map to a signal column, also match reports + # where that signal is non-neutral (most reports have category='multi') + _signal_col = { + 'forex': 'signal_forex', + 'energy': 'signal_energy', + 'metals': 'signal_metals', + 'equities': 'signal_indices', + 'indices': 'signal_indices', + }.get(category) + if _signal_col: + conditions.append(f"(category = ? OR {_signal_col} != 'neutral')") + else: + conditions.append("category = ?") params.append(category) if importance: conditions.append("importance >= ?") diff --git a/frontend/src/pages/InstitutionalReports.tsx b/frontend/src/pages/InstitutionalReports.tsx index 5ac3b2f..b8dac77 100644 --- a/frontend/src/pages/InstitutionalReports.tsx +++ b/frontend/src/pages/InstitutionalReports.tsx @@ -1,7 +1,8 @@ import { useState } from 'react' +import { Link } from 'react-router-dom' import { useInstitutionalReports, useInstitutionalStats, useRefreshInstitutionalReports } from '../hooks/useApi' import { useQueryClient } from '@tanstack/react-query' -import { RefreshCw, TrendingUp, TrendingDown, Minus, AlertTriangle, Star, CheckCircle, Clock } from 'lucide-react' +import { RefreshCw, TrendingUp, TrendingDown, Minus, AlertTriangle, Star, CheckCircle, Clock, Users, ExternalLink } from 'lucide-react' import clsx from 'clsx' import { format } from 'date-fns' @@ -285,6 +286,21 @@ export default function InstitutionalReports() { )} + {/* Specialist Desks link */} +