1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82506],{39201:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/events",function(){return t(98329)}])},98329:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return R}});var s=t(85893),r=t(85200),i=t(96317),a=t(67294),o=t(37887),l=t(1644),d=t(48641),c=t(83234),u=t(11163),h=t(76722),x=t(54602),v=t(47503),j=t(52670),f=t(70089),m=t(14995),p=t(51516),g=t(99052),y=t(82475);let I={[v.mg.ASSOCIATION]:"Association",[v.mg.GROUPS]:"Groups",[v.mg.SPONSORS]:"Sponsors"},HostedInMenu=e=>{let{value:n,onChange:t}=e;return(0,s.jsxs)(g.v2,{children:[(0,s.jsx)(g.j2,{as:y.U,children:n?I[n]:"All"}),(0,s.jsx)(g.qy,{children:(0,s.jsxs)(g.__,{type:"radio",value:null!=n?n:"",onChange:t,children:[(0,s.jsx)(g.ii,{value:"",children:"All"}),(0,s.jsx)(g.ii,{value:v.mg.ASSOCIATION,children:I[v.mg.ASSOCIATION]}),(0,s.jsx)(g.ii,{value:v.mg.GROUPS,children:I[v.mg.GROUPS]}),(0,s.jsx)(g.ii,{value:v.mg.SPONSORS,children:I[v.mg.SPONSORS]})]})})]})};var C=t(25191),N=t(35228);let S={[v.Fd.IN_PERSON]:"In Person",[v.Fd.ONLINE]:"Online",[v.Fd.HYBRID]:"In Person & Online"},VenueTypeMenu=e=>{let{value:n,onChange:t}=e;return(0,s.jsxs)(g.v2,{children:[(0,s.jsx)(g.j2,{as:y.U,children:n?S[n]:"All"}),(0,s.jsx)(g.qy,{children:(0,s.jsxs)(g.__,{type:"radio",value:null!=n?n:"",onChange:t,children:[(0,s.jsx)(g.ii,{value:"",children:"All"}),(0,s.jsx)(g.ii,{value:v.Fd.IN_PERSON,children:S[v.Fd.IN_PERSON]}),(0,s.jsx)(g.ii,{value:v.Fd.ONLINE,children:S[v.Fd.ONLINE]}),(0,s.jsx)(g.ii,{value:v.Fd.HYBRID,children:S[v.Fd.HYBRID]})]})})]})},getAdminEventsPageCount=e=>{let{currentPage:n,totalCount:t,hasMore:s}=e,r=t>10?Math.ceil(t/10):0;return s?Math.max(n+1,r):Math.max(n,r)},AllEvents=()=>{var e,n,t;let r=a.useRef(new Date),i=(0,u.useRouter)();a.useEffect(()=>{if(!i.isReady||null==i.query.eventType)return;let{eventType:e,...n}=i.query;i.replace({pathname:i.pathname,query:n},void 0,{shallow:!0})},[i,i.isReady,i.query.eventType]);let g=i.query.searchText?i.query.searchText.toString():void 0,y=i.query.hostedIn?i.query.hostedIn:void 0,I=i.query.registrationType?i.query.registrationType:void 0,S=i.query.offset?Number(i.query.offset):0,A=i.query.eventSituation?i.query.eventSituation:N.L.LIVE_AND_UPCOMING,O=i.query.venueType?i.query.venueType:void 0,q=(0,o.a)(m.p,{variables:{input:{limit:10,offset:10*S,filter:{searchText:g||void 0,hostedIn:y?[y]:void 0,registrationType:I?[I]:void 0,venueType:O?[O]:void 0,eventStatus:{[N.L.LIVE_AND_UPCOMING]:[v.N3.ACTIVE],[N.L.DRAFT]:[v.N3.DRAFT],[N.L.PAST]:[v.N3.ACTIVE],[N.L.INACTIVE]:[v.N3.INACTIVE],[N.L.ALL]:void 0}[A],dateWindow:{[N.L.LIVE_AND_UPCOMING]:{windowType:v.ke.AnyOverlap,windowStart:r.current.toISOString()},[N.L.DRAFT]:void 0,[N.L.PAST]:{windowType:v.ke.EndsWithin,windowEnd:r.current.toISOString()},[N.L.INACTIVE]:void 0,[N.L.ALL]:void 0}[A]},sortOptions:{startDate:{[N.L.LIVE_AND_UPCOMING]:v.oi.asc,[N.L.DRAFT]:v.oi.asc,[N.L.PAST]:v.oi.desc,[N.L.INACTIVE]:v.oi.desc,[N.L.ALL]:v.oi.desc}[A]}}},notifyOnNetworkStatusChange:!0}),E=(0,f.N)(e=>i.replace({pathname:i.pathname,query:{...i.query,searchText:e,offset:0}}),500);return(0,s.jsxs)(d.Kq,{spacing:"6",children:[(0,s.jsxs)(j.Z,{as:d.Kq,spacing:"0",children:[(0,s.jsxs)(d.xu,{px:"4",children:[(0,s.jsxs)(d.Kq,{direction:"row",alignItems:"center",children:[(0,s.jsx)(N.C,{value:A,onChange:e=>i.replace({pathname:i.pathname,query:{...i.query,eventSituation:e,offset:0}})}),(0,s.jsx)(d.LZ,{}),(0,s.jsx)(x.o,{defaultValue:g,onChange:E,isLoading:q.networkStatus===l.I.setVariables,label:"Search events",maxW:"xs"})]}),(0,s.jsx)(d.iz,{})]}),(0,s.jsxs)(d.Kq,{direction:"row",spacing:"4",justifyContent:"flex-start",p:"4",children:[(0,s.jsxs)(c.NI,{maxW:"3xs",children:[(0,s.jsx)(c.lX,{children:"Location"}),(0,s.jsx)(VenueTypeMenu,{value:O,onChange:e=>i.replace({pathname:i.pathname,query:{...i.query,venueType:e,offset:0}})})]}),(0,s.jsxs)(c.NI,{maxW:"3xs",children:[(0,s.jsx)(c.lX,{children:"Registration"}),(0,s.jsx)(C.u,{value:I,onChange:e=>i.replace({pathname:i.pathname,query:{...i.query,registrationType:e,offset:0}})})]}),(0,s.jsxs)(c.NI,{maxW:"3xs",children:[(0,s.jsx)(c.lX,{children:"Host"}),(0,s.jsx)(HostedInMenu,{value:y,onChange:e=>i.replace({pathname:i.pathname,query:{...i.query,hostedIn:e,offset:0}})})]})]})]}),(0,s.jsx)(p.Y,{events:null===(e=q.data)||void 0===e?void 0:e.adminEvents.results,isLoading:!(null===(n=q.data)||void 0===n?void 0:n.adminEvents)&&q.loading,hasFilter:!!(g||y||I||A||O)}),(0,s.jsx)(h.t,{currentPage:S+1,numberOfPages:(null===(t=q.data)||void 0===t?void 0:t.adminEvents)?getAdminEventsPageCount({currentPage:S+1,totalCount:q.data.adminEvents.totalCount,hasMore:q.data.adminEvents.hasMore}):0,onChange:e=>i.replace({pathname:i.pathname,query:{...i.query,offset:e-1}})})]})};
1var A=t(90195),O=t(47741),q=t(41664),E=t.n(q),T=t(6491),L=t(23253),w=t(2821);let ConferencesInactiveModal=e=>{let{isOpen:n,onClose:t}=e;return(0,s.jsxs)(w.u_,{isOpen:n,onClose:t,children:[(0,s.jsx)(w.ZA,{}),(0,s.jsxs)(w.hz,{children:[(0,s.jsx)(w.xB,{children:"The Conferences Feature is Not Enabled for this Account Yet."}),(0,s.jsxs)(w.fe,{children:["If you're interested in hosting a conference in Tradewing or learning more about the Conferences feature, contact your Customer Success Manager or reach out to"," ",(0,s.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),(0,s.jsx)(w.mz,{children:(0,s.jsx)(O.zx,{onClick:t,children:"Got it!"})})]})]})},_=a.forwardRef((e,n)=>(0,s.jsxs)(g.sN,{flexDirection:"column",alignItems:"flex-start",...e,ref:n,children:[(0,s.jsx)(d.Kq,{direction:"row",alignItems:"center",children:(0,s.jsx)(d.xv,{children:"Create a Conference"})}),(0,s.jsx)(d.xv,{fontSize:"sm",fontWeight:"normal",lineHeight:"base",children:"Best for a larger event with a schedule of sessions and optional sponsor booths"})]}));_.displayName="CreateConference";let CreationMenu=()=>{let{conferences:e}=(0,L.g)(),n=(0,A.qY)();return(0,s.jsxs)(d.xu,{children:[(0,s.jsxs)(g.v2,{children:[(0,s.jsx)(g.j2,{as:O.zx,rightIcon:(0,s.jsx)(T.v4q,{}),children:"Create an Event"}),(0,s.jsxs)(g.qy,{maxW:"xs",zIndex:"popover",children:[(0,s.jsx)(E(),{href:"/admin/event/new",children:(0,s.jsxs)(g.sN,{flexDirection:"column",alignItems:"flex-start",children:[(0,s.jsx)(d.xv,{children:"Create a Simple Event"}),(0,s.jsx)(d.xv,{fontSize:"sm",fontWeight:"normal",lineHeight:"base",children:"Best for a single-session meeting or recording"})]})}),e?(0,s.jsx)(E(),{href:"/admin/conference/new",children:(0,s.jsx)(_,{})}):(0,s.jsx)(_,{onClick:n.onOpen}),(0,s.jsx)(E(),{href:"/admin/events/xpro/new",children:(0,s.jsxs)(g.sN,{flexDirection:"column",alignItems:"flex-start",children:[(0,s.jsx)(d.xv,{children:"Create an XPro.AI Conference"}),(0,s.jsx)(d.xv,{fontSize:"sm",fontWeight:"normal",lineHeight:"base",children:"Best for a conferences with end-to-end management, from registration to on-site operations and analytics."})]})})]})]}),(0,s.jsx)(ConferencesInactiveModal,{isOpen:n.isOpen,onClose:n.onClose})]})};var P=t(93064),R=(0,t(52609).z)(()=>(0,s.jsx)(i.C,{children:(0,s.jsxs)(r.DY,{maxWidth:"full",mx:"auto",children:[(0,s.jsxs)(r.yG,{justifyContent:"space-between",children:[(0,s.jsx)(r.lm,{size:"md",children:"Events"}),(0,s.jsx)(CreationMenu,{})]}),(0,s.jsx)(r.hb,{children:(0,s.jsx)(AllEvents,{})})]})}),{requiresEvery:[P.lj.ADMIN_ROLE]})}},function(e){e.O(0,[40630,27313,38568,2187,64986,96317,92642,14482,80731,49774,92888,40179],function(){return e(e.s=39201)}),_N_E=e.O()}]); 2//# sourceMappingURL=events-b7b9466da7db8b21.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.