%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/silvzytp/calling_code/storage/framework/views/
Upload File :
Create Path :
Current File : //home/silvzytp/calling_code/storage/framework/views/a77e491a5a8ee3eb69e82e39799a5cf47c02ae93.php

<?php $__env->startSection('title', $siteTitle); ?>
<?php $__env->startSection('action'); ?>
<?php if(Auth::user()->role_id == 1 || Auth::user()->role_id == 2): ?>
<div class="d-flex align-items center">
    <button class="btn btn-sm btn-secondary import-calling mr-1"><i class="ti-plus fs-ism"></i> Import</button>
</div>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('styles'); ?>
<style>
    .import-file {
        width: 100%;
        border: 1px dotted #ccc;
        padding: 20px;
        text-align: center;
        margin-bottom: 0;
    }
    label[for="all_checked"]::before {
        border-color: #fff !important;
    }
</style>
<?php $__env->stopPush(); ?>

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

    <div class="row">
        <div class="col-12">
            <?php if(Auth::user()->role->slug != 'agent'): ?>
                <div class="card mb-3">
                    <div class="card-header">
                        <h6 class="card-title">Filter</h6>
                    </div>
                    <div class="card-body">
                        <form method="POST">
                            <div class="row">
                                <div class="col-md-3">
                                    <select name="agent" class="form-control">
                                        <option value="">-- Select Agent --</option>
                                        <?php $__currentLoopData = $agents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $agent): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($agent->id); ?>"><?php echo e($agent->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                                <div class="col-md-3">
                                    <select class="form-control" name="status" onchange="select_status(this.value)">
                                        <option value="">-- Select Status --</option>
                                        <?php $__empty_1 = true; $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                            <option value="<?php echo e($status->id); ?>"><?php echo e($status->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>

                                        <?php endif; ?>
                                    </select>
                                </div>
                                <div class="col-md-3">
                                    <select class="form-control" name="sub_status">
                                        <option value="">-- Select Sub Status --</option>
                                    </select>
                                </div>
                                <div class="col-md-3">
                                    <select class="form-control" name="potential">
                                        <option value="">-- Select Potential --</option>
                                        <?php $__currentLoopData = POTENTIAL; $__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 class="row mt-3">
                                <div class="col-md-4">
                                    <input type="text" class="form-control" required id="date_range" placeholder="MM/DD/YY" autocomplete="off" autofocus>
                                    <input type="hidden" name="start_date">
                                    <input type="hidden" name="end_date">
                                </div>
                                <div class="col-4">
                                    <select class="form-control" name="assign_select">
                                        <option value="">-- Select Please --</option>
                                        <option value="1">Assign</option>
                                        <option value="2">Unassign</option>
                                    </select>
                                </div>
                                <div class="col-4">
                                    <div class="d-flex align-items-center">
                                        <label class="mb-0" style="min-width: 100px">Call Date</label>
                                        <input type="text" class="form-control" name="call_date" id="call_date_range" placeholder="MM/DD/YY" autocomplete="off" autofocus>
                                        <input type="hidden" name="call_start_date">
                                        <input type="hidden" name="call_end_date">
                                    </div>
                                </div>
                            </div>
                            <div class="row mt-3">
                                <div class="col-3">
                                    <input type="text" class="form-control" name="search" placeholder="File name search here..">
                                </div>
                                <div class="col-3">
                                    <input type="text" class="form-control" name="search_here" placeholder="Search here..">
                                </div>
                                <div class="col-3">
                                    <select name="filter_touch" class="form-control">
                                        <option value="">Select Pleace</option>
                                        <option value="1">Touch</option>
                                        <option value="2">Untouch</option>
                                    </select>
                                </div>
                                <div class="col-md-3 text-left">
                                    <button type="button" id="filter-btn" class="btn btn-md btn-primary"><i class="fas fa-search"></i></button>
                                    <button type="button" id="filter-reset" class="btn btn-md btn-warning"><i class="fas fa-sync-alt"></i></button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            <?php endif; ?>

            <div id="bulk-card" class="d-none">
                <form method="POST" id="bulk-form">
                    <?php echo csrf_field(); ?>
                    <div class="d-flex align-items-center mb-3">
                        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.form.selectbox','data' => ['name' => 'operation','divClass' => 'mb-0']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('form.selectbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'operation','divClass' => 'mb-0']); ?>
                            <option value="">-- Select --</option>
                            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'app.callings.delete')): ?>
                            <option value="delete">Delete</option>
                            <?php endif; ?>
                            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'app.callings.assign')): ?>
                            <option value="assign">Assign</option>
                            <?php endif; ?>
                            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'app.callings.reject')): ?>
                            <option value="soft">Move to Lead Pool</option>
                            <?php endif; ?>
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>

                        <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'app.callings.assign')): ?>
                        <?php if($agents->isNotEmpty()): ?>
                            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.form.selectbox','data' => ['name' => 'managers','divClass' => 'mb-0 ml-2 manager-list d-none']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('form.selectbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'managers','divClass' => 'mb-0 ml-2 manager-list d-none']); ?>
                                <option value="">-- Select Agent --</option>
                                <?php $__currentLoopData = $agents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($value->id); ?>"><?php echo e($value->name); ?></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; ?>
                        <?php endif; ?>
                        <?php endif; ?>


                        <div class="bulk-apply">
                            <button class="btn btn-md btn-primary rounded-0 ml-2 px-3">Apply</button>
                        </div>
                    </div>
                </form>
            </div>

            <div class="card">
                <div class="card-body px-0">
                    <table class="table table-sm table-bordered table-style" id="calling-datatables">
                            <thead>
                                <tr class="bg-primary text-light">
                                    <th>
                                        <div class="custom-control custom-checkbox">
                                            <input type="checkbox" class="custom-control-input" id="all_checked">
                                            <label class="custom-control-label" for="all_checked"></label>
                                        </div>
                                    </th>
                                    <th>File Name</th>
                                    <th>Date</th>
                                    <th>Agent</th>
                                    <th>Importer</th>
                                    <th>Serial</th>
                                    <th>Name</th>
                                    <th>Email</th>
                                    <th>Phone</th>
                                    <th>Number 1</th>
                                    <th>Number 2</th>
                                    <th>Action</th>
                                    <th>Status</th>
                                    <th>Sub Status</th>
                                    <th>Potential</th>
                                    <th>Time Of Call</th>
                                    <th>Comment</th>
                                    <th>Follow up 1</th>
                                    <th>Follow up 2</th>
                                    <th>Follow up 3</th>
                                    <th class="text-right">Action</th>
                                </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                </div>
            </div>
        </div>
    </div>

    <?php echo $__env->make('backend.modal.import', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('backend.modal.calling-modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('backend.pages.calling.export', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
    <script>
        table = $('#calling-datatables').DataTable({
            processing: true,
            serverSide: true,
            autoWidth: false,
            order: [], //Initial no order
            bInfo: true, //TO show the total number of data
            bFilter: false, //For datatable default search box show/hide
            responsive: true,
            ordering: false,
            lengthMenu: [
                [5, 10, 15, 25, 50, 100, 1000, 10000, -1],
                [5, 10, 15, 25, 50, 100, 1000, 10000, "All"]
            ],
            pageLength: 10, //number of data show per page
            ajax: {
                url: "<?php echo e(route(routeName().'.callings.get-data')); ?>",
                type: "POST",
                dataType: "JSON",
                data: function(d) {
                    d._token = _token;
                    d.status = $('select[name="status"]').val();
                    d.sub_status = $('select[name="sub_status"]').val();
                    d.agent = $('select[name="agent"]').val();
                    d.potential = $('select[name="potential"]').val();
                    d.start_date = $('input[name="start_date"]').val();
                    d.end_date   = $('input[name="end_date"]').val();
                    d.call_start_date = $('input[name="call_start_date"]').val();
                    d.call_end_date   = $('input[name="call_end_date"]').val();
                    d.search_text = $('input[name="search"]').val();
                    d.assign_agent_data = $('select[name="assign_select"]').val();
                    d.search_input = $('input[name="search_here"]').val();
                    d.touch             = $('select[name="filter_touch"]').val();
                },
            },
            columns: [
                {data: 'bulk_check',orderable: false, searchable: true},
                {data: 'file_name'},
                {data: 'date'},
                {data: 'agent'},
                {data: 'importer'},
                {data: 'serial'},
                {data: 'name'},
                {data: 'email'},
                {data: 'phone'},
                {data: 'number_1'},
                {data: 'number_2'},
                {data: 'action', orderable: false, searchable: false},
                {data: 'status'},
                {data: 'sub_status'},
                {data: 'potential'},
                {data: 'time_of_call'},
                {data: 'comment'},
                {data: 'follow_up1'},
                {data: 'follow_up2'},
                {data: 'follow_up3'},
                {data: 'action', orderable: false, searchable: false},
            ],
            language: {
                processing: '<img src="<?php echo e(asset("uploads/images/table-loading.svg")); ?>">',
                emptyTable: '<strong class="text-danger">No Data Found</strong>',
                infoEmpty: '',
                zeroRecords: '<strong class="text-danger">No Data Found</strong>',
                oPaginate: {
                    sPrevious: "Previous", // This is the link to the previous page
                    sNext: "Next", // This is the link to the next page
                },
                lengthMenu: "_MENU_"
            },
            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'app.calling.export')): ?>
            dom: "<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6' <'float-right pr-15'B>>>" +
            "<'row'<'col-sm-12'tr>>" +
            "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'<'float-right pr-15'p>>>",
             buttons: {
                buttons: [
                    {
                        text: '<i class="fa fa-refresh" aria-hidden="true"></i> Reload',
                        className: 'btn btn-sm btn-primary',
                        action: function (e, dt, node, config) {
                            dt.ajax.reload(null, false);
                        }
                    },
                    {
                        text: '<i class="fa fa-file-excel-o" aria-hidden="true"></i> Export',
                        className: 'export_data btn btn-sm btn-primary'
                    }
                ]
            }
            <?php endif; ?>
        });

        // deletable btn
        $(document).on('click', 'button.confirm-deletable-action', function(){
            // modal data
            let data_id = $('#deletable-modal input.datatable').val();
            const url = "<?php echo e(route(routeName().'.callings.destroy')); ?>";

            deletable_action(data_id,url); // define function
        });

        // user bulk operation
        $(document).on('click', 'button.bulk-deletable-action', function(){
            var data_id = $('#deletable-modal input.datatable').val();
            var operation_type = $('#deletable-modal .modal-body input.operation-type').val();
            const url = "<?php echo e(route(routeName().'.callings.bulk-operation')); ?>";
            var assign_user = $('#deletable-modal .modal-body input.manager-select').val();
            bulk_deletable_action(data_id,operation_type,assign_user,url);
        });


        // operation assign manager
        $(document).on('change','select[name="operation"]', function(){
            let selected_value = $(this).val();
            if (selected_value == 'assign') {
                $('.manager-list').removeClass('d-none');
            }else{
                $('.manager-list').addClass('d-none');
            }
        });

        $(document).on('click', 'button.import-calling', function(){
            $('form#import-form-submit')[0].reset();
            $('#import-modal').modal({
                backdrop: 'static',
                keyboard: false
            });
        });

        $(document).on('submit', 'form#import-form-submit', function(e){
            e.preventDefault()
            $.ajax({
                type: "POST",
                url: "<?php echo e(route(routeName().'.callings.import')); ?>",
                data: new FormData(this),
                processData: false,
                contentType: false,
                dataType: "JSON",
                beforeSend: function(){
                    $('.modal-loader').removeClass('d-none');
                },
                complete: function(){
                    $('.modal-loader').addClass('d-none');
                },
                success: function (response) {
                    if (response.status == 'success') {
                        $('#import-modal').modal('hide');
                        table.draw();
                        flashMessage(response.status,response.message);
                    }else{
                        flashMessage(response.status,response.message);
                    }
                }
            });
        });

        function select_status(status){
            $.ajax({
                type: "POST",
                url: "<?php echo e(route(routeName().'.callings.status.get-data')); ?>",
                data: {_token:_token,status:status},
                dataType: "JSON",
                success: function (response) {
                    $('select[name="sub_status"]').html('');
                    if (response) {
                        $('select[name="sub_status"]').html(response);
                    }
                }
            });
        }

        function export_select_status(status){
            $.ajax({
                type: "POST",
                url: "<?php echo e(route(routeName().'.callings.status.get-data')); ?>",
                data: {_token:_token,status:status},
                dataType: "JSON",
                success: function (response) {
                    $('select[name="export_sub_status"]').html('');
                    if (response) {
                        $('select[name="export_sub_status"]').html(response);
                    }
                }
            });
        }

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

        $(document).on('click', 'button#filter-reset',function(){
            $('form')[0].reset();
            $('input[name="start_date"]').val('')
            $('input[name="end_date"]').val('')
            table.ajax.reload();
        });


        // datepicker
        $('input#date_range').daterangepicker({
            opens: 'right',
            autoUpdateInput: false,
            locale: {
                cancelLabel: 'Clear'
            },
            ranges: {
                'Today'       : [moment(), moment()],
                'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
                'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                'This Month'  : [moment().startOf('month'), moment().endOf('month')],
                'Last Month'  : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
            }
        }, function(start, end, label) {

        });

        $('input#date_range').on('apply.daterangepicker', function(ev, picker) {
            $(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
            $('input[name="start_date"]').val(picker.startDate.format('YYYY-MM-DD'));
            $('input[name="end_date"]').val(picker.endDate.format('YYYY-MM-DD'));
        });

        $('input#date_range').on('cancel.daterangepicker', function(ev, picker) {
            $(this).val('');
            $('input[name="start_date"]').val('');
            $('input[name="end_date"]').val('');
        });

        // call datepicker
        $('input#call_date_range').daterangepicker({
            opens: 'right',
            autoUpdateInput: false,
            locale: {
                cancelLabel: 'Clear'
            },
            ranges: {
                'Today'       : [moment(), moment()],
                'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
                'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                'This Month'  : [moment().startOf('month'), moment().endOf('month')],
                'Last Month'  : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
            }
        }, function(start, end, label) {

        });

        $('input#call_date_range').on('apply.daterangepicker', function(ev, picker) {
            $(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
            $('input[name="call_start_date"]').val(picker.startDate.format('YYYY-MM-DD'));
            $('input[name="call_end_date"]').val(picker.endDate.format('YYYY-MM-DD'));
        });

        $('input#call_date_range').on('cancel.daterangepicker', function(ev, picker) {
            $(this).val('');
            $('input[name="call_start_date"]').val('');
            $('input[name="call_end_date"]').val('');
        });


        $(document).on('click', 'button.data-view', function(){
            var data_id = $(this).data('id');
            var type_name = $(this).data('type');
            var content = $(this).data('content');
            var serial = $(this).data('serial');
            $('#calling-single-modal .modal-title').text(type_name+' ('+serial+')');
            $('#calling-single-modal .content').text(content == '' ? type_name +' is empty!' : content);
            $('#calling-single-modal').modal({
                keyboard: false,
                backdrop: 'static'
            });
        });

        $(document).on('click', 'button.data-time-view', function(){
            var serial = $(this).data('serial');
            var data_time = $(this).data('time');
            $('#calling-single-modal .modal-title').text(serial);
            $('#calling-single-modal .content').html(data_time);
            $('#calling-single-modal').modal({
                keyboard: false,
                backdrop: 'static'
            });
        });

        $(document).on('click', 'button#btn-time-data', function(){
            $('.modal-title').text('Time Of Call');
            $('.content > p').text('');
            var data_id = $(this).data('id');
            $.ajax({
                type: "POST",
                url: "<?php echo e(route(routeName().'.callings.time')); ?>",
                data: {
                    _token:_token,
                    data_id:data_id
                },
                dataType: "JSON",
                success: function (response) {
                    $('#calling-data').html('');
                    if (response) {
                        $('#calling-data').append(response)
                        $('#calling-single-modal').modal({
                            keyboard: false,
                            backdrop: 'static'
                        });
                    }
                }
            });
        });

        // modal
        $(document).on('click', 'button.export_data', function(){
            $('form#export_form')[0].reset();
            $('#export-modal').modal({
                keyboard: false,
                dackdrop: 'static'
            })
        });
        
        $(document).on('submit', 'form#export_form', function(){
            $('#export-modal').modal('hide');
        });
        
        $(document).on('keyup keypress','input[name="search_here"]',function(){
           table.ajax.reload(); 
        });
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.backend', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/silvzytp/calling_code/resources/views/backend/pages/calling/index.blade.php ENDPATH**/ ?>

Zerion Mini Shell 1.0