import _ from 'lodash'; import { Meteor } from 'meteor/meteor'; import React, { Component } from 'react'; import { Link,browserHistory } from 'react-router'; import { FormGroup,Panel,Table, ButtonToolbar,Modal, FormControl,Glyphicon,Button } from 'react-bootstrap'; import { AddStudentForm } from './addStudentForm'; import {moment} from 'meteor/momentjs:moment' export class StudentTable extends Component { constructor(props) { super(props); this.state = { show: false }; this.onUpdate = this.onUpdate.bind(this); }; onUpdate(key, value) { this.setState({[key]: value}); }; render() { return (
Student Details
{ this.props.students.map(function(student, i) { return( ) }) }
First Name Last Name Class DOB Status Actions
{student.firstName} {student.lastName} {student.class} {student.dob? moment(student.dob).format("LL") : } Active
); }; };