// Drawer.jsx - org detail drawer // // Deprioritised data points are hidden from the passport per feedback // (Andrea & Rintati). These can be inferred from the value chain, so the // passport stays focused on what the maps actually use: // Global view - hide budget, size, funding source, start year, type of // financial support (financial instruments). // Regional view (India) - additionally hide "Regions active"; the rest of // the deprioritised set is hidden too. // `regional` is passed from app.jsx based on the active view. function Drawer({ org, allOrgs, regional = false, onClose, onPickOrg }) { if (!org) return null; const { facets } = window.INITIATIVES_DATA; const typeKey = window.TYPE_KEY[org.type] || 'ngo'; const typeShort = facets.types.short[org.type] || ''; // Map collaborators to known orgs (fuzzy match) const knownLookup = new Map(); for (const o of allOrgs) knownLookup.set(o.name.toLowerCase(), o); const findKnown = (name) => { const ln = name.toLowerCase(); for (const [k, v] of knownLookup) { if (k === ln || k.includes(ln) || ln.includes(k.split('(')[0].trim())) return v; } return null; }; const stop = (e) => e.stopPropagation(); return ( <>
{org.description}