PageSourceSearch

https://www.govolunteerglos.org/assets/OrganizationLayout-Cinvik9Z.js

js govolunteerglos.org collected 2026-10-08 04:09:08 UTC 31,270 bytes, 2 lines download raw bytes

1import{al as We,am as Ve,an as Fe,ao as Ue,j as e,ap as Le,_ as G,aq as Ge,ar as Ke,as as Qe,at as He,a as oe,g as ie,d as ce,au as Je,av as ke,t as F,aw as K,h as fe,B as te,w as X,b as $,ax as ae,a5 as le,ay as j,az as re,aA as ge,aB as Ye,aC as D,A as Q,aD as Z,W as _e,aE as Ze,aF as Xe,c as Ne,aG as De,aH as en,aI as nn,aJ as de,aK as xe,aL as an,ac as tn,G as ve,aM as on,Z as Pe,aN as Me,y as sn,z as rn,i as ln,e as Re,aO as we,aP as dn,aQ as cn,v as gn,aR as un,ag as Ee,aS as ue,aT as mn,I as pn,T as Se,aU as me,aV as Ce,aW as hn,aX as bn,aY as Oe,aZ as fn,a_ as vn,a$ as zn,U as yn,b0 as kn,b1 as _n,O as jn,p as xn,b2 as wn,r as Sn,J as Cn,b3 as On,b4 as An,q as In,b5 as Tn,b6 as Ln}from"./index-CLautiso.js";import{r as p,F as q,b3 as Nn,b4 as Dn,b5 as pe,aA as Pn,b6 as Mn,b7 as Rn,ae as En,b8 as $n,b9 as qn,ba as Bn,aR as Wn,bb as Vn,bc as Fn,h as Un,a7 as Gn,bd as Kn,be as Qn,bf as Hn,bg as Jn,bh as Yn,bi as Zn,bj as Xn}from"./vendor-BFrzAml_.js";import{O as ze}from"./index-Cc7jn_-P.js";import{t as ye}from"./externalUrl-BGFkiOq_.js";import{S as Ae}from"./Section-DNC4BvhP.js";import{u as ea}from"./useUpdateOrganization-BZpRroce.js";import{am as he,an as Ie,ao as Te,ap as V,v as ne,aq as na}from"./app-0SgohmKS.js";import{u as aa}from"./use-local-storage-Z1JqULrU.js";import{u as x}from"./usePermission-CRDVtmdu.js";import{g as ta}from"./sdgs-DSb_8d5X.js";import{u as $e}from"./useAccess-cF6ANmaJ.js";import{E as oa,T as ia}from"./Tags-Bp3JGOAA.js";import{u as sa,a as ra}from"./useCreateReport-C8Pq4v2i.js";import{n as la}from"./nl2br-MOlb471b.js";import{C as da}from"./index-Cp-7L0TI.js";import{u as ca}from"./tags.hooks-C_4-5Mcb.js";import{u as ga}from"./useDeleteOrganizationMember-Ci6iDWG4.js";import{u as ua}from"./useMyMembership-CFGPw6Dd.js";import{u as ma}from"./useTeamOrOrgTranslationVars-HMXygCYr.js";import pa from"./AdminLayout-CklLFkxg.js";import{G as be}from"./Grid-8HSiUfhF.js";import"./dayjs-timezone-iana-plugin-B-UFEDqf.js";import"./operations.graphql-ymFeHCC2.js";import"./operations.graphql-BYQ54kv-.js";import"./operations.graphql-2zWMv2iy.js";import"./contract.graphql-CSgB6VDP.js";try{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new a.Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="e95cd88e-ea02-471b-937a-5e314e9159aa",a._sentryDebugIdIdentifier="sentry-dbid-e95cd88e-ea02-471b-937a-5e314e9159aa")}catch{}var qe={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};const ha=Qe((a,{variant:o,color:i,childrenOffset:t,autoContrast:f})=>{const c=a.variantColorResolver({color:i||a.primaryColor,theme:a,variant:o||"light",autoContrast:f});return{root:{"--nl-bg":i||o?c.background:void 0,"--nl-hover":i||o?c.hover:void 0,"--nl-color":i||o?c.color:void 0},children:{"--nl-offset":He(t)}}}),je=We((a,o)=>{const i=Ve("NavLink",null,a),{classNames:t,className:f,style:c,styles:r,unstyled:h,vars:A,opened:s,defaultOpened:T,onChange:v,children:g,active:u,disabled:w,leftSection:l,rightSection:k,label:L,description:I,disableRightSectionRotation:_,noWrap:b,childrenOffset:z,autoContrast:N,mod:d,attributes:P,onClick:S,onKeyDown:R,...C}=i,y=Fe({name:"NavLink",props:i,classes:qe,className:f,style:c,classNames:t,styles:r,unstyled:h,attributes:P,vars:A,varsResolver:ha}),[E,B]=Ue({value:s,defaultValue:T,finalValue:!1,onChange:v}),M=!!g,W=O=>{S?.(O),M&&(O.preventDefault(),B(!E))};return e.jsxs(e.Fragment,{children:[e.jsxs(Le,{...y("root"),component:"a",ref:o,onClick:W,onKeyDown:O=>{R?.(O),O.nativeEvent.code==="Space"&&M&&(O.preventDefault(),B(!E))},unstyled:h,mod:[{disabled:w,active:u,expanded:E},d],...C,children:[l&&e.jsx(G,{component:"span",...y("section"),mod:{position:"left"},children:l}),e.jsxs(G,{...y("body"),mod:{"no-wrap":b},children:[e.jsx(G,{component:"span",...y("label"),children:L}),e.jsx(G,{component:"span",mod:{active:u},...y("description"),children:I})]}),(M||k!==void 0)&&e.jsx(G,{...y("section"),component:"span",mod:{rotate:E&&!_,position:"right"},children:M?k!==void 0?k:e.jsx(Ge,{...y("chevron")}):k})]}),M&&e.jsx(Ke,{in:E,...y("collapse"),children:e.jsx("div",{...y("children"),children:g})})]})});je.classes=qe;je.displayName="@mantine/core/NavLink";const ba={en:"Complete setup",nl:"Voltooi setup"},fa={en:"Let's get started!",nl:"Aan de slag!"},va={en:"Create %{g:aDeed} %{g:deed | capitalize}",nl:"Maak een %{g:deed} aan"},za={en:"Create your first %{g:deed}",nl:"Maak je eerste %{g:deed} aan"},ya={en:"Create",nl:"Creëer"},ka={en:"Create your %{g:organization}",nl:"Maak je %{g:organization} aan"},_a={en:"Customize",nl:"Aanpassen"},ja={en:"Customize your pages",nl:"Pas je pagina's aan"},xa={en:"Add people",nl:"Toevoegen"},wa={en:"Add people to your %{g:organization}",nl:"Voeg personen toe aan je %{g:organization}"},Sa={en:"Settings",nl:"Instellingen"},Ca={en:"Set a cover photo",nl:"Stel een omslagfoto in"},Oa={en:"Promote",nl:"Promoot"},Aa={en:"Invite volunteers to your %{g:deeds}",nl:"Nodig vrijwilligers uit voor je %{g:deeds}"},Ia={en:"Approval",nl:"Goedkeuring"}
1,Ta={en:"%{g:organization | capitalize} approved by our moderators",nl:"%{g:organization | capitalize} goedgekeurd door onze moderators"},La={en:"Welcome to %{g:platform}, %{name}",nl:"Welkom bij %{g:platform}, %{name}"},Na={completeOnboarding:ba,start:fa,tip_create_deed:va,tip_create_deed_h:za,tip_create_organization:ya,tip_create_organization_h:ka,tip_customize:_a,tip_customize_h:ja,tip_invite_volunteers:xa,tip_invite_volunteers_h:wa,tip_profile:Sa,tip_profile_h:Ca,tip_promote_deed:Oa,tip_promote_deed_h:Aa,tip_reviewed:Ia,tip_reviewed_h:Ta,welcome:La},Da=()=>{const a=oe(Na),o=ie(),{mutateAsync:i}=ea(),{organizationSlug:t}=ce(),[f,c]=aa({key:"showOnboarding",defaultValue:!0}),[r,h]=p.useState(!1),{isMobile:A}=Je();if(!t)throw new Error("organizationSlug param not found in route");const s=ke(),T=!!s&&!s.onboard_complete,v=F.deeds.search.useQuery({organizationIds:[s?.id??0],status:"all",withOrganization:!1,pageSize:2},{enabled:T}),g=F.organizations.members.listSimple.useQuery({organizationId:s?.id??0},{enabled:T}),u=s&&{create_organization:!0,profile:!!s.cover_image,reviewed:[K.approved,K.rejected].includes(s.org_status),create_deed:v.data?v.data.pagination.rowCount>0:null,promote_deed:s.onboard_promote_deed,invite_volunteers:g.data?g.data.members.length>1:null},w=fe(d=>(d.auth.user&&d.auth.user.first_names)??"");p.useEffect(()=>{h(!0)},[]);const l=p.useCallback(async()=>i({organizationId:s.id,onboard_complete:!0}),[i,s]);if(!s||!u||!r||A)return null;const k=[{name:"create_organization",link:d=>`/o/${d}`},{name:"profile",link:d=>`/o/${d}/settings/profile`},{name:"reviewed",link:null},{name:"create_deed",link:d=>`/o/${d}/${o.deedsString}/new`},{name:"promote_deed",link:d=>`/o/${d}/${o.deedsString}`},{name:"invite_volunteers",link:d=>`/o/${d}/members/all`}];function L(){setTimeout(()=>{document.querySelector("#organization-submenu")?.scrollIntoView()},200)}if(s.onboard_complete||!f)return null;const I=Object.values(u);if(I.includes(null))return null;const _=I.every(Boolean);let b=!0,z=a("welcome",{name:w});_||(z+=`. ${a("start")}`);const N=_?e.jsx(te,{onClick:l,children:a("completeOnboarding")}):e.jsx("div",{className:he.onboarding,children:k.map((d,P)=>{const S=a(`tip_${d.name}`),R=a(`tip_${d.name}_h`);let C;return u[d.name]?C=e.jsx(q,{className:"margin-right-5",icon:Nn}):b&&(b=!1,C=e.jsx(q,{className:"margin-right-5",icon:Dn})),e.jsxs("div",{className:he.onboardingItem,children:[e.jsx(X,{size:"lg",children:d.link?e.jsx($,{to:d.link(s.slug),children:e.jsxs("button",{type:"button",onClick:L,role:"link",children:[C,S]})}):e.jsxs(e.Fragment,{children:[C,S]})}),e.jsx("div",{children:d.link?e.jsx($,{className:he.tipLink,to:d.link(s.slug),children:e.jsx("button",{type:"button",onClick:L,role:"link",children:R})}):R})]},P)})});return e.jsx(ae,{children:e.jsx(le,{dismissable:!0,disableIcon:!0,onDismiss:()=>c(!1),status:"info",title:z,children:N})})},Pa={en:"Add",nl:"Toevoegen"},Ma={en:"Add Admin",nl:"Beheerder toevoegen"},Ra={en:"Add %{g:deed_community | capitalize}",nl:"%{g:deed_community | capitalize} toevoegen"},Ea={en:"Add %{g:deed | capitalize}",nl:"%{g:deed | capitalize} toevoegen"},$a={en:"Add %{g:p2pdeed}",nl:"%{g:p2pdeed} toevoegen"},qa={en:"Add %{g:deed_volunteering | capitalize}",nl:"%{g:deed_volunteering | capitalize} toevoegen"},Ba={en:"Add %{g:deed_workshop | capitalize}",nl:"%{g:deed_workshop | capitalize} toevoegen"},Wa={buttonAdd:Pa,buttonAddAdmin:Ma,buttonAddCommunityEvent:Ra,buttonAddDeed:Ea,buttonAddP2PDeed:$a,buttonAddVolunteeringEvent:qa,buttonAddWorkshopEvent:Ba},Va=a=>{const o=ie(),i=oe(Wa),t={hasDeedsWritePermission:x({resource:j.deeds,action:"update",organizationId:a.organization.id,organization:a.organization}),hasMemberWritePermission:x({resource:j.members,action:"update",organizationId:a.organization.id,organization:a.organization})},f=p.useMemo(()=>[t.hasDeedsWritePermission&&o.whitelabel.settings.volunteerings_enabled&&{label:i(o.whitelabel.settings.workshops_enabled||o.whitelabel.settings.community_events_enabled?"buttonAddVolunteeringEvent":"buttonAddDeed"),key:"organization-quick-actions-add-deed",href:re({organizationSlug:a.organization.slug,deedsTranslation:o.deedsString,deedType:ge.volunteering})},t.hasMemberWritePermission&&{label:i("buttonAddAdmin"),key:"organization-quick-actions-add-admin",href:Ye({organizationSlug:a.organization.slug})},o.whitelabel.settings.workshops_enabled&&t.hasDeedsWritePermission&&{label:i("buttonAddWorkshopEvent"),key:"organization-quick-actions-add-workshop",href:re({organizationSlug:a.organization.slug,deedsTranslation:o.deedsString,deedType:ge.workshop})},o.whitelabel.settings.community_events_enabled&&t.hasDeedsWritePermission&&{label:i("buttonAddCommunityEvent"),key:"organization-quick-actions-add-community",href:re({organizationSlug:a.organization.slug,deedsTranslation:o.deedsString,deedType:ge.community})},(o.whitelabel.settings.p2p_deeds_enabled||o.whitelabel.p2p_organization_id===a.organization.id)&&o.whitelabel.settings.p2p_deed_creation_on_org_page_enabled&&{label:i("buttonAddP2PDeed"),key:"organization-quick-actions-add-p2p-deed",href:re({organizationSlug:a.organization.slug,deedsTranslation:o.deedsString,forP2P:!0})}].filter(r=>r!==!1),[t.hasDeedsWritePermission,t.hasMemberWritePermission,o.whitelabel.settings.workshops_enabled,o.whitelabel.settings.community_events_enabled,o.whitelabel.settings.volunteerings_enabled,o.whitelabel.settings.p2p_deeds_enabled,o.whitelabel.p2p_organization_id,o.whitelabel.settings.p2p_deed_creation_on_org_page_enabled,i,a.organization.id,a.organization.slug,o.deedsString]),c=p.useMemo(()=>f.map(({label:r,key:h,href:A})=>{const s=T=>T?p.createElement(D.Item,{...Q(h),component:$,to:A,key:h,"aria-label":r,c:"text",fz:"md",leftSection:e.jsx(q,{icon:pe})},r):p.createElement(te,{...Q(h),component:$,key:h,to:A,leftSection:e.jsx(q,{icon:pe}),mr:"sm",variant:"outline"},r);return s.displayName=`ActionRenderer-${h}`,s}),[f]);return c.length===0?null:e.jsx("div",{className:Z(Ie.wrapper,a.onCover&&Ie.onCover),children:c.length>1?e.jsxs(D,{"aria-label":i("buttonAdd"),position:"bottom-start",children:[e.jsx(D.Target,{children:e.jsx(te,{...Q("organization-quick-actions-button"),leftSection:e.jsx(q,{icon:pe}),variant:"muted",c:"text",children:i("buttonAdd")})}),e.jsx(D.Dropdown,{children:c.map(r=>r(!0))})]}):c.map(r=>r(!1))})};function Be(a,o){const i=_e(),t=Ze(i.key);p.useEffect(()=>{o&&t!==i.key&&a()},[a,o,t,i.key])}function Fa(a,o){const i=Xe(a,{fetchPolicy:"cache-and-network",...o}
1);return Be(i.refetch,!o?.skip),o?.skip?null:i.data??null}const Ua={en:"Admin",nl:"Beheerder"},Ga={en:"Photos",nl:"Foto's"},Ka={en:"Analytics",nl:"Analytics"},Qa={en:"Chat",nl:"Chat"},Ha={en:"Credential confirmations",nl:"Bevestigingen van kwalificaties"},Ja={en:"Data",nl:"Data"},Ya={en:"%{g:deeds | capitalize} with pending application or activity reports",nl:"%{g:deeds | capitalize} met aanmeldingen in afwachting of activiteitenrapporten"},Za={en:"Forms",nl:"Vragenlijsten"},Xa={en:"Home",nl:"Home"},et={en:"People",nl:"Personen"},nt={en:"Pending membership requests",nl:"Lidmaatschapsverzoeken in afwachting"},at={en:"Menu",nl:"Menu"},tt={en:"Unknown menu item",nl:"Onbekend menu-item"},ot={en:"Messages",nl:"Berichten"},it={en:"Blog",nl:"Blog"},st={en:"%{g:teams | capitalize}",nl:"%{g:teams | capitalize}"},rt={en:"%{g:teams | capitalize}",nl:"%{g:teams | capitalize}"},lt={en:"Todos",nl:"Todos"},dt={en:"Your page",nl:"Je pagina"},ct={admin:Ua,albums:Ga,analytics:Ka,chat:Qa,credentialConfirmations:Ha,data:Ja,deeds_badge_h:Ya,forms:Za,home:Xa,members:et,membership_requests_badge_h:nt,menu:at,menuItemUknownLabelAriaLabel:tt,messages:ot,pages:it,regionalTeams:st,teams:rt,todo:lt,yourPage:dt},gt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OrganizationMembershipRequestsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"idOrSlug"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"listMembershipRequests"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"total"}}]}}]}}]}}]}}]},ut=({extraMenuItems:a})=>{const{organizationSlug:o}=ce(),i=oe(ct),t=ie(),f=Ne(),c=_e(),[r,{open:h,close:A}]=De(!1);if(!o)throw new Error("organizationSlug param is missing in route");const s=ke(),T=$e(),v=s?.id??0,g={organizationId:v,organization:s},u=x({...g,resource:j.deeds,action:"update"}),w=!!s&&u,l=F.organizations.pendingDeedsCount.useQuery({organizationId:v},{enabled:w,retry:en}),{refetch:k}=l,L=p.useCallback(()=>k({cancelRefetch:!1}),[k]);Be(L,w);const I=w?l.data??null:null,_=!!s&&nn(T,s.id),b=!!t.whitelabel.settings.rich_volunteer_profile_enabled,z=F.organizations.hasCredentialVerifications.useQuery({organizationId:s?.id??0},{enabled:!!s&&_&&!b}),N=_&&(b||!!z.data?.everAsked),d=x({...g,resource:j.analytics,action:"read"}),P=x({...g,resource:j.data,action:"read"}),S=x({...g,resource:j.deeds,action:"read"}),R=x({...g,resource:j.members,action:"read"}),C=x({...g,resource:j.members,action:"update"}),y=s&&C,B=Fa(gt,{variables:y?{organizationId:s.id.toString()}:void 0,skip:!y})?.organization?.listMembershipRequests?.pageInfo.total??0,M=x({...g,resource:j.albums,action:"read"}),W=x({...g,resource:j.teams,action:"read"}),O=x({...g,resource:j.forms,action:"update"}),H=x({...g,resource:j.profile,action:"update"}),ee=x({...g,resource:j.messages,action:"read"}),J=p.useMemo(()=>{if(!s)return[];const n=s.type===ze.nonprofit?i("regionalTeams"):i("teams");return[S&&{type:"LINK",key:"deeds",label:an(i.g("deeds")),icon:Pn,to:`/o/${s.slug}/${t.deedsString}`,rightSection:w?e.jsx(xe,{hidden:!I,variant:"emphasis",value:I,tooltip:e.jsx("span",{children:i("deeds_badge_h")})}):void 0},R&&{type:"LINK",key:"members",label:i("members"),icon:Mn,to:`/o/${s.slug}/members/all`,rightSection:C?e.jsx(xe,{hidden:!B,variant:"emphasis",value:
1B,tooltip:e.jsx("span",{children:i("membership_requests_badge_h")})}):void 0},W&&s.teams_enabled&&{type:"LINK",key:"teams",label:n,icon:Rn,to:`/o/${s.slug}/teams`},s.org_status===K.approved&&(t.isSuperAdmin||_)&&t.whitelabel.settings.volunteer_bank_enabled&&{type:"LINK",key:"volunteer-pool",label:i.g("volunteerPool"),icon:En,to:"/users/volunteer-bank"},O&&{type:"LINK",key:"forms",label:i("forms"),icon:$n,to:`/o/${s.slug}/forms`},{type:"DIVIDER",key:"settings-divider"},H&&{type:"LINK",key:"your-page",label:i("yourPage"),icon:qn,to:`/o/${s.slug}/settings/profile`},M&&{type:"LINK",key:"albums",label:i("albums"),icon:Bn,to:`/o/${s.slug}/albums`},ee&&{type:"LINK",key:"messages",label:i("messages"),icon:Wn,to:`/messages?${de.filterFrom}=${s.id}`},d&&t.whitelabel.settings.org_panel_enabled&&{type:"LINK",key:"analytics",label:i("analytics"),icon:Vn,to:`/o/${s.slug}/analytics`},P&&t.whitelabel.settings.org_panel_enabled&&{type:"LINK",key:"data",label:i("data"),icon:Fn,to:`/o/${s.slug}/data`},N&&s&&{type:"LINK",key:"credential-confirmations",label:i("credentialConfirmations"),icon:Un,to:tn("organizationCredentialVerifications",{organizationSlug:s.slug})}].filter(U=>!!U)},[w,s,I,M,d,P,S,O,R,ee,H,W,_,N,t.deedsString,t.isSuperAdmin,t.whitelabel.settings.org_panel_enabled,t.whitelabel.settings.volunteer_bank_enabled,i,C,B]),se=p.useMemo(()=>{let n=null;for(const m of J){if(m.type!=="LINK")continue;const U=m.to.split("?")[0];U&&c.pathname.startsWith(U)&&(n=m.key)}return n},[J,c.pathname]),Y=(n,m)=>{if(n.type==="DIVIDER")return m==="desktop"?e.jsx(G,{my:8},n.key):e.jsx(D.Divider,{},n.key);const U=e.jsx(q,{icon:n.icon,fixedWidth:!0,color:"var(--primary-color)"});return m==="desktop"?e.jsx(je,{component:$,c:"text",to:n.to,label:n.label,fz:"xl",py:0,pl:0,leftSection:U,rightSection:n.rightSection,active:se===n.key,classNames:{root:Te.navLink,section:Te.navLinkSection}},n.key):e.jsx(D.Item,{"aria-label":n.label,leftSection:U,rightSection:n.rightSection,onClick:()=>f(n.to),children:n.label},n.key)};return e.jsx(ae,{children:e.jsxs("div",{id:"organization-submenu",children:[e.jsx(G,{hiddenFrom:"sm",children:e.jsxs(D,{"aria-label":i("menu"),position:"bottom-start",opened:r,onChange:n=>n?h():A(),styles:{item:{paddingBlock:6}},children:[e.jsx(D.Target,{children:e.jsx(Le,{"aria-label":i("menu"),children:e.jsxs(ve,{gap:4,wrap:"nowrap",justify:"center",children:[e.jsx(on,{opened:r,size:"sm",component:"div"}),e.jsx(X,{fw:500,children:i("menu")})]})})}),e.jsxs(D.Dropdown,{children:[J.map(n=>Y(n,"mobile")),a&&a.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(D.Divider,{}),a.map(n=>e.jsx(D.Item,{"aria-label":n.label,leftSection:e.jsx(q,{icon:n.icon,fixedWidth:!0,color:"var(--primary-color)"}),onClick:n.onClick,...Q(n.testId),children:n.label},`extra-${n.key}`))]})]})]})}),e.jsx(Pe,{gap:0,"aria-label":i("menu"),role:"navigation",visibleFrom:"sm",children:J.map(n=>Y(n,"desktop"))})]})})},mt={en:"Are you sure you want to leave this %{g:organization}? If you're an admin, you will lose your admin rights.",nl:"Weet je zeker dat je %{g:thisOrganization} %{g:organization} wilt verlaten? Als je een beheerder bent, zul je je beheerderstoegang kwijtraken."},pt={en:"You cannot leave this %{g:organization} because you are assigned as a contact person. Please reassign the contact person role first.",nl:"Je kunt %{g:thisOrganization} %{g:organization} niet verlaten omdat je als contactpersoon bent ingesteld. Wijs eerst een andere contactpersoon aan."},ht={en:"For this %{g:organization} you need to request to become a member. Do you want to send your request?",nl:"Voor deze groep moet je aanvragen om lid te worden. Wil je een aanvraag versturen?"},bt={en:"Donate",nl:"Doneren"},ft={en:"This %{g:organization}'s content is shared with your site, however you aren't able to edit it yourself.",nl:"De content van %{g:thisOrganization} %{g:organization} wordt gedeeld met jouw site, je kunt de content niet zelf aanpassen."},vt={en:"SBBI/ANBI",nl:"SBBI/ANBI"},zt={en:"This %{g:organization} has indicated that it is either ANBI or SBBI certified",nl:"%{g:thisOrganization | capitalize} %{g:organization} heeft een ANBI of SBBI status"},yt={en:"Leave %{g:organization}",nl:"Verlaat %{g:organization}"},kt={en:"Log in",nl:"Log in"},_t={en:"To send a message to this %{g:organization}, please log in or create an account.",nl:"Log in of maak een account aan om een bericht te sturen naar %{g:thisOrganization} %{g:organization}."},jt={en:"Log in to send a message",nl:"Log in om een ​​bericht te verzenden"},xt={en:"Send a message",nl:"Stuur een bericht"},wt={en:"Open in CRM",nl:"Openen in CRM"},St={en:"Report organization",nl:"Rapporteer organisatie"},Ct={en:"Are you sure you want to report this organization?",nl:"Weet je zeker dat je deze organisatie wilt rapporteren?"},Ot={en:"Members can easily find, organise and track volunteer activities together",nl:"Leden kunnen samen vrijwilligerswerk vinden, organiseren en samen meten"},At={en:"Ask to become an official volunteer of the %{g:organization}",nl:"Word officiële vrijwilliger bij %{g:thisOrganization} %{g:organization}."},It={en:"Request Sent",nl:"Verzoek verzonden"},Tt={en:"Join %{g:organization}",nl:"Lid worden"},Lt={en:"Create account",nl:"Account aanmaken"},Nt={en:"Skip Sidebar",nl:"Zijbalk overslaan"},Dt={en:"Unclaimed",nl:"Ongeclaimd"},Pt={en:"Website",nl:"Website"},Mt={areYouSureLeave:mt,cannotLeaveContactPerson:pt,confirmRequest:ht,donate:bt,externalHelp:ft,government_certified:vt,government_certified_h:zt,leaveGroup:yt,logIn:kt,messageLoginBody:_t,messageLoginTitle:jt,messageOrganization:xt,openInCrm:wt,reportOrganization:St,reportOrganizationConfirm:Ct,requestGroup_h:Ot,requestNonprofit_h:At,requestSent:It,requestToJoin:Tt,signUp:Lt,skipSidebar:Nt,unclaimed:Dt,website:Pt},Rt=(a,o)=>a.organizations.parent[o]?a.organizations.organizations[a.organizations.parent[o]]:null,Et=({sidebarH1:a})=>{const o=ie(),i=p.useContext(Me),t=oe(Mt),f=sn(),c=rn(),{organizationSlug:r}=ce(),h=Ne(),{enabledBySetting:A}=ca(),s=sa();if(!r)throw new Error("organizationSlug param is missing in route");
1const v=!!fe(ln),[g,{open:u,close:w}]=De(!1),l=ke()??null,k=Re(),L=F.useUtils(),I=ga(),_=F.me.membershipRequests.create.useMutation({onSuccess:async n=>{n.status==="joined"&&await Promise.all([k(we()),L.me.memberships.list.invalidate(),L.me.access.invalidate()]),f({message:t("requestSent")})(n)},onError:n=>c()(n)}),b=fe(n=>l?Rt(n,l.id):null),{membership:z,isLoading:N}=ua(l?.id),{openReportDialog:d}=ra({onSuccess:(n,m)=>{s.mutate({type:"organization",organization_id:l.id,reason:n},{onSuccess:()=>m()})},question:t("reportOrganizationConfirm")}),P=dn(),S=cn(),{data:R}=F.crm.getDeepLink.useQuery({objectType:"org",objectId:l?.id??0},{enabled:S&&!!l,staleTime:da}),C=R?.crmUrl;if(!l)return null;const y=ye(l.url),E=ye(l.donation_url),B=()=>{Oe.open({children:t("areYouSureLeave"),okButtonProps:{color:"danger"},cancelButtonLabel:t.g("cancel"),onOk:()=>{z&&I.mutate({organizationId:z.organization_id,membershipId:z.id},{onSuccess:()=>{k(we())},onError:n=>{fn(n)===vn.COULD_NOT_DELETE_CONTACT_PERSON_ORGANIZATION_MEMBER&&zn.error({message:t("cannotLeaveContactPerson")})}})}})},M=()=>{Oe.open({children:t("confirmRequest"),onOk:()=>{_.mutate({organizationId:l.id})}})},W=l.causes||[],O=l.sdgs||[],H=ta(t.locale,o.whitelabel),ee=gn(t.locale,o.whitelabel),J=un(l,o),se=Ee({obj:l.about,originalContentLanguage:l.detected_primary_language,currentlyActiveLanguage:o.language,whitelabel:o.whitelabel,shouldAttemptTranslateToUserLanguage:i}),Y=[y&&{key:"website",label:t("website"),icon:Gn,onClick:()=>{window.open(y,"_blank","noopener,noreferrer")}},S&&!!C&&{key:"crm",label:t("openInCrm"),icon:Kn,onClick:()=>{window.open(C,"_blank","noopener,noreferrer")},testId:ue.buttonOpenInCrm},l.org_status!==K.archived&&(!z||z.access_level!==mn.admin)&&{key:"message",label:t("messageOrganization"),icon:Qn,onClick:()=>{if(!v){u();return}h(`/messages/new?${de.toOrg}=${l.id}`)}},v&&!N&&z&&!o.whitelabel.settings.user_leave_organisation_disable&&{key:"leave",label:t("leaveGroup"),icon:Hn,onClick:B,testId:ue.buttonLeave},v&&!N&&!z&&l.membership_applications_enabled&&{key:"request",label:t("requestToJoin"),icon:Jn,onClick:M,testId:ue.buttonSendRequestToJoin},l.donations_enabled&&E&&{key:"donate",label:t("donate"),icon:Yn,onClick:()=>{window.open(E,"_blank","noopener,noreferrer")}},{key:"report",label:t("reportOrganization"),icon:Zn,onClick:d}].filter(n=>!!n);return e.jsxs("div",{children:[e.jsx("a",{href:"#bypass-sidebar",className:V.bypassBlock,children:t("skipSidebar")}),e.jsxs("div",{className:ne.textCenter,children:[e.jsx(pn,{src:l.image,className:V.organizationLogo,alt:l.name,width:150,height:150,fit:"clip"}),e.jsx(Se,{order:a?1:2,size:"h3",mb:0,lh:1,children:e.jsx($,{to:`/o/${l.slug}`,className:V.orgTitle,...Q("org-name-sidebar"),children:l.name})}),b&&e.jsx(Se,{order:5,size:"md",fw:"normal",children:e.jsx($,{to:`/o/${b.slug}`,children:b.name})}),e.jsx(X,{className:V.orgType,children:t.g(`${l.type}`)}),P&&!l.claimed&&e.jsx(ae,{children:e.jsx(me,{color:"magenta",children:t("unclaimed")})}),J&&e.jsx(ae,{children:e.jsx(me,{title:t("externalHelp"),children:t.g("external")})})]}),e.jsxs("div",{children:[se&&e.jsx("div",{className:"hideMobile",children:e.jsx(X,{className:V.marginBottomS,children:e.jsx(oa,{text:se,len:200,transform:la})})}),W&&W.length>0&&e.jsx("div",{className:Z("hideMobile",V.paddingBottomS),children:W.filter(n=>ee.find(m=>m.value===n)).map(n=>e.jsx(me,{children:ee.find(m=>m.value===n).label},n))}),A.enabled_for_organizations.length>0&&e.jsx("div",{className:Z("hideMobile",ne.paddingBottomS),children:e.jsx(ia,{setting:"enabled_for_organizations",onlyTags:l.tags,useVolunteerTexts:!0})}),e.jsx(ut,{extraMenuItems:Y}),Y.length>0&&e.jsx(ve,{gap:"xs",mt:"xs",visibleFrom:"sm",children:Y.map(n=>e.jsx(Ce,{label:n.label,withArrow:!0,children:e.jsx(hn,{variant:"subtle",color:"text",size:"lg","aria-label":n.label,onClick:n.onClick,...Q(n.testId),children:e.jsx(q,{icon:n.icon,color:"var(--primary-color)"})})},n.key))}),e.jsx(ae,{className:"hideMobile",children:e.jsx("div",{className:Z(ne.marginTopR,ne.typographyS),children:l.government_certified&&e.jsx("div",{className:Z("clean-link",V.governmentCertified),children:e.jsx(Ce,{label:t("government_certified_h"),withArrow:!0,children:e.jsxs("span",{children:[e.jsx(q,{icon:Xn,className:V.icon}),t("government_certified")]})})})})}),O&&O.length>0&&e.jsx("div",{className:Z("hideMobile",ne.paddingBottomS),children:O.filter(n=>H.find(m=>m.value===n)).map(n=>e.jsx("img",{style:{width:"120px"},src:H.find(m=>m.value===n).icon,alt:H.find(m=>m.value===n).label},n))})]}),e.jsx(bn,{opened:g,onClose:w,title:e.jsx(X,{fw:"bold",children:t("messageLoginTitle")}),centered:!0,children:e.jsxs(Pe,{gap:"md",children:[e.jsx(X,{children:t("messageLoginBody")}),e.jsxs(ve,{justify:"flex-end",gap:"xs",children:[e.jsx(te,{component:$,variant:"default",to:`/login?next=${encodeURIComponent(`/messages/new?${de.toOrg}=${l.id}`)}`,children:t("logIn")}),e.jsx(te,{component:$,to:`/register?next=${encodeURIComponent(`/messages/new?${de.toOrg}=${l.id}`)}`,children:t("signUp")})]})]})})]})},$t={en:"This %{teamOrOrg} has been deleted. It is no longer available on the platform, only superadmins can view it.",nl:"%{thisTeamOrOrg.nl | capitalize} %{teamOrOrg} is verwijderd en niet langer actief op het platform. Gebruikers kunnen de pagina niet meer zien, alleen platform admins nog."},qt={en:"Deleted %{teamOrOrg}",nl:"%{teamOrOrg | capitalize} verwijderd"},Bt={en:"Volunteering with %{organization}. %{about}",nl:"Vrijwilligerswerk doen voor %{organization}. %{about}"},Wt={en:"Volunteering with %{organization} in %{location}. %{about}",nl:"Vrijwilligerswerk doen voor %{organization} in %{location}. %{about}"},Vt={en:"You cannot publish %{g:deeds}, please wait until %{g:platform} approves your %{g:organization}
1.",nl:"Je kunt %{g:deeds} nog niet publiceren, wacht tot %{g:platform} jouw %{g:organization} goedkeurt."},Ft={en:"We have been notified and will review your %{g:organization} within 24 hours.",nl:"We reageren binnen 24 uur."},Ut={en:" We have been notified and someone will review your %{g:organization} shortly.",nl:" We zijn op de hoogte gesteld en je %{g:organization} wordt binnenkort door iemand beoordeeld."},Gt={en:"%{g:organization | capitalize} pending approval.",nl:"%{g:organization | capitalize} in afwachting van goedkeuring."},Kt={en:"%{g:organization | capitalize} has been rejected by our moderation team. You should receive an email from us explaining why we don't think your %{g:organization} is suitable for %{g:platform}",nl:"%{g:organization | capitalize} is afgewezen door onze moderatoren. Je zal een e-mail van ons ontvangen waarin we uitleggen waarom we denken dat je %{g:organization} niet geschikt is voor %{g:platform}"},Qt={archived:$t,archivedTitle:qt,organizationAbout:Bt,organizationAboutLocation:Wt,pending:Vt,pendingTime:Ft,pendingTimeWhitelabel:Ut,pendingTitle:Gt,rejected:Kt},Ht=a=>{const o=Re(),i=ie(),t=_e(),{organizationSlug:f}=ce();if(!f)throw new Error("organizationSlug param is missing in route");const c=F.organizations.get.useQuery({by:"slug",slug:f}),r=c.data,h=$e(),A=!!r&&yn(h,r.id),s=x({organizationId:r?.id??0,organization:r,resource:j.profile,action:"delete"}),T=!!r?.cover_image,v=ma(!!r?.parent_organization_id),{setGlobalErrorOnResponseFail:g}=kn();p.useEffect(()=>{c.data&&o(_n(c.data))},[o,c.data]),p.useEffect(()=>{c.error&&g(jn.Organization)(c.error)},[c.error,g]),xn(r&&r.name||"",1);const u=oe(Qt),w=p.useContext(Me),l=Ee({obj:r?.about,whitelabel:i.whitelabel,originalContentLanguage:r?.detected_primary_language,currentlyActiveLanguage:u.locale,shouldAttemptTranslateToUserLanguage:w}),k=p.useCallback(()=>e.jsx(Ae,{children:u.g("clientError")}),[u]),L=p.useCallback(()=>e.jsx("div",{children:a.children}),[a.children]);if(typeof window>"u"&&r){const N=r.city||r.address,P=u(`organizationAbout${N?"Location":""}`,{organization:r?.name,location:N,about:wn(l,70)}).trim();if(Sn(()=>({"og:type":"article","og:title":`${r?.name} | ${i.siteName}`,"og:description":P,...Cn(r?.image),"twitter:card":"summary_large_image","twitter:creator":r?.twitter_url||""})),r?.type===ze.nonprofit){const S=ye(r.url);On(()=>({"@context":"http://schema.org","@type":"NGO",name:r?.name,logo:r?.image,...S&&{url:S},...r?.address&&{address:r.address}}))}}const I=p.useMemo(()=>{if(!r||!s)return null;switch(r.org_status){case K.rejected:return e.jsx(le,{status:"danger",children:u("rejected")});case K.pending:return e.jsx(le,{status:"warning",title:u("pendingTitle"),children:`${u("pending")} ${u(`pendingTime${An(i.whitelabel)?"Whitelabel":""}`)}`});case K.archived:return e.jsx(le,{status:"warning",title:u("archivedTitle",v),children:u("archived",v)});default:return null}},[r,u,v,s,i.whitelabel]);if(!r)return null;In(()=>`${i.httpsUrl}/o/${r.slug}${["",...t.pathname.split("/").slice(3)].join("/")}`);const _=a.cover??Tn,b=a.sidebar==null?Et:a.sidebar,z=a.sidebar==null?{sidebarH1:a.sidebarH1}:{};return e.jsxs(e.Fragment,{children:[I,r.type===ze.nonprofit&&!a.disableOrganizationOnboarding&&A&&e.jsx(Da,{}),e.jsx("div",{className:"container",children:e.jsxs(be,{gutter:"sm",children:[e.jsx(be.Col,{span:{base:12,sm:b?3:1},children:b&&e.jsx("div",{...Q("organization-sidebar"),className:na.sidebar,children:e.jsx(b,{...z})})}),e.jsx(be.Col,{span:{base:12,sm:b?9:10},style:{paddingLeft:"0px",paddingRight:"0px",marginRight:"0px"},children:e.jsxs(Ae,{bordered:!0,children:[e.jsxs("div",{style:{position:"relative"},children:[_&&e.jsx(_,{}),a.quickActionsToolbar&&e.jsx(Va,{onCover:T,organization:r})]}),e.jsx("div",{id:"bypass-sidebar"}),e.jsx(Ln,{catch:k,children:L})]})})]})})]})},jo=a=>e.jsx(pa,{children:e.jsx(Ht,{...a})});export{jo as default};
2//# sourceMappingURL=OrganizationLayout-Cinvik9Z.js.map

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.