<commit_before>﻿import React from "react";
import ReactDOM from "react-dom";
import axios from "axios";
import Pusher from "pusher-js";
import GoogleMap from 'google-map-react';

import 'bootstrap/dist/css/bootstrap.css';
import '../../Styles/site.css';

var eventData = {
    name : "<NAME>",
    desc : "Po roce se zase shledame, dame neco dobryho k jidlu a piti a poprejeme Pavlovi k jeho 25. narozkam.",
    people : ["<EMAIL>", "<EMAIL>"],
    dates: [
        {
            value: "2. 3. 2016",
            hours: ["8:00","9:00", "10:00"]
        },
        {
            value: "2. 4. 2019",
            hours: ["10:00", "11:00"]
        }
    ],
    places: [{ lat: 59.938043, lng: 30.337157 }, { lat: 59.938, lng: 30.33 }]
}


class BasicInfoBlock extends React.Component {
    render(){
        return(
                <form className="form-horizontal">
                    <div className="form-group">
                        <label htmlFor="eventName" className="col-sm-2 control-label">Name</label>
                        <div className="col-sm-10">
                        <input type="text" id="eventName" className="form-control" placeholder="Event name" value={eventData.name}/>
                        </div>
                    </div>
                    <div className="form-group">
                        <label htmlFor="eventDesc" className="col-sm-2 control-label">Description</label>
                        <div className="col-sm-10">
                        <textarea id="eventDesc" className="form-control" rows="3">{eventData.desc}</textarea>
                        </div>
                    </div>
                    <div className="form-group">
                        <div className="col-sm-offset-2 col-sm-10">
                        <button type="submit" className="btn btn-default">Save event</button>
                        </div>
                    </div>
                </form>
            );
    }
}


class PeopleRows extends React.Component {
    render() {
        var rows = [];
        var count = 0;
        eventData.people.forEach(function (row)
        {
            var rowId = "personEmail" + count;
            rows.push
            (
                    <div className="form-group">
                        <label htmlFor={rowId} className="col-sm-2 control-label">Person's email</label>
                        <div className="col-sm-10">
                            <input type="email" id={rowId} className="form-control" value={row} />
                        </div>
                    </div>
            );
            count++;
        });

     
        return (
        <div>
            <div className="form-group">
                <label htmlFor="personEmail0" className="col-sm-2 control-label">Person's email</label>
                <div className="col-sm-10">
                <input type="email" id="personEmail0" className="form-control" placeholder="<EMAIL>" />
                </div>
            </div>
            {rows}
        </div>
        );
    }
}

class PeopleBlock extends React.Component {
    render(){
        return(
            <form className="form-horizontal">
                <button type="button" className="btn btn-default">Add people</button>
                <PeopleRows/>
            </form>
        );
    }
}

class DateTimeBlock extends React.Component{
    render(){
        var row = "12/27/2016";
        return(
                <form className="form-horizontal">
                    <button type="button" className="btn btn-default">Add date</button>
                    <div className="form-group">
                        <label htmlFor="eventDate0" className="col-sm-2 control-label">Datetime</label>
                        <div className="col-sm-10">
                        <input type="datetime-local" id="eventDate0" className="form-control" value={row}/>
                        </div>
                    </div>
                </form>
        );
    }
}

