PageSourceSearch

https://jobpaths.com/_next/static/chunks/pages/admin/fundraisers/[id]/details-cadd941a04fac669.js

js jobpaths.com collected 2026-10-04 10:42:33 UTC 11,451 bytes, 2 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4ca8546f-3d22-4d7d-a9b9-514da755363e",e._sentryDebugIdIdentifier="sentry-dbid-4ca8546f-3d22-4d7d-a9b9-514da755363e")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5215],{12740:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var n=t(37876),i=t(26969);t(14232);let a=e=>{let{title:s,description:t,amount:a,href:l}=e;return(0,n.jsx)(i.A,{shallow:!0,prefetch:!1,href:l,children:(0,n.jsxs)("div",{style:{margin:"2rem 0",cursor:l?"pointer":"unset"},children:[(0,n.jsx)("b",{style:{fontSize:24},children:a}),(0,n.jsxs)("p",{style:{borderTop:"1px solid lightgrey",padding:".5rem 0",lineHeight:1.2},children:[s,(0,n.jsx)("br",{})," ",(0,n.jsx)("small",{style:{marginTop:".4rem",color:"grey",fontSize:12,display:"inline-block"},children:t})]})]})})}},21789:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var n=t(37876);t(14232);var i=t(21162),a=t(45877),l=t(42771);let r=e=>{let{title:s,data:t,keys:r,colors:d}=e;return(null==t?void 0:t.length)?(0,n.jsxs)(l.oj,{children:[(0,n.jsx)("h4",{children:s}),(0,n.jsx)(a._x,{style:{height:"30rem"},children:(0,n.jsx)(i.ED,{enableLabel:!1,data:t||[],keys:r,indexBy:"_id",padding:.3,layout:"horizontal",colors:d||{scheme:"set1"},labelSkipWidth:12,labelSkipHeight:12,margin:{right:50,bottom:50,left:200},groupMode:"grouped"})})]}):null}},45877:(e,s,t)=>{"use strict";t.d(s,{AL:()=>l,_x:()=>r,oj:()=>o,zp:()=>c});var n=t(37876),i=t(45300),a=t(30388);let l=a.Ay.div.withConfig({componentId:"sc-c5f85434-0"})(["column-count:2;column-gap:2rem;"]),r=a.Ay.div.withConfig({componentId:"sc-c5f85434-1"})(["height:150px;"]),d=a.Ay.div.withConfig({componentId:"sc-c5f85434-2"})(["h3{margin:0;display:inline;}"]),o=e=>{let{children:s,...t}=e;return(0,n.jsx)(i.A,{shadow:!0,style:{display:"inline-block",width:"100%"},...t,children:s})},c=e=>{let{value:s,text:t}=e;return s&&0!==s?(0,n.jsxs)(d,{children:[(0,n.jsx)("h3",{children:s||0}),"\xa0\xa0",(0,n.jsx)("span",{children:t})]}):(0,n.jsx)(n.Fragment,{})}},68464:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/fundraisers/[id]/details",function(){return t(99296)}])},99296:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var n=t(37876),i=t(14232),a=t(29693),l=t(42556),r=t(35791),d=t(12740),o=t(34349),c=t(12124),h=t(22127),u=t(21073),x=t(24744),m=t(39121),j=t(45300),p=t(21789),g=t(54067),f=t(89099),y=t(58667);let C=e=>{var s;let{row:t,data:r,setData:d,onClose:m,getAddress:j}=e,[p,g]=(0,i.useState)((null==t||null==(s=t.profile)?void 0:s.address)||{}),f=(0,a.o)(),y=e=>{let{target:{name:s,value:t}}=e;g(e=>({...e,[s]:t}))},C=async()=>{(0,u.A)("/team-pages/".concat(t.id),{method:"PATCH",body:JSON.stringify({...p,_csrf:(0,x.J)()})}).then(()=>{let e=[...r],s=e.findIndex(e=>e.id===t.id);s>=0&&(e[s].profile={...e[s].profile,address:{...p}},e[s].address=j(p),d(e),f("success","Address updated."),m())}).catch(e=>f("error",e))};return(0,n.jsxs)(c.A,{style:{maxWidth:"500px"},onClickOutside:()=>m(),children:[(0,n.jsxs)(h.JU,{children:["Address line 1",(0,n.jsx)(h.pd,{name:"line1",onChange:y,value:p.line1||""})]}),(0,n.jsxs)(h.JU,{children:["Address line 2",(0,n.jsx)(h.pd,{name:"line2",onChange:y,value:p.line2||""})]}),(0,n.jsxs)(h.JU,{children:["City",(0,n.jsx)(h.pd,{name:"city",onChange:y,value:p.city||""})]}),(0,n.jsxs)(h.JU,{children:["State",(0,n.jsx)(h.pd,{name:"state",onChange:y,value:p.state||""})]}),(0,n.jsxs)(h.JU,{children:["Zip",(0,n.jsx)(h.pd,{name:"zip",onChange:y,value:p.zip||""})]}),(0,n.jsxs)(l.fI,{children:[(0,n.jsx)(l.VP,{xs:"50%",children:(0,n.jsx)(o.A,{fullWidth:!0,primary:!0,onClick:C,small:!0,children:"Save"})}),(0,n.jsx)(l.VP,{xs:"50%",children:(0,n.jsx)(o.A,{fullWidth:!0,neutral:!0,onClick:()=>m(),small:!0,children:"Cancel"})})]})]})},v=e=>{let{row:s,data:t,setData:r,onClose:d}=e,[m,j]=(0,i.useState)(null==s?void 0:s.comments),p=(0,a.o)(),g=async()=>{(0,u.A)("/team-pages/".concat(s.id),{method:"PATCH",body:JSON.stringify({comments:m,_csrf:(0,x.J)()})}).then(()=>{let e=[...t],n=e.findIndex(e=>e.id===s.id);n>=0&&(e[n].comments=m,r(e),p("success","Comments updated."),d())}).catch(e=>p("error",e))};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(c.A,{style:{maxWidth:"500px"},onClickOutside:()=>d(),children:[(0,n.jsxs)(h.JU,{children:["Comments",(0,n.jsx)(h.pd,{as:"textarea",type:"text",rows:4,onChange:e=>j(e.target.value),value:m})]}),(0,n.jsxs)(l.fI,{children:[(0,n.jsx)(l.VP,{xs:"50%",children:(0,n.jsx)(o.A,{fullWidth:!0,primary:!0,onClick:g,small:!0,children:"Save"})}),(0,n.jsx)(l.VP,{xs:"50%",children:(0,n.jsx)(o.A,{fullWidth:!0,neutral:!0,onClick:()=>d(),small:!0,children:"Cancel"})})]})]})})},b=function(e){let{templateVars:{fundraiser:s,teamPages:t,totals:a}}=e,c=(0,f.useRouter)(),x=(0,i.useMemo)(()=>{let e=new URLSearchParams(c.query);return e.delete("id"),e},[]),[b,A]=(0,i.useState)(null),[w,k]=(0,i.useState)(null),[P,T]=(0,i.useState)(!![...x.keys()].length),S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
1return[e.line1,e.line2,e.city,e.state,e.zip].filter(Boolean).join(", ")},[V,_]=(0,i.useState)(t.map(e=>{var s,t,n;return{id:e.id,name:e.name,email:null==(s=e.owner)?void 0:s.email,owner:null==(t=e.owner)?void 0:t.name,address:S(null==(n=e.profile)?void 0:n.address),donationCount:e.donationCount,manualDonations:e.manualDonations,totalRaised:e.totalRaised,status:e.status,createdAt:new Date(e.createdAt).toLocaleDateString(),comments:e.comments,joinedTeams:e.joinedTeams,joinedTeamsTotalRaised:e.joinedTeamsTotalRaised,percentage:e.percentage,slug:e.slug,goal:e.goal,ownerJobTitle:e.ownerJobTitle,preRegisterForNextEvent:e.preRegisterForNextEvent,preRegisterDate:e.preRegisterDate,profile:e.profile,organizationTypeLabel:e.organizationTypeLabel,...e.survey}},[])),R=async()=>{let e=await (0,u.A)("/admin/fundraisers/".concat(s.id,"/details?").concat(new URLSearchParams({...c.query,asCsv:!0}))),t=document.createElement("a");t.href="data:application/octet-stream,".concat(encodeURIComponent(e)),t.download="fundraiser-export-".concat(new Date().toISOString(),".csv"),t.click()},D=V.filter(e=>!V.find(s=>s.joinedTeams.map(e=>e.id).includes(e.id))).filter(e=>e.joinedTeamsTotalRaised>0).sort((e,s)=>(s.joinedTeamsTotalRaised||0)-(e.joinedTeamsTotalRaised||0)).slice(0,10).reverse().map(e=>{let{joinedTeamsTotalRaised:s,name:t}=e;return{_id:t,totalRaised:s}}),J=V.filter(e=>e.donationCount>0).sort((e,s)=>(s.donationCount||0)-(e.donationCount||0)).slice(0,10).reverse().map(e=>{let{donationCount:s,name:t}=e;return{_id:t,donationCount:s}});return(0,n.jsxs)(n.Fragment,{children:[null!==b&&(0,n.jsx)(v,{data:V,setData:_,row:V[b],onClose:()=>A(null)}),null!==w&&(0,n.jsx)(C,{data:V,setData:_,row:V[w],getAddress:S,onClose:()=>k(null)}),(0,n.jsx)(r.lZ,{children:(0,n.jsx)(l.mc,{children:(0,n.jsxs)(l.fI,{children:[(0,n.jsx)(l.VP,{children:(0,n.jsx)("h2",{children:s.title})}),(0,n.jsxs)(l.VP,{style:{textAlign:"right"},children:[(0,n.jsx)(o.A,{small:!0,neutral:!0,onClick:R,children:"Export Data"}),"\xa0",(0,n.jsx)(o.A,{small:!0,primary:!0,href:"/admin/fundraisers",children:"Go To Fundraiser List"})]})]})})}),(0,n.jsx)(l.mc,{style:{marginTop:y.gutterWidth},children:(0,n.jsxs)(j.A,{children:[(0,n.jsx)(l.fI,{children:(0,n.jsxs)(l.VP,{onClick:()=>T(e=>!e),children:[(0,n.jsx)("i",{className:"fas fa-filter"}),"\xa0",P?"Hide":"Show"," Filters"]})}),P&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.fI,{children:[(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)(h.JU,{children:"Page Name"}),(0,n.jsx)(h.pd,{placeholder:"Page Name",onChange:e=>x.set("pageName",e.target.value),defaultValue:x.get("pageName")})]}),(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)(h.JU,{children:"Email"}),(0,n.jsx)(h.pd,{placeholder:"Email",onChange:e=>x.set("email",e.target.value),defaultValue:x.get("email")})]}),(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)(h.JU,{children:"Owner"}),(0,n.jsx)(h.pd,{placeholder:"Owner",onChange:e=>x.set("owner",e.target.value),defaultValue:x.get("owner")})]}),(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)(h.JU,{children:"Address"}),(0,n.jsx)(h.pd,{placeholder:"Address",onChange:e=>x.set("address",e.target.value),defaultValue:x.get("address")})]}),(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)(h.JU,{children:"Status"}),(0,n.jsx)(h.l6,{onChange:function(){let[{value:e}={}]=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return x.set("status",e||"")},default:{value:x.get("status"),label:x.get("status")},fetch:(0,g.rM)([{value:"active",label:"Active"},{value:"archived",label:"Archived"}])})]}),(0,n.jsxs)(l.VP,{md:"75%",children:[(0,n.jsx)(h.JU,{children:"Comments"}),(0,n.jsx)(h.pd,{placeholder:"Comments",onChange:e=>x.set("comments",e.target.value),defaultValue:x.get("comments")})]})]}),(0,n.jsx)("br",{}),(0,n.jsxs)(l.fI,{children:[(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)(h.JU,{children:"Sort By"}),Object.entries({createdAt:"Created At",updatedAt:"Updated At","profile.organization.type":"Org Type","profile.organization.school":"School Name","profile.organization.district":"Disctric Name","profile.organization.organizationName":"Organization Name"}).map((e,s)=>{let[t,i]=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{onClick:()=>x.set("sortBy",t),defaultChecked:x.has("sortBy")?x.get("sortBy")===t:0===s,type:"radio",id:t,name:"sortby"})," ","\xa0",(0,n.jsx)("label",{for:t,children:i}),(0,n.jsx)("br",{})]})})]}),(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)(h.JU,{children:"Sort Order"}),(0,n.jsx)("input",{onClick:()=>x.set("sortOrder","desc"),defaultChecked:!x.has("sortOrder")||"desc"===x.get("sortOrder"),type:"radio",id:"desc",name:"sortorder"}),"\xa0",(0,n.jsx)("label",{for:"desc",children:"Descending"}),(0,n.jsx)("br",{}),(0,n.jsx)("input",{onClick:()=>x.set("sortOrder","asc"),defaultChecked:"asc"===x.get("sortOrder"),type:"radio",id:"asc",name:"sortorder"}),"\xa0",(0,n.jsx)("label",{for:"asc",children:"Ascending"})]}),(0,n.jsx)(l.VP,{md:"25%"}),(0,n.jsxs)(l.VP,{md:"25%",children:[(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)(o.A,{onClick:()=>{window.location.search=x.toString()},fullWidth:!0,children:"Search"})]})]})]})]})}),(0,n.jsx)(l.mc,{children:(0,n.jsxs)(l.fI,{children:[(0,n.jsx)(l.VP,{children:(0,n.jsx)(d.A,{title:"Pages",description:"Number of Pages for the Fundraiser",amount:a.pages})}),(0,n.jsx)(l.VP,{children:(0,n.jsx)(d.A,{title:"Donations",description:"Number of Donations Received for all pages",amount:a.donationCount})}),(0,n.jsx)(l.VP,{children:(0,n.jsx)(d.A,{title:"Raised",description:"Total Received as Donations",amount:a.totalRaised})})]})}),(0,n.jsx)(l.mc,{children:(0,n.jsxs)(l.VP,{children:[(0,n.jsx)("div",{style:{width:"48%",display:"inline-block"},children:(0,n.jsx)(p.A,{data:D,keys:["totalRaised"],title:"Top 10 most raised"})}),(0,n.jsx)("div",{style:{width:"4%",display:"inline-block"}}),(0,n.jsxs)("div",{style:{width:"48%",display:"inline-block"},children:[(0,n.jsx)(p.A,{data:J,keys:["donationCount"],title:"Top 10 most donations"})," "]})]})}),(0,n.jsx)(l.mc,{children:V.map((e,s)=>(0,n.jsx)(m.A.asTeamPage,{...e,onEditComments:()=>A(s),onEditAddress:()=>k(s)},e.id))})]})}}},e=>{e.O(0,[5838,9598,419,1162,2127,636,6593,8792],()=>e(e.s=68464)),_N_E=e.O()}]);
2//# sourceMappingURL=details-cadd941a04fac669.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.