1"use strict";(self.webpackChunkclient_v2=self.webpackChunkclient_v2||[]).push([[5140],{30136:(ee,U,a)=>{a.d(U,{BL:()=>D,K0:()=>o,Pb:()=>F,QV:()=>Y,Ql:()=>t,rG:()=>P,xq:()=>Q});var e=a(283766),y=a(939291),I=a(967489),b=a(541615);const{fetchHubEngagementScore:f,fetchHubTopPerformingAlumni:_,fetchUsersWithEngagementScores:C,fetchUserEngagementScore:j,fetchLastMonthCronStatus:k,fetchCaseDownloadHistory:T}=b.A,R=async()=>{try{const{data:n}=await(0,I.o8D)({});return(0,y.A)(n,"data",{})}catch(n){return{}}},Q=n=>(0,e.useQuery)([f],()=>R()),F=10,G=async n=>{const{searchText:r,...m}=n,p={...m,filters:{}};r&&r.length&&(p.filters={condition:"INTERSECT",rules:[{id:"searchFilter",slug:"searchFilter",value:r}]});const{data:N}=await(0,I.e06)(p),L=(0,y.A)(N,"data.users",[]),w=L.length===F;return{users:L,hasMore:w}},P=n=>{const{hubId:r,...m}=n;return(0,e.useQuery)([_],()=>G({page:0,limit:10}),m)};function Y(n){return(0,e.useInfiniteQuery)({queryKey:[C,n],queryFn:()=>G(n)})}const z=async({hubId:n,userId:r})=>{const{data:m}=await(0,I.Y9Y)({hubId:n,userId:r});return(0,y.A)(m,"data",{})},D=n=>{const{hubId:r,userId:m,...p}=n;return(0,e.useQuery)({queryKey:[j,m],queryFn:()=>z({hubId:r,userId:m}),...p})},o=()=>(0,e.useQuery)({queryKey:[k],queryFn:async()=>{const{data:n}=await(0,I.VQY)();return n},staleTime:5*60*1e3}),s=async()=>{const{data:n}=await(0,I.pRY)();return(0,y.A)(n,"data",[])},t=()=>(0,e.useQuery)({queryKey:[T],queryFn:s,refetchOnWindowFocus:!0,refetchInterval:1e3})},196310:(ee,U,a)=>{a.d(U,{$$:()=>Q,Hi:()=>D,NH:()=>G,U3:()=>s,_3:()=>o,__:()=>T,bO:()=>z,hK:()=>k,kp:()=>R,mE:()=>f,xM:()=>F,y8:()=>Y,yZ:()=>P});const e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],y=2024,I=1,b=()=>{const t=new Date,n=t.getMonth();return n===0?{month:12,year:t.getFullYear()-1}:{month:n,year:t.getFullYear()}},f=t=>{const n=b();return t===!0?n:C(n,-1)},_=(t,n)=>t.year!==n.year?t.year-n.year:t.month-n.month,C=(t,n)=>{const r=t.year*12+(t.month-1)+n;return{year:Math.floor(r/12),month:r%12+1}},j=(t,n)=>_(t,n)<=0?t:n,k=()=>{const t=new Date().getFullYear()-1;return{from:{month:1,year:t},to:{month:12,year:t}}},T=t=>{const{from:n,to:r}=t;return`${e[n.month-1]} ${n.year} to ${e[r.month-1]} ${r.year}`},R=t=>{const{from:n,to:r}=t;return`${e[n.month-1]} ${n.year} \u2013 ${e[r.month-1]} ${r.year}`},Q=t=>`${t.year}-${String(t.month).padStart(2,"0")}`,F=t=>`${t.from.month}/${t.from.year}-${t.to.month}/${t.to.year}`,G=(t,n="pdf")=>{const{from:r,to:m}=t;return`CASE_${e[r.month-1]}${r.year}_${e[m.month-1]}${m.year}.${n}`},P=(t,n)=>{const{from:r,to:m}=t;if(!r.month||!r.year||!m.month||!m.year)return!1;const p={month:I,year:y},N=n!=null?n:b();return!(_(r,p)<0||_(r,N)>0||_(m,r)<0||_(m,N)>0||_(m,C(r,11))>0)},Y=t=>{const n=t!=null?t:b(),r=[];for(let m=y;m<=n.year;m++)r.push({label:String(m),value:m});return r},z=(t,n)=>{if(!t)return[];const r={month:I,year:y},m=n!=null?n:b();return e.map((p,N)=>{const L=N+1,w={month:L,year:t};return _(w,r)<0||_(w,m)>0?null:{label:p,value:L}}).filter(p=>p!==null)},D=(t,n)=>{if(!t.month||!t.year)return[];const r=n!=null?n:b(),m=j(C(t,11),r),p=[];for(let N=t.year;N<=m.year;N++)p.push({label:String(N),value:N});return p},o=(t,n,r)=>{if(!t.month||!t.year||!n)return[];const m=r!=null?r:b(),p=j(C(t,11),m);return e.map((N,L)=>{const w=L+1,B={month:w,year:n};return _(B,t)<0||_(B,p)>0?null:{label:N,value:w}}).filter(N=>N!==null)},s=(t,n,r)=>{const m=r!=null?r:b(),p=j(C(t,11),m);return n.month>0&&n.year>0&&_(n,t)>=0&&_(n,p)<=0?n:p}},329566:(ee,U,a)=>{a.d(U,{E0:()=>P,JE:()=>D,Kp:()=>z,OD:()=>Y,SI:()=>G,nX:()=>j,qN:()=>f,rb:()=>Q,se:()=>C,yC:()=>F});var e=a(551471),y=a.n(e),I=a(425170);const b=new Set(["done","error","failed"]),f=(o,s)=>y().tz(o,s).format("MMM D, YYYY [at] hh:mm A"),_=o=>{const s=y()(o,"YYYY-MM",!0);return s.isValid()?s.format("MMM YYYY"):o},C=(o,s)=>`${_(o)} - ${_(s)}`,j=o=>[...o].sort((s,t)=>new Date(t.createdAt).getTime()-new Date(s.createdAt).getTime()),k=o=>!b.has(o),T=o=>o.status==="done"&&!!o.fileUrl,R=o=>o.rawCsvDownload!=null,Q=(o,s)=>s?T(s)?"ready":s.status==="error"||s.status==="failed"||o.status==="failed"&&!T(s)?"failed":k(s.status)?"generating":"failed":"hidden",F=o=>o.status!=="failed"&&k(o.pdfDownload.status),G=o=>R(o)&&!F(o),P=o=>!R(o)&&T(o.pdfDownload),Y=o=>{if(F(o)||P(o))return!1;if(!G(o))return!0;const s=T(o.pdfDownload),t=o.rawCsvDownload?T(o.rawCsvDownload):!1;return!s&&!t},z=()=>{(0,I.mei)("Downloading report","success","Your download has started.",{},{},{placement:"bottomRight"})},D=o=>{const s=document.createElement("a");s.href=o,s.rel="noopener",document.body.appendChild(s),s.click(),document.body.removeChild(s),z()}},623521:(ee,U,a)=>{a.d(U,{Kg:()=>e,aL:()=>I,h0:()=>y,l:()=>b});const e="exportsCsv",y="downloadCaseReportCsv",I="EXPORT_ENGAGEMENT_SCORE_REPORTS",b="EXPORT_ENGAGEMENT_SCORE_CASE_REPORT",f="EXPORT_CASE_REPORT_RAW_CSV"},667381:(ee,U,a)=>{a.r(U),a.d(U,{default:()=>rt});var e=a(715621),y=a(537953),I=a(163081),b=a(145926),f=a(248883),_=a(992972),C=a.n(_),j=a(90570),k=a(939291),T=a(321658),R=a.n(T),Q=a(226898),F=a(419611),G=a(760106),P=a(839050),Y=a(425170),z=a(65122),D=a(906453),o=a(668998),s=a(33256),t=a(723961);const n={aboutCaseGlossaryButton:"aboutCaseGlossaryButton__wyP8W",aboutCaseGlossaryDrawer:"aboutCaseGlossaryDrawer__IsntV",modeCardItem:"modeCardItem__vjNpS"},r="CASE (Council for Advancement and Support of Education) is a global nonprofit that sets the standard for measuring alumni engagement at educational institutions worldwide.",m=[{title:"Volunteer",description:"Alumni who serve in a formal capacity \u2014 mentors, advisory board members, event volunteers, or chapter leaders."},{title:"Experiential",description:"Alumni who participate in events or programs \u2014 reunions, webinars, networking events, or campus visits."},{title:"Communication",description:"Alumni who engage with institutional communications \u2014 email opens, social interactions, magazine reads, or survey responses."},{title:"Philanthropic",description:"Alumni who make a financial contribution \u2014 gifts, pledges, matching, or in-kind donations \u2014 regardless of amount."}],p="Each alumni record is counted once per engagement mode per year, even if they engage multiple times. Alumni can appear in multiple engagement modes.",N="Institutions submit this data annually to CASE to benchmark engagement and identify where to invest in alumni relations.",w=()=>{const{trackAboutCaseClicked:u}=(0,t.n)(),i=(0,y.useMemo)(()=>[{key:"case-intro",label:"",description:r,dictionary:[]},{key:"case-engagement-modes",label:"Modes of Engagement",dictionary:m.map(d=>({key:d.title.toLowerCase(),label:d.title,definition:d.description,isCollapsible:!1,
1className:n.modeCardItem}))},{key:"case-how-counts",label:"How counts are tracked",description:p,dictionary:[]},{key:"case-why-matters",label:"Why it matters",description:N,dictionary:[]}],[]);return(0,e.jsx)(s.A,{dictionary:i,title:"About CASE",selectedKey:null,label:"About CASE",icon:"pg-book-open-o",ariaLabel:"About CASE",contentClassName:n.aboutCaseGlossaryDrawer,buttonClassName:n.aboutCaseGlossaryButton,callParent:u,rootLabel:null})},B={banner:"banner__DwiqV",message:"message__fPgdN",actions:"actions__H514O",caseBannerIconInfo:"caseBannerIconInfo__D7JAN","svg-icon":"svg-icon__mklMl"},Me=({onViewCaseReport:u})=>(0,e.jsxs)("aside",{className:B.banner,role:"status","aria-live":"polite","aria-label":"CASE report availability",children:[(0,e.jsx)("span",{className:B.caseBannerIconInfo,children:(0,e.jsx)(f.C0,{icon:"pg-info"})}),(0,e.jsx)("p",{className:B.message,children:"View your CASE report on the platform, or generate it to download"}),(0,e.jsx)("div",{className:B.actions,children:(0,e.jsx)(f.$n,{type:"primary",onClick:u,"aria-label":"View report",children:"View report"})})]});var ne=a(837181),ye=a(972185);const te={scoreChart:"scoreChart__jyoUg",header:"header__v2vag",engagementScoreHeading:"engagementScoreHeading__CRNq4",overall:"overall__rd78u",score:"score__FStN2",avgScore:"avgScore__sqSMA",updates:"updates__DHjeY",emptyState:"emptyState__tAqqw"},de={height:160,width:220,padding:{top:10,right:20,bottom:40,left:60}},Ce={overall:{height:475,width:1e3,padding:{top:70,right:60,bottom:100,left:100}},communication:de,philanthropy:de,volunteer:de,experiential:de},Oe={overall:"Overall engagement",communication:"Communications",philanthropy:"Philanthropy",volunteer:"Volunteer",experiential:"Experiential"},re=({engagementScoresData:u,scoreChartType:i="overall"})=>{var d;const{scoresHistory:v={},avgScores:S={},percentageChangeInScores:l={}}=u,A={autoRotate:!0,offset:60,textStyle:{fontSize:"12",textAlign:"center",fill:"#4D535E"},position:"center"},E=M=>Object.keys(v).map(($,H)=>{const Z=R()($,"DD-MM-YYYY"),[q,X]=[Z.format("MMM"),Z.format("YY")];return{time:`${q}-${X}`,value:(0,k.A)(v,`${$}.${M}`,0)}}),x=M=>i==="overall"?(0,ye.A)(M,"time"):(0,ye.A)([0,5,11],$=>M[$].time);if((0,j.A)(v))return(0,e.jsx)("div",{className:te.emptyState,children:(0,e.jsx)("span",{children:"No data found!"})});const O=E(i);return(0,e.jsxs)("div",{className:te.scoreChart,children:[(0,e.jsxs)("div",{className:te.header,children:[(0,e.jsx)("span",{className:C()(te.engagementScoreHeading,{overall:i==="overall"}),children:Oe[i]}),(0,e.jsxs)("div",{className:te.score,children:[(0,e.jsx)("span",{className:C()(te.avgScore,{overall:i==="overall"}),children:S[i]}),(0,e.jsx)(f.vu,{icon:(d=l[i])!=null&&d.includes("-")?"pg-arrow-down":l[i]!=="0.0 %"?"pg-arrow-up":void 0,iconPosition:"left",text:l[i],className:te.updates})]})]}),(0,e.jsxs)(ne.Chart,{scale:{value:{alias:"Engagement Score",min:0},time:{alias:"Time",ticks:x(O)}},height:Ce[i].height,width:Ce[i].width,data:O,forceFit:!0,padding:Ce[i].padding,children:[(0,e.jsx)(ne.Legend,{}),(0,e.jsx)(ne.Axis,{name:"value",title:i==="overall"?A:null}),(0,e.jsx)(ne.Tooltip,{crosshairs:{type:"y"},useHtml:!0,htmlContent:(M,$)=>`<div 2 class="g2-tooltip" 3 style=' 4 position:absolute; 5 height: 24px; 6 min-width: 90px; 7 background-color: rgba(255, 255, 255, 0.9); 8 border: solid 1px black; 9 padding: 0px 10px; 10 border-radius: 5px; 11 '> 12 <div class="g2-tooltip-title">${M}: ${(0,k.A)($,"0.value",0)}</div> 13 </div>`}),(0,e.jsx)(ne.Geom,{type:"line",position:"time*value",size:2,color:"#096DD9"}),(0,e.jsx)(ne.Geom,{type:"point",position:"time*value",size:2,shape:"circle",color:"#096DD9"})]})]})};var me=a(805569),je=a(637260);const le={topPerformerContainer:"topPerformerContainer__BX4od",header:"header__o1jwA",title:"title__FGIMF",topPerformersTable:"topPerformersTable__zuqXa",overallColumn:"overallColumn__sCika"},Ue=({baseRoute:u,topPerformingAlumniList:i,isLoading:d})=>{const v=[{title:"Name",dataIndex:"name",key:"name",fixed:"left",width:"34%",ellipsis:!0},{title:"Com",dataIndex:"communication",key:"communication",width:"12%"},{title:"Exp",dataIndex:"experiential",key:"experiential",width:"12%"},{title:"Vol",dataIndex:"volunteer",key:"volunteer",width:"12%"},{title:"Phil",dataIndex:"philanthropy",key:"philanthropy",width:"12%"},{title:"Overall",dataIndex:"overall",key:"overall",width:"18%",className:le.overallColumn,render:(l,A)=>(0,e.jsx)(me.N_,{to:`${u}?userId=${A.userId}`,children:A.overall})}],S=i.map(l=>{var A,E,x,O,M;return{userId:l.id,name:`${l.firstName} ${l.lastName}`,communication:((A=l==null?void 0:l.engagementScores)==null?void 0:A.communication)||0,experiential:((E=l==null?void 0:l.engagementScores)==null?void 0:E.experiential)||0,volunteer:((x=l==null?void 0:l.engagementScores)==null?void 0:x.volunteer)||0,philanthropy:((O=l==null?void 0:l.engagementScores)==null?void 0:O.philanthropy)||0,overall:((M=l==null?void 0:l.engagementScores)==null?void 0:M.overall)||0}});return(0,e.jsx)("div",{className:le.topPerformerContainer,children:(0,e.jsx)(je.A,{className:le.topPerformersTable,dataSource:S,columns:v,rowKey:l=>l.userId,scroll:{x:!0},title:()=>(0,e.jsxs)("div",{className:le.header,children:[(0,e.jsx)("span",{className:le.title,children:"Top alumni"}),i!=null&&i.length?(0,e.jsx)(me.N_,{to:`${u}/explore-alumni`,children:"View all"}):null]}),pagination:!1,loading:d})})};var Ne=a(821061),Fe=a(532153),De=a(177587),Le=a(832196),Be=a(214349),Ye=a(736611),ae=a(30136),xe=a(768835);const Se=({text:u,className:i,textClassName:d,iconPosition:v="left",negativeScoreClassName:S="",positiveScoreClassName:l="",showIcon:A=!0})=>{var E;const x=!((E=`${u}`)!=null&&E.includes("-")),O=x?"pg-arrow-up":"pg-arrow-down";return(0,e.jsx)(f.vu,{icon:A?O:void 0,iconPosition:v,iconProps:{height:14,width:14},text:`${u}`.replace("-",""),textClassName:d,className:(0,xe.A)(i,{[S]:!x,[l]:x})})},h={userScoreProfile:"userScoreProfile__TFzt1",profileInfoCard:"profileInfoCard__e0ojD",leftSection:"leftSection__Y7QYr",profilePicture:"profilePicture__PE4iU",profileAboutSection:"profileAboutSection__nJbLT",viewProfileLink:"viewProfileLink__NpX80",userName:"userName__xISfj",headline:"headline__Uqpe8",rightSection:"rightSection__reDwt",scoreCircle:"scoreCircle__ETJFs",score:"score__RIE0y",scoreInfo:"scoreInfo__tdpZ5",title:"title__Sm39
130",scoreUpdates:"scoreUpdates__r_6yD",updates:"updates__Wv4jf",updateTime:"updateTime__rFiBa",closeIconButton:"closeIconButton__VQgH7",scoresContainer:"scoresContainer__GGHLV",header:"header__lf8nZ",date:"date__Ygtm4",bottomContainer:"bottomContainer__NBzf3",scoreCategoryContainer:"scoreCategoryContainer__vzXVO",scoreChipContainer:"scoreChipContainer__URIjF",scoreUpdateTitle:"scoreUpdateTitle__Mep0u",positiveScore:"positiveScore__sAJb8",negativeScore:"negativeScore__KlgAb",chip:"chip__tXxq5"},$e=({category:u,categoryScore:i,categoryScoreChange:d,categoryScorePercentageChange:v,caseCategoryScores:S})=>(0,j.A)(S)?null:(0,e.jsxs)("div",{className:h.scoreCategoryContainer,children:[(0,e.jsxs)("div",{className:h.leftSection,children:[(0,e.jsx)("h2",{className:h.title,children:u}),(0,e.jsx)("div",{className:h.scoreChipContainer,children:(0,Ne.A)(S).map(([l,A])=>(0,e.jsx)(Se,{textClassName:h.scoreUpdateTitle,className:h.scoreUpdates,positiveScoreClassName:h.positiveScore,negativeScoreClassName:h.negativeScore,iconPosition:"right",text:`${A.label} (${A.changeInScore})`,showIcon:A.changeInScore!==0},l))})]}),(0,e.jsxs)("div",{className:h.rightSection,children:[(0,e.jsx)("h1",{className:h.score,children:i}),(0,e.jsx)(Se,{text:v,showIcon:parseFloat(v)!==0,className:h.chip})]})]}),He=({userEngagementScores:u,lastUpdatedOn:i})=>{const d=[{label:"Appreciate",key:"appreciate",onClick:()=>{}},{label:"Send message",key:"sendMessage",onClick:()=>{}},{label:"Share profile",key:"shareProfile",onClick:()=>{}}],v=R()(i).format("DD/MM/YYYY");return(0,e.jsxs)("div",{className:h.scoresContainer,children:[(0,e.jsx)("div",{className:h.header,children:(0,e.jsxs)("div",{className:h.leftSection,children:[(0,e.jsx)("h2",{className:h.title,children:"Trends"}),(0,e.jsxs)("p",{className:h.date,children:["Last modified on ",v]})]})}),(0,e.jsx)("div",{className:h.bottomContainer,children:(0,Ne.A)(u).map(([S,l])=>(0,e.jsx)($e,{category:l.label,categoryScore:l.score,categoryScorePercentageChange:l.percentageChangeInScore,caseCategoryScores:l.caseCategoriesScores,categoryScoreChange:l.changeInScore},S))})]})},Ve=({userProfileDetails:u,userEngagementScores:i,onClose:d})=>{const{name:v,identifier:S,photoUrl:l,workHistory:A,schools:E,headline:x}=u,O=(0,P.er)(),M=(0,P.lx)(),$=(0,Ye.Ol)({schools:E,location:null,clusterInfo:O,hub
13:M,currentUserHub:{},standardUserType:"alumni"}),{percentageChangeInScore:H,score:Z}=i!=null?i:{},{headline:q,richTextHeadline:X}=(0,Be.g)({headline:x||"",workHistory:A||[]});return(0,e.jsxs)("div",{className:h.profileInfoCard,children:[(0,e.jsxs)("div",{className:h.leftSection,children:[(0,e.jsx)("img",{className:h.profilePicture,src:l,alt:""}),(0,e.jsxs)("div",{className:h.profileAboutSection,children:[(0,e.jsx)("h2",{className:h.userName,children:v}),X?(0,e.jsx)(De.A,{removeQuillClass:!0,text:q,className:h.headline}):(0,e.jsx)("p",{className:h.headline,children:q}),(0,e.jsx)(De.A,{text:$,className:h.headline}),(0,e.jsx)(Le.Ay,{moduleName:"profile",target:"_blank","aria-label":"View Profile",params:{userIdentifier:S},className:h.viewProfileLink,children:"View profile"})]})]}),(0,e.jsxs)("div",{className:h.rightSection,children:[(0,e.jsx)("div",{className:h.scoreCircle,children:(0,e.jsx)("span",{className:h.score,children:Z})}),(0,e.jsxs)("div",{className:h.scoreInfo,children:[(0,e.jsx)("p",{className:h.title,children:"Engagement Score"}),(0,e.jsxs)("div",{className:h.scoreUpdates,children:[(0,e.jsx)(Se,{text:H,showIcon:parseFloat(H)!==0,className:h.updates}),(0,e.jsxs)("span",{className:h.updateTime,children:[H!=null&&H.includes("-")?"less":"more"," than last month"]})]})]})]}),(0,e.jsx)(f.$n,{className:h.closeIconButton,onClick:d,icon:(0,e.jsx)(f.C0,{icon:"pg-cross"}),children:"Close"})]})},Ge=({showModal:u})=>{const i=(0,b.W6)(),d=(0,b.zy)(),S=new URLSearchParams(d.search).get("userId"),l=(0,P.lx)(),A=()=>{i.push({pathname:d.pathname})},{data:E,isLoading:x}=(0,ae.BL)({userId:S,hubId:l.id,enabled:!!S,onError:()=>{A(),(0,Y.mei)("something went wrong...","error")}});if(!S)return null;const O=(0,k.A)(E,"userDetails",{}),M=(0,k.A)(E,"userScores",{}),$=(0,k.A)(E,"lastUpdatedOn",""),H=(0,Fe.A)(M,"overall");return(0,e.jsx)(f.aF,{id:"user-score-profile-modal",isFullScreen:!0,open:u,children:x?(0,e.jsx)(F.A,{}):(0,e.jsxs)("div",{className:h.userScoreProfile,children:[(0,e.jsx)(Ve,{userProfileDetails:O,userEngagementScores:M.overall,onClose:A}),(0,e.jsx)(He,{userEngagementScores:H,lastUpdatedOn:$})]})})},ke=()=>(0,ae.xq)();var oe=a(623521),Pe=a(636285),Ke=a(748607),ze=a(860129),Qe=a(380141),Xe=a(354350),Je=a(718922);const W={scoreSummary:"scoreSummary__uUofB",scoreCategory:"scoreCategory__quo1R",scoreCategory__main:"scoreCategory__main__Rqhit",rightSection:"rightSection__yfuv9",score:"score__AKkdl",score__main:"score__main___nawl",updates:"updates__eM4hX",lastActivity:"lastActivity__V0f9Q"},we=({scoreCategory:u,score:i,percentageChange:d,lastActivityDate:v})=>{var S;const l=u.toLocaleLowerCase()==="overall",A=!((S=`${d}`)!=null&&S.includes("-"));return(0,e.jsxs)("div",{className:W.scoreSummary,children:[(0,e.jsx)("span",{className:(0,xe.A)(W.scoreCategory,{[W.scoreCategory__main]:l}),children:`${u} ${l?"engagement":""}`}),(0,e.jsxs)("div",{className:W.rightSection,children:[(0,e.jsx)("span",{className:(0,xe.A)(W.score,{[W.score__main]:l}),children:i}),(0,e.jsx)(f.vu,{icon:d!=null&&d.includes("-")?"pg-arrow-down":d!=="0.0 %"?"pg-arrow-up":void 0,iconPosition:"left",text:d,className:W.updates}),l&&(0,e.jsx)("span",{className:W.lastActivity,children:`${A?"more":"less"} than last month`})]})]})},We=({lastActivityDate:u})=>u?R()(u).format("MMM D, YYYY"):"N/A",Ie=["communication","experiential","volunteer","philanthropy","overall"],Ze=[...Ie,"lastActivityDate"],qe=[{title:"Alum name",dataIndex:"name",key:"name",width:180,ellipsis:!0},{title:"Communication",dataIndex:"communication",key:"communication",align:"center"},{title:"Experiential",dataIndex:"experiential",key:"experiential",align:"center"},{title:"Volunteer",dataIndex:"volunteer",key:"volunteer",align:"center"},{title:"Philanthropy",dataIndex:"philanthropy",key:"philanthropy",align:"center"},{title:"Overall",dataIndex:"overall",key:"overall",align:"center"},{title:"Last activity date",dataIndex:"lastActivityDate",key:"lastActivityDate",align:"center",render:(u,i)=>We(i)},{title:"",dataIndex:"bookmarkUser",key:"bookmarkUser",align:"center",width:50}],et=u=>{const i=R()(),d=R().duration(i.diff(u)),v=d.years(),S=d.months(),l=Math.floor(d.asWeeks());return v>0?"year":S>0?"month":l>0?"week":"just now"},g={"bg-primary-xlight":"bg-primary-xlight__wBph7","bg-primary-light":"bg-primary-light__DKztW","bg-primary":"bg-primary__qGYNj","bg-primary-dark":"bg-primary-dark__I1AOD","bg-primary-xdark":"bg-primary-xdark__F8jiA","bg-secondary-xlight":"bg-secondary-xlight__CKaoz","bg-secondary-light":"bg-secondary-light__c3fD
13H","bg-secondary":"bg-secondary__gYTjk","bg-secondary-dark":"bg-secondary-dark__hnp2L","bg-secondary-xdark":"bg-secondary-xdark__OvF0l","bg-success-xlight":"bg-success-xlight__bCFLr","bg-success-light":"bg-success-light__LhC38","bg-success":"bg-success__m1s5n","bg-success-dark":"bg-success-dark__o9Bo6","bg-success-xdark":"bg-success-xdark__Ji_nJ","bg-info-xlight":"bg-info-xlight__hQuxE","bg-info-light":"bg-info-light__quNPK","bg-info":"bg-info__dQXi0","bg-info-dark":"bg-info-dark__NGFYJ","bg-info-xdark":"bg-info-xdark__RQfWQ","bg-warning-xlight":"bg-warning-xlight__TpAPt","bg-warning-light":"bg-warning-light__Cvyhg","bg-warning":"bg-warning__bAiUt","bg-warning-dark":"bg-warning-dark__vSXSh","bg-warning-xdark":"bg-warning-xdark__Nj3ii","bg-alert-xlight":"bg-alert-xlight__lD6A3","bg-alert-light":"bg-alert-light__DzhHv","bg-alert":"bg-alert__sxFgr","bg-alert-dark":"bg-alert-dark__hhHTa","bg-alert-xdark":"bg-alert-xdark__iJ7tf","bg-danger-xlight":"bg-danger-xlight__iJCaJ","bg-danger-light":"bg-danger-light__B3jTO","bg-danger":"bg-danger__gkWPH","bg-danger-dark":"bg-danger-dark__YyNWq","bg-danger-xdark":"bg-danger-xdark__wuBS2",engagementScore:"engagementScore__JSugS",topShell:"topShell__EbdQz",topShellInner:"topShellInner__qYUoa",pageHeader:"pageHeader__MlkBj",headerDate:"headerDate__Y5zxZ",contentShell:"contentShell__njJOI",actions:"actions__ZYnTk",categoryText:"categoryText__tOogp",downloadAction:"downloadAction__Amtle",content:"content__sv5zb",chartContainer:"chartContainer__x9on0",topSection:"topSection__p_QQO",overallChart:"overallChart__dDyWl",topPerformers:"topPerformers__Bu3hx",durationFilter:"durationFilter__Zw54F",bottomSection:"bottomSection__g1Fs_",sectionChart:"sectionChart__JmRBf",backNavLink:"backNavLink__FmbxI",scoreSummary:"scoreSummary__R_CUn",bottom:"bottom__NIMXb",alumniListTable:"alumniListTable__X_1BB",bookmarkIcon:"bookmarkIcon__FcsrV",bookmarked:"bookmarked__cu40_",header:"header__c5YxK",search:"search__YylIh",headerRightSection:"headerRightSection__gd4im",tableColumnHeader:"tableColumnHeader__XPAcy",columnHeaderBtn:"columnHeaderBtn__nqtEw",center:"center___WYwY",selected:"selected__CFqLg",scoreModalHeader:"scoreModalHeader__WzzS6",closeIconButton:"closeIconButton__h5YsE"},tt=({engagementScoresData:u})=>{var i,d;const{lastUpdatedOn:v,avgScores:S,percentageChangeInScores:l}=u;return(0,e.jsxs)("div",{className:g.scoreSummary,children:[(0,e.jsx)(we,{score:(i=S.overall)!=null?i:0,scoreCategory:(0,Pe.A)("overall"),percentageChange:(d=l.overall)!=null?d:"0",lastActivityDate:et(v)}),(0,e.jsx)("div",{className:g.bottom,children:Ie.slice(0,4).map(A=>{var E,x;return(0,e.jsx)(we,{score:(E=S[A])!=null?E:0,scoreCategory:(0,Pe.A)(A),percentageChange:(x=l[A])!=null?x:"0"},A)})})]})},at=()=>{const u=(0,P.lx)(),{mutate:i}=(0,Xe.F)(),d=`${(0,Y.LmZ)(u)}/site-admin/users-and-analytics/engagement-score`,[v,S]=(0,y.useState)(1),[l,A]=(0,y.useState)(""),[E,x]=(0,y.useState)({orderBy:"overall",order:"desc"}),O=(0,Je.o_)(l,700),{data:M,isLoading:$}=ke(),{data:H,isLoading:Z}=(0,ae.QV)({page:v-1,searchText:O,...E}),q=c=>{E&&E.orderBy===c?(E.order==="desc"&&x({orderBy:c,order:"asc"}),E.order==="asc"&&x({orderBy:"overall",order:"desc"})):x({orderBy:c,order:"desc"})},X=c=>c!==E.orderBy?"pg-switch-vertical-o":E.order==="desc"?"pg-arrow-down-o":"pg-arrow-up-o",ge=({onClick:c,title:K,isSortable:se,columnKey:V})=>(0,e.jsxs)("div",{className:C()(g.tableColumnHeader,{[g.center]:V!=="name"}),children:[K,se&&(0,e.jsx)(f.K0,{onClick:c,"aria-label":`Switch sort order for ${K}`,size:"small",icon:X(V),className:C()({[g.selected]:V===E.orderBy})})]}),be=(c,K)=>(0,e.jsx)(me.N_,{to:`${d}/explore-alumni?userId=${K.userId}`,children:c}),he=()=>qe.map(c=>{const K={...c,title:(0,e.jsx)(ge,{isSortable:Ze.includes(c.key),title:c.title,columnKey:c.key,onClick:()=>q(c.key)})};return c.key==="name"&&(0,Ke.A)(K,"render",be),K}),J=c=>(0,e.jsx)(f.K0,{icon:"pg-bookmark-o",iconProps:{size:20},useIconFill:!!c.isBookmarked,"aria-pressed":!!c.isBookmarked,"aria-label":"bookmark user",className:C()(g.bookmarkIcon,c.isBookmarked?g.bookmarked:null),size:"small",onClick:()=>i(c)}),ce=c=>{A(c),v>1&&S(1)}
13,pe=(0,ze.A)((0,ye.A)(H==null?void 0:H.pages,"users")),Ee=(0,k.A)((0,Qe.A)(H==null?void 0:H.pages),"hasMore",!1),ve=()=>Ee?v*ae.Pb+1:(v-1)*ae.Pb+pe.length,_e=pe.map(c=>{var K,se,V,Te,Re;return{userId:c.id,name:`${c.firstName} ${c.lastName}`,communication:((K=c==null?void 0:c.engagementScores)==null?void 0:K.communication)||0,experiential:((se=c==null?void 0:c.engagementScores)==null?void 0:se.experiential)||0,volunteer:((V=c==null?void 0:c.engagementScores)==null?void 0:V.volunteer)||0,philanthropy:((Te=c==null?void 0:c.engagementScores)==null?void 0:Te.philanthropy)||0,overall:((Re=c==null?void 0:c.engagementScores)==null?void 0:Re.overall)||0,bookmarkUser:J(c),lastActivityDate:c==null?void 0:c.lastActivityDate}});return(0,e.jsxs)("div",{children:[(0,e.jsxs)(me.N_,{className:g.backNavLink,to:d,children:[(0,e.jsx)(f.C0,{icon:"pg-cheveron-left",height:24,width:24})," Back to dashboard"]}),!$&&(0,e.jsx)(tt,{engagementScoresData:M}),(0,e.jsx)(je.A,{className:g.alumniListTable,dataSource:_e,columns:he(),rowKey:c=>c.userId,title:()=>(0,e.jsx)("div",{className:g.header,children:(0,e.jsx)(f.pd,{type:"text",className:g.search,placeholder:"Search by name/keyword",onChange:c=>ce(c),value:l})}),loading:Z,pagination:{simple:!1,total:ve(),pageSize:ae.Pb,onChange(c){S(c)},current:v}})]})},nt=(0,y.lazy)(()=>a.e(2572).then(a.bind(a,802572))),ue="scores",ie="case-report",Ae="/hub/:identifier/site-admin/users-and-analytics/engagement-score",ot=({onClose:u,config:i,showModal:d,isLoading:v})=>(0,e.jsx)(f.aF,{id:"hub-engagement-score-config-modal",isFullScreen:!0,open:d,children:v?(0,e.jsx)(F.A,{}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:g.scoreModalHeader,children:(0,e.jsx)(f.$n,{className:g.closeIconButton,onClick:u,icon:(0,e.jsx)(f.C0,{icon:"pg-cross"}),children:"Close"})}),(0,e.jsx)(D.P,{mode:"view",handleActionsChanges:()=>{},config:i})]})}),st=({headerDivRef:u})=>{const i=(0,I.useDispatch)(),d=(0,P.lx)(),v=(0,P.iZ)(),{isSuperAdmin:S}=(0,Y.MDA)(v,d==null?void 0:d.id),{pathname:l}=(0,b.zy)(),[A,E]=(0,y.useState)(!1),{data:x,isLoading:O}=ke(),{data:M,isLoading:$}=(0,ae.rG)({hubId:d==null?void 0:d.id}),{data:H={},isLoading:Z}=(0,o.U)({hubID:d.id}),{trackViewCaseReportClicked:q}=(0,t.n)(),[X,ge]=(0,y.useState)(ue),[be,he]=(0,y.useState)(!1),J=!!(0,Y.DLA)("engagementScoring","caseReportTab",d),ce=(x==null?void 0:x.isCaseReportCreated)&&(S||(0,Y.DLA)("engagementScoring","showOfficialCaseReport",d)),pe=()=>{i((0,Q.pE9)(oe.Kg))},Ee=()=>{ce&&i((0,Q.pE9)(oe.h0))},ve=({show:V})=>{E(V)};if((0,y.useEffect)(()=>{if(!(0,j.A)(x)&&!O&&(u!=null&&u.current)){const V=R()(x.lastUpdatedOn).format("DD/MM/YYYY");u.current.textContent=`Last updated on ${V}`}},[x,u,O]),O)return(0,e.jsx)(F.A,{});const _e=V=>{V&&(ge(V),V===ie&&he(!0))},c=()=>{ge(ie),he(!0),q()},K=(0,e.jsxs)("div",{children:[J&&(0,e.jsx)(Me,{onViewCaseReport:c}),(0,e.jsxs)("section",{className:g.topSection,children:[(0,e.jsxs)("div",{className:g.downloadAction,children:[ce&&!J&&(0,e.jsx)(f.$n,{type:"link",onClick:Ee,children:"Download CASE Global Engagement Metrics Survey Report"}),(0,e.jsx)(f.$n,{type:"secondary",onClick:()=>ve({show:!0}),children:"View scoring configuration"}),(0,e.jsx)(f.$n,{type:"primary",onClick:pe,children:"Export Engagement Scores"})]}),(0,e.jsxs)("div",{className:g.content,children:[(0,e.jsx)("div",{className:C()(g.overallChart,g.chartContainer),children:(0,e.jsx)(re,{engagementScoresData:x,scoreChartType:"overall"})}),(0,e.jsx)("div",{className:C()(g.topPerformers,g.chart),children:(0,e.jsx)(Ue,{topPerformingAlumniList:(0,k.A)(M,"users",[]),isLoading:$,baseRoute:l})})]})]}),(0,e.jsxs)("section",{className:g.bottomSection,children:[(0,e.jsx)("div",{className:g.actions,children:(0,e.jsx)("span",{className:g.categoryText,children:J?"Engagement by category":"CASE categories"})}),(0,e.jsxs)("div",{className:g.content,children:[(0,e.jsx)("div",{className:C()(g.sectionChart,g.chartContainer),children:(0,e.jsx)(re,{engagementScoresData:x,scoreChartType:"communication"})}),(0,e.jsx)("div",{className:C()(g.sectionChart,g.chartContainer),children:(0,e.jsx)(re,{engagementScoresData:x,scoreChartType:"experiential"})}),(0,e.jsx)("div",{className:C()(g.sectionChart,g.chartContainer),children:(0,e.jsx)(re,{engagementScoresData:x,scoreChartType:"volunteer"})}),(0,e.jsx)("div",{className:C()(g.sectionChart,g.chartContainer),children:(0,e.jsx)(re,{engagementScoresData:x,scoreChartType:"philanthropy"})})]})]})]}),se=J&&be?(0,e.jsx)(y.Suspense,{fallback:(0,e.jsx)(F.A,{}),children:(0,e.jsx)(nt,{})}):null;return(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:g.topShell,children:(0,e.jsxs)("div",{className:g.topShellInner,children:[(0,e.jsxs)("div",{className:g.pageHeader,children:[(0,e.jsx)("div",{children:(0,e.jsx)("h3",{children:"Engagement Scores"})}),(0,e.jsxs)("div",{className:g.pageHeaderActions,children:[J&&(0,e.jsx)(w,{}),!J&&(0,e.jsx)("div",{className:g.headerDate,ref:u})]})]}),J&&(0,e.jsx)("div",{className:g.tabsNavigation,children:(0,e.jsx)(f.tU,{"aria-label":"Engagement Scores sections",onChange:_e,tabs:[{label:"Scores",key:ue,active:X===ue},{label:"CASE report",key:ie,active:X===ie}]})})]})}),(0,e.jsxs)("div",{className:g.contentShell,children:[X===ue&&K,X===ie&&se]}),(0,e.jsx)(G.A,{id:oe.Kg,exportParams:{type:"EXPORT_CSV",requestData:{},fileType:oe.aL}}),ce?(0,e.jsx)(G.A,{id:oe.h0,exportParams:{type:"EXPORT_CSV",requestData:{},fileType:oe.l}}):null,(0,e.jsx)(ot,{showModal:A,onClose:()=>ve({show:!1}),config:H,isLoading:Z})]})},rt=()=>{const u=(0,y.useRef)(null),{search:i}=(0,b.zy)(),v=new URLSearchParams(i).get("userId");
13return(0,e.jsxs)(z.A,{className:g.engagementScore,footer:null,children:[(0,e.jsxs)(b.dO,{children:[(0,e.jsx)(b.qh,{path:`${Ae}/explore-alumni`,component:at}),(0,e.jsx)(b.qh,{path:`${Ae}`,render:()=>(0,e.jsx)(st,{headerDivRef:u})}),(0,e.jsx)(b.qh,{children:(0,e.jsx)(b.rd,{to:`${Ae}`})})]}),(0,e.jsx)(Ge,{showModal:!!v})]})}},706234:(ee,U,a)=>{a.d(U,{t:()=>e});const e={PDF:"pdf",PDF_WITH_CSV:"pdf_csv"}},723961:(ee,U,a)=>{a.d(U,{n:()=>C});var e=a(356029),y=a(706234),I=a(329566),b=a(196310);const f={[y.t.PDF]:"CASE Report (PDF)",[y.t.PDF_WITH_CSV]:"CASE Report (PDF) + Raw Data (CSV)"},_=j=>{const k=(0,b.kp)(j),[T,R]=k.split(" \u2013 ");return{from:T,to:R}},C=()=>{const j=(0,e.E)();return{trackReportingPeriodUpdated:D=>{const{from:o,to:s}=_(D);j({pgAnalytics:"Admin: CASE Report - Reporting Period Updated",pgAnalyticsFrom:o,pgAnalyticsTo:s})},trackGenerateReportClicked:(D,o)=>{const{from:s,to:t}=_(o);j({pgAnalytics:"Admin: CASE Report - Generate Report Clicked",pgAnalyticsReportType:f[D],pgAnalyticsFrom:s,pgAnalyticsTo:t})},trackDownloadConfirmed:(D,o)=>{const{from:s,to:t}=_(o);j({pgAnalytics:"Admin: CASE Report - Download Confirmed",pgAnalyticsReportType:f[D],pgAnalyticsFrom:s,pgAnalyticsTo:t})},trackAboutCaseClicked:()=>{j({pgAnalytics:"Admin: CASE Report - About CASE clicked"})},trackPreviewSampleReportClicked:()=>{j({pgAnalytics:"Admin: CASE Report - Preview Sample Report Clicked"})},trackViewDataViewerClicked:D=>{const{from:o,to:s}=_(D);j({pgAnalytics:"Admin: CASE Report - View Data Viewer Clicked",pgAnalyticsFrom:o,pgAnalyticsTo:s})},trackViewCaseReportClicked:()=>{j({pgAnalytics:"Admin: CASE Report - Banner CTA Clicked",pgAnalyticsCTA:"View CASE Report"})},trackMetricCardDeeplinkClicked:(D,o)=>{const s=(0,b.kp)(o);j({pgAnalytics:"Admin: CASE Report - Metric Card Deeplink Clicked",pgAnalyticsCategory:D,pgAnalyticsTimeframe:s})},trackActivityDownloadClicked:D=>{const o=(0,I.se)(D.startDate,D.endDate),[s,t]=o.split(" - ");j({pgAnalytics:"Admin: CASE Report - Activity Download Clicked",pgAnalyticsReportType:D.reportType,pgAnalyticsFrom:s,pgAnalyticsTo:t})}}}},760106:(ee,U,a)=>{a.d(U,{A:()=>o});var e=a(715621),y=a(537953),I=a(163081),b=a(665790),f=a(62644),_=a(251981),C=a(939291),j=a(69914),k=a(226898),T=a(294097),R=a(201172);const Q={};var F=Object.defineProperty,G=(s,t,n)=>t in s?F(s,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[t]=n,P=(s,t,n)=>G(s,typeof t!="symbol"?t+"":t,n);class Y extends y.PureComponent{constructor(){super(...arguments),P(this,"state",{fileUrl:null,fileId:null,ctaLink:null}),P(this,"getFileId",t=>`file_request_${t||(0,j.A)()}`),P(this,"checkFile",t=>{const{fileUrl:n,visibleModalId:r}=this.props;n||T.E.get(`/download-files/${t}`).then(m=>{const p=(0,C.A)(m,"data.fileUrl"),N=(0,C.A)(m,"data.ctaLink");p?(this.setState({fileUrl:p,fileId:t}),setTimeout(()=>{const L=document.getElementById(this.getFileId(t));L&&N&&L.setAttribute("href",N)},14*60*1e3)):r&&setTimeout(()=>this.checkFile(t),1e3*10)}).catch(m=>console.error(m))}),P(this,"startExport",()=>{const{exportParams:t,asyncModalShow:n,id:r,renderType:m}=this.props;this.setState({exportStarted:!0}),n(r);const p=(0,C.A)(t,"requestData"),N=(0,C.A)(p,"tableName"),L={filters:p.filters,matchType:"all"};if(N==="DATA_VIEWER"&&p.dataViewerReportId){let w=`/hub-analytics-service/data-viewer/${p.dataViewerReportId}?toCsv=true&getUrl=true`;m==="cluster"&&(w=`/cluster-analytics-service/data-viewer/${p.dataViewerReportId}?toCsv=true&getUrl=true`,p&&Array.isArray(p.columns)&&p.columns.length&&(L.selectedColumns=p.columns)),T.E.post(w,L).then(({data:B})=>{B&&B.fileUrl&&this.setState({fileUrl:B.fileUrl})})}else{let w=t;w&&w.fileType==="FIND_USERS_CSV_ES"&&Array.isArray((0,C.A)(w,"requestData.filters.filters"))&&(w.requestData={...w.requestData,...w.requestData.filters}),T.E.post("/download-files",w).then(B=>{const fe=(0,C.A)(B,"data.id");fe&&this.checkFile(fe)}).catch(B=>console.error(B))}}),P(this,"handleCancel",()=>{const{asyncModalHide:t}=this.props;this.setState({fileUrl:null}),t()})}componentDidUpdate(t){const{visibleModalId:n,id:r}=this.props;n===r&&t.visibleModalId!==n&&(n?this.startExport():this.handleCancel())}render(){const{title:t="Export To CSV",closable:n=!1,...r}=this.props,{fileUrl:m,fileId:p}=this.state,N=(0,e.jsx)(b.A,{type:"primary",onClick:this.handleCancel,children:"Hide"}),L=(0,e.jsx)(f.A,{type:"loading",style:{fontSize:30,fontWeight:"bold"},spin:!0});return(0,e.jsx)(R.A,{...r,title:t,closable:n,footer:N,children:(0,e.jsx)("div",{children:m?(0,e.jsxs)("div",{children:[(0,e.jsx)("h4",{children:"Download Ready"}),(0,e.jsxs)("div",{children:["Your download request has been processed. Please",(0,e.jsx)("a",{id:this.getFileId(p),href:m,children:" click here "}),"to download your file."]})]}):(0,e.jsxs)("div",{children:[(0,e.jsx)("h4",{children:"Preparing Download"}),(0,e.jsxs)("div",{className:"export-modal-block",children:[(0,e.jsx)("div",{className:"text-center",children:(0,e.jsx)(_.A,{indicator:L,className:"spin-class"})}),(0,e.jsx)("div",{children:"We are preparing your file. For large exports, this process may take a few minutes. We will also e-mail you the link to download your file."})]})]})})})}}const z=({asyncModal:{visibleModalId:s}})=>({visibleModalId:s}),D=s=>({asyncModalShow:t=>s((0,k.pE9)(t)),asyncModalHide:()=>s((0,k.k9u)())}),o=(0,I.connect)(z,D)(Y)}}]);
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.