File: //home/armgroup/libs/resources/views/admin/orders/index.blade.php
@extends('admin.layouts.app')
@section('title', 'پنل مدیریت | تمام سفارشات')
@section('content')
<div class="content-wrapper">
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">تمام سفارشات</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-left">
{{ Breadcrumbs::render('orders') }}
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<div class="container-fluid bg-white">
<div class="row mb-4">
<div class="col-lg-2 col-md-6 col-12 mt-3">
<button class="btn btn-block btn-info btn-sm action-btn" value="print"><span class="fa fa-print"></span> چاپ گروهی</button>
</div>
</div>
<div class="table-responsive-sm table-responsive-md">
{{ $dataTable->table() }}
</div>
</div>
</section>
</div>
@endsection
@section('footer')
{{ $dataTable->scripts() }}
<script>
$(document).ready(function () {
$("#check_all").click(function(){
$('.datatables-checkbox').not(this).prop('checked', this.checked);
});
$('.action-btn').on('click', function (e) {
var checked_ids = $('input:checkbox:checked').map(function () {
return $(this).val();
}).get();
if(checked_ids.length) {
window.location = '/admin/orders/group-print?ids=' + checked_ids;
} else {
iziToast.error({
message: 'سفارشی جهت چاپ انتخاب نشده است!',
'position': 'topLeft'
});
}
});
$('#orders-table').on('draw.dt', function () {
$('#check_all').prop('checked', false);
});
});
</script>
@endsection