KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/leadai/leadai.co.in/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/leadai/leadai.co.in/storage/framework/views/46801e0ce5c3b1206eb2eb0866b002c2a69fd42f.php
<?php $__env->startSection('content'); ?>
    <!-- begin::main content -->
    <style>
        .input_upload {
            width: 100px;
            height: 35px;
            position: absolute;
            bottom: -34px;
            right: 350px;
        }

        .import-content p {
            padding: 0;
            margin: 0;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .filter-form-box {
            background-color: #FBFAFA;
            padding: 10px 24px;
            position: absolute;
            width: 450px;
            border: 1px solid #ddd;
            border-radius: 5px;
            top: 71px;
            z-index: 20;
        }

        .filter-form-box input {
            height: 40px !important;
        }

        .diamond {
            width: 20px;
            height: 20px;
            background-color: #FBFAFA;
            transform: rotate(45deg);
            position: relative;
            top: -21px;
            left: 0px;
            border-top: 1px solid #ddd;
            border-left: 1px solid #ddd;
        }

        .seach-input:focus {
            outline: none !important;
            border-top: 1px solid #ddd !important;
            border-bottom: 1px solid #ddd !important;
        }

        .seach-input {
            height: 40px !important;
            border-top: 1px solid #ddd !important;
            border-bottom: 1px solid #ddd !important;
            border-left: 1px solid #ddd !important;
        }

        .kanban-column {
            height: 465px;
            overflow-y: scroll;
            overflow-x: hidden;
            scrollbar-color: #a8a8a8 #cbcbcb;
            scrollbar-width: thin;
            padding: 10px;
            min-height: 300px;
        }

        .kanban-task {
            position: relative;
            cursor: grab;
            background-color: white;
            margin-bottom: 10px;
            padding: 10px;
        }

        .highlight {
            border: 1px dashed #06b6d4;
            background-color: #c0ecff;
        }

        .kanban-board {
            width: 100%;
            overflow: auto;
            display: flex;
            justify-content: space-between;
        }

        .processing-lead {
            width: 300px;
            position: absolute;
            left: 60%;
            top: 28%;
            transform: translate(-50%, 50%);
        }

        .kanban-div-p {
            background: #ebf2f5;
            padding: 0px;
            margin: 5px;
            border-radius: 5px;
            border-top: 2px #67757c solid;
        }

        .stage-head {
            padding: 8px 0px 0px 11px;
        }
    </style>
    <main class="main-content">
        <div class="container">
            <div class="toast d-none float-right">
                <div class="toast-body bg-success text-white">
                    <i class="fa fa-check fa-lg"></i>&nbsp Status Update Successfully
                </div>
            </div>
            <!-- begin::page header -->
            <div class="page-header d-md-flex align-items-center justify-content-between">
                <div>
                    <h3>Manage  <?php echo \App\Helpers\Frontend::lead_name(); ?></h3>
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>"><?php echo e(__('message.dashboard')); ?></a>
                            </li>
                            <li class="breadcrumb-item" aria-current="page">Leads</li>
                            <li class="breadcrumb-item active" aria-current="page">List</li>
                        </ol>
                    </nav>
                </div>
                <div>
                    <div class="form-group mt-3">
                        <form class="change_pipeline_form" action="<?php echo e(asset('leads')); ?>" method="get">
                            <select class="form-control change_pipeline" name="change_pipeline">
                                <option selected disabled>Select Pipeline</option>
                                <?php if(!empty($pipelines)): ?>
                                    <?php $__currentLoopData = $pipelines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pipeline): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($pipeline->id); ?>"
                                            <?php echo e(isset($_GET['change_pipeline']) ? ($pipeline->id == $_GET['change_pipeline'] ? 'selected' : '') : ''); ?>>
                                            <?php echo e($pipeline->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </select>
                        </form>
                    </div>


                </div>
            </div>
            <!-- end::page header -->

            <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
            <?php if($errors->any()): ?>
                <div class="alert alert-danger">
                    <ul>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><?php echo e($error); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            <?php endif; ?>
            <div class="card">
                <div class="card-header">
                    <?php if($errors->any()): ?>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div><?php echo e($error); ?></div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <div class="row">
                        <div class="col-md-4 py-3">
                            <form action="<?php echo e(asset('leads/list')); ?>" method="get">
                                <div class="company-field-box">
                                    <div>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <button type="button"
                                                    class="btn border input-group-text filter-company-btn">
                                                    <i class="icon ti-filter fa-lg"></i>
                                                </button>
                                            </div>
                                            <input type="search"
                                                value="<?php echo e(isset($_GET['search']) ? $_GET['search'] : null); ?>" name="search"
                                                class="form-control border-right-0 seach-input">
                                            <button class="btn border border-left-0" type="submit"
                                                style="margin-left:-5px;">
                                                <i class="icon ti-search fa-lg mt-1"></i>
                                            </button>
                                        </div>

                                        
                                        <div class="filter-form-box d-none">
                                            <div class="diamond"></div>
                                            <form method="get" action="<?php echo e(asset('leads/list')); ?>">
                                                <div class="form-group">
                                                    <label> <?php echo e(__('message.email')); ?></label>
                                                    <input type="text" name="email"
                                                        value="<?php echo e(isset($_GET['email']) ? $_GET['email'] : null); ?>"
                                                        class="form-control" id="email">
                                                </div>
                                                <div class="row">
                                                    <div class="form-group col-6">
                                                        <label><?php echo e(__('message.name')); ?> </label>
                                                        <input value="<?php echo e(isset($_GET['name']) ? $_GET['name'] : null); ?>"
                                                            type="text" name="name" class="form-control"
                                                            id="name">
                                                    </div>
                                                    <div class="form-group col-6">
                                                        <label><?php echo e(__('message.phone')); ?></label>
                                                        <input type="text"
                                                            value="<?php echo e(isset($_GET['mobile']) ? $_GET['mobile'] : null); ?>"
                                                            name="mobile" class="form-control" id="mobile">
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="form-group col-6">
                                                        <label>City</label>
                                                        <input type="text"
                                                            value="<?php echo e(isset($_GET['city']) ? $_GET['city'] : null); ?>"
                                                            name="city" class="form-control" id="city">
                                                    </div>
                                                    <div class="form-group col-6">
                                                        <label>Source</label>
                                                        <select class="form-control" name="source">
                                                            <option value="" disabled>Select Source</option>
                                                            <?php if(!$sources->isEmpty()): ?>
                                                                <?php $__currentLoopData = $sources; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $source): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <option value="<?php echo e($source->id); ?>">
                                                                        <?php echo e($source->name); ?></option>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="form-group col-6">
                                                        <label>Course</label>
                                                        <select class="form-control" name="course">
                                                            <option value="">Select Course</option>
                                                            <?php if(!$products_list->isEmpty()): ?>
                                                                <?php $__currentLoopData = $products_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $products): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <option value="<?php echo e($products->id); ?>">
                                                                        <?php echo e($products->name); ?></option>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </select>
                                                    </div>
                                                    <div class="form-group col-6">
                                                        <label>Pipline</label>
                                                        <select class="form-control" name="pipeline">
                                                            <option disabled selected>Select Pipeline</option>
                                                            <?php if(!$pipelines->isEmpty()): ?>
                                                                <?php $__currentLoopData = $pipelines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pipeline): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <option value="<?php echo e($pipeline->id); ?>">
                                                                        <?php echo e($pipeline->name); ?></option>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="form-group col-6">
                                                        <label><?php echo e(__('message.start')); ?> <?php echo e(__('message.date')); ?></label>
                                                        <input type="date" name="start_date"
                                                            value="<?php echo e(isset($_GET['start_date']) ? $_GET['start_date'] : null); ?>"
                                                            class="form-control" id="start_date">
                                                    </div>
                                                    <div class="form-group col-6">
                                                        <label><?php echo e(__('message.end')); ?> <?php echo e(__('message.date')); ?></label>
                                                        <input type="date" name="end_date"
                                                            value="<?php echo e(isset($_GET['end_date']) ? $_GET['end_date'] : null); ?>"
                                                            class="form-control" id="end_date">
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="form-group col-12">
                                                        <a href="<?php echo e(asset('leads/list')); ?>"
                                                            class="btn btn-danger clear-button text-white"><?php echo e(__('message.clear')); ?></a>
                                                        <button type="submit"
                                                            class="btn btn-success apply-button"><?php echo e(__('message.apply')); ?></button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                        
                                    </div>
                                </div>
                            </form>
                        </div>

                        <div class="col-md-8 justify-content-end py-3">
                            
                            <a data-toggle="tooltip" data-original-title="Export"
                                class="btn btn-outline-secondary btn-uppercase pull-right"
                                href="<?php echo e(asset('export-leads')); ?>">
                                <i class="ti-export fa-lg"></i>
                            </a>
                            
                            <a data-toggle="tooltip" data-original-title="Import" data-bs-toggle="modal"
                                data-bs-target="#importModal"
                                class="btn btn-outline-secondary btn-uppercase pull-right mr-1">
                                <i class="ti-import fa-lg"></i>
                            </a>



                            
                            <a data-toggle="tooltip" data-original-title="List View" href="<?php echo e(asset('leads/list')); ?>"
                                class="btn btn-outline-secondary btn-uppercase pull-right mr-1">
                                <i class="ti-view-list fa-lg"></i>
                            </a>
                            
                            


                            <a data-toggle="tooltip" data-original-title="New Lead" data-bs-toggle="modal"
                                data-bs-target="#leadModal"
                                class="btn btn-outline-secondary btn-uppercase pull-right mr-1">
                                <i class="ti-plus fa-lg"></i>
                            </a>



                        </div>
                    </div>
                </div>
                <div class="card-body kanban-wrapper">
                    <?php
                        $count = 0;
                    ?>
                    <div class="processing-lead text-center display-5 alert-info alert d-none">Processing...</div>
                    <div class="kanban-board">
                        <?php if(isset($stages)): ?>
                            <?php $__currentLoopData = $stages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $st): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-md-4 kanban-div-p">
                                    <div class="d-flex mb-3 justify-content-between stage-head">
                                        <h5 class="font-size-18 text-capitalize"><?php echo e($st->name); ?></h5>

                                        
                                    </div>

                                    <div class="kanban-column" data-drop-id="<?php echo e($st->id); ?>">


                                        <?php $__currentLoopData = $leads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php if($value->lead_stage->name == $st->name): ?>
                                                <div style="border-radius: 5px;" class="p-3 mt-3 kanban-task"
                                                    data-lead-id="<?php echo e($value->id); ?>"
                                                    data-stage-id="<?php echo e($st->id); ?>">

                                                    
                                                    <div class="mb-2 d-flex justify-content-between">
                                                        <a class="font-size-15 text-capitalize"
                                                            href="<?php echo e(asset('leads/details/' . $value->id)); ?>">
                                                            <?php echo e($value->name); ?>

                                                        </a>
                                                        <div data-toggle="tooltip" data-original-title="Add Task">
                                                            <button lead_id="<?php echo e($value->id); ?>" data-toggle="modal" data-target="#ListTaskModal" style="padding: 8px;"
                                                                class="btn btn-sm btn-outline-primary open_task_modal pull-right">
                                                                <i class="icon ti-plus"></i>
                                                            </button>
                                                        </div>
                                                    </div>
                                                    <p class="mb-2 d-flex justify-content-between">
                                                        
                                                            <span data-toggle="tooltip" data-original-title="Pipeline"
                                                                class="btn btn-sm btn-outline-secondary"><?php echo e($pipeline->name ?? ''); ?></span>

                                                            
                                                            <span data-toggle="tooltip" data-original-title="Product"
                                                                class="btn btn-sm btn-outline-info"><?php echo e($value->product_name); ?>

                                                            </span>
                                                        

                                                        
                                                    </p>
                                                        

                                                    <p>
                                                        <span class='font-size-12'><i class="icon fa fa-phone mr-1"></i>
                                                            <?php echo e($value->phone); ?></span><br>
                                                        <span class='font-size-12'><i class="icon ti-email mr-1"></i>
                                                            <?php echo e($value->email); ?></span><br>
                                                        <span class='font-size-12'><i
                                                                class="icon fa fa-calendar mr-1"></i>
                                                            <?php echo e(date('d-M-Y', strtotime($value->created_at))); ?>

                                                        </span>
                                                    </p>

                                                    
                                                    <?php
                                                            $last_task = App\Helpers\Dashboard::getTask(
                                                                $value->id,
                                                                'lead',
                                                            );
                                                            $pipeline = App\Helpers\Dashboard::getPipeline(
                                                                $value->pipeline_id,
                                                            );
                                                        ?>
                                                    <?php if(isset($last_task)): ?>
                                                    <div style="border-radius: 5px;"
                                                        class="border bg-info bg border-dashed p-2">
                                                        

                                                        <p class="font-size-12 mb-1"><?php echo e($last_task->name ?? ''); ?></p>
                                                        <span><?php echo e(date('d-M-Y', strtotime($last_task->date ?? ''))); ?></span>

                                                        <br>
                                                        <p class="mb-2">
                                                            <span data-toggle="tooltip" data-original-title="Task Status"
                                                                class="badge badge-light text-uppercase">
                                                                <?php echo e($last_task->status ?? ''); ?></span>

                                                            <?php if($last_task->priority ?? '' == 'high'): ?>
                                                                <span data-toggle="tooltip"
                                                                    data-original-title="Task Priority"
                                                                    class="badge badge-danger text-uppercase font-size-8">High</span>
                                                            <?php elseif($last_task->priority ?? '' == 'medium'): ?>
                                                                <span data-toggle="tooltip"
                                                                    data-original-title="Task Priority"
                                                                    class="badge badge-warning text-uppercase font-size-8">Medium</span>
                                                            <?php elseif($last_task->priority ?? '' == 'low'): ?>
                                                                <label data-toggle="tooltip"
                                                                    data-original-title="Task Priority"
                                                                    class="badge badge-info text-uppercase font-size-8">Low</label>
                                                            <?php endif; ?>
                                                        </p>
                                                    </div>
                                                    <?php endif; ?>




                                                    <div class='mt-2'>
                                                        <?php
                                                            $leads_data = App\Helpers\Dashboard::getLeadUser(
                                                                $value->id,
                                                            );

                                                            $color = 'bg-success';
                                                            if ($key % 2 == 0) {
                                                                $color = 'bg-danger';
                                                            }
                                                        ?>
                                                        <div class="avatar">
                                                            <?php if(!empty($leads_data)): ?>
                                                                <?php $__currentLoopData = $leads_data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $leads_da): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <figure data-toggle="tooltip"
                                                                        data-original-title="<?php echo e($leads_da->user_name); ?>"
                                                                        class="avatar avatar-sm">
                                                                        <span
                                                                            class="avatar-title bg-success rounded-circle"><?php echo e(substr($leads_da->user_name, 0, 1)); ?></span>
                                                                    </figure>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </div>




                                                    </div>
                                                </div>
                                            <?php endif; ?>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>
                                </div>
                                <?php $count=0; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>
                    </div>
                </div>
            </div>

            <?php echo $__env->make('leads.modal.lead_import_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <?php echo $__env->make('leads.modal.add_task', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        </div>

    </main>

    <?php echo $__env->make('leads.modal.create_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
    <!-- begin::dataTable -->
    <!-- end::dataTable -->

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

    <!-- jQuery UI CSS for styling draggable elements -->
    <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <!-- end::select2 -->
    <script>

         $(".open_task_modal").click(function(){
                $(".task_add_form").trigger('reset');
                var lead_id = $(this).attr("lead_id");
                $("#add_lead_id").val(lead_id);
            });


        $(function() {
            // Make the tasks draggable

            $(".kanban-task").draggable({
                cursor: 'move',
                revert: false,
                snap: true,
                helper: "clone",
                start: function(event, ui) {
                    $(this).css('overflow', 'hidden');
                    $(this).css('opacity', '0.7');
                    $(this).css('z-index', '10000');

                },
                stop: function(event, ui) {
                    $(this).css('position', 'relative');
                    $(this).css('opacity', '1');
                    $(this).css('z-index', 12);
                }
            });

            // Make the columns droppable
            $(".kanban-column").droppable({
                accept: ".kanban-task",
                hoverClass: "highlight", // Highlight the column on hover

                drop: function(event, ui) {

                    $(this).append(ui.draggable);

                    ui.draggable.css({
                        top: "auto",
                        left: "auto"

                    });

                    var leadId = ui.draggable.data('lead-id');
                    var stageId = ui.draggable.data('stage-id');
                    var drop_stage_id = $(this).data("drop-id");
                    //alert(drop_stage_id);

                    $.ajax({
                        type: "post",
                        headers: {
                            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                        },
                        data: {
                            "lead_id": leadId,
                            "stage_id": stageId,
                            "drop_stage_id": drop_stage_id
                        },
                        url: "<?php echo e(asset('change-lead-status')); ?>",
                        dataType: "html",
                        beforeSend: function() {
                            $(".processing-lead").removeClass("d-none");
                        },
                        success: function(result) {
                            $(".processing-lead").addClass("d-none");
                            var allData = JSON.parse(result);
                            console.log(allData);

                            var drag_count = allData.data.drag_count;
                            var drop_count = allData.data.drop_count;
                            $(".stage-" + stageId).html(drag_count);
                            $(".stage-" + drop_stage_id).html(drop_count);

                        },
                        error: function(xhr, error, status) {
                            console.log(JSON.parse(xhr.responseText));
                        }
                    });
                }
            });
        });
    </script>

    <script>
        $(document).ready(function() {
            $("#checkAll").click(function() {
                $('.userids:checkbox').not(this).prop('checked', this.checked);
                var length = $('.userids[type="checkbox"]:checked').length;
                if ($(".multiple-delete-btn").hasClass('d-none')) {
                    $(".multiple-delete-btn").removeClass("d-none");
                    $(".multiple-delete-btn").html('<span class="pt-1">Delete (' + length + ")</span>");
                } else {
                    $(".multiple-delete-btn").addClass("d-none");
                }

            });

            //employee delte button code
            $(".emp-delete-btn").click(function() {
                var emp_id = $(this).attr("emp_id");


                swal({
                    title: 'Are you sure?',
                    text: 'Once deleted, you will not be recover!',
                    icon: 'warning',
                    dangerMode: true,
                    buttons: ["Cancel", "Yes!"],
                }).then(function(value) {
                    if (value) {
                        $.ajaxSetup({
                            headers: {
                                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                            }
                        });

                        $.ajax({
                            type: "post",
                            data: {
                                "emp_id": emp_id
                            },
                            url: "<?php echo e(asset('delete-distributor')); ?>",
                            dataType: "html",
                            success: function(result) {
                                //console.log(result);
                                swal("success!", "Successfully deleted!", "success");
                                window.location.reload();
                            },
                            error: function(error) {
                                swal("Failed !", "Failed !", "error");
                                window.location.reload();
                            }
                        });

                    }
                });
            });



            $(".input_file_upload").on("change", function() {
                $(".import-company-form").submit();
            });

            $(".import-company-form").on("submit", function(event) {
                // Prevent the default form submission
                event.preventDefault();


                $.ajax({
                    type: "POST",
                    url: "<?php echo e(asset('import-distributor')); ?>",
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    },
                    data: new FormData(this),
                    processData: false,
                    contentType: false,
                    cache: false,
                    beforeSend: function() {
                        $(".import-content").html("<h5>Please wait uploading...</h5>");
                    },
                    success: function(response) {
                        if (response.message == "success") {
                            var div = `<div class='text-success text-center' style='font-size:50px'>
                           <i class='fa fa-check-circle' ></i>
                           <p  style='font-size:20px'>Dealer/Partner Import Successfully !</p>
                       </div>`;
                            $(".import-content").html(div);
                            setTimeout(function() {
                                window.location.reload();
                            }, 3000);

                        } else {
                            //console.log(error);
                            var div = `<div class='text-danger text-center' style='font-size:50px'>
                           <i class='fa fa-times-circle' ></i>
                           <p  style='font-size:20px'>Please check the datasheet !</p>
                       </div>`;
                            $(".import-content").html(div);
                        }
                    },
                    error: function(xhr, status, error) {
                        //console.log(error);
                        var div = `<div class='text-danger text-center' style='font-size:50px'>
                       <i class='fa fa-times-circle' ></i>
                       <p  style='font-size:20px'>Please check the datasheet !</p>
                   </div>`;
                        $(".import-content").html(div);
                    }
                });
            });


            // Delete Multiple
            $(".multiple-delete-btn").click(function() {
                var URL = "<?php echo e(asset('distributor-delete-multiple')); ?>";
                var user_ids = [];
                $('.userids:checkbox:checked').each(function() {
                    user_ids.push($(this).val());
                });



                swal({
                    title: 'Are you sure?',
                    text: 'Once deleted, you will not be recover!',
                    icon: 'warning',
                    dangerMode: true,
                    buttons: ["Cancel", "Yes!"],
                }).then(function(value) {
                    if (value) {
                        $.ajaxSetup({
                            headers: {
                                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                            }
                        });

                        $.ajax({
                            type: "post",
                            data: {
                                "ids": user_ids
                            },
                            url: URL,
                            dataType: "html",
                            success: function(result) {
                                console.log(result);
                                swal("success!", "Successfully deleted!", "success");
                                window.location.reload();
                            },
                            error: function(xhr, status, error) {
                                swal("failed!", "Failed !", "error");
                                window.location.reload();
                            }
                        });

                    }
                });

            });


        });

        $(".apply-button").click(function() {
            $(".filter-form-box").addClass("d-none");
        });


        //filter company code
        $(".filter-company-btn").click(function() {

            if ($(".filter-form-box").hasClass("d-none")) {
                $(".filter-form-box").removeClass("d-none");
            } else {
                $(".filter-form-box").addClass("d-none");
            }
        });


        $(".change_pipeline").on("change", function() {

            $(".change_pipeline_form").submit();
        });


        //change status code
        $(".status-change").on("change", function() {

            var check_val = 0;
            if ($(this).is(":checked")) {
                check_val = 1;
            }

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

            $.ajax({
                type: "post",
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                },
                url: "<?php echo e(asset('change-user-status')); ?>",
                data: {
                    user_id: id,
                    status: check_val
                },
                dataType: "html",
                success: function(result) {
                    console.log(result);
                    var allData = JSON.parse(result);

                    if (allData.message == "success") {
                        $('.toast').removeClass('d-none');
                        $('.toast').toast('show');
                    } else {
                        var div = `
                   <div class="toast-body bg-danger text-white">
                           <i class="fa fa-times-circle-o fa-lg"></i>&nbsp Status Update Failed

                   </div>
               `;

                        $('.toast').removeClass('d-none');
                        $('.toast').toast('show');
                        $('.toast').html(div);
                    }
                },
                error: function(xhr, status, error) {
                    console.log(error);
                    var div = `
                   <div class="toast-body bg-danger text-white">
                           <i class="fa fa-times-circle-o fa-lg"></i>&nbsp Status Update Failed

                   </div>
               `;

                    $('.toast').removeClass('d-none');
                    $('.toast').toast('show');
                    $('.toast').html(div);

                }
            });

        });
        $(".main-section").hide();

        /*$(".ghm-hotel").click(function(){
             $(".main-section").show();
             $(".main-section1").hide();
         });*/
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/leadai/leadai.co.in/resources/views/leads/index.blade.php ENDPATH**/ ?>

Anon7 - 2021