<?php $__env->startSection('title', app_name() . ' | '. __('labels.backend.access.credit.management')); ?>

<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-body">
        <div class="row">
            <div class="col-sm-5">
                <h4 class="card-title mb-0">
                    <?php echo app('translator')->get('labels.backend.access.credit.management'); ?>
                </h4>
            </div><!--col-->
            <div class="col-sm-7 ">
            <div class="btn-toolbar float-right">
                <span> <?php echo app('translator')->get('labels.backend.access.credit.title'); ?> : <?php echo e(!empty($userDetail->credit) ? $userDetail->credit : 0); ?></span>
                </div>
            </div><!--col-->
        </div><!--row-->

        <div class="row mt-4">
            <div class="col">
            <div class="form-group row">
                        <?php echo e(html()->label(__('validation.attributes.backend.access.permissions.name'))
                            ->class('col-md-2 form-control-label')
                            ->for('name')); ?>


                        <div class="col-md-10">
                            <?php echo e(html()->text('tags')
                                ->class('form-control')
                                ->placeholder(__('validation.attributes.backend.access.permissions.name'))
                                ->attribute('maxlength', 191)
                                ->required()
                                ->autofocus()); ?>

            
                        </div><!--col-->
                    </div><!--form-group-->
                    <div id ="subhtml">
                    </div>
            </div>
            </div>

    </div><!--card-body-->
</div><!--card-->
<?php $__env->stopSection(); ?>

<?php $__env->startPush('after-scripts'); ?>
    <script>
        $(function () {
            var availableTags = <?php echo json_encode($userList, 15, 512) ?>;
    $( "#tags" ).autocomplete({
      source: availableTags
    });

    function tranferCredit() {
      alert("b");
    }

    $("#tags").on('keypress',function(event){
     if(event.which == 13){
        event.preventDefault();
                $.ajax({
                    url:      '<?php echo e(route('admin.auth.credit.creditdetails')); ?>',
                    type:     "POST",
                    data: {
                        "_token": "<?php echo e(csrf_token()); ?>",
                        'userDetail': $(this).val(),
                    },
                    success: function(data) {
                        $('#subhtml').html(data.html);
                    },
                    error: function(xhr, textStatus, errorThrown) {
                        alert('AJAX ERROR ! Check the console !');
                        console.error(errorThrown);
                    }
                });

                return false;
     }
 });

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

<?php echo $__env->make('backend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/licenseriolabz/public_html/license-repo/resources/views/backend/credit/index.blade.php ENDPATH**/ ?>