%PDF- %PDF-
Direktori : /home/silvzytp/ccd-ind-code/resources/views/backend/pages/calling/ |
Current File : //home/silvzytp/ccd-ind-code/resources/views/backend/pages/calling/transfer.blade.php |
@extends('layouts.backend') @section('title', $siteTitle) @section('action') @permission('app.agents.create') <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>--> <!--<a href="{{ route(routeName().'.callings.create') }}" class="btn btn-sm btn-primary"><i class="ti-plus fs-ism fw-800"></i> Add Calling</a>--> </div> @endpermission @endsection @push('styles') <style> .import-file { width: 100%; border: 1px dotted #ccc; padding: 20px; text-align: center; margin-bottom: 0; } </style> @endpush @section('content') <div class="row"> <div class="col-12"> <div id="bulk-card" class="d-none"> <form method="POST" id="bulk-form"> @csrf <div class="d-flex align-items-center mb-3"> <x-form.selectbox name="operation" divClass="mb-0"> <option value="">-- Select --</option> <option value="transfer">Transfer</option> </x-form.selectbox> @if ($agents->isNotEmpty()) <x-form.selectbox name="managers" divClass="mb-0 ml-2 manager-list d-none"> <option value="">-- Select Agent --</option> @foreach ($agents as $value) <option value="{{ $value->id }}">{{ $value->name }}</option> @endforeach </x-form.selectbox> @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-borderless table-style" id="calling-datatables"> <thead> <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>Serial</th> <th>Name</th> <th>Email</th> <th>Number 1</th> <th>Number 2</th> <th>Status</th> <th>Sub Status</th> <th>Comment</th> <th>Time of Calling</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.import') @endsection @push('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: 25, //number of data show per page ajax: { url: "{{ route(routeName().'.callings.transfer.get-data') }}", type: "POST", dataType: "JSON", data: function(d) { d._token = _token; }, }, columns: [ {data: 'bulk_check',orderable: false, searchable: false}, {data: 'serial'}, {data: 'name'}, {data: 'email'}, {data: 'number_1'}, {data: 'number_2'}, {data: 'status'}, {data: 'sub_status'}, {data: 'comment'}, {data: 'time_of_calling'}, {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_" }, 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_{{ 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_{{ 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_{{ 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' ); } } ] } }); // 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 = "{{ 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 == 'transfer') { $('.manager-list').removeClass('d-none'); }else{ $('.manager-list').addClass('d-none'); } }); $(document).on('click', 'button.import-calling', function(){ $('#import-modal').modal({ backdrop: 'static', keyboard: false }); }); $(document).on('submit', 'form#import-form-submit', function(e){ e.preventDefault() $.ajax({ type: "POST", url: "{{ route('super.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); } } }); }); </script> @endpush