Edit File: bda563cbbc4e5314e22b43bebdc2e6d24d29c648.php
<?php $__env->startSection('css'); ?> <link rel="stylesheet" type="text/css" href="<?php echo e(asset('admin/app-assets/vendors/css/extensions/sweetalert2.min.css')); ?>"> <link rel="stylesheet" type="text/css" href="<?php echo e(asset('admin/index_page.css')); ?>"> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="content-body"> <div class="mb-1 d-flex justify-content-between m-0"> <?php if (isset($component)) { $__componentOriginal8ab64a152ebd5dc11aab297c2fbeb1c6ee34b75e = $component; } ?> <?php $component = App\View\Components\Admin\Buttons::resolve(['addbutton' => ''.e(route('admin.coupons.create')).'','deletebutton' => ''.e(route('admin.coupons.deleteAll')).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('admin.buttons'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Buttons::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal8ab64a152ebd5dc11aab297c2fbeb1c6ee34b75e)): ?> <?php $component = $__componentOriginal8ab64a152ebd5dc11aab297c2fbeb1c6ee34b75e; ?> <?php unset($__componentOriginal8ab64a152ebd5dc11aab297c2fbeb1c6ee34b75e); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcd3d56d807712dee9d45093831508c7c3364ab65 = $component; } ?> <?php $component = App\View\Components\Admin\Filter::resolve(['datefilter' => 'true','order' => 'true','searchArray' => [ 'coupon_num' => [ 'input_type' => 'text', 'input_name' => __('admin.coupon_number'), ], ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('admin.filter'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Filter::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcd3d56d807712dee9d45093831508c7c3364ab65)): ?> <?php $component = $__componentOriginalcd3d56d807712dee9d45093831508c7c3364ab65; ?> <?php unset($__componentOriginalcd3d56d807712dee9d45093831508c7c3364ab65); ?> <?php endif; ?> </div> <div class="table_content_append"> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?> <script src="<?php echo e(asset('admin/app-assets/vendors/js/extensions/sweetalert2.all.min.js')); ?>"></script> <script src="<?php echo e(asset('admin/app-assets/js/scripts/extensions/sweet-alerts.js')); ?>"></script> <script> $(document).on('click', '.open-coupon', function () { $('.coupon_id').val($(this).data('id')) }) </script> <script> $(document).on('change', '.select2', function () { if ($(this).val() == 'ratio') { $('.max_discount').prop('readonly', false); } else { $('.max_discount').prop('readonly', true); } }); </script> <script> $(document).on('keyup', '.discount', function () { if ($('.select2').val() == 'number') { $('.max_discount').val($(this).val()); } else { $('.max_discount').val(null); } }); </script> <script> $(document).ready(function () { $(document).on('submit', '.notify-form', function (e) { e.preventDefault(); var url = $(this).attr('action') $.ajax({ url: url, method: 'post', data: new FormData($(this)[0]), dataType: 'json', processData: false, contentType: false, beforeSend: function () { $(".send-notify-button").html( '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>' ).attr('disable', true) }, success: (response) => { $(".text-danger").remove() $('.store input').removeClass('border-danger') $(".send-notify-button").html("<?php echo e(__('admin.update')); ?>").attr( 'disable', false) $('#notify').modal('toggle'); Swal.fire({ position: 'top-start', type: 'success', title: response.message, showConfirmButton: false, timer: 1500, confirmButtonClass: 'btn btn-primary', buttonsStyling: false, }) $('#div_' + response.id).parent().html(response.html) }, error: function (xhr) { $(".send-notify-button").html("<?php echo e(__('admin.update')); ?>").attr( 'disable', false) $(".text-danger").remove() $('.notify-form input').removeClass('border-danger') $.each(xhr.responseJSON.errors, function (key, value) { $('.notify-form input[name=' + key + ']').addClass( 'border-danger') $('.notify-form input[name=' + key + ']').after( `<span class="mt-5 text-danger">${value}</span>`); $('.notify-form select[name=' + key + ']').after( `<span class="mt-5 text-danger">${value}</span>`); }); }, }); }); }); </script> <?php echo $__env->make('admin.shared.deleteAll', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php echo $__env->make('admin.shared.deleteOne', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php echo $__env->make('admin.shared.filter_js', ['index_route' => url('admin/coupons')], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('admin.layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/thunderw/public_html/resources/views/admin/coupons/index.blade.php ENDPATH**/ ?>
Back to File Manager