@include('header')
@include('navigator_menu_principal')
@include('modals/modal_juicios_homonimos')
@include('modals/modal_homonimos')
<div class="container" style="width: 80%;">
    <div class="col-md-12">
        <!-- inicio tabla ACTORES -->
        <div id="div_homonimos_actores" style="padding-bottom: 20px;">
            <h3>Juicios Como Actor -Homonimos-</h3>
            <table id="tabla_homonimos_actores" class="table table-bordered text-right table-hover">
                <thead>
                    <tr>
                        <th>Cuit Demandado</th>
                        <th>Demandado</th>
                        <th>Fecha Causa</th>
                        <th>Actor</th>
                        <th>Radicacion</th>
                        <th>Localidad del Juzgado</th>
                        <th>Tipo de Novedad</th>
                        <th>Expediente</th>
                        <th>Fuente</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($juicios_homonimos_actores as $ha)
                        <tr id="{{$ha->id_juicio}}">
                            <td class="text-center" style="width:5%;">{{ $ha->cuit_demandado}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->demandado}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->fecha_causa_formateada}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->actor}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->radicacion}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->localidad_del_juzgado}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->tipo_de_novedad}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->expediente}}</td>
                            <td class="text-center" style="width:5%;">{{ $ha->fuente}}</td>
                            <td class="text-center" style="width:5%;">
                                <button id="btn_modificar_actor" class="btn btn-info btn-fidelitas text-center"
                                    data-cuit_demandado="{{ $ha->cuit_demandado}}" data-actor="{{ $ha->actor}}"
                                    data-_token="{{ csrf_token() }}" data-id_juicio="{{ $ha->id_juicio}}"
                                    data-observaciones="{{ $ha->observaciones}}" data-tipo="A"
                                    data-radicacion="{{ $ha->radicacion}}"
                                    data-localidad_del_juzgado="{{ $ha->localidad_del_juzgado}}"
                                    data-tipo_de_novedad="{{ $ha->tipo_de_novedad}}" data-expediente="{{ $ha->expediente}}"
                                    data-fuente="{{ $ha->fuente}}" data-toggle="modal">Modificar</button>
                            </td>
                        </tr>
                    @endforeach
                </tbody>
            </table>
        </div>
        <!-- fin tabla ACTORES -->

        <!-- inicio tabla DEMANDADOS -->
        <div id="div_juicios_actor" style="padding-bottom: 20px;">
            <h3>Juicios Como Demandado -Homonimos-</h3>
            <table id="tabla_juicios_demandado" class="table table-bordered text-right table-hover">
                <thead>
                    <tr>
                        <th>Cuit Actor</th>
                        <th>Actor</th>
                        <th>Fecha Causa</th>
                        <th>Demandado</th>
                        <th>Radicacion</th>
                        <th>Localidad del Juzgado</th>
                        <th>Tipo de Novedad</th>
                        <th>Expediente</th>
                        <th>Fuente</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($juicios_homonimos_demandados as $hd)
                        <tr id="{{$hd->id_juicio}}">
                            <td class="text-center" style="width:5%;">{{ $hd->cuit_actor }}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->actor }}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->fecha_causa }}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->demandado}}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->radicacion}}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->localidad_del_juzgado}}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->tipo_de_novedad}}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->expediente}}</td>
                            <td class="text-center" style="width:5%;">{{ $hd->fuente}}</td>
                            <td class="text-center" style="width:5%;">
                                <form id="form_modificar_homonimos_demandados" method="POST">
                                    <button id="btn_modificar_demandados" class="btn btn-info btn-fidelitas text-center"
                                        data-cuit_actor="{{ $hd->cuit_actor}}" data-demandado="{{ $hd->demandado}}"
                                        data-_token="{{ csrf_token() }}" data-toggle="modal"
                                        data-id_juicio="{{ $hd->id_juicio}}" data-observaciones="{{ $hd->observaciones}}"
                                        data-tipo="D" data-radicacion="{{ $hd->radicacion}}"
                                        data-localidad_del_juzgado="{{ $hd->localidad_del_juzgado}}"
                                        data-tipo_de_novedad="{{ $hd->tipo_de_novedad}}"
                                        data-expediente="{{ $hd->expediente}}"
                                        data-fuente="{{ $hd->fuente}}">Modificar</button>
                                </form>
                            </td>
                        </tr>
                    @endforeach
                </tbody>

            </table>
        </div>
        <!-- fin tabla DEMANDADOS -->

        <!-- inicio tabla HOMONIMOS -->
        <div id="div_homonimos" style="padding-bottom: 20px;">
            <h3>Juicios -Homonimos-</h3>
            <table id="tabla_homonimos" class="table table-bordered text-right table-hover">
                <thead>
                    <tr>
                        <th>Cuit Actor</th>
                        <th>Actor</th>
                        <th>Fecha Causa</th>
                        <th>Cuit Demandado</th>
                        <th>Demandado</th>
                        <th>Radicacion</th>
                        <th>Localidad del Juzgado</th>
                        <th>Tipo de Novedad</th>
                        <th>Expediente</th>
                        <th>Fuente</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($homonimos as $homonimo)
                        <tr id="{{$homonimo->id_juicio}}">
                            <td class="text-center" style="width:5%;">{{ $homonimo->cuit_actor }}</td>
                            <td class="text-center" style="width:5%;">{{ $homonimo->actor }}</td>
                            <td class="text-center" style="width:5%;">{{ $homonimo->fecha_causa }}</td>
                            <td class="text-center" style="width:5%;">{{ $homonimo->cuit_demandado }}</td>
                            <td class="text-center" style="width:5%;">{{ $homonimo->demandado}}</td>
                            <td style="width:5%;">{{ $homonimo->radicacion}}</td>
                            <td style="width:5%;">{{ $homonimo->localidad_del_juzgado}}</td>
                            <td style="width:5%;">{{ $homonimo->tipo_de_novedad}}</td>
                            <td style="width:5%;">{{ $homonimo->expediente}}</td>
                            <td style="width:5%;">{{ $homonimo->fuente}}</td>
                            <td style="width:5%;" class="text-center">
                                <form id="form_modificar_homonimos_demandados" method="POST">
                                    <!--<input type="hidden" class="token"         name="_token"        value="{{ csrf_token() }}">-->
                                    <button id="btn_modificar_homonimos" class="btn btn-info btn-fidelitas text-center"
                                        data-_token="{{ csrf_token() }}" data-toggle="modal"
                                        data-id_juicio_homonimo="{{ $homonimo->id_juicio}}"
                                        data-actor_h="{{ $homonimo->actor}}" data-demandado_h="{{ $homonimo->demandado}}"
                                        data-observaciones_h="{{ $homonimo->observaciones}}"
                                        data-radicacion_h="{{ $homonimo->radicacion}}"
                                        data-localidad_del_juzgado_h="{{ $homonimo->localidad_del_juzgado}}"
                                        data-tipo_de_novedad_h="{{ $homonimo->tipo_de_novedad}}"
                                        data-expediente_h="{{ $homonimo->expediente}}"
                                        data-fuente_h="{{ $homonimo->fuente}}">Modificar</button>
                                </form>
                            </td>
                        </tr>
                    @endforeach
                </tbody>

            </table>
        </div>
        <!-- fin tabla HOMONIMOS -->
    </div>
</div>
<script type="text/javascript" src="{{ URL::asset('js/juicios_datacleaning.js') }}"> </script>
@include('footer')