Blame view

imports/client/views/org/app/module/AdminAppLayout.js 1.79 KB
39d8f536d   Deepak   some more cleamup
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   Deepak   added login/reset...
8
9
  import { EnterModule }                    from '/imports/client/views/org/enter/module/index';
  // import { VerifyModule }                   from '/imports/client/views/verify/module/index';
9fc4b8983   anuj_thakur   navigation intigr...
10
  import { Navbar,Modal, Nav, NavItem,
b02441289   Deepak   added verify module
11
    Glyphicon, Collapse,
9fc4b8983   anuj_thakur   navigation intigr...
12
13
    NavbarToggler, NavbarBrand,
    NavLink, DropdownItem, DropdownToggle, DropdownMenu,
bdd4abb61   Deepak   some cleanup
14
    NavDropdown, MenuItem, Breadcrumb }     from 'react-bootstrap';
52c4c75df   Deepak   fixed admin compo...
15
  import { VerifyModule }                   from '/imports/client/views/verify/module/index'
d532f2f02   Deepak   made changes in r...
16
  import { AdminModule }                    from '/imports/client/views/org/admin/app/Index'
b02441289   Deepak   added verify module
17

9fc4b8983   anuj_thakur   navigation intigr...
18
19
  var Accordion = require('react-bootstrap').Accordion;
  var Panel = require('react-bootstrap').Panel;
d532f2f02   Deepak   made changes in r...
20
  export class AdminAppLayout extends Component {
39d8f536d   Deepak   some more cleamup
21

39d8f536d   Deepak   some more cleamup
22
    render() {
52c4c75df   Deepak   fixed admin compo...
23
      const {user, org} = this.props.data;
39d8f536d   Deepak   some more cleamup
24
25
      if(!user) {
        return (
c4d3e07d0   Deepak   added login/reset...
26
27
28
29
          <EnterModule
            pane      = {this.props.location.query.enter}
            location  = {this.props.location}
          />
39d8f536d   Deepak   some more cleamup
30
        );
bdd4abb61   Deepak   some cleanup
31
      }else if(!user.isEmailVerified()) {
b02441289   Deepak   added verify module
32
33
34
35
36
37
        return (
          <VerifyModule
            pane      = {this.props.location.query.verify}
            location  = {this.props.location}
          />
        );
bdd4abb61   Deepak   some cleanup
38
      }else if(user.role==='ADMIN'){
52c4c75df   Deepak   fixed admin compo...
39
          return(
d532f2f02   Deepak   made changes in r...
40
            <AdminModule
52c4c75df   Deepak   fixed admin compo...
41
42
43
44
              user = {user}
              org = {org}
            />
          );
bdd4abb61   Deepak   some cleanup
45
46
47
48
      }else{
        return (
          null
        );
52c4c75df   Deepak   fixed admin compo...
49
      }
39d8f536d   Deepak   some more cleamup
50
51
52
    };
  
  };