PageSourceSearch

https://donate-portal.vercel.app/_next/static/chunks/pages/user/report-e96d542dfa38f2d3.js

js donate-portal.vercel.app collected 2026-10-03 07:16:13 UTC 12,560 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[370],{7882:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/report",function(){return i(2308)}])},3912:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var a=i(8168),n=i(45),r=i(6540);i(4363);var l=i(53),o=i(4931),d=i(9957),s=i(138);i(5026).A.styles;var c=r.forwardRef(function(e,t){var i=e.children,d=e.classes,s=e.className,c=e.color,u=void 0===c?"default":c,m=e.component,p=e.disabled,h=void 0!==p&&p,f=e.disableElevation,b=void 0!==f&&f,g=e.disableFocusRipple,v=void 0!==g&&g,y=e.disableRipple,A=void 0!==y&&y,x=e.fullWidth,E=void 0!==x&&x,C=e.orientation,N=void 0===C?"horizontal":C,R=e.size,j=void 0===R?"medium":R,T=e.variant,w=void 0===T?"outlined":T,D=(0,n.A)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"]),k=(0,l.A)(d.grouped,d["grouped".concat((0,o.A)(N))],d["grouped".concat((0,o.A)(w))],d["grouped".concat((0,o.A)(w)).concat((0,o.A)(N))],d["grouped".concat((0,o.A)(w)).concat("default"!==u?(0,o.A)(u):"")],h&&d.disabled);return r.createElement(void 0===m?"div":m,(0,a.A)({role:"group",className:(0,l.A)(d.root,s,E&&d.fullWidth,b&&d.disableElevation,"contained"===w&&d.contained,"vertical"===N&&d.vertical),ref:t},D),r.Children.map(i,function(e){return r.isValidElement(e)?r.cloneElement(e,{className:(0,l.A)(k,e.props.className),color:e.props.color||u,disabled:e.props.disabled||h,disableElevation:e.props.disableElevation||b,disableFocusRipple:v,disableRipple:A,fullWidth:E,size:e.props.size||j,variant:e.props.variant||w}):null}))});let u=(0,s.A)(function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},disableElevation:{boxShadow:"none"},disabled:{},fullWidth:{width:"100%"},vertical:{flexDirection:"column"},grouped:{minWidth:40},groupedHorizontal:{"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{borderTopRightRadius:0,borderTopLeftRadius:0},"&:not(:last-child)":{borderBottomRightRadius:0,borderBottomLeftRadius:0}},groupedText:{},groupedTextHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:(0,d.X4)(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:(0,d.X4)(e.palette.secondary.main,.5)}},groupedOutlined:{},groupedOutlinedHorizontal:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedVertical:{"&:not(:first-child)":{marginTop:-1},"&:not(:last-child)":{borderBottomColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none"},groupedContainedHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderBottom:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderColor:e.palette.primary.dark}},groupedContainedSecondary:{"&:not(:last-child)":{borderColor:e.palette.secondary.dark}}}},{name:"MuiButtonGroup"})(c)},820:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var a=i(6540),n=i(961),r=i(3707),l=i(7625),o=i(2327);function d(e){return e.substring(2).toLowerCase()}let s=function(e){var t=e.children,i=e.disableReactTree,s=void 0!==i&&i,c=e.mouseEvent,u=void 0===c?"onClick":c,m=e.onClickAway,p=e.touchEvent,h=void 0===p?"onTouchEnd":p,f=a.useRef(!1),b=a.useRef(null),g=a.useRef(!1),v=a.useRef(!1);a.useEffect(function(){return setTimeout(function(){g.current=!0},0),function(){g.current=!1}},[]);var y=a.useCallback(function(e){b.current=n.findDOMNode(e)},[]),A=(0,l.A)(t.ref,y),x=(0,o.A)(function(e){var t=v.current;if(v.current=!1,g.current&&b.current&&!(document.documentElement.clientWidth<e.clientX)&&!(document.documentElement.clientHeight<e.clientY)){if(f.current){f.current=!1;return}(e.composedPath?e.composedPath().indexOf(b.current)>-1:!(0,r.A)(b.current).documentElement.contains(e.target)||b.current.contains(e.target))||!s&&t||m(e)}}),E=function(e){return function(i){v.current=!0;var a=t.props[e];a&&a(i)}},C={ref:A};return!1!==h&&(C[h]=E(h)),a.useEffect(function(){if(!1!==h){var e=d(h),t=(0,r.A)(b.current),i=function(){f.current=!0};return t.addEventListener(e,x),t.addEventListener("touchmove",i),function(){t.removeEventListener(e,x),t.removeEventListener("touchmove",i)}}},[x,h]),!1!==u&&(C[u]=E(u)),a.useEffect(function(){if(!1!==u){var e=d(u),t=(0,r.A)(b.current);return t.addEventListener(e,x),function(){t.removeEventListener(e,x)}}},[x,u]),a.createElement(a.Fragment,null,a.cloneElement(t,C))}},5904:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var a=i(6540);let n=(0,i(8014).A)(a.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 13l-4-4h8z"}),"ArrowDropDownCircleOutlined")},8296:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var a=i(6540);let n=(0,i(8014).A)(a.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit")},7974:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var a=i(6540);let n=(0,i(8014).A)(a.createElement("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"}),"Email")},586:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var a=i(6540);let n=(0,i(8014).A)(a.createElement("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"}),"Undo")},2308:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DonationsTable:()=>D,default:()=>z});var a=i(4848),n=i(6540),r=i(5099),l=i(8874),o=i(3261),d=i(4505),s=i(6715),c=i(5026),u=i(7284),m=i(3912),p=i(2016),h=i(2163),f=i(7944),b=i(7156),g=i(820),v=i(2104),y=i(9998),A=i(7974),x=i(5904),E=i(586),C=i(8296),N=i(3051),R=i(5093),j=i.n(R);let T=i(6425);
1function w(){let[e,t]=(0,n.useState)(""),[i,r]=(0,n.useState)(null),[o,d]=(0,n.useState)(""),u=(0,s.useRouter)(),m=(0,l.rX)("type");return(0,n.useEffect)(()=>{u.query&&u.query.i&&r(u.query.i),u.query&&u.query.type&&d(u.query.type)},[u]),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"p-50 mx-auto",children:[(0,a.jsx)("h1",{children:"Reports"}),i&&(0,a.jsxs)("h3",{children:["Filtered for Campaign"," ",(0,a.jsx)(c.A,{variant:"contained",onClick:()=>r(null),children:"Clear"})]}),o&&(0,a.jsxs)("h3",{children:["Filtered for Donation Type - ",o,(0,a.jsx)(c.A,{variant:"contained",onClick:()=>d(null),children:"Clear"})]}),"user"!=m&&(0,a.jsx)(c.A,{variant:"contained",color:"primary",href:"/user/chart",children:"Charts"}),(0,a.jsx)("div",{className:"clearfix",children:"\xa0"}),(0,a.jsx)(D,{SearchText:e,filterCampaign:i,filterType:o})]})})}let D=e=>{let{SearchText:t="",filterCampaign:i=null,filterType:o="",dateFilter:c="",customStartDate:m="",customEndDate:p="",setcustomStartDate:h=null,setcustomEndDate:f=null}=e,b=(0,s.useRouter)(),g=(0,l.rX)("type"),[v,y]=(0,n.useState)([]);(0,n.useEffect)(()=>{if(m&&j()(m).isAfter(p)){h(p),f(m);return}(async()=>{T.post("/api/Donation",{action:"list",userId:localStorage.userid,type:localStorage.type,SearchText:t,filter:c,customStartDate:m,customEndDate:p}).then(e=>{if(e&&e.data&&Array.isArray(e.data)){let t=[],i=1;e.data.forEach(e=>{var a,n,r,o,d,s,c,u,m,p;e.ownerDetails[0]&&e.ownerDetails[0].name&&e.ownerDetails[0].name;let h="";e.campaignDetails[0]&&e.campaignDetails[0].title&&(h=e.campaignDetails[0].title),t.push((a=e._id,n=i++,r=e.creationDate,o=e.firstname+" "+e.lastname,d="$ "+(0,l.ej)(e.amount),s=e.email,c=e.phone,u=e.donorType,m=e.campaignId,p="$ "+(0,l.ej)(0),{dataid:a,id:n,date:r,name:o,amount:d,email:s,phone:c,fund:"N/A",marketing:"",attr:"",relation:u,campaignId:m,tax:p,gross:"$ "+(0,l.ej)(e.amount),campaign:h,PaymentMethod:"Online",gifttype:"onetime"==e.gifttype?"One-Time":"pledge"==e.gifttype?"Pledge":e.gifttype}))}),y(t)}})})()},[t,c,m,p]);let A=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t&&(0,l.F4)(t),(0,d.Ay)("Deleting ...");let i=[],a=[];v.map(t=>{-1!=e.indexOf(t.id)?i.push(t.dataid):a.push(t)}),await T.post("/api/Donation",{action:"delete",list:i}),d.Ay.dismiss(),d.Ay.success("Deleted"),y(a)},x=i?v.filter(e=>e.campaignId==i):v;o&&(x=x.filter(e=>e.gifttype==o));for(let e=1;e<=x.length;e++)x[e-1].id=e;return(0,a.jsx)(r.A,{title:(0,a.jsxs)(a.Fragment,{children:["Total Donations: ",x.length," ",-1==b.route.indexOf("report")?(0,a.jsx)("a",{className:"small ml-50",href:"/user/report",children:"View All"}):""," "]}),headCells:"user"==g?[{id:"id",numeric:!0,label:"#",className:"hidden-md"},{id:"date",label:"Date",className:"hidden-sm"},{id:"fund",label:"Fund",className:"hidden-md"},{id:"campaign",label:"Campaign",className:"hidden-xs"},{id:"amount",numeric:!0,label:"Gift Amount"},{id:"tax",numeric:!0,label:"Goods or Services Rec.",className:"hidden-md"},{id:"gross",numeric:!0,label:"Tax Deductible Amt",className:"hidden-md"},{id:"PaymentMethod",label:"PaymentMethod",className:"hidden-md"},{id:"gifttype",label:"Gift Type",className:"hidden-md"},{id:"message",label:""}]:[{id:"id",numeric:!0,label:"#",className:"hidden-md"},{id:"date",label:"Date",className:"hidden-sm"},{id:"name",label:"Name",className:"hidden-sm"},{id:"email",label:"Email",className:"hidden-sm"},{id:"phone",numeric:!0,label:"Phone",className:"hidden-sm"},{id:"fund",label:"Fund",className:"hidden-md"},{id:"campaign",label:"Campaign",className:"hidden-xs"},{id:"amount",numeric:!0,label:"Gift Amount"},{id:"tax",numeric:!0,label:"Goods or Services Rec.",className:"hidden-md"},{id:"gross",numeric:!0,label:"Tax Deductible Amt",className:"hidden-md"},{id:"marketing",label:"Marketing Appeal",className:"hidden-md"},{id:"attr",label:"Attribute",className:"hidden-md"},{id:"relation",label:"Relationship Type",className:"hidden-sm"},{id:"PaymentMethod",label:"PaymentMethod",className:"hidden-md"},{id:"gifttype",label:"Gift Type",className:"hidden-md"},{id:"message",label:""}],rows:x,renderEnd:e=>(0,a.jsx)(u.A,{style:{padding:8},children:"user"!=g&&(0,a.jsx)(k,{row:e,deleteData:A})}),onDelete:A,rowClick:e=>{b.push("/user/donation?i="+e)}})};function k(e){let{row:t,deleteData:i}=e,[r,o]=n.useState(!1),d=n.useRef();return(0,a.jsxs)(n.Fragment,{children:[(0,a.jsxs)(m.A,{style:{marginRight:10,color:"#fff !important"},ref:d,"aria-label":"split button",children:[(0,a.jsx)(p.Ay,{title:"Open",children:(0,a.jsxs)(c.A,{variant:"contained",color:"primary",size:"small",style:{color:"#fff !important",minWidth:100},onClick:e=>{(0,l.F4)(e),window.location.href="mailto:"+t.email+"?subject=Donation Received&body=Thank you for your donation."},href:"mailto:"+t.email,children:[(0,a.jsx)(A.A,{})," \xa0 Email"]})}),(0,a.jsx)(c.A,{variant:"contained",color:"primary",size:"small","aria-controls":r?"split-button-menu":void 0,"aria-expanded":r?"true":void 0,"aria-label":"extra options","aria-haspopup":"menu",onClick:e=>{(0,l.F4)(e),o(e=>!e)},children:(0,a.jsx)(x.A,{})})]}),(0,a.jsx)(h.A,{sx:{zIndex:1},open:r,anchorEl:d.current,role:void 0,transition:!0,disablePortal:!0,style:{zIndex:100},children:e=>{let{TransitionProps:n,placement:r}=e;return(0,a.jsx)(f.A,{...n,style:{transformOrigin:"bottom"===r?"center top":"center bottom"},children:(0,a.jsx)(b.A,{children:(0,a.jsx)(g.A,{onClickAway:()=>{o(!1)},children:(0,a.jsxs)(v.A,{id:"split-button-menu",autoFocusItem:!0,children:[(0,a.jsxs)(y.A,{onClick:e=>i([t.id],e),children:[(0,a.jsx)(E.A,{})," \xa0 Refund"]}),(0,a.jsxs)(y.A,{className:"editBtn",children:[(0,a.jsx)(C.A,{})," \xa0 Edit"]}),(0,a.jsxs)(y.A,{className:"deleteBtn",onClick:e=>i([t.id],e),children:[(0,a.jsx)(N.A,{})," \xa0 Delete"]})]})})})})}})]})}let z=()=>(0,a.jsx)(o.A,{Component:w,header:!0,footer:!0})}},e=>{var t=t=>e(e.s=t);e.O(0,[3197,3478,9906,8037,9736,6425,1021,1679,9830,6938,571,636,6593,8792],()=>t(7882)),_N_E=e.O()}]);

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.