2019-02-27 01:08:15 +08:00
|
|
|
import React, { PureComponent } from 'react';
|
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import Auth from '/imports/ui/services/auth';
|
|
|
|
import GuestUsers from '/imports/api/guest-users/';
|
|
|
|
import Service from './service';
|
|
|
|
import WaitingComponent from './component';
|
|
|
|
|
|
|
|
class WaitingContainer extends PureComponent {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<WaitingComponent {...this.props} />
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default withTracker(() => {
|
2019-04-04 04:11:47 +08:00
|
|
|
const guestUsers = GuestUsers.find({
|
2019-02-27 01:08:15 +08:00
|
|
|
meetingId: Auth.meetingID,
|
|
|
|
guest: true,
|
|
|
|
approved: false,
|
|
|
|
denied: false,
|
|
|
|
}).fetch();
|
|
|
|
|
|
|
|
|
|
|
|
const authenticatedUsers = GuestUsers.find({
|
|
|
|
meetingId: Auth.meetingID,
|
|
|
|
authenticated: true,
|
|
|
|
guest: false,
|
|
|
|
approved: false,
|
|
|
|
denied: false,
|
|
|
|
}).fetch();
|
|
|
|
|
|
|
|
return {
|
|
|
|
guestUsers,
|
|
|
|
authenticatedUsers,
|
|
|
|
guestUsersCall: Service.guestUsersCall,
|
2019-04-04 04:11:47 +08:00
|
|
|
changeGuestPolicy: Service.changeGuestPolicy,
|
2019-02-27 01:08:15 +08:00
|
|
|
};
|
|
|
|
})(WaitingContainer);
|