%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/silvzytp/calling_code/resources/views/backend/pages/
Upload File :
Create Path :
Current File : /home/silvzytp/calling_code/resources/views/backend/pages/dashboard-data.blade.php

@extends('layouts.backend')
@section('title', $siteTitle)
@push('styles')

@endpush

@section('content')
<div class="row pt-4">
    <div class="col-12">
        <div class="card">
            <div class="card-body px-0">
                <table class="table table-sm table-borderless table-style" id="dashboard-datatables">
                    <thead>
                        <th>File Name</th>
                        <th>Date</th>
                        <th>Agent</th>
                        <th>Serial</th>
                        <th>Name</th>
                        <th>Email</th>
                        <th>Phone</th>
                        <th>Number 1</th>
                        <th>Number 2</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>
                    <tbody>

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

@include('backend.modal.calling-modal')
@endsection

@push('scripts')
    <script>
        table = $('#dashboard-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,200,-1],
                [5, 10, 15, 25, 50, 100,200,"All"]
            ],
            pageLength: 10, //number of data show per page
            ajax: {
                url: "{{ url()->full() }}",
                type: "GET",
                dataType: "JSON",
                data: function(d) {
                    d._token = _token;
                },
            },
            columns: [
                {data: 'file_name'},
                {data: 'date'},
                {data: 'agent'},
                {data: 'serial'},
                {data: 'name'},
                {data: 'email'},
                {data: 'phone'},
                {data: 'number_1'},
                {data: 'number_2'},
                {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="{{ 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_"
            }
        });

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

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

        $(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: "{{ 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>
@endpush

Zerion Mini Shell 1.0