<commit_before>var React = require('react');
var VolunteerRow = require('../VolunteerRow/VolunteerRow.js');

module.exports = React.createClass({
    meetsFilters:function(volunteer){
        return !this.props.filters.filterText || volunteer.firstName.indexOf(this.props.filters.filterText)!==-1;},
    render: function () {
       // var that=this;
        var rows = this.props.volunteers.
        filter( (volunteer)=> {return this.meetsFilters(volunteer);}).
        map(function (volunteer) { return (<VolunteerRow volunteer={volunteer} />)});
        return (
            <div className="table-component col-xs-12">
                <table className="table table-striped table-hover">
                    <thead>
                        <tr>
                            <th>Profile ID</th>
                            <th>Email</th>
                            <th>First Name</th>
                            <th>Last Name</th>
                            <th>Department</th>
                            <th>Role</th>
                            <th>Volunteer Type</th>
                            <th>Production</th>
                            <th>Phone</th>
                            <th>Got ticket</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        {rows}
                    </tbody>
                </table><commit_msg>search user first name last name or email<commit_after>var React = require('react');
var VolunteerRow = require('../VolunteerRow/VolunteerRow.js');

module.exports = React.createClass({
    meetsFilters:function(volunteer){
        let txt= this.props.filters.filterText.toLowerCase();
        return !txt
        || volunteer.firstName.toLowerCase().indexOf(txt)!==-1
        || volunteer.lastName.toLowerCase().indexOf(txt)!==-1
        || volunteer.email.toLowerCase().indexOf(txt)!==-1
        ;},
    render: function () {
       // var that=this;
        var rows = this.props.volunteers.
        filter( (volunteer)=> {return this.meetsFilters(volunteer);}).
        map(function (volunteer) { return (<VolunteerRow volunteer={volunteer} />)});
        return (
            <div className="table-component col-xs-12">
                <table className="table table-striped table-hover">
                    <thead>
                        <tr>
                            <th>Profile ID</th>
                            <th>Email</th>
                            <th>First Name</th>
                            <th>Last Name</th>
                            <th>Department</th>
                            <th>Role</th>
                            <th>Volunteer Type</th>
                            <th>Production</th>
                            <th>Phone</th>
                            <th>Got ticket</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        {rows}
                    </tbody>
                </table>
{'fraction_non_alphanumeric': 0.12719583604424203, 'fraction_numerical': 0.002602472348731295, 'mean_word_length': 1.179305457122608, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '970876', 'n_tokens_mistral': 806, 'n_tokens_neox': 781, 'n_words': 131}