

<?php $__env->startSection('title', $page_title); ?>


<?php $__env->startPush('styles'); ?>
    <link href="plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css"/>
    <link href="css/daterangepicker.min.css" rel="stylesheet" type="text/css"/>
    <style>
        .table thead,
        .table th,
        .table td {
            text-align: center;
        }

        .test-width {
            display: grid;
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 5px;
        }

        .tag-width {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 5px;
        }

        .img-size {
            /* 	padding: 0;
                         margin: 0; */
            height: 450px;
            width: 700px;
            background-size: cover;
            overflow: hidden;
        }

        .modal-content {
            width: 700px;
            border: none;
        }

        .modal-body {
            padding: 0;
        }

        .carousel-control-prev-icon {
            background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23009be1' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E");
            width: 30px;
            height: 48px;
        }

        .carousel-control-next-icon {
            background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23009be1' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E");
            width: 30px;
            height: 48px;
        }

        table#dataTable {
            width: 1600px !important;
        }
    </style>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
    <div class="d-flex flex-column-fluid">
        <div class="container-fluid">
            <!--begin::Notice-->
            <div class="card card-custom gutter-b">
                <div class="card-header flex-wrap py-5">
                    <div class="card-title">
                        <h3 class="card-label"><i class="<?php echo e($page_icon); ?> text-primary"></i> <?php echo e($sub_title); ?></h3>
                    </div>
                    <div class="card-toolbar">
                        <!--begin::Button-->
                        <?php if(permission('product-import-access')): ?>
                            <a href="javascript:void(0);" onclick="showExcelModal('Upload Excel Sheet','Save')"
                               class="btn btn-success btn-sm font-weight-bolder">
                                <i class="fas fa-plus-circle"></i> Upload Excel Sheet</a>

                            <a class="btn btn-info btn-sm font-weight-bolder"
                               href="<?php echo e(asset('images/products_sample.csv')); ?>" title="" download><i
                                    class="fas fa-download"></i> Download CSV Sample</a>
                        <?php endif; ?>
                        
                        <a href="<?php echo e(route('product.add')); ?>" class="btn btn-primary btn-sm font-weight-bolder mr-2">
                            <i class="fas fa-plus-circle"></i> Add New</a>
                        
                        <!--end::Button-->
                    </div>
                </div>
            </div>
            <!--end::Notice-->
            <!--begin::Card-->
            <div class="card card-custom">
                <div class="card-header flex-wrap py-5">
                    <form method="POST" id="form-filter" class="col-md-12 px-0">
                        <div class="row">
                            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.form.textbox','data' => ['labelName' => 'SKU','name' => 'sku','col' => 'col-md-4']]); ?>
