Code coverage report for src/components/student-dashboard/dashboard.cjsx

Statements: 95.83% (23 / 24)      Branches: 100% (0 / 0)      Functions: 66.67% (2 / 3)      Lines: 95.83% (23 / 24)      Ignored: none     

All files » src/components/student-dashboard/ » dashboard.cjsx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97                                                                     21× 21× 21× 21× 21×                                                                                
var AllEventsByWeek, BS, BrowseTheBook, CourseDataMixin, CourseStore, DontForgetPanel, EmptyPanel, PracticeButton, ProgressGuideShell, React, StudentDashboardStore, ThisWeekPanel, UpcomingPanel, _, moment;
 
React = require('react');
 
BS = require('react-bootstrap');
 
moment = require('moment');
 
_ = require('underscore');
 
DontForgetPanel = require('./dont-forget-panel');
 
EmptyPanel = require('./empty-panel');
 
UpcomingPanel = require('./upcoming-panel');
 
AllEventsByWeek = require('./all-events-by-week');
 
ThisWeekPanel = require('./this-week-panel');
 
PracticeButton = require('../buttons/practice-button');
 
ProgressGuideShell = require('./progress-guide');
 
BrowseTheBook = require('../buttons/browse-the-book');
 
CourseDataMixin = require('../course-data-mixin');
 
StudentDashboardStore = require('../../flux/student-dashboard').StudentDashboardStore;
 
CourseStore = require('../../flux/course').CourseStore;
 
module.exports = React.createClass({
  displayName: 'StudentDashboard',
  propTypes: {
    courseId: React.PropTypes.string.isRequired
  },
  mixins: [CourseDataMixin],
  contextTypes: {
    router: React.PropTypes.func
  },
  getInitialState: function() {
    return {
      selectedTabIndex: 1
    };
  },
  selectTab: function(index) {
    return this.setState({
      selectedTabIndex: index
    });
  },
  render: function() {
    var courseDataProps, courseId, info;
    courseId = this.props.courseId;
    courseDataProps = this.getCourseDataProps(courseId);
    info = StudentDashboardStore.get(courseId);
    return React.createElement("div", React.__spread({}, courseDataProps, {
      "className": "tutor-booksplash-background"
    }), React.createElement("div", {
      "className": 'container'
    }, React.createElement(BS.Row, null, React.createElement(BS.Col, {
      "xs": 12,
      "md": 8,
      "lg": 9
    }, React.createElement(BS.TabbedArea, {
      "activeKey": this.state.selectedTabIndex,
      "onSelect": this.selectTab,
      "animation": false
    }, React.createElement(BS.TabPane, {
      "eventKey": 1.,
      "tab": 'This Week'
    }, React.createElement(ThisWeekPanel, {
      "courseId": courseId
    }), React.createElement(UpcomingPanel, {
      "courseId": courseId
    })), React.createElement(BS.TabPane, {
      "eventKey": 2.,
      "tab": 'All Past Work'
    }, React.createElement(AllEventsByWeek, {
      "courseId": courseId
    })))), React.createElement(BS.Col, {
      "xs": 12,
      "md": 4,
      "lg": 3
    }, React.createElement(ProgressGuideShell, {
      "courseId": courseId,
      "sampleSizeThreshold": 3
    }), React.createElement("div", {
      "className": 'actions-box'
    }, React.createElement(BrowseTheBook, {
      "unstyled": true,
      "courseId": courseId
    }, React.createElement("div", null, "Browse the Book")))))));
  }
});