<commit_before>'use strict';

import React from 'react';
import Modal from '../global/modal.jsx';
import Table from './table.jsx';

const DistrictCard =  React.createClass({
 
    toggleModal() {
        const state = this.state.modalOpen;
        this.setState({ modalOpen: !state});
    },
    getInitialState: function(){
        return {
           modalOpen: false
         };
    },
    render: function(){
        return (
            <div className="pure-u pure-u-6-24">
                <div className="card">
                    <div className="card-top">
                        <div className="card-head">{this.props.data.block_name}</div>
                        <div className="card-designation">{this.props.data.block_code}</div>
                    </div>
                    <div className="card-numbers pure-g">
                        <div className="pure-u pure-u-12-24 ">
                            <div className="card-number-sub">{this.props.translation.current}</div>
                            <div>{this.props.data.current_total}</div>
                        </div>
                        <div className="pure-u pure-u-12-24 ">
                            <div className="card-number-sub">{this.props.translation.delayed}</div>
                            <div>{this.props.data.delayed_total}</div>
                        </div>
                    </div>
                    <h4 className="card-officer-title">{this.props.translation.officers}</h4>
                    {
                        this.props.data.officers.map(function(officer, i) {
                            return (
                               <div className="card-officer">
                                    <div>{officer.name}</div>
                                    <div className="card-officer-sub">
                                        {officer.designation}
                                        <span className="u-pull-right">{officer.mobile}</span>
                                    </div>
                               </div>
                            );
                        })
                    }
                    <button className="button button--primary" onClick={this.toggleModal}>{ this.props.translation.muster_details}</button>
                </div>
            </div>
        ); 
    }
});


export default DistrictCard;<commit_msg>Add modal on district card<commit_after>'use strict';

import React from 'react';
import Modal from '../global/modal.jsx';
import Table from './table.jsx';

const DistrictCard =  React.createClass({
 
    toggleModal() {
        const state = this.state.modalOpen;
        this.setState({ modalOpen: !state});
    },
    getInitialState: function(){
        return {
           modalOpen: false
         };
    },
    render: function(){
        return (
            <div className="pure-u pure-u-6-24">
                <div className="card">
                    <div className="card-top">
                        <div className="card-head">{this.props.data.block_name}</div>
                        <div className="card-designation">{this.props.data.block_code}</div>
                    </div>
                    <div className="card-numbers pure-g">
                        <div className="pure-u pure-u-12-24 ">
                            <div className="card-number-sub">{this.props.translation.current}</div>
                            <div>{this.props.data.current_total}</div>
                        </div>
                        <div className="pure-u pure-u-12-24 ">
                            <div className="card-number-sub">{this.props.translation.delayed}</div>
                            <div>{this.props.data.delayed_total}</div>
                        </div>
                    </div>
                    <h4 className="card-officer-title">{this.props.translation.officers}</h4>
                    {
                        this.props.data.officers.map(function(officer, i) {
                            return (
                               <div className="card-officer">
                                    <div>{officer.name}</div>
                                    <div className="card-officer-sub">
                                        {officer.designation}
                                        <span className="u-pull-right">{officer.mobile}</span>
                                    </div>
                               </div>
                            );
                        })
                    }
                    <button className="button button--primary" onClick={this.toggleModal}>{this.props.translation.muster_details}</button>
                    <Modal show={ this.state.modalOpen } onClose={this.toggleModal}>  
                        
                    </Modal>
                </div>
            </div>
        ); 
    }
});


export default DistrictCard;
{'fraction_non_alphanumeric': 0.1252805549887778, 'fraction_numerical': 0.005305039787798408, 'mean_word_length': 1.1211596711380354, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2362659', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1150, 'n_words': 181}