class EventEditLayout extends React.Component {
    render() {
        var center = { lat: 59.938043, lng: 30.337157 };
        var zoom = 9;

        let styles = {
                panel: {
                border: "solid #f1f1f1",
                borderWidth: "1 1px",
                borderRadius: "8px",

                padding: "15px"
                }
        }

        return (
            <div>

            <h2>Basic information</h2>
                <div style={styles.panel} >
                <BasicInfoBlock/>
                </div>
            <h2>People</h2><commit_msg>wip mock data edit event<commit_after>﻿import React from "react";
import ReactDOM from "react-dom";
import axios from "axios";
import Pusher from "pusher-js";
import GoogleMap from 'google-map-react';

import 'bootstrap/dist/css/bootstrap.css';
import '../../Styles/site.css';

var eventData = {
    name : "<NAME>",
    desc : "Po roce se zase shledame, dame neco dobryho k jidlu a piti a poprejeme Pavlovi k jeho 25. narozkam.",
    people : ["<EMAIL>", "<EMAIL>"],
    dates: [
        {
            value: "2. 3. 2016",
            hours: ["8:00","9:00", "10:00"]
        },
        {
            value: "2. 4. 2019",
            hours: ["10:00", "11:00"]
        }
    ],
    places: [{ lat: 59.938043, lng: 30.337157 }, { lat: 59.938, lng: 30.33 }]
}


class BasicInfoBlock extends React.Component {
    render(){
        return(
                <form className="form-horizontal">
                    <div className="form-group">
                        <label htmlFor="eventName" className="col-sm-2 control-label">Name</label>
                        <div className="col-sm-10">
                        <input type="text" id="eventName" className="form-control" placeholder="Event name" defaultValue={eventData.name}/>
                        </div>
                    </div>
                    <div className="form-group">
                        <label htmlFor="eventDesc" className="col-sm-2 control-label">Description</label>
                        <div className="col-sm-10">
                        <textarea id="eventDesc" className="form-control" rows="3" defaultValue={eventData.desc}></textarea>
                        </div>
                    </div>
                    <div className="form-group">
                        <div className="col-sm-offset-2 col-sm-10">
                        <button type="submit" className="btn btn-default">Save event</button>
                        </div>
                    </div>
                </form>
            );
    }
}


class PeopleRows extends React.Component {
    render() {
        var rows = [];
        var count = 1;
        eventData.people.forEach(function (row)
        {
            var rowId = "personEmail" + count;
            rows.push
            (
                    <div className="form-group">
                        <label htmlFor={rowId} className="col-sm-2 control-label">Person's email</label>
                        <div className="col-sm-10">
                            <input type="email" id={rowId} className="form-control" value={row} />
                        </div>
                    </div>
            );
            count++;
        });

     
        return (
        <div>
            <div className="form-group">
                <label htmlFor="personEmail0" className="col-sm-2 control-label">Person's email</label>
                <div className="col-sm-10">
                <input type="email" id="personEmail0" className="form-control" placeholder="<EMAIL>" />
                </div>
            </div>
            {rows}
        </div>
        );
    }
}

class PeopleBlock extends React.Component {
    render(){
        return(
            <form className="form-horizontal">
                <button type="button" className="btn btn-default">Add people</button>
                <PeopleRows/>
            </form>
        );
    }
}

class DateTimeBlock extends React.Component{
    render(){
        //var row = new Date("2016-12-30T20:40:00Z").toISOString();
        var row = new Date("2016-12-30 20:40:00").toISOString();
        return(
                <form className="form-horizontal">
                    <button type="button" className="btn btn-default">Add date</button>
                    <div className="form-group">
                        <label htmlFor="eventDate0" className="col-sm-2 control-label">Datetime</label>
                        <div className="col-sm-10">
                        <input type="datetime-local" id="eventDate0" className="form-control" defaultValue={row}/>
                        </div>
                    </div>
                </form>
        );
    }
}

class EventEditLayout extends React.Component {
    render() {
        var center = { lat: 59.938043, lng: 30.337157 };
        var zoom = 9;

        let styles = {
                panel: {
                border: "solid #f1f1f1",
                borderWidth: "1 1px",
                borderRadius: "8px",

                padding: "15px"
                }
        }

        return (
            <div>

            <h2>Basic information</h2>
                <div style={styles.panel} >
                <BasicInfoBlock/>
                </div>
            <h2>People</h2>
{'fraction_non_alphanumeric': 0.13657006920415224, 'fraction_numerical': 0.02768166089965398, 'mean_word_length': 1.3967349054159108, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 137, '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': '1359933', 'n_tokens_mistral': 2703, 'n_tokens_neox': 2458, 'n_words': 538}