/
home
/
sjslayjy
/
public_html
/
assets
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startPush('plugin-styles'); ?> <!-- <?php echo Html::style('/assets/plugins/plugin.css'); ?> --> <?php echo Html::style('//cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css'); ?> <style type="text/css"> .table th, .table td { white-space: break-spaces !important; } </style> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <div class="row"> <div class="col-lg-12 grid-margin"> <div class="card"> <div class="card-body"> <div class="row grid-margin"> <div class="col-lg-8"> <h4 class="card-title">Faulty Spares Parts At Testing Repairing Center (TRC)</h4> </div> <div class="col-lg-4"> <select class="form-control mr" onchange="get_faulty_spare_by_warehouse(this)"> <?php $__currentLoopData = $warehouses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warehouse): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($warehouse); ?>" <?php echo e($current_warehouse == $warehouse ? 'selected' : ''); ?>><?php echo e($warehouse); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="table-responsive"> <table class="table table-striped myTable"> <thead> <tr> <th> Spare Code </th> <th> Description</th> <th> Faulty Qty</th> <th> View History </th> </tr> </thead> <tbody id="faulty_spare_data"> <?php $__currentLoopData = $spares; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $spare): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td> <?php echo e($spare->spare_code); ?> </td> <td> <?php echo e($spare->description); ?></td> <td> <label class="badge badge-warning"><?php echo e($spare->qty); ?></label></td> <td> <a href="<?php echo e(url('circle-store/spare-history-at-trc/'.$spare->spare_code)); ?>">TRC History</a> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('plugin-scripts'); ?> <?php echo Html::script('/assets/plugins/chartjs/chart.min.js'); ?> <?php echo Html::script('/assets/plugins/jquery-sparkline/jquery.sparkline.min.js'); ?> <?php $__env->stopPush(); ?> <?php $__env->startPush('custom-scripts'); ?> <?php echo Html::script('/assets/js/dashboard.js'); ?> <?php echo Html::script('//cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js'); ?> <script type="text/javascript"> $(document).ready( function () { var myTable = $('.myTable').dataTable(); } ); </script> <script type="text/javascript"> function get_faulty_spare_by_warehouse(t){ var warehouse = $(t).val(); var url = window.location.origin+"/admin/get-faulty-spare-of-warehouse" var data = {}; data._token = "<?php echo e(csrf_token()); ?>"; data.warehouse = warehouse; // $('#loaderAction').show(); $.ajax({ type: "POST", url: url, data: data, success:function(res){ console.log(res); if(res.success == true){ var html = ""; $.each(res.spares,function(k,stock){ html +=`<tr> <td class="font-weight-medium">`+stock.spare_code+`</td> <td class="font-weight-medium">`+stock.description+`</td> <td><label class="badge badge-info">`+(stock.qty)+`</label></td> <td><a href="`+window.location.origin+`/circle-store/spare-history-at-trc/`+stock.spare_code+`">TRC History</a></td> </tr>`; }); $('#faulty_spare_data').html(html); }else{ swal(res.msg, { icon: "error", }); } // $('#loaderAction').hide(); }, error:function(error){ console.log(error); }, dataType: 'json' }); } </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/assets/resources/views/circle-store/spare-at-trc.blade.php ENDPATH**/ ?>