%PDF- %PDF-
Direktori : /var/www/html/storage/framework/views/ |
Current File : //var/www/html/storage/framework/views/0e46326721ff039d0b9ee5f00fcbea7bcb84f321.php |
<?php $__env->startSection('title'); ?> Liste des Clients <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="container"> <!-- Button trigger modal --> <?php if(session()->has('status')): ?> <div class="alert alert-success" role="alert"> <?php echo e(session()->get('status')); ?> </div> <?php elseif(session()->has('error')): ?> <div class="alert alert-danger" role="alert"> <?php echo e(session()->get('error')); ?> </div> <?php endif; ?> <?php if(session()->has('message')): ?> <div class="alert alert-success"> <?php echo e(session()->get('message')); ?> </div> <?php endif; ?> <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="alert alert-danger"> <?php echo e($message); ?> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <div class="card"> <div class="card-header"> <h5 class="card-title font-weight-bold text-primary">Importer ou Exporter la liste des Clients</h5> </div> <div class="card-body"> <form action="<?php echo e(route('Import')); ?>" method="POST" class="row col-12" enctype="multipart/form-data"> <div class="col-6"> <div class="custom-file"> <?php echo csrf_field(); ?> <input type="file" name="file" class="custom-file-input" id="customFile" required> <label class="custom-file-label" for="customFile">choisir un fichier</label> </div> </div> <div class="col-3"> <button type="submit" class="btn btn-success"><i class="fas fa-file-excel"></i> Importer</button> </div> <div class="col-3"> <a class="btn btn-success" href="<?php echo e(route('export')); ?>"><i class="fas fa-download"></i> Exporter</a> </div> </form> </div> </div> <br> <div class="card"> <div class="card-header"> <ul class="nav nav-pills card-header-pills"> <li class="nav-item"> <button type="button" class="btn btn-info" data-toggle="modal" data-target="#addClientModal"> <i class="fas fa-plus"></i> Ajouter Client </button> </li> <li class="d-flex"> <input class="form-control me-2" type="search" id="searchInput" placeholder="Search" aria-label="Search"> </li> <li class="nav-item"> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#DeleteClientModal" id="DeleteAll"> <i class="fas fa-trash-alt"></i> Supprimer Tout </button> </li> </ul> </div> <div class="card-body"> <h5 class="card-title font-weight-bold text-primary">Liste des Clients</h5> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr> <th scope="col">N° Dossier</th> <th scope="col">Date</th> <th scope="col">Entreprise</th> <th scope="col">Gérant</th> <th scope="col">Contact</th> <th scope="col">Adresse</th> <th scope="col">Site web</th> <th scope="col">N° d'agrément</th> <th scope="col">N° RC</th> <th scope="col">N° ICE</th> <th scope="col">Actions</th> <th scope="col"> <input type="checkbox" id="checkAll"></th> </tr> </thead> <tbody> <?php $__currentLoopData = $clients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $client): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="clients"> <td> <?php echo e($client->meta->nbdossier); ?></td> <td> <?php echo e($client->date_j); ?></td> <td> <?php echo e($client->name); ?> </td> <td> <?php echo e($client->meta->manager); ?> </td> <td> <ul> <li><?php echo e($client->phone); ?></li> <li><?php echo e($client->email); ?> </li> </ul> </td> <td> <ul> <li><?php echo e($client->meta->adress); ?></li> <li><?php echo e($client->meta->ville); ?></li> </ul> </td> <td> <?php echo e($client->meta->website); ?> </td> <td> <?php echo e($client->meta->agrement_number); ?> </td> <td> <?php echo e($client->meta->rc); ?> </td> <td> <?php echo e($client->meta->ice); ?> </td> <td> <div class="row"> <div class="col-4 px-2"> <a class="badge badge-info btn" type="button" href=<?php echo e(route('edit_client', ['id' => $client->id])); ?>><i class="fas fa-edit"></i> </a> </div> <div class="col-4 px-2"> <button class="badge badge-danger btn" type="button" data-toggle="modal" data-target="#deleteModal" data-delete-id="<?php echo e($client->id); ?>"> <i class="fas fa-trash-alt"></i> </button> </div> <div class="col-4 px-2"> <button class="badge badge-success btn" type="button" data-toggle="modal" data-target="#editRemarqueModal" data-object="<?php echo e(@json_encode(['id' => $client->id, 'remarques' => $client->meta->remarques])); ?>"> <i class="fas fa-eye"></i> </button> </div> </div> </td> <td> <input type="checkbox" value="<?php echo e($client->id); ?>" name="ids" class="checkAllids"> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> <div class="d-flex flex-row justify-content-center"><?php echo e($clients->links()); ?></div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?> <!-- Modal add --> <?php if($errors->all()): ?> <script> $(document).ready(function() { $('#addClientModal').modal('show'); }); </script> <?php endif; ?> <div class="modal fade" id="addClientModal" tabindex="-1" role="dialog" aria-labelledby="addClientModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="addClientModalLabel"> J2HB | Ajouter Clients </h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form method="POST" action="<?php echo e(route('store_client')); ?>" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <div class="modal-body"> <div class="container-fluid"> <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="alert alert-danger"><?php echo e($error); ?></div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <div class="row col-12"> <div class="col-12"> <div class="form-group mb-3"> <input type="number" class="form-control form-control-user" name="nbdossier" id="nbdossier" placeholder="Numéro du dossier" value="<?php echo e(@old('nbdossier')); ?>" required> </div> </div> </div> <div class="row col-12"> <div class="col-6"> <div class="form-group mb-3"> <input type="text" class="form-control form-control-user" name="name" id="name" placeholder="Client" value="<?php echo e(@old('name')); ?>" required> </div> </div> <div class="col-6"> <div class="form-group mb-3"> <input type="text" class="form-control form-control-user" name="manager" id="manager" placeholder="Gérant" value="<?php echo e(@old('manager')); ?>" required> </div> </div> </div> <div class="row col-12"> <div class="col-6"> <div class="form-group mb-3"> <input type="tel" class="form-control form-control-user" name="phone" id="phone" placeholder="Téléphone" value="<?php echo e(@old('phone')); ?>" required> </div> </div> <div class="col-6"> <div class="form-group mb-3"> <input type="email" class="form-control form-control-user" name="email" id="email" placeholder="E-mail" value="<?php echo e(@old('email')); ?>" required> </div> </div> </div> <div class="row col-12"> <div class="col-6"> <div class="form-group mb-3"> <input type="text" class="form-control form-control-user" name="adress" id="adress" placeholder="Adresse" value="<?php echo e(@old('adress')); ?>" required> </div> </div> <div class="col-6"> <div class="form-group mb-3"> <input type="text" class="form-control form-control-user" name="ville" id="ville" placeholder="Ville" value="<?php echo e(@old('ville')); ?>" required> </div> </div> </div> <div class="row col-12"> <div class="col-6"> <div class="form-group mb-3"> <input type="date" class="form-control form-control-user" name="date_j" id="date_j" value="<?php echo e(@old('date_j')); ?>" required> </div> </div> <div class="col-6"> <div class="form-group mb-3"> <input type="url" class="form-control form-control-user" name="website" id="website" value="<?php echo e(@old('website')); ?>" placeholder="Siteweb"> </div> </div> </div> <div class="row col-12"> <div class="col-6"> <div class="form-group mb-3"> <input type="text" class="form-control form-control-user" name="cin" id="cin" placeholder="CIN" value="<?php echo e(@old('cin')); ?>" required> </div> </div> <div class="col-6"> <div class="form-group mb-3"> <input type="text" class="form-control form-control-user" name="agrement_number" id="agrement_number" placeholder="Nombre d'agrément" value="<?php echo e(@old('agrement_number')); ?>" required> </div> </div> </div> <div class="row col-12"> <div class="col-6"> <div class="form-group mb-3"> <input type="text" class="form-control form-control-user" name="ice" id="ice" placeholder="ICE" value="<?php echo e(@old('ice')); ?>" required> </div> </div> <div class="col-6"> <div class="form-group mb-3"><input type="text" class="form-control form-control-user" name="rc" id="rc" placeholder="RC" value="<?php echo e(@old('rc')); ?>" required></div> </div> </div> <div class="row col-12"> <div class="col-12"> <div class="input-group mb-3"> <div class="custom-file"> <input type="file" class="custom-file-input" name="upload" id="upload" aria-describedby="inputGroupFileAddon01" required> <label class="custom-file-label" for="inputGroupFile01"> Scanner CIN, Nb_agrement, RC, ICE...</label> </div> </div> </div> </div> <div class="row col-12"> <div class="col-12"> <div class="form-group mb-3"> <textarea name="remarques" class="form-control form-control-user" placeholder="Remarques" id="remarques" cols="75" rows="10"></textarea> </div> </div> </div> </div> <button type="submit" class="btn btn-primary btn-user">Ajouter</button> </div> </form> </div> </div> </div> <!-- Delete --> <div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteClientModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <form class="modal-content" method="post" action="<?php echo e(route('destroy_client')); ?>"> <div class="modal-header"> <h5 class="modal-title">Confirmation :</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <p>Etes-vous sûr que vous voulez supprimer ?</p> </div> <div class="modal-footer"> <input type="hidden" name="id"> <?php echo csrf_field(); ?> <button type="submit" id="OK_button" name="OK_button" class="btn btn-primary">OK</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button> </div> </form> </div> </div> <!-- End Delete--> <!-- Delete ALL --> <div class="modal fade" id="DeleteClientModal" tabindex="-1" role="dialog" aria-labelledby="DeleteClientModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <form class="modal-content" action="<?php echo e(route('deleteAllclients')); ?>" method="post"> <div class="modal-header"> <h5 class="modal-title">Confirmation :</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <p>Etes-vous sûr que vous voulez supprimer ?</p> </div> <div class="modal-footer"> <input type="hidden" name="allids"> <?php echo csrf_field(); ?> <button type="submit" id="OK_button" name="OK_button" class="btn btn-primary">OK</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button> </div> </form> </div> </div> <!-- Delete ALL --> <!-- update Remarque --> <div class="modal fade" id="editRemarqueModal" tabindex="-1" role="dialog" aria-labelledby="editRemarqueModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <form action="<?php echo e(route('store_client')); ?>" method="post"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="editRemarqueModalLabel"> J2HB | Modifier Remarque </h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <?php echo csrf_field(); ?> <input type="hidden" name="id"> <textarea name="remarques" id="remarques" cols="75" class="form-control form-control-user" rows="10"></textarea> </div> <div class="modal-footer"> <button type="submit" id="update" name="update" class="btn btn-primary">Modifier</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button> </div> </div> </form> </div> </div> <!-- End Update --> <script language="javascript"> $(document).ready(function() { $("#deleteModal").on('show.bs.modal', function(e) { var id = parseInt($(e.relatedTarget).attr('data-delete-id')); $(this).find('input[name="id"]').val(id); }); $("#editRemarqueModal").on('show.bs.modal', function(e) { var data = JSON.parse($(e.relatedTarget).attr('data-object')); $(this).find('input[name="id"]').val(data.id); $(this).find('input[name="remarques"]').val(data.remarques); }); $("#DeleteClientModal").on('show.bs.modal', function(e) { var allids = []; $("input:checkbox[name=ids]:checked").each(function() { allids.push($(this).val()); }); $(this).find('input[name="allids"]').val(allids.join(',')); }); $("#searchInput").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#clients").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); $(function(e) { $("#checkAll").click(function() { $(".checkAllids").prop('checked', $(this).prop('checked')); }); }); }); // Add the following code if you want the name of the file appear on select $(".custom-file-input").on("change", function() { var fileName = $(this).val().split("\\").pop(); $(this).siblings(".custom-file-label").addClass("selected").html(fileName); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('template', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\gestionstock\resources\views/Clients/index.blade.php ENDPATH**/ ?>