1import{aX as g,q as j,a as b,t as v,aP as N,r as o,j as e,aI as i,L as y,b as f,A as x}from"./index-DXw5IyQz.js";import{P as w}from"./PortfolioContainer-DuyH2JDl.js";import"./accordion-C8lK9f1z.js";import"./alert-dialog-CI-PteSA.js";import"./apiRequest-D3JfC5PP.js";import"./firebase-Bkv2sE9P.js";import"./pencil-DH5RU6b9.js";import"./lazy-image-CB81XZXa.js";import"./image-CUF_npZZ.js";import"./upload-Bdl8w8Mx.js";import"./maximize-2-YIH5AM3W.js";import"./send-DyoKc_iB.js";import"./profile-photo-editor-BXlYrLtT.js";import"./pen-line-Dc2-1mZs.js";import"./rotate-ccw-BMA0jfMW.js";import"./save-DOssrFtg.js";import"./message-circle-DjiHWWBO.js";import"./globe-C7v3MIeY.js";function q(){const[k,t]=g("/organization-portfolio/:id"),{toast:d}=j(),[,r]=b(),{user:P}=v();N({backgroundColor:"#f8f9fa"});const[n,l]=o.useState(!0),[a,u]=o.useState(null),[h,p]=o.useState(null);return o.useEffect(()=>{(async()=>{if(!(t!=null&&t.id)){p("Geen organisatie ID opgegeven in de URL"),l(!1);return}try{l(!0),console.log(`Ophalen organisatie portfolio voor ID: ${t.id}`);const s=await fetch(`/api/organizations/${t.id}/portfolio`);if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const m=await s.json();if(m.success&&m.data)u(m.data);else throw new Error("Ongeldig responsformaat van API")}catch(s){console.error("Error fetching organization portfolio:",s),p("Kon organisatie portfolio niet laden. Mogelijk bestaat deze niet of is deze niet actief."),d({title:"Fout",description:"Kon organisatie portfolio niet laden. Mogelijk bestaat deze niet of is deze niet actief.",variant:"destructive"})}finally{l(!1)}})()},[t==null?void 0:t.id,d]),o.useEffect(()=>{if(!n&&a){const c=window.location.hash;c&&setTimeout(()=>{const s=document.getElementById(c.substring(1));s&&s.scrollIntoView({behavior:"smooth",block:"start"})},100)}},[n,a]),n?e.jsxs("div",{className:"flex flex-col min-h-screen-safe bg-[#f8f9fa]",children:[e.jsx(i,{}),e.jsx("main",{className:"flex-1 overflow-y-auto px-4 app-content",children:e.jsxs("div",{className:"flex flex-col items-center justify-center h-96",children:[e.jsx(y,{className:"h-10 w-10 animate-spin text-[#FF0083] mx-auto"}),e.jsx("p",{className:"mt-4 text-[#4A4A4A] font-lato",children:"Portfolio wordt geladen..."})]})})]}):h?e.jsxs("div",{className:"flex flex-col min-h-screen-safe bg-[#f8f9fa]",children:[e.jsx(i,{}),e.jsx("main",{className:"flex-1 overflow-y-auto px-4 app-content",children:e.jsxs("div",{className:"space-y-6 pt-2 pb-6",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs(f,{onClick:()=>r("/community"),className:"flex items-center gap-2 text-gray-600 hover:text-white hover:bg-[#FF0083] mb-2 px-3 bg-transparent border-0 shadow-none transition-all duration-200 hover:shadow-sm",children:[e.jsx(x,{className:"h-4 w-4"}),"Terug naar community"]}),e.jsx("h1",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:"Portfolio niet gevonden"})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center h-64",children:[e.jsx("p",{className:"text-xl font-semibold text-red-500",children:"Fout bij laden portfolio"}),e.jsx("p",{className:"mt-2 text-gray-700",children:h})]})]})})]}):a?e.jsxs("div",{className:"flex flex-col min-h-screen-safe bg-[#f8f9fa]",children:[e.jsx(i,{}),e.jsx("main",{className:"flex-1 overflow-y-auto px-4 app-content",children:e.jsxs("div",{className:"space-y-6 pt-2 pb-32 md:pb-20",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs(f,{variant:"ghost",onClick:()=>r("/community"),className:"flex items-center gap-2 text-gray-600 hover:text-gray-900 mb-2 px-0",children:[e.jsx(x,{className:"h-4 w-4"}),"Terug naar community"]}),e.jsx("h1",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Bekijk het bedrijfsprofiel"})]}),e.jsx(w,{organizationId:t==null?void 0:t.id,isPublicView:!0,userRole:"BUSINESS"})]})})]}):e.jsxs("div",{className:"flex flex-col min-h-screen-safe bg-[#f8f9fa]",children:[e.jsx(i,{}),e.jsx("main",{className:"flex-1 overflow-y-auto px-4 app-content",children:e.jsxs("div",{className:"space-y-6 pt-2 pb-6",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs(f,{onClick:()=>r("/community"),className:"flex items-center gap-2 text-gray-600 hover:text-white hover:bg-[#FF0083] mb-2 px-3 bg-transparent border-0 shadow-none transition-all duration-200 hover:shadow-sm",children:[e.jsx(x,{className:"h-4 w-4"}),"Terug naar community"]}),e.jsx("h1",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:"Portfolio niet gevonden"})]}),e.jsx("div",{className:"flex flex-col items-center justify-center h-64",children:e.jsx("p",{className:"text-xl font-semibold text-gray-700",children:"Portfolio niet gevonden"})})]})})]})}export{q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.