Blame view
imports/client/views/org/app/module/AppLayout.js
1.79 KB
39d8f536d
|
1 2 3 4 5 6 7 |
import _ from 'lodash'; import { Meteor } from 'meteor/meteor'; import React, { Component } from 'react'; import { Link } from 'react-router'; import { Avatar } from '/imports/client/components/Avatar'; import { Icon } from '/imports/client/components/Icon'; import classNames from 'classnames'; |
c4d3e07d0
|
8 9 |
import { EnterModule } from '/imports/client/views/org/enter/module/index'; // import { VerifyModule } from '/imports/client/views/verify/module/index'; |
9fc4b8983
|
10 |
import { Navbar,Modal, Nav, NavItem, |
b02441289
|
11 |
Glyphicon, Collapse, |
9fc4b8983
|
12 13 |
NavbarToggler, NavbarBrand, NavLink, DropdownItem, DropdownToggle, DropdownMenu, |
ca09f1493
|
14 |
NavDropdown, MenuItem, Breadcrumb } from 'react-bootstrap'; |
52c4c75df
|
15 16 |
import { VerifyModule } from '/imports/client/views/verify/module/index' import { AdminAppLayout } from '/imports/client/views/org/admin/AdminLayout' |
b02441289
|
17 |
|
9fc4b8983
|
18 19 |
var Accordion = require('react-bootstrap').Accordion; var Panel = require('react-bootstrap').Panel; |
39d8f536d
|
20 |
export class AppLayout extends Component { |
39d8f536d
|
21 |
render() { |
52c4c75df
|
22 |
const {user, org} = this.props.data; |
39d8f536d
|
23 24 25 |
if(!user) { return ( |
c4d3e07d0
|
26 27 28 29 |
<EnterModule pane = {this.props.location.query.enter} location = {this.props.location} /> |
39d8f536d
|
30 31 |
); } |
b02441289
|
32 33 34 35 36 37 38 39 |
if(!user.isEmailVerified()) { return ( <VerifyModule pane = {this.props.location.query.verify} location = {this.props.location} /> ); } |
52c4c75df
|
40 41 42 43 44 45 46 47 |
if(user.role==='ADMIN'){ return( <AdminAppLayout user = {user} org = {org} /> ); } |
e0cc9d5d7
|
48 |
|
52c4c75df
|
49 50 |
return ( null |
39d8f536d
|
51 52 53 54 |
); }; }; |