<?php $__env->startSection('title', '| resultat'); ?>


<?php $__env->startSection('content'); ?>

<div class="content-wrapper">
        <div class="content-header">
                        <div class="container-fluid">
                            <div class="row mb-2">
                            <div class="col-sm-6">
                                <h1 class="m-0 text-info">GESTION DES RESULTATS</h1>
                            </div><!-- /.col -->
                            <div class="col-sm-6">
                                <ol class="breadcrumb float-sm-right">
                                    <li class="breadcrumb-item"><a href="<?php echo e(route('go.menu', ['projet_id'=>$projet_id])); ?>" role="button" class="btn btn-success">menu</a></li>
                                    <li class="breadcrumb-item"><a href="<?php echo e(route('fiche.indicateur.projet', ['projet_id'=>$projet_id])); ?>" role="button" class="btn btn-success">Fiche de suivi des indicateurs</a></li>
                                    <li class="breadcrumb-item active"><a href="<?php echo e(route('resultat.create')); ?>" role="button" class="btn btn-success">ENREGISTRER resultat</a></li>
                                </ol>
                            </div><!-- /.col -->
                            </div><!-- /.row -->
                        </div><!-- /.container-fluid -->
            </div>

    <?php if($message = Session::get('success')): ?>
        <div class="alert alert-success">
            <p><?php echo e($message); ?></p>
        </div>
    <?php endif; ?>
    <?php if($message = Session::get('error')): ?>
        <div class="alert alert-danger">
            <p><?php echo e($message); ?></p>
        </div>
    <?php endif; ?>

<div class="col-12">
    <div class="card border-danger border-0">
        <div class="card-header bg-success text-center">LISTE D'ENREGISTREMENT DES RESULTATS</div>
            <div class="card-body">
                <table id="example1" class="table table-bordered table-responsive-md table-striped text-center">
                    <thead>
                        <tr>
                            <th>Projet</th>
                            <th>Nom indicateur</th>
                            <th>valeur Total</th>
                            <th>Desagrege</th>
                            <th>Observation</th>
                            <th>Date début </th>
                            <th>Date Fin </th>
                            <th>Commune</th>
                            <th>action</th>

                        </tr>
                    </thead>
                    <tbody>
                    <?php $__currentLoopData = $resultats; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $resultat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($resultat->indicateur->projet->nom); ?></td>
                            <td><?php echo e($resultat->indicateur->indicateur); ?></td>
                            <td><?php echo e($resultat->rts); ?></td>
                            <td><?php $__currentLoopData = $resultat->resultatDetails; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $resultatDetail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php echo e($resultatDetail->valeur); ?> <?php echo e($resultatDetail->desagrege->titre); ?>,
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></td>
                            <td><?php echo e($resultat->observation); ?></td>
                            <td><?php echo e($resultat->debut); ?></td>
                            <td><?php echo e($resultat->fin); ?></td>
                            <td><?php echo e($resultat->commune->nomc); ?></td>
                            <td>
                                <a href="<?php echo e(route('resultat.edit', $resultat->id)); ?>" role="button" class="btn btn-info"><i class="fas fa-edit"></i></a>
                                <?php echo Form::open(['method' => 'DELETE', 'route'=>['resultat.destroy', $resultat->id], 'style'=> 'display:inline', 'onclick'=>"if(!confirm('Êtes-vous sûr de vouloir supprimer cet enregistrement ?')) { return false; }"]); ?>

                                <button class="btn btn-danger"><i class="far fa-trash-alt"></i></button>
                                <?php echo Form::close(); ?>




                            </td>

                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </tbody>
                </table>



            </div>

        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\enda\RFA\plateforme RFA\rfaBackend\resources\views/resultat/index.blade.php ENDPATH**/ ?>