%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/resources/views/lead/ |
Upload File : |
@extends('layouts.app')
@push('datatable-styles')
@include('sections.datatable_css')
@endpush
@section('content')
<!-- CONTENT WRAPPER START -->
<div class="content-wrapper">
<!-- Add Task Export Buttons Start -->
<div class="d-grid d-lg-flex d-md-flex action-bar">
<div id="table-actions" class="flex-grow-1 align-items-center">
</div>
<x-datatable.actions>
</x-datatable.actions>
</div>
<!-- Add Task Export Buttons End -->
<!-- Task Box Start -->
<div class="d-flex flex-column w-tables rounded mt-3 bg-white table-responsive">
{!! $dataTable->table(['class' => 'table table-hover border-0 w-100']) !!}
</div>
<!-- Task Box End -->
</div>
<!-- CONTENT WRAPPER END -->
@endsection
@push('scripts')
@include('sections.datatable_js')
<script>
$('#lead-table').on('preXhr.dt', function(e, settings, data) {
});
const showTable = () => {
window.LaravelDataTables["lead-table"].draw(false);
}
$('body').on('click', '.delete-table-row', function() {
var id = $(this).data('id');
Swal.fire({
title: "@lang('messages.sweetAlertTitle')",
text: "@lang('messages.recoverRecord')",
icon: 'warning',
showCancelButton: true,
focusConfirm: false,
confirmButtonText: "@lang('messages.confirmDelete')",
cancelButtonText: "@lang('app.cancel')",
customClass: {
confirmButton: 'btn btn-primary mr-3',
cancelButton: 'btn btn-secondary'
},
showClass: {
popup: 'swal2-noanimation',
backdrop: 'swal2-noanimation'
},
buttonsStyling: false
}).then((result) => {
if (result.isConfirmed) {
var url = "{{ route('lead.destroy', ':id') }}";
url = url.replace(':id', id);
var token = "{{ csrf_token() }}";
$.easyAjax({
type: 'POST',
url: url,
data: {
'_token': token,
'_method': 'DELETE'
},
success: function(response) {
if (response.status == "success") {
showTable();
}
}
});
}
});
});
$( document ).ready(function() {
@if (!is_null(request('start')) && !is_null(request('end')))
$('#datatableRange').val('{{ request('start') }}' +
' @lang("app.to") ' + '{{ request('end') }}');
$('#datatableRange').data('daterangepicker').setStartDate("{{ request('start') }}");
$('#datatableRange').data('daterangepicker').setEndDate("{{ request('end') }}");
showTable();
@endif
});
</script>
@endpush