diff --git a/frontend/src/pages/EntityReviewPage.css b/frontend/src/pages/EntityReviewPage.css index 7af49425be..6043d4a7ea 100644 --- a/frontend/src/pages/EntityReviewPage.css +++ b/frontend/src/pages/EntityReviewPage.css @@ -2604,6 +2604,67 @@ color: #6b7280; } +/* Source URL Header (link + badge) */ +.source-url-header { + display: flex; + align-items: center; + gap: 0.5rem; + flex-wrap: wrap; +} + +/* Provides Match Toggle */ +.provides-match-toggle { + display: flex; + align-items: center; + padding: 0.5rem 0; +} + +.provides-match-toggle .toggle-label { + display: flex; + align-items: center; + gap: 0.5rem; + cursor: pointer; + font-size: 0.8125rem; + color: var(--text-secondary, #64748b); +} + +.provides-match-toggle input[type="checkbox"] { + width: 16px; + height: 16px; + accent-color: #10b981; + cursor: pointer; +} + +.provides-match-toggle .toggle-text { + color: var(--text-primary, #1e293b); +} + +.dark .provides-match-toggle .toggle-text { + color: var(--text-primary, #e2e8f0); +} + +.provides-match-toggle svg { + color: var(--text-secondary, #94a3b8); + cursor: help; +} + +/* Provides Match Badge on existing source URLs */ +.provides-match-badge { + display: inline-flex; + align-items: center; + gap: 0.25rem; + padding: 2px 6px; + background: rgba(16, 185, 129, 0.15); + color: #10b981; + border-radius: 4px; + font-size: 0.6875rem; + font-weight: 500; +} + +.dark .provides-match-badge { + background: rgba(16, 185, 129, 0.2); +} + /* WCMS-Only Profiles Styles */ .wcms-only-search { position: relative; diff --git a/frontend/src/pages/EntityReviewPage.tsx b/frontend/src/pages/EntityReviewPage.tsx index 335589c83c..35a0350d0a 100644 --- a/frontend/src/pages/EntityReviewPage.tsx +++ b/frontend/src/pages/EntityReviewPage.tsx @@ -145,6 +145,7 @@ interface SourceUrlItem { source_type?: string; source_domain?: string; comment?: string; + provides_match?: boolean; added_at?: string; added_manually?: boolean; } @@ -402,6 +403,7 @@ export default function EntityReviewPage() { const [showSourceUrlInput, setShowSourceUrlInput] = useState(false); const [sourceUrl, setSourceUrl] = useState(''); const [sourceComment, setSourceComment] = useState(''); + const [sourceProvidesMatch, setSourceProvidesMatch] = useState(false); const [addingSourceUrl, setAddingSourceUrl] = useState(false); const [sourceUrlError, setSourceUrlError] = useState(null); const [sourceUrlSuccess, setSourceUrlSuccess] = useState(null); @@ -714,6 +716,7 @@ export default function EntityReviewPage() { source_url: sourceUrl.trim(), comment: sourceComment.trim() || undefined, source_type: 'webpage', + provides_match: sourceProvidesMatch, }; // For WCMS-only profiles, include WCMS metadata @@ -747,6 +750,7 @@ export default function EntityReviewPage() { // Clear inputs and show success setSourceUrl(''); setSourceComment(''); + setSourceProvidesMatch(false); setSourceUrlSuccess(result.message || (language === 'nl' ? 'Bron toegevoegd' : 'Source added')); // Hide success message after 3 seconds @@ -765,7 +769,7 @@ export default function EntityReviewPage() { } finally { setAddingSourceUrl(false); } - }, [selectedProfile, sourceUrl, sourceComment, language, fetchProfileDetail, fetchWcmsOnlyProfileDetail]); + }, [selectedProfile, sourceUrl, sourceComment, sourceProvidesMatch, language, fetchProfileDetail, fetchWcmsOnlyProfileDetail]); // Save review decision const saveDecision = useCallback(async (decision: 'match' | 'not_match' | 'uncertain') => { @@ -2143,16 +2147,27 @@ export default function EntityReviewPage() { } return (
- - - {displayUrl} - +
+ + + {displayUrl} + + {source.provides_match && ( + + + {language === 'nl' ? 'Match' : 'Match'} + + )} +
{source.comment && (
"{source.comment}" @@ -2204,6 +2219,32 @@ export default function EntityReviewPage() { disabled={addingSourceUrl} rows={2} /> +
+
+ } + > + + + +