%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/e8c73a24978014fa7c63f65913ff2199033f53ad.php

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

<?php $__env->stopSection(); ?>
<?php $__env->startPush('styles'); ?>
    <style>
        #calling-datatables tbody tr td:nth-child(7),
        #calling-datatables tbody tr td:nth-child(8),
        #calling-datatables tbody tr td:nth-child(9){
            font-weight: 600;
            font-size: 15px;
        }
    </style>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-12">
            <div class="card mb-3">
                <div class="card-header">
                    <h6 class="card-title">Filter</h6>
                </div>
                <div class="card-body">
                    <form method="POST" id="filter-form">
                        <div class="row filter-row">
                            <div class="col-md-3">
                                <input type="text" class="form-control" name="search" placeholder="file name, serial, name, email search here..">
                            </div>
                            <div class="col-md-2">
                                <select class="form-control" name="status" onchange="filterSelectStatus(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-2">
                                <select class="form-control" name="filter_sub_status">
                                    <option value="">-- Select Sub Status --</option>
                                </select>
                            </div>
                            <div class="col-md-2">
                                <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 class="col-md-2">
                                <select class="form-control" name="filter_touch">
                                    <option value="">-- Select Please --</option>
                                    <option value="1">Touch</option>
                                    <option value="2">Untouch</option>
                                </select>
                            </div>
                            <div class="col-md-2">
                                <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-md-4 mt-3">
                                <div class="d-flex align-items-center">
                                    <label class="mb-0" style="min-width: 100px;">Call Date</label>
                                    <div class="w-100">
                                        <input type="text" class="form-control" 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="col-md-1 text-right mt-3">
                                <button type="button" id="filter-btn" class="btn btn-md btn-primary"><i class="fas fa-search"></i></button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="card">
                <div class="card-body px-0">
                    <div class="table-responsive">
                        <table class="table table-sm table-bordered table-style" id="calling-datatables">
                            <tr class="bg-primary text-light">
                                <thead>
                                    <th>Serial</th>
                                    <th>File Name</th>
                                    <th>Date</th>
                                    <th>Agent</th>
                                    <th>Name</th>
                                    <th>Email</th>
                                    <th>Phone</th>
                                    <th>Number 1</th>
                                    <th>Number 2</th>
                                    <th>Edit</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>
                                </thead>
                            </tr>
                            <tbody>

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

    <?php echo $__env->make('backend.modal.calling-update', \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 $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
    <script>
        table = $('#calling-datatables').DataTable({
            processing: true,
            serverSide: true,
            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('app.callings.agent.get-data')); ?>",
                type: "POST",
                dataType: "JSON",
                data: function(d) {
                    d._token = _token;
                    d.status = $('select[name="status"]').val();
                    d.sub_status = $('select[name="filter_sub_status"]').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.touch             = $('select[name="filter_touch"]').val();
                },
            },
            columns: [
                {data: 'serial'},
                {data: 'file_name'},
                {data: 'date'},
                {data: 'agent'},
                {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: [
                    {
                        extend: 'pdf',
                        filename: 'users_<?php echo e(date("d_m_d")); ?>',
                        title: 'User List',
                        orientation: "portrait",
                        pageSize: "A4",
                        className: 'pdfButton btn btn-sm btn-primary',
                        exportOptions: {
                            columns: '0,1,2,3,4,5,6,7,8,9,10,11'
                        },
                    },
                    {
                        extend: 'excel',
                        filename: 'users_<?php echo e(date("d_m_d")); ?>',
                        title: 'User List',
                        className: 'excelButton btn btn-sm btn-primary',
                        exportOptions: {
                            columns: '0,1,2,3,4,5,6,7,8,9,10,11'
                        },
                    },
                    {
                        extend: 'csv',
                        filename: 'users_<?php echo e(date("d_m_d")); ?>',
                        title: 'User List',
                        className: 'csvButton btn btn-sm btn-primary',
                        exportOptions: {
                            columns: '1,2,3,4,5,6,7,8,9,10,11,12'
                        },
                    },
                    {
                        extend: 'print',
                        title: 'User List',
                        orientation: "landscape",
                        pageSize: "A4",
                        className: 'printButton btn btn-sm btn-primary',
                        exportOptions: {
                            columns: '0,1,2,3,4,5,6,7,8,9,10,11'
                        },
                        customize: function ( win ) {
                            $(win.document.body)
                                .addClass('bg-white')
                                .css('font-size','10pt');

                            $(win.document.body).find('table')
                                .addClass('compact bg-white')
                                .css('font-size','inherit' );
                        }
                    }
                ]
            }
            <?php endif; ?>
        });

        $(document).on('click', 'button.btn-edit', function(){
            var data_id = $(this).data('id');

            if (data_id != '') {
                $.ajax({
                    type: "POST",
                    url: "<?php echo e(route('app.callings.agent.edit')); ?>",
                    data: {
                        _token:_token,
                        data_id:data_id
                    },
                    dataType: "JSON",
                    success: function (response) {
                        if (response.status == 'error') {
                            flashMessage(response.status,response.message);
                        }else{
                            $('#calling-render-box').html(response);
                            $('#calling-modal').modal({
                                backdrop: 'static',
                                keyboard: false
                            });
                            var calling_id = $('input[name="calling_id"]').val();
                            var status_id = $('input[name="status_id"]').val();
                            statusSelected(calling_id,status_id);
                        }
                    }
                });
            }
        });

        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) {
                    $('.filter-row select[name="sub_status"]').html('');
                    if (response) {
                        $('.filter-row select[name="sub_status"]').html(response);
                    }
                }
            });
        }

        function selectStatus(status){
            if (status == 1) {
                $('#reminder-date').removeClass('d-none');
            }else{
                $('#reminder-date').addClass('d-none');
            }
            
            $.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 filterSelectStatus(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="filter_sub_status"]').html('');
                    if (response) {
                        $('select[name="filter_sub_status"]').html(response);
                    }
                }
            });
        }

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

        $(document).on('submit','form#calling-update-form', function(e){
            e.preventDefault();

            $.ajax({
                type: "POST",
                url: "<?php echo e(route('app.callings.agent.update')); ?>",
                data: new FormData(this),
                dataType: "JSON",
                processData: false,
                contentType: false,
                cache: false,
                beforeSend: function(){
                    $('form button#call_update span').addClass('spinner-border spinner-border-sm text-light');
                },
                complete: function(){
                    $('form button#call_update span').removeClass('spinner-border spinner-border-sm text-light');
                },
                success: function (response) {
                    if (response.status == 'success') {
                        flashMessage(response.status,response.message);
                        table.ajax.reload(null, false);
                        $('#calling-modal').modal('hide');
                    }
                    
                    if (response.status == 'error') {
                        flashMessage(response.status,response.message);
                    }
                }
            });
        });

        $(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#filter-btn',function(){
            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-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'
                        });
                    }
                }
            });
        });
    </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/agent-calling.blade.php ENDPATH**/ ?>

Zerion Mini Shell 1.0