﻿import React, { memo } from 'react';
import { withRouter } from "react-router-dom";

//componentes
import CajaTRexto from '../../../../components/UI/cajaTexto/cajaTexto.jsx';
import CajaTextoBusqueda from '../../../../components/UI/cajaTexto/cajaTextoBusqueda.jsx';
import CheckBox from '../../../../components/UI/checkBox/checkBox.jsx';

function tabAutoGestion(props) {

    const { Datos, id, labelledby, } = props;
    return (
        <>
            <div className="content-box box-secondary">
                <div className="row">
                    <div className="col-md-12">
                        <div className="row">
                            <CajaTextoBusqueda col="4" id="ReportarA" type="text" label={Datos.ReportarA.attributes.label} value={Datos.ReportarA.value} attributes={Datos.ReportarA.attributes} onChangeInput={props.onChangeInputEmp} onClick={() => props.handleModalEmp('ReportarA')} onKeyPress={props.onKeyPressEmp} onBlur={() => props.onBlurEmpl("ReportarA")} />
                            <CajaTRexto col="8" id="ReportarANombre" type="text" label={Datos.ReportarANombre.attributes.label} value={Datos.ReportarANombre.value} attributes={Datos.ReportarANombre.attributes} onChangeInput={() => { }} />
                        </div>
                        <div className='row'>
                            <CajaTextoBusqueda col="4" id="ReportaAJefe" type="text" label={Datos.ReportaAJefe.attributes.label} value={Datos.ReportaAJefe.value} attributes={Datos.ReportaAJefe.attributes} onChangeInput={props.onChangeInputEmp} onClick={() => props.handleModalEmp('ReportaAJefe')} onKeyPress={props.onKeyPressEmp} onBlur={() => props.onBlurEmpl('ReportaAJefe')} />
                            <CajaTRexto col="8" id="ReportaAJefeNombre" type="text" label={Datos.ReportaAJefeNombre.attributes.label} value={Datos.ReportaAJefeNombre.value} attributes={Datos.ReportaAJefeNombre.attributes} onChangeInput={() => { }} />
                        </div>

                        <div className="row">
                            <CajaTextoBusqueda col="4" id="ReportarA2" type="text" label={Datos.ReportarA2.attributes.label} value={Datos.ReportarA2.value} attributes={Datos.ReportarA2.attributes} onChangeInput={props.onChangeInputEmp} onClick={() => props.handleModalEmp('ReportarA2')} onKeyPress={props.onKeyPressEmp} onBlur={() => props.onBlurEmpl("ReportarA2")} />
                            <CajaTRexto col="8" id="ReportarANombre2" type="text" label={Datos.ReportarANombre2.attributes.label} value={Datos.ReportarANombre2.value} attributes={Datos.ReportarANombre2.attributes} onChangeInput={() => { }} />
                        </div>
                        <div className='row'>
                            <CajaTextoBusqueda col="4" id="ReportaAJefe2" type="text" label={Datos.ReportaAJefe2.attributes.label} value={Datos.ReportaAJefe2.value} attributes={Datos.ReportaAJefe2.attributes} onChangeInput={props.onChangeInputEmp} onClick={() => props.handleModalEmp('ReportaAJefe2')} onKeyPress={props.onKeyPressEmp} onBlur={() => props.onBlurEmpl('ReportaAJefe2')} />
                            <CajaTRexto col="8" id="ReportaAJefeNombre2" type="text" label={Datos.ReportaAJefeNombre2.attributes.label} value={Datos.ReportaAJefeNombre2.value} attributes={Datos.ReportaAJefeNombre2.attributes} onChangeInput={() => { }} />
                        </div>
                        <div className="row">
                            <CheckBox id='ApruebaAcciones' col="4" attributes={Datos.ApruebaAcciones.attributes} value={Datos.ApruebaAcciones.value} label={Datos.ApruebaAcciones.attributes.label} onChange={props.handleCheckBoxAA} />
                            <CheckBox id='EstadoUsuarioAutogestion' col="4" attributes={Datos.EstadoUsuarioAutogestion.attributes} value={Datos.EstadoUsuarioAutogestion.value} label={Datos.EstadoUsuarioAutogestion.attributes.label} onChange={props.handleCheckBoxEUA} />
                            <CheckBox id='PermiteSolicitudHorasExtra' col="4" attributes={Datos.PermiteSolicitudHorasExtra.attributes} value={Datos.PermiteSolicitudHorasExtra.value} label={Datos.PermiteSolicitudHorasExtra.attributes.label} onChange={props.handleCheckBoxEUA} />
                        </div>
                    </div>
                </div>
            </div>
        </>
    );
}
export default withRouter(memo(tabAutoGestion));