<?php $component->withName('form.textbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['labelName' => 'SKU','name' => 'sku','col' => 'col-md-4']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.form.textbox','data' => ['labelName' => 'Product/Varaition Code','name' => 'product_code','col' => 'col-md-4']]); ?>
<?php $component->withName('form.textbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['labelName' => 'Product/Varaition Code','name' => 'product_code','col' => 'col-md-4']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>

                            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.form.selectbox','data' => ['labelName' => 'Category','name' => 'category_id','col' => 'col-md-4','class' => 'selectpicker']]); ?>
<?php $component->withName('form.selectbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['labelName' => 'Category','name' => 'category_id','col' => 'col-md-4','class' => 'selectpicker']); ?>
                                <?php if(!$categories->isEmpty()): ?>
                                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>

                            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.form.selectbox','data' => ['labelName' => 'Brand','name' => 'brand_id','col' => 'col-md-4','class' => 'selectpicker']]); ?>
<?php $component->withName('form.selectbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['labelName' => 'Brand','name' => 'brand_id','col' => 'col-md-4','class' => 'selectpicker']); ?>
                                <?php if(!$brands->isEmpty()): ?>
                                    <?php $__currentLoopData = $brands; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($brand->id); ?>"><?php echo e($brand->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>

                            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.form.selectbox','data' => ['labelName' => 'Status','name' => 'status','col' => 'col-md-4','class' => 'selectpicker']]); ?>
<?php $component->withName('form.selectbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['labelName' => 'Status','name' => 'status','col' => 'col-md-4','class' => 'selectpicker']); ?>
                                <?php $__currentLoopData = STATUS; $__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(); ?>
                             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                            
                            <div class="col-md-0">
                                <div style="margin-top:28px;">
                                    <button id="btn-reset" class="btn btn-danger btn-sm btn-elevate btn-icon float-right"
                                            type="button" data-toggle="tooltip" data-theme="dark" title="Reset">
                                        <i class="fas fa-undo-alt"></i></button>

                                    <button id="btn-filter"
                                            class="btn btn-primary btn-sm btn-elevate btn-icon mr-2 float-right" type="button"
                                            data-toggle="tooltip" data-theme="dark" title="Search">
                                        <i class="fas fa-search"></i></button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="card-body">
                    <!--begin: Datatable-->
                    <div id="kt_datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
                        <div class="row">
                            <div class="col-sm-12 table-responsive">
                                <table id="dataTable" class="table  table-bordered table-hover">
                                    <thead class="bg-primary">
                                    <tr>
                                        <th>Sl</th>
                                        <th>Code</th>
                                        <th>SKU</th>
                                        <th>Image</th>
                                        <th>Name</th>
                                        <th class="text-nowrap" width="5%">Category</th>
                                        <th class="text-nowrap">Brand</th>
                                        <th colspan="7">Variation</th> <!-- Colspan for Variation column -->
                                        <th>Features</th>
                                        <th>Published</th>
                                        <th class="text-nowrap">Tax</th>
                                        <th>Action</th>
                                    </tr>
                                    <tr>
                                        <th></th>
                                        <th></th>
                                        <th></th>
                                        <th></th>
                                        <th width="5%"></th>
                                        <th></th>
                                        <th></th>
                                        <th class="text-wrap">V. Name</th>
                                        <th class="text-wrap">V. Code</th>
                                        <th>Purchase</th>
                                        <th>Sale</th>
                                        <th>Whole Sale</th>
                                        <th>V.Discount</th>
                                        <th>Stock</th>
                                        <th></th>
                                        <th></th>
                                        <th></th>
                                        <th></th>
                                    </tr>
                                    </thead>
                                    <tbody></tbody>
                                </table>
                            </div>
                        </div>
                    </div>

                    <div class="modal fade" id="largeModal" tabindex="-1" role="dialog" aria-labelledby="basicModal"
                         aria-hidden="true">
                        <div class="modal-dialog modal-lg">
                            <div class="modal-content">
                                <div class="modal-body">
                                    <!-- carousel -->
                                    <div id='carouselExampleIndicators' class='carousel slide' data-ride='carousel'>
                                        <ol class='carousel-indicators'>
                                            <li data-target='#carouselExampleIndicators' data-slide-to='0'
                                                class='active'>
                                            </li>
                                            <li data-target='#carouselExampleIndicators' data-slide-to='1'></li>
                                        </ol>
                                        <div class='carousel-inner ' id="imageList">
                                            
                                        </div>
                                        <a class='carousel-control-prev' href='#carouselExampleIndicators' role='button'
                                           data-slide='prev'>
                                            <span class='carousel-control-prev-icon' aria-hidden='true'></span>
                                            <span class='sr-only'>Previous</span>
                                        </a>
                                        <a class='carousel-control-next' href='#carouselExampleIndicators' role='button'
                                           data-slide='next'>
                                            <span class='carousel-control-next-icon' aria-hidden='true'></span>
                                            <span class='sr-only'>Next</span>
                                        </a>
                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--end: Datatable-->
                </div>
            </div>
            <!--end::Card-->
        </div>
    </div>
    
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
    <script>
        var table;
        $(document).ready(function () {
            table = $('#dataTable').DataTable({
                "processing": true, //Feature control the processing indicator
                "serverSide": true, //Feature control DataTable server side processing mode
                "order": [], //Initial no order
                'ordering': false,
                "responsive": false, //Make table responsive in mobile device
                "bInfo": true, //TO show the total number of data
                "bFilter": false, //For datatable default search box show/hide
                "lengthMenu": [
                    [5, 10, 15, 25, 50, 100, 1000, 10000, -1],
                    [5, 10, 15, 25, 50, 100, 1000, 10000, "All"]
                ],
                "pageLength": 25, //number of data show per page
                "language": {
                    processing: `<i class="fas fa-spinner fa-spin fa-3x fa-fw text-primary"></i> `,
                    emptyTable: '<strong class="text-danger">No Data Found</strong>',
                    infoEmpty: '',
                    zeroRecords: '<strong class="text-danger">No Data Found</strong>'
                },
                "ajax": {
                    "url": "<?php echo e(route('product.datatable.data')); ?>",
                    "type": "POST",
                    "data": function (data) {
                        data.sku = $("#form-filter #sku").val();
                        data.product_code = $("#form-filter #product_code").val();
                        data.category_id = $("#form-filter #category_id").val();
                        data.brand_id = $("#form-filter #brand_id").val();
                        data.status = $("#form-filter #status").val();

                        data._token = _token;
                    }
                },
                "columnDefs": [{},],
                "dom": "<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6' <'float-right'B>>>" +
                    "<'row'<'col-sm-12'tr>>" +
                    "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'<'float-right'p>>>",

                "buttons": [
                        <?php if(permission('product-report')): ?>
                    {
                        'extend': 'colvis',
                        'className': 'btn btn-secondary btn-sm text-white',
                        'text': 'Column',
                        'columns': ':gt(0)'
                    }, {
                        "extend": 'print',
                        'text': 'Print',
                        'className': 'btn btn-secondary btn-sm text-white',
                        "title": "<?php echo e($page_title); ?> List",
                        "orientation": "landscape", //portrait
                        "pageSize": "A4", //A3,A5,A6,legal,letter
                        "exportOptions": {
                            <?php if(permission('material-bulk-delete')): ?>
                            columns: ':visible:not(:eq(0),:eq(13))'
                            <?php else: ?>
                            columns: ':visible:not(:eq(12))'
                            <?php endif; ?>
                        },
                        customize: function (win) {
                            $(win.document.body).addClass('bg-white');
                            $(win.document.body).find('table thead').css({
                                'background': '#034d97'
                            });
                            $(win.document.body).find('table tfoot tr').css({
                                'background-color': '#034d97'
                            });
                            $(win.document.body).find('h1').css('text-align', 'center');
                            $(win.document.body).find('h1').css('font-size', '15px');
                            $(win.document.body).find('table').css('font-size', 'inherit');
                        },
                    }, {
                        "extend": 'csv',
                        'text': 'CSV',
                        'className': 'btn btn-secondary btn-sm text-white',
                        "title": "<?php echo e($page_title); ?> List",
                        "filename": "<?php echo e(strtolower(str_replace(' ', '-', $page_title))); ?>-list",
                        "exportOptions": {
                            <?php if(permission('material-bulk-delete')): ?>
                            columns: ':visible:not(:eq(0),:eq(13))'
                            <?php else: ?>
                            columns: ':visible:not(:eq(12))'
                            <?php endif; ?>
                        }
                    }, {
                        "extend": 'excel',
                        'text': 'Excel',
                        'className': 'btn btn-secondary btn-sm text-white',
                        "title": "<?php echo e($page_title); ?> List",
                        "filename": "<?php echo e(strtolower(str_replace(' ', '-', $page_title))); ?>-list",
                        "exportOptions": {
                            <?php if(permission('material-bulk-delete')): ?>
                            columns: ':visible:not(:eq(0),:eq(13))'
                            <?php else: ?>
                            columns: ':visible:not(:eq(12))'
                            <?php endif; ?>
                        },
                    }, {
                        "extend": 'pdf',
                        'text': 'PDF',
                        'className': 'btn btn-secondary btn-sm text-white',
                        "title": "<?php echo e($page_title); ?> List",
                        "filename": "<?php echo e(strtolower(str_replace(' ', '-', $page_title))); ?>-list",
                        "orientation": "landscape", //portrait
                        "pageSize": "A4", //A3,A5,A6,legal,letter
                        "exportOptions": {
                            <?php if(permission('material-bulk-delete')): ?>
                            columns: ':visible:not(:eq(0),:eq(13))'
                            <?php else: ?>
                            columns: ':visible:not(:eq(12))'
                            <?php endif; ?>
                        },
                        customize: function (doc) {
                            doc.defaultStyle.fontSize =
                                7; //<-- set fontsize to 16 instead of 10
                            doc.styles.tableHeader.fontSize = 7;
                            doc.pageMargins = [5, 5, 5, 5];
                        }
                    },
                        <?php endif; ?>
                        <?php if(permission('product-bulk-delete')): ?> {
                        'className': 'btn btn-danger btn-sm delete_btn d-none text-white',
                        'text': 'Delete',
                        action: function (e, dt, node, config) {
                            multi_delete();
                        }
                    } <?php endif; ?>
                ],
            });

            $('#btn-filter').click(function () {
                table.ajax.reload();
            });

            $('#btn-reset').click(function () {
                $('#form-filter')[0].reset();
                $('#form-filter .selectpicker').selectpicker('refresh');
                table.ajax.reload();
            });

            $(document).on('click', '.delete_data', function () {
                let id = $(this).data('id');
                let name = $(this).data('name');
                let row = table.row($(this).parent('tr'));
                let url = "<?php echo e(route('product.delete')); ?>";
                delete_data(id, url, table, row, name);
            });

            function multi_delete() {
                let ids = [];
                let rows;
                $('.select_data:checked').each(function () {
                    ids.push($(this).val());
                    rows = table.rows($('.select_data:checked').parents('tr'));
                });
                if (ids.length == 0) {
                    Swal.fire({
                        type: 'error',
                        title: 'Error',
                        text: 'Please checked at least one row of table!',
                        icon: 'warning',
                    });
                } else {
                    let url = "<?php echo e(route('product.bulk.delete')); ?>";
                    bulk_delete(ids, url, table, rows);
                }
            }

            $(document).on('click', '.change_status', function () {
                let id = $(this).data('id');
                let name = $(this).data('name');
                let status = $(this).data('status');
                let row = table.row($(this).parent('tr'));
                let url = "<?php echo e(route('product.change.status')); ?>";
                change_status(id, url, table, row, name, status);
            });

            $(document).on('click', '#excel-upload-btn', function () {
                let form = document.getElementById('upload_excel_form');
                let formData = new FormData(form);

                $.ajax({
                    url: "",
                    type: "POST",
                    data: formData,
                    dataType: "JSON",
                    contentType: false,
                    processData: false,
                    cache: false,
                    beforeSend: function () {
                        $('#excel-upload-btn').addClass('spinner spinner-white spinner-right');
                    },
                    complete: function () {
                        $('#excel-upload-btn').removeClass(
                            'spinner spinner-white spinner-right');
                    },
                    success: function (data) {
                        $('#upload_excel_form').find('.is-invalid').removeClass('is-invalid');
                        $('#upload_excel_form').find('.error').remove();
                        if (data.status == false) {
                            $.each(data.errors, function (key, value) {
                                var key = key.split('.').join('_');
                                $('#upload_excel_form input#' + key).addClass(
                                    'is-invalid');
                                $('#upload_excel_form textarea#' + key).addClass(
                                    'is-invalid');
                                $('#upload_excel_form select#' + key).parent().addClass(
                                    'is-invalid');
                                // if(key == 'code' || key == 'start_date' || key == 'end_date'){
                                $('#upload_excel_form #' + key).parents('.form-group')
                                    .append(
                                        '<small class="error text-danger">' + value +
                                        '</small>');
                                // }else{
                                //     $('#upload_excel_form #' + key).parent().append(
                                //     '<small class="error text-danger">' + value + '</small>');
                                // }
                            });
                        } else {
                            notification(data.status, data.message);
                            if (data.status == 'success') {
                                table.ajax.reload();
                            }

                            $('#upload_excel_modal').modal('hide');
                        }
                    },
                    error: function (xhr, ajaxOption, thrownError) {
                        console.log(thrownError + '\r\n' + xhr.statusText + '\r\n' + xhr
                            .responseText);
                    }
                });
            });
        });


        $(document).ready(function () {
            $(document).on('click', '.show-image', function () {
                let id = $(this).data('id');
                let imagePath = $(this).data('image_path');

                if (id) {
                    $.ajax({
                        url: "<?php echo e(route('product.image.show')); ?>",
                        type: "get",
                        async: false,
                        data: {
                            id: id
                        },
                        dataType: "JSON",
                        success: function (data) {
                            if (data !== null) {
                                let html = '';
                                $('#imageList').empty();
                                $.each(data.image, function (key, filename) {
                                    let new_list = imagePath + '/' + filename;
                                    html += '<div class="carousel-item ' + (key === 0 ?
                                            'active' : '') +
                                        '"><img class="img-size" src="' + new_list +
                                        '" alt="' + filename + '" /></div>';
                                });
                                $('#imageList').append(html);
                            }
                        },
                        error: function (xhr, ajaxOption, thrownError) {
                            console.log(thrownError + '\r\n' + xhr.statusText + '\r\n' + xhr
                                .responseText);
                        }
                    });
                }
            });
        });

        function handleCheckboxChange(checkbox, productId) {
            var checkboxName = checkbox.name;
            var checkboxValue = checkbox.value;
            var isChecked = checkbox.checked;

            if (isChecked) {
                // console.log("Checkbox named " + checkboxName + " with value " + checkboxValue + " is checked");
                // Perform update operation on the server (AJAX request)
                updateCheckboxStatus(checkboxName, 1, parseFloat(productId));
            } else {
                // console.log("Checkbox named " + checkboxName + " with value " + checkboxValue + " is unchecked");
                // Perform update operation on the server (AJAX request)
                updateCheckboxStatus(checkboxName, 0, parseFloat(productId));
            }
        }

        function updateCheckboxStatus(inputName, isChecked, productId) {

            let data = {};
            data[inputName] = inputName;
            data.isChecked = isChecked;
            data.id = productId;

            $.ajax({
                method: "GET",
                url: "<?php echo e(route('product.feature.change.status')); ?>", // Replace with your server endpoint
                data: data,
                success: function (response) {
                    notification(response.status, response.message);
                    table.ajax.reload();
                },
                error: function (error) {
                    notification(error.status, error.message);
                }
            });
        }


        $(document).on('click', '.change_status', function () {
            let id = $(this).data('id');
            let name = $(this).data('name');
            let status = $(this).data('status');

            let row = table.row($(this).parent('tr'));
            let url = "<?php echo e(route('product.change.status')); ?>";
            change_status(id, url, table, row, name, status);
        });
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/iconshoppercom/iconshopper/Modules/Product/Resources/views/index.blade.php ENDPATH**/ ?>