Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #134 from signmeup/hotfix/dont-show-online-students
Browse files Browse the repository at this point in the history
Hotfix: display only online TAs, not students, on queue page
  • Loading branch information
athyuttamre committed Nov 22, 2016
2 parents abb2f38 + 60ce17f commit fbda673
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/imports/ui/components/queue-header/queue-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="name-and-staff">
<h1 class="queue-name display-5 mb-1">{{queue.course.name}} &middot; {{queue.name}}</h1>
<div class="staff float-xs-right">
{{#each ta in onlineStaff}}
{{#each ta in (onlineStaff queue)}}
{{> ProfilePic user=ta}}
{{/each}}
</div>
Expand Down
10 changes: 6 additions & 4 deletions app/imports/ui/components/queue-header/queue-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ Template.QueueHeader.helpers({
ticketCount,
scheduledEndTime,

onlineStaff() {
const staff = Meteor.users.find({
onlineStaff(queue) {
const staff = queue.course().staff().fetch();
const onlineStaff = Meteor.users.find({
_id: { $in: staff.map((user) => { return user._id; }) },
'status.online': true,
}).fetch();
});

const online = [];
const idle = [];
staff.forEach((user) => {
onlineStaff.forEach((user) => {
if (user.status.idle) {
idle.push(user);
} else {
Expand Down

0 comments on commit fbda673

Please sign in to comment.