1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[466],{10466:function(e,t,n){n.r(t),n.d(t,{default:function(){return K}});var a=n(20641),s=n(90033);const i={class:"my-events-shell"},o={class:"my-events-container"},r={class:"my-events-header mb-5"},l={class:"my-events-header-row"},p={class:"my-events-header-text"},v={class:"title is-4 mb-1"},d={key:0,class:"has-text-grey is-size-7"},c=["aria-label","title"],h={class:"my-events-profile-btn-avatar"},m={class:"my-events-profile-btn-label"},u=["aria-label"],g={class:"my-events-skeleton-date"},f={class:"my-events-skeleton-info"},y={class:"my-events-skeleton-meta"},k={key:1,class:"card p-5 has-text-centered"},E={class:"has-text-grey"},b={class:"is-size-7 has-text-grey mt-2"},L={key:2},A={class:"my-events-tenant-header mb-3"},C=["src","alt"],S={key:1,class:"my-events-tenant-name"},x={class:"my-events-footer is-size-7 mt-6"},P={class:"my-events-footer-text"};function $(e,t,n,$,w,N){const T=(0,a.g2)("LogoThumbnail"),X=(0,a.g2)("font-awesome-icon"),I=(0,a.g2)("b-skeleton"),_=(0,a.g2)("EventListCard"),F=(0,a.g2)("EventAppOnboardingSplash");return(0,a.uX)(),(0,a.CE)("div",i,[(0,a.Lk)("div",o,[(0,a.Lk)("header",r,[(0,a.Lk)("div",l,[(0,a.Lk)("div",p,[(0,a.Lk)("h1",v,(0,s.v_)(e.$t("My events")),1),w.verifiedEmail?((0,a.uX)(),(0,a.CE)("p",d,[(0,a.eW)((0,s.v_)(e.$t("Signed in as"))+" ",1),(0,a.Lk)("strong",null,(0,s.v_)(w.verifiedEmail),1)])):(0,a.Q3)("",!0)]),"contact"===w.principalKind?((0,a.uX)(),(0,a.CE)("button",{key:0,type:"button",class:"my-events-profile-btn","aria-label":e.$t("My profile"),title:e.$t("My profile"),onClick:t[0]||(t[0]=(...e)=>N.goToProfile&&N.goToProfile(...e))},[(0,a.Lk)("span",h,[N.profileAvatarItem?((0,a.uX)(),(0,a.Wv)(T,{key:0,item:N.profileAvatarItem,"is-type":"roundSmall"},null,8,["item"])):((0,a.uX)(),(0,a.Wv)(X,{key:1,icon:"fa-light fa-user"}))]),(0,a.Lk)("span",m,(0,s.v_)(e.$t("My profile")),1)],8,c)):(0,a.Q3)("",!0)])]),w.isLoading?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"my-events-skeleton","aria-busy":"true","aria-label":e.$t("Loading your events...")},[((0,a.uX)(),(0,a.CE)(a.FK,null,(0,a.pI)(2,e=>(0,a.Lk)("div",{key:"sk-card-"+e,class:"card my-events-skeleton-card"},[(0,a.Lk)("div",g,[(0,a.bF)(I,{width:"32px",height:"11px",animated:""}),(0,a.bF)(I,{width:"36px",height:"28px",animated:""}),(0,a.bF)(I,{width:"28px",height:"11px",animated:""})]),(0,a.Lk)("div",f,[(0,a.bF)(I,{width:"70%",height:"20px",animated:""}),(0,a.Lk)("div",y,[(0,a.bF)(I,{width:"90px",height:"13px",animated:""}),(0,a.bF)(I,{width:"70px",height:"13px",animated:""})]),(0,a.bF)(I,{width:"56px",height:"20px",animated:""})]),(0,a.bF)(I,{width:"108px",height:"108px",rounded:!1,animated:"",class:"my-events-skeleton-cover"})])),64))],8,u)):N.groupedEvents.length?((0,a.uX)(),(0,a.CE)("div",L,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(N.groupedEvents,e=>((0,a.uX)(),(0,a.CE)("div",{key:e.tenantId,class:"my-events-tenant mb-6"},[(0,a.Lk)("div",A,[e.tenantLogo?((0,a.uX)(),(0,a.CE)("img",{key:0,src:N.logoPublicUrl(e.tenantLogo,"tenant"),alt:e.tenantName,class:"my-events-tenant-logo"},null,8,C)):((0,a.uX)(),(0,a.CE)("span",S,(0,s.v_)(e.tenantName),1))]),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.events,e=>((0,a.uX)(),(0,a.Wv)(_,{key:e.eventAttendId,event:N.toCardEvent(e),"cover-media-path":"event_public",onClick:t=>N.openEvent(e)},null,8,["event","onClick"]))),128))]))),128)),(0,a.Lk)("footer",x,[(0,a.Lk)("span",P,(0,s.v_)(e.$t("Community platform powered by")),1),t[1]||(t[1]=(0,a.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer",class:"my-events-footer-link"},[(0,a.Lk)("strong",null,"Orgo")],-1))])])):((0,a.uX)(),(0,a.CE)("div",k,[(0,a.Lk)("p",E,(0,s.v_)(e.$t("No events registered to your email yet.")),1),(0,a.Lk)("p",b,(0,s.v_)(e.$t("When you are invited to an event, it will appear here.")),1)]))]),N.showOnboardingSplash?((0,a.uX)(),(0,a.Wv)(F,{key:0,onGoToProfile:N.onSplashGoToProfile},null,8,["onGoToProfile"])):(0,a.Q3)("",!0)])}n(44114);var w=n(40834),N=n(20537),T=n(10858),X=n(31823),I=n(95256),_={name:"EventAppMyEvents",components:{EventListCard:N.A,EventAppOnboardingSplash:T.A,LogoThumbnail:X.A},data(){return{isLoading:!1,verifiedEmail:null,events:[],principalKind:null,prefEventAppOnboardingSeen:!0}},computed:{...(0,w.L8)(["user"]),showOnboardingSplash(){return"contact"===this.principalKind&&!this.prefEventAppOnboardingSeen},profileAvatarItem(){if(!this.user)return null;
1const e=[this.user.firstName,this.user.lastName].filter(Boolean).join(" ");return{...this.user,"@type":"Contact",name:e}},groupedEvents(){const e=new Map;for(const t of this.events){const n=t.tenant.id;e.has(n)||e.set(n,{tenantId:n,tenantSlug:t.tenant.slug,tenantName:t.tenant.name,tenantLogo:t.tenant.logo,events:[]}),e.get(n).events.push(t)}return Array.from(e.values())}},created(){const e=this.$store.state.currentUser;let t=null;try{t=sessionStorage.getItem("eventApp.tenantSlug")}catch(n){}e&&e.id&&"contact"!==e.kind&&!t?this.$router.replace({name:"Dashboard"}):(this.bootstrapContactIfNeeded(),this.fetchEvents())},methods:{logoPublicUrl:I.YV,bootstrapContactIfNeeded(){const e=this.$store.state.currentUser;e&&e.id&&"contact"===e.kind||this.$http.plain.get("/event-app/me").then(e=>{const t=e.data||{};"contact"===t.kind&&(t.tenant&&this.$store.commit("setTenant",t.tenant),this.$store.commit("setCurrentUser",{id:t.id,firstName:t.firstName,lastName:t.lastName,name:[t.firstName,t.lastName].filter(Boolean).join(" "),email:t.email,phoneNumber:t.phoneNumber,logo:t.logo,professionHeadline:t.professionHeadline,kind:"contact","@type":"Contact",userRoles:[],notificationSettings:{},isEventAppPhonePrivate:!!t.isEventAppPhonePrivate,isEventAppEmailPrivate:!!t.isEventAppEmailPrivate,isEventAppProfilePublic:!1!==t.isEventAppProfilePublic,prefEventAppOnboardingSeen:!!t.prefEventAppOnboardingSeen}))}).catch(e=>{console.log(e)})},fetchEvents(){this.isLoading=!0,this.$http.plain.get("/event-app/my-events-legacy").then(e=>{this.verifiedEmail=e.data.verifiedEmail,this.events=e.data.events??[];const t=e.data.principal||{};this.principalKind=t.kind||null,this.prefEventAppOnboardingSeen=!1!==t.prefEventAppOnboardingSeen}).catch(e=>{console.log(e);const t=e?.response?.status;401!==t&&403!==t||this.$router.push({name:"Login"})}).finally(()=>{this.isLoading=!1})},toCardEvent(e){return{id:e.event.id,name:e.event.name,dateTimeBegin:e.event.dateStart,dateTimeEnd:e.event.dateEnd,location:e.event.location,logo:e.event.logo}},openEvent(e){const t=(()=>{try{return sessionStorage.getItem("eventApp.tenantSlug")}catch(e){return null}})(),n=e.tenant.slug;t!==n?this.$http.plain.post("/event-app/session/"+n).then(()=>{try{sessionStorage.setItem("eventApp.tenantSlug",n)}catch(t){}this.navigateToEvent(e)}).catch(e=>{console.log(e),this.fetchEvents()}):this.navigateToEvent(e)},navigateToEvent(e){this.$router.push({name:"EventAppAgenda",params:{item:e.event.uuid}})},onSplashGoToProfile(){this.goToProfile()},goToProfile(){this.$router.push({name:"EventAppContactProfile"})}}},F=n(66262);const O=(0,F.A)(_,[["render",$],["__scopeId","data-v-674d6eab"]]);var K=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.