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

<?php $__env->startSection('title'); ?>
    Idea - Code Report
<?php $__env->stopSection(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-header'); ?>
<!-- breadcrumb -->
<div class="page-title">
    <div class="row">
        <div class="col-sm-6">
            <h4 class="mb-0"> Code Report</h4>
        </div>
        <div class="col-sm-6">
            <ol class="breadcrumb pt-0 pr-0 float-left float-sm-right ">
                <li class="breadcrumb-item"><a href="#" class="default-color"><?php echo e(trans('main_trans.Dashboard')); ?></a>
                </li>
                <li class="breadcrumb-item active"> Code Report</li>
            </ol>
        </div>
    </div>
</div>
<!-- breadcrumb -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- row -->
<div class="row">
    <div class="col-md-12 mb-30">
        <div class="card card-statistics h-100">
            <div class="card-body">
                <?php echo Form::open(['url' => 'getcodesReport', 'autocomplete' => 'off']); ?>


                <?php echo e(csrf_field()); ?>


                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>Item name : <span class="text-danger">*</span></label>
                            <select name="lab" id="lab" class="custom-select" class="custom-select"
                                aria-label="Default select example">
                                <option selected disabled><?php echo e(trans('main_trans.Choose')); ?></option>
                                <?php $__currentLoopData = $labs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($key); ?>"><?php echo e($value); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-8">
                        <div class="form-group">
                            <label>Code name : <span class="text-danger">*</span></label>
                            <select name="code" id="code" class="custom-select" class="custom-select"
                                aria-label="Default select example">
                            </select>
                        </div>
                    </div>
                </div>
                <br>
                <div class="d-flex justify-content-center">
                    <button type="submit" class="btn btn-primary btn-lg"> Report </button>
                </div>
                <br><br><br><br><br><br><br><br><br><br><br><br><br><br>
                <?php echo Form::close(); ?>

            </div>
           
        </div>
    </div>
</div>
<!-- row closed -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<script>
    $(document).ready(function() {

        $('select[name="lab"]').on('change', function() {

            var lab = $(this).val();

            if (lab) {

                $.ajax({
                    url: '/getcodes/' + lab,
                    type: 'GET',
                    dataType: 'json',
                    success: function(data) {
                        console.log(data);
                        $('select[name="code"]').empty();
                        $.each(data, function(key, value) {
                            $('select[name="code"]')
                                .append('<option value="' + key + '">' + value +
                                    '</option>');
                        });
                    }

                });

            } else {
                $('select[name="code"]').empty();
            }

        });
    });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\Mustafa\Certificates\resources\views/pages/Reports/getcodesid.blade.php ENDPATH**/ ?>