PageSourceSearch

https://treesthatcount.co.nz/_next/static/chunks/pages/admin/projects/[projectId]/funders-0b84165c3bcdf448.js

js treesthatcount.co.nz collected 2026-09-24 22:00:04 UTC 4,228 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7594],{94894:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/projects/[projectId]/funders",function(){return r(90850)}])},7456:function(e,t,r){"use strict";r.d(t,{D:function(){return s}});var n=r(85893),a=r(8172),o=r(50788);const u={prev_page:"Previous page",next_page:"Next page"},s=e=>{let{count:t,page:r,pageSize:s,onChange:i,showQuickJumper:c=!1}=e;return t&&r&&s?(0,n.jsx)("div",{className:"my-6",children:(0,n.jsx)(a.Z,{current:r,jumpNextIcon:(0,n.jsx)("span",{"aria-hidden":!0,children:"\u2026"}),jumpPrevIcon:(0,n.jsx)("span",{"aria-hidden":!0,children:"\u2026"}),locale:u,nextIcon:(0,n.jsx)(o.FNi,{}),onChange:i,pageSize:s,prefixCls:"rc-pagination-rebrand",prevIcon:(0,n.jsx)(o.G1X,{}),total:t,showQuickJumper:c&&{goButton:"Go to page"}})}):null}},55680:function(e,t,r){"use strict";r.d(t,{o:function(){return h}});var n=r(85893),a=r(27060),o=r(11163),u=r(92077),s=r.n(u),i=r(67294),c=r(44156),l=r(23065),d=r(7456),f=r(75850),p=r(89827),g=r(27518),m=r(4037);const h=e=>{let{isAdmin:t=!1}=e;const r=(0,o.useRouter)(),{projectId:u}=r.query,{currentPage:h,limit:v,offset:x,onPageClick:j}=(0,m.h)({limit:12}),[y,{data:q}]=(0,p.tDb)({fetchPolicy:"network-only"}),_=(0,i.useMemo)((()=>null===q||void 0===q?void 0:q.Funder.map((e=>({...e,Trees:e.Instruction.reduce(((e,t)=>{var r,n;return e+((null===(n=t.Matches_aggregate.aggregate)||void 0===n||null===(r=n.sum)||void 0===r?void 0:r.Quantity)||0)}),0),Total:e.Instruction.reduce(((e,t)=>{var r;return e+((null===(r=t.Purchase)||void 0===r?void 0:r.Total)||0)}),0)})))),[q]),N=(0,i.useMemo)((()=>{var e;return(null===q||void 0===q||null===(e=q.Funder_aggregate.aggregate)||void 0===e?void 0:e.count)||0}),[q]);(0,i.useEffect)((()=>{y({variables:{id:u,offset:x,limit:v}})}),[v,y,x,u]);const w=(0,i.useMemo)((()=>{const e=(0,a.Cl)();return[e.accessor("Account.Name",{header:"Funder",cell:e=>{var r;return t?(0,n.jsx)(c.h$,{href:(0,g.oz)({routeParams:{accountId:null===(r=e.row.original.Account)||void 0===r?void 0:r.Id}}),children:e.getValue()}):e.getValue()}}),e.accessor("Trees",{header:"Trees received",cell:e=>s()(e.getValue()).format("0,0")})]}),[t]),I=e=>"Account_Name"===e?"text-left! pl-4":"Trees"===e?"text-right! pr-4":"";return(0,n.jsxs)("div",{children:[(0,n.jsx)(l.nv,{className:"ml-4",children:"Supporters for this project"}),(0,n.jsx)(f.i,{data:_||[],columns:w,headerClasses:I,cellClasses:I}),(0,n.jsx)(d.D,{count:N,onChange:e=>{j(e)},page:h,pageSize:v})]})}},14031:function(e,t,r){"use strict";r.d(t,{g:function(){return a}});var n=r(85893);const a=e=>{let{className:t="",...r}=e;return(0,n.jsx)("div",{className:"flex flex-col ".concat(t),...r})}},4037:function(e,t,r){"use strict";r.d(t,{h:function(){return u}});var n=r(11163),a=r(67294);const o={offset:0,page:1},u=e=>{const{limit:t=10}=e||{},r=(0,n.useRouter)(),u=(0,a.useMemo)((()=>({limit:parseInt(r.query.limit,10),offset:parseInt(r.query.offset,10),page:parseInt(r.query.page,10)})),[r.query]);(0,a.useEffect)((()=>{if(!r.query.limit||!r.query.offset||!r.query.page){const e={...o,limit:t};Object.entries(e).forEach((e=>{let[t,n]=e;r.query[t]=n})),r.replace({pathname:r.pathname,query:r.query},void 0,{shallow:!0})}}),[r.query]);return{currentPage:u.page||o.page,limit:u.limit||t,offset:u.offset||o.offset,onPageClick:e=>{const t=e&&(null===u||void 0===u?void 0:u.limit)?(e-1)*u.limit:0;r.query.offset="".concat(t),r.query.page="".concat(e),r.push({pathname:r.pathname,query:r.query},void 0,{shallow:!0})},resetPagination:()=>{delete r.query.limit,delete r.query.offset,delete r.query.page,r.push({pathname:r.pathname,query:r.query},void 0,{shallow:!0})}}}},90850:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return l}});var n=r(85893),a=r(7515),o=r(14031),u=r(55680),s=r(92251),i=r(50173);const c=()=>(0,n.jsx)(o.g,{children:(0,n.jsx)(s.l,{activeTab:i.u1.Funders,children:(0,n.jsx)(u.o,{isAdmin:!0})})});var l=(0,r(33712).mL)((()=>(0,n.jsx)(a.T3,{title:"Project funders | Admin",children:(0,n.jsx)(c,{})})))}},function(e){e.O(0,[509,1255,5666,9759,4053,9336,1317,5850,678,2888,9774,179],(function(){return t=94894,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
2//# sourceMappingURL=funders-0b84165c3bcdf448.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.