<div class="">
    <div class="page-title">
        <div class="title_left">
            <h3>Docente <small>{{ $doc->docente->nombre }} {{ $doc->docente->apellido_paterno }}
                    {{ $doc->docente->apellido_materno }}</small></h3>
        </div>
    </div>

    <div class="clearfix"></div>
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_title">
                    <h2>{{ $doc->materia->nombre_mat }}</h2>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">
                    <table id="tabla" class="table table-striped jambo_table bulk_action">
                        <thead>
                            <tr class="headings">
                                <th class="column-title text-center">No.</th>
                                <th class="column-title text-center">Documento </th>
                                <th class="column-title text-center">Avance </th>
                                <th class="column-title text-center no-link last"><span class="nobr">Acción</span>
                                </th>
                                <th class="bulk-actions" colspan="7">
                                    <a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions
                                        (
                                        <span class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
                                </th>
                            </tr>
                        </thead>

                        <tbody>
                            <tr class="even pointer">
                                <td class="text-md-center" data-label="No.">
                                    1
                                </td>
                                <td class="text-md-center" data-label="Documento">
                                    Instrumentación Didáctica
                                </td>
                                <td class="text-md-center" data-label="Avance">
                                    <?php
                                        $bid = 0;
                                        $colorid = 'secondary';
                                        ?>
                                    @foreach ($ind as $insd)
                                    @if ($insd->instrumentacionDidactica->cve_mat == $doc->materia->cve_mat)
                                    @if ($insd->instrumentacionDidactica->status_instdidac == 1)
                                    <?php
                                                    $bid = 100;
                                                    $colorid = 'primary';
                                                    ?>
                                    @endif
                                    @endif
                                    @endforeach
                                    <div class="progress">
                                        <div class="progress-bar progress-bar-striped bg-{{ $colorid }}"
                                            role="progressbar" style="width: 100%" aria-valuenow="10"
                                            aria-valuemin="{{ $bid }}" aria-valuemax="100">{{ $bid }} %
                                        </div>
                                    </div>
                                </td>
                                <td class="py-1 text-md-center" data-label="Acción">
                                    <div class="btn-group btn-group-sm">
                                        <button type="button" class="btn btn-success btn-sm" data-toggle="tooltip"
                                            data-placement="top" title="" data-original-title="Vista Previa"
                                            onclick="consultar_instrumentaciondidacticaJ({{ $insd->instrumentacionDidactica->cve_instdidac }},'jefe')"><i
                                                class="fa fa-eye"></i></button>
                                    </div>
                                </td>
                            </tr>
                            <tr class="even pointer">
                                <td class="text-md-center" data-label="No.">
                                    2
                                </td>
                                <td class="text-md-center" data-label="Documento">
                                    Evaluación Diagnostico
                                </td>
                                <td class="text-md-center" data-label="Avance">
                                    <div class="progress">
                                        <?php
                                        $b = 0;
                                        $color = 'secondary';
                                        ?>
                                        @foreach ($ded as $d)
                                        @if ($d->evaluacionDiag->cve_mat == $doc->materia->cve_mat)
                                        @if ($d->evaluacionDiag->status_evaldiag == 1)
                                        <?php
                                                    $b = 100;
                                                    $color = 'primary';
                                                    ?>
                                        @endif
                                        @endif
                                        @endforeach
                                        <div class="progress-bar progress-bar-striped bg-{{ $color }}"
                                            role="progressbar" style="width: 100%" aria-valuenow="{{ $b }}"
                                            aria-valuemin="0" aria-valuemax="100">{{ $b }} %
                                        </div>
                                    </div>
                                </td>
                                <td class="py-1 text-md-center" data-label="Acción">
                                    <div class="btn-group btn-group-sm">
                                        @if (count($firma) === 0)
                                        @if ($d->evaluacionDiag->status_evaldiag != 0)
                                        <button type="button" class="btn btn-success btn-sm" data-toggle="tooltip"
                                            data-placement="top" title="" data-original-title="Vista Previa"
                                            onclick="consultar_evaluaciondiagnosticoJ({{ $d->cve_evaldiag }},'jefe')"><i
                                                class="fa fa-eye"></i></button>
                                        @endif
                                        @endif
                                    </div>
                                </td>
                            </tr>
                            <tr class="even pointer">
                                <td class="text-md-center" data-label="No.">
                                    3
                                </td>
                                <td class="text-md-center" data-label="Documento">
                                    Reporte de evaluación y Acreditación
                                </td>
                                <td class="text-md-center" data-label="Avance">
                                    <div class="progress">
                                        <?php
                                        $bfea = 0;
                                        $colorfea = 'secondary';
                                        ?>
                                        @foreach ($dea as $ea)
                                        @if ($ea->reporteEvalAcre->estado_repfea == 'Entregado')
                                        <?php
                                                $bfea = 100;
                                                $colorfea = 'primary';
                                                ?>
                                        @else
                                        @if ($ea->reporteEvalAcre->estado_repfea =='Firmado')
                                        <?php
                                            $bfea = 100;
                                            $colorfea = 'primary';
                                            ?>
                                        @endif
                                        @endif
                                        @endforeach
                                        <div class="progress-bar progress-bar-striped bg-{{ $colorfea }}"
                                            role="progressbar" style="width: 100%" aria-valuenow="10"
                                            aria-valuemin="{{ $bfea }}" aria-valuemax="100">
                                            {{ $bfea }}%
                                        </div>
                                    </div>
                                </td>
                                <td class="py-1 text-md-center" data-label="Acción">
                                    <div class="btn-group btn-group-sm">
                                        @if (count($firmaea) === 0)
                                        @if ($ea->reporteEvalAcre->estado_repfea == 'Entregado')
                                        <button type="button" class="btn btn-success btn-sm" data-toggle="tooltip"
                                            data-placement="top" title="" data-original-title="Vista Previa"
                                            onclick="consultar_evaluacionacreditacionJ({{ $ea->reporteEvalAcre->cve_repfea }},'jefe')"><i
                                                class="fa fa-eye"></i></button>
                                        @endif
                                        @endif
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>

                    <div class="ln_solid"></div>
                    <div class="mb-1 row">
                        <div class="col-md-3 col-sm-12"></div>
                        <div class="col-md-6 col-sm-12">
                            <div class="row">
                                <div class="col">
                                    <button class="btn btn-dark btn-block" type="button"
                                        onclick="listado_asignacion()"><i class=" fa fa-times"></i>
                                        Cancelar</button>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3 col-sm-12"></div>
                    </div>
                    <br>

                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function() {
        $('[data-toggle="tooltip"]').tooltip();
    });
</script>
<script>
    $(document).ready(function() {
        $('[data-toggle="tooltip"]').click(function() {
            $('[data-toggle="tooltip"]').tooltip("hide");

        });
    });
</script>
