Skip to content

Commit

Permalink
feature-9065: Track when attendees login and join an event virtually …
Browse files Browse the repository at this point in the history
…in CSV (#9138)
  • Loading branch information
nnhathung committed Sep 12, 2023
1 parent 0cbe4fd commit d2861b9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/components/public/stream/join-video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default class JoinVideo extends Component<Args> {
openPanel(): void {
if (this.args.canAccess) {
this.args.showSidePanel?.();
this.eventCheckIn(this.args.event.identifier)
this.router.transitionTo({ queryParams: { side_panel: true } });
} else {
if (this.session.isAuthenticated) {
Expand All @@ -35,4 +36,16 @@ export default class JoinVideo extends Component<Args> {
}
}
}

async eventCheckIn(event_identifier: string) {
try {
const data:any = {
'check_in_type' : 'event',
'is_check_in' : true
};
await this.loader.post(`events/${event_identifier}/virtual/check-in`, data);
} catch (e) {
// Ignore error to prevent stackoverflow
}
}
}
17 changes: 17 additions & 0 deletions app/components/public/stream/video-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,28 @@ export default class PublicStreamVideoStream extends Component<Args> {
this.selectingLanguage.setName(null);
}
this.selectingLanguage.setTranslationRoomId(stream.id)
this.eventCheckIn(this.args.event.identifier, stream.microlocationId)
}

@action
hideStreamYard() {
this.selectingLanguage.setStreamYardVisibility(false);
}

async eventCheckIn(event_identifier: string, microlocation_id: number) {
try {
const data:any = {
'check_in_type' : 'room',
microlocation_id,
'is_check_in' : true
};
if (microlocation_id === undefined) {
data.check_in_type = 'virtual-room'
}
await this.loader.post(`events/${event_identifier}/virtual/check-in`, data);
} catch (e) {
// Ignore error to prevent stackoverflow
}
}

}

0 comments on commit d2861b9

Please sign in to comment.