{"size": 1908, "ext": "js", "max_stars_repo_path": "src/modules/studySession/ListStudySession.js", "max_stars_repo_name": "phanmduong/ZGroup-react", "max_stars_repo_stars_event_min_datetime": "2017-12-06T14:49:32.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-18T05:16:15.000Z", "max_issues_repo_path": "src/modules/studySession/ListStudySession.js", "max_issues_repo_name": "delta94/keetool-client-react", "max_issues_repo_issues_event_min_datetime": "2020-07-17T11:27:21.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T18:26:51.000Z", "max_forks_repo_path": "src/modules/studySession/ListStudySession.js", "max_forks_repo_name": "delta94/keetool-client-react", "max_forks_repo_forks_event_min_datetime": "2017-12-17T04:12:40.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-19T13:17:46.000Z"}
{"max_stars_count": 2, "max_issues_count": 7, "max_forks_count": 3, "avg_line_length": 34.0714285714, "max_line_length": 78, "alphanum_fraction": 0.4040880503}
import React from 'react';
import ButtonGroupAction from '../../components/common/ButtonGroupAction';
import PropTypes from 'prop-types';

class ListStudySession extends React.Component {
    constructor(props, context) {
        super(props, context);
    }

    render() {
        return (
            <div className="table-responsive">
                <table className="table table-striped">
                    <thead className="text-rose">
                    <tr>
                        <th>Ngày trong tuần</th>
                        <th>Thời gian bắt đầu</th>
                        <th>Thời gian kết thúc</th>
                        <th/>
                    </tr>
                    </thead>
                    <tbody>
                    {this.props.studySessions.map(studySession => {
                        return (
                            <tr key={studySession.id}>
                                <td>{studySession.weekday}</td>
                                <td>{studySession.start_time}</td>
                                <td>{studySession.end_time}</td>
                                <td>
                                    <ButtonGroupAction
                                        delete={this.props.deleteStudySession}
                                        object={studySession}
                                        editUrl=""
                                        edit={this.props.onClickEdit}
                                    />
                                </td>
                            </tr>
                        );
                    })}
                    </tbody>
                </table>
            </div>

        );
    }
}

ListStudySession.propTypes = {
    deleteStudySession: PropTypes.func.isRequired,
    studySessions: PropTypes.array.isRequired,
    onClickEdit: PropTypes.func.isRequired,
};


export default ListStudySession;
