added crud data master region & cabang

This commit is contained in:
Jagad R R
2025-01-08 14:12:45 +07:00
parent 1027b0dfb4
commit 314fefd52d
27 changed files with 983 additions and 15 deletions
@@ -85,6 +85,7 @@
<tr>
<th>#</th>
<th>User</th>
<th>Cabang</th>
<th>Nama Penerima</th>
<th>Tanggal</th>
<th>Jenis</th>
@@ -112,6 +113,7 @@
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $item->user->name }}</td>
<td>{{ $item->user->cabang->cabang->name }}</td>
<td>{{ $item->name }}</td>
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
<td>{{ $item->jenis }}</td>
@@ -322,7 +324,7 @@
$('#dataTable').DataTable({
responsive: false,
dom: 'Bfrtip',
buttons: ['excel', 'pdf', 'print']
buttons: ['excel', 'pdf', 'print', 'colvis'],
});
}
@@ -86,6 +86,7 @@
<th>#</th>
<th>No Expense</th>
<th>Nama</th>
<th>Cabang</th>
<th>Tanggal</th>
<th>Allowance</th>
<th>Transport Ankot</th>
@@ -113,6 +114,7 @@
<td>{{ $loop->iteration }}</td>
<td>{{ $item->expense_number }}</td>
<td>{{ $item->user->name }}</td>
<td>{{ $item->user->cabang->cabang->name }}</td>
<td>{{ \Carbon\Carbon::parse($item->created_at)->locale('id')->isoFormat('D MMMM Y') }}</td>
<td>{{ number_format($item->allowance, 0, ',', '.') }}</td>
<td>{{ number_format($item->transport_ankot, 0, ',', '.') }}</td>
@@ -324,7 +326,7 @@
$('#dataTable').DataTable({
responsive: false,
dom: 'Bfrtip',
buttons: ['excel', 'pdf', 'print']
buttons: ['excel', 'pdf', 'print', 'colvis'],
});
}
@@ -85,6 +85,7 @@
<tr>
<th>#</th>
<th>Nama</th>
<th>Cabang</th>
<th>Tanggal</th>
<th>Jenis</th>
<th>Keterangan</th>
@@ -110,6 +111,7 @@
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $item->user->name }}</td>
<td>{{ $item->user->cabang->cabang->name }}</td>
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
<td>{{ $item->kategori->name }}</td>
<td>{{ $item->keterangan }}</td>
@@ -309,7 +311,7 @@
$('#dataTable').DataTable({
responsive: false,
dom: 'Bfrtip',
buttons: ['excel', 'pdf', 'print']
buttons: ['excel', 'pdf', 'print', 'colvis'],
});
}
@@ -86,6 +86,7 @@
<th>#</th>
<th>No Expense</th>
<th>Nama</th>
<th>Cabang</th>
<th>Rayon</th>
<th>Tanggal</th>
<th>Tujuan</th>
@@ -113,6 +114,7 @@
<td>{{ $loop->iteration }}</td>
<td>{{ $item->expense_number }}</td>
<td>{{ $item->user->name }}</td>
<td>{{ $item->user->cabang->cabang->name }}</td>
<td>{{ $item->rayon->code }}</td>
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }}</td>
<td>{{ $item->tujuan }}</td>
@@ -350,7 +352,7 @@
$('#dataTable').DataTable({
responsive: false,
dom: 'Bfrtip',
buttons: ['excel', 'pdf', 'print']
buttons: ['excel', 'pdf', 'print', 'colvis'],
});
}
@@ -85,6 +85,7 @@
<tr>
<th>#</th>
<th>Nama</th>
<th>Cabang</th>
<th>Tanggal</th>
<th>Liter</th>
<th>Total</th>
@@ -113,6 +114,7 @@
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $item->user->name }}</td>
<td>{{ $item->user->cabang->cabang->name }}</td>
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('dddd, D MMMM Y HH:mm:ss') }}</td>
<td>{{ $item->liter }}</td>
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
@@ -327,7 +329,7 @@
$('#dataTable').DataTable({
responsive: false,
dom: 'Bfrtip',
buttons: ['excel', 'pdf', 'print']
buttons: ['excel', 'pdf', 'print', 'colvis'],
});
}
@@ -0,0 +1,71 @@
@extends('layouts.app')
@section('title')
Dashboard
@endsection
@section('admin-content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Tambahkan Cabang Baru</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
</li>
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="card card-primary card-outline">
<div class="card-body">
<form method="POST" action="{{ route('admin.cabang.store') }}">
@csrf
@include('backend.layouts.partials.messages')
<div class="mb-3">
<label class="form-label">Pilih Kepala Cabang</label>
<select class="form-control" name="head_id">
<option value="">Pilih Kepala Cabang</option>
@foreach ($users as $user)
<option value="{{ $user->id }}">{{ $user->name }} | {{ $user->email }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Pilih Induk Region</label>
<select class="form-control" name="region_id">
<option value="">Pilih Region</option>
@foreach ($regions as $item)
<option value="{{ $item->id }}">{{ $item->code }} | {{ $item->name }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Pilih Cost Centre</label>
<select class="form-control" name="cost_id">
<option value="">Pilih Cost Centre</option>
@foreach ($cost_centres as $item)
<option value="{{ $item->id }}">{{ $item->code }} | {{ $item->name }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Code Cabang</label>
<input type="text" class="form-control" name="code">
</div>
<div class="mb-3">
<label class="form-label">Nama Cabang</label>
<input type="text" class="form-control" name="name">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
</section>
@endsection
@@ -0,0 +1,72 @@
@extends('layouts.app')
@section('title')
Dashboard
@endsection
@section('admin-content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Edit Cabang</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
</li>
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="card card-primary card-outline">
<div class="card-body">
<form method="POST" action="{{ route('admin.cabang.update', $cabang->id) }}">
@csrf
@method('PUT')
@include('backend.layouts.partials.messages')
<div class="mb-3">
<label class="form-label">Pilih Kepala Cabang</label>
<select class="form-control" name="head_id">
<option value="">Pilih Kepala Cabang</option>
@foreach ($users as $user)
<option value="{{ $user->id }}" {{ $cabang->head_id == $user->id ? 'selected' : '' }}>{{ $user->name }} | {{ $user->email }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Pilih Induk Region</label>
<select class="form-control" name="region_id">
<option value="">Pilih Region</option>
@foreach ($regions as $item)
<option value="{{ $item->id }}" {{ $cabang->region_id == $item->id ? 'selected' : '' }}>{{ $item->code }} | {{ $item->name }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Pilih Cost Centre</label>
<select class="form-control" name="cost_id">
<option value="">Pilih Cost Centre</option>
@foreach ($cost_centres as $item)
<option value="{{ $item->id }}" {{ $cabang->cost_id == $item->id ? 'selected' : '' }}>{{ $item->code }} | {{ $item->name }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Code Cabang</label>
<input type="text" class="form-control" name="code" value="{{ $cabang->code }}">
</div>
<div class="mb-3">
<label class="form-label">Nama Cabang</label>
<input type="text" class="form-control" name="name" value="{{ $cabang->name }}">
</div>
<button type="submit" class="btn btn-primary">Save</button>
</form>
</div>
</div>
</div>
</section>
@endsection
@@ -0,0 +1,108 @@
@extends('layouts.app')
@section('title')
Dashboard
@endsection
@section('admin-content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Data Master Cabang</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
</li>
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="card card-primary card-outline">
<div class="card-body">
<h4 class="header-title float-left">List Data Cabang</h4>
<p class="float-right mb-2">
@if (Auth::user()->can('cabang.create'))
<a class="btn btn-primary text-white" href="{{ route('admin.cabang.create') }}">
Add New Cabang
</a>
@endif
</p>
<div class="clearfix"></div>
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable"
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
style="width:100%">
<thead class="bg-light text-capitalize">
<tr>
<th>#</th>
<th>Nama Kepala Cabang</th>
<th>Email Kepala Cabang</th>
<th>Region</th>
<th>Code</th>
<th>Nama</th>
<th>Cost Centre</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@foreach ($cabang as $item)
<tr>
<td>{{ $loop->index + 1 }}</td>
<td>{{ $item->head->name }}</td>
<td>{{ $item->head->email }}</td>
<td>{{ $item->region->name }}</td>
<td>{{ $item->code }}</td>
<td>{{ $item->name }}</td>
<td>{{ $item->cost->name }} ({{ $item->cost->code }})</td>
<td>
@if (auth()->user()->can('cabang.edit'))
<a class="btn btn-success btn-sm text-white" href="{{ route('admin.cabang.edit', $item->id) }}">Edit</a>
@endif
@if (auth()->user()->can('cabang.delete'))
<a class="btn btn-danger text-white btn-sm" href="javascript:void(0);"
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $item->id }}').submit(); }">
{{ __('Delete') }}
</a>
<form id="delete-form-{{ $item->id }}"
action="{{ route('admin.cabang.destroy', $item->id) }}"
method="POST" style="display: none;">
@method('DELETE')
@csrf
</form>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
@section('scripts')
<script>
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'
]
});
}
});
</script>
@endsection
@@ -37,7 +37,7 @@
<label class="form-label">Account Number</label>
<input type="text" class="form-control" name="account_number" value="{{ $category->account_number }}">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<button type="submit" class="btn btn-primary">Save</button>
</form>
</div>
</div>
@@ -54,10 +54,10 @@
<td>{{ $category->name }}</td>
<td>{{ $category->account_number }}</td>
<td>
@if (auth()->user()->can('admin.edit'))
@if (auth()->user()->can('category.edit'))
<a class="btn btn-success btn-sm text-white" href="{{ route('admin.category.edit', $category->id) }}">Edit</a>
@endif
@if (auth()->user()->can('admin.delete'))
@if (auth()->user()->can('category.delete'))
<a class="btn btn-danger text-white btn-sm" href="javascript:void(0);"
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $category->id }}').submit(); }">
{{ __('Delete') }}
@@ -37,7 +37,7 @@
<label class="form-label">Nama Cost Centre</label>
<input type="text" class="form-control" name="name" value="{{ $cost->name }}">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<button type="submit" class="btn btn-primary">Save</button>
</form>
</div>
</div>
@@ -54,10 +54,10 @@
<td>{{ $cost->code }}</td>
<td>{{ $cost->name }}</td>
<td>
@if (auth()->user()->can('admin.edit'))
@if (auth()->user()->can('cost.edit'))
<a class="btn btn-success btn-sm text-white" href="{{ route('admin.cost.edit', $cost->id) }}">Edit</a>
@endif
@if (auth()->user()->can('admin.delete'))
@if (auth()->user()->can('cost.delete'))
<a class="btn btn-danger text-white btn-sm" href="javascript:void(0);"
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $cost->id }}').submit(); }">
{{ __('Delete') }}
@@ -36,7 +36,7 @@
<label class="form-label">Nama Rayon</label>
<input type="text" class="form-control" name="name" value="{{ $rayon->name }}">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<button type="submit" class="btn btn-primary">Save</button>
</form>
</div>
</div>
@@ -54,10 +54,10 @@
<td>{{ $rayon->code }}</td>
<td>{{ $rayon->name }}</td>
<td>
@if (auth()->user()->can('admin.edit'))
@if (auth()->user()->can('rayon.edit'))
<a class="btn btn-success btn-sm text-white" href="{{ route('admin.rayon.edit', $rayon->id) }}">Edit</a>
@endif
@if (auth()->user()->can('admin.delete'))
@if (auth()->user()->can('rayon.delete'))
<a class="btn btn-danger text-white btn-sm" href="javascript:void(0);"
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $rayon->id }}').submit(); }">
{{ __('Delete') }}
@@ -0,0 +1,53 @@
@extends('layouts.app')
@section('title')
Dashboard
@endsection
@section('admin-content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Tambahkan Region Baru</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
</li>
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="card card-primary card-outline">
<div class="card-body">
<form method="POST" action="{{ route('admin.region.store') }}">
@csrf
@include('backend.layouts.partials.messages')
<div class="mb-3">
<label class="form-label">Pilih Kepala Region</label>
<select class="form-control" name="head_id">
<option value="">Pilih Kepala Region</option>
@foreach ($users as $user)
<option value="{{ $user->id }}">{{ $user->name }} | {{ $user->email }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Code Region</label>
<input type="text" class="form-control" name="code">
</div>
<div class="mb-3">
<label class="form-label">Nama Region</label>
<input type="text" class="form-control" name="name">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
</section>
@endsection
@@ -0,0 +1,54 @@
@extends('layouts.app')
@section('title')
Dashboard
@endsection
@section('admin-content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Edit Region</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
</li>
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="card card-primary card-outline">
<div class="card-body">
<form method="POST" action="{{ route('admin.region.update', $region->id) }}">
@csrf
@method('PUT')
@include('backend.layouts.partials.messages')
<div class="mb-3">
<label class="form-label">Pilih Kepala Region</label>
<select class="form-control" name="head_id">
<option value="">Pilih Kepala Region</option>
@foreach ($users as $user)
<option value="{{ $user->id }}" {{ $region->head_id == $user->id ? 'selected' : '' }}>{{ $user->name }} | {{ $user->email }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Code Region</label>
<input type="text" class="form-control" name="code" value="{{ $region->code }}">
</div>
<div class="mb-3">
<label class="form-label">Nama Region</label>
<input type="text" class="form-control" name="name" value="{{ $region->name }}">
</div>
<button type="submit" class="btn btn-primary">Save</button>
</form>
</div>
</div>
</div>
</section>
@endsection
@@ -0,0 +1,104 @@
@extends('layouts.app')
@section('title')
Dashboard
@endsection
@section('admin-content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Data Master Region</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
</li>
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="card card-primary card-outline">
<div class="card-body">
<h4 class="header-title float-left">List Data Region</h4>
<p class="float-right mb-2">
@if (Auth::user()->can('region.create'))
<a class="btn btn-primary text-white" href="{{ route('admin.region.create') }}">
Add New Region
</a>
@endif
</p>
<div class="clearfix"></div>
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable"
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
style="width:100%">
<thead class="bg-light text-capitalize">
<tr>
<th>#</th>
<th>Nama Kepala Region</th>
<th>Email Kepala Region</th>
<th>Code</th>
<th>Nama</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@foreach ($region as $item)
<tr>
<td>{{ $loop->index + 1 }}</td>
<td>{{ $item->head->name }}</td>
<td>{{ $item->head->email }}</td>
<td>{{ $item->code }}</td>
<td>{{ $item->name }}</td>
<td>
@if (auth()->user()->can('region.edit'))
<a class="btn btn-success btn-sm text-white" href="{{ route('admin.region.edit', $item->id) }}">Edit</a>
@endif
@if (auth()->user()->can('region.delete'))
<a class="btn btn-danger text-white btn-sm" href="javascript:void(0);"
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $item->id }}').submit(); }">
{{ __('Delete') }}
</a>
<form id="delete-form-{{ $item->id }}"
action="{{ route('admin.region.destroy', $item->id) }}"
method="POST" style="display: none;">
@method('DELETE')
@csrf
</form>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
@section('scripts')
<script>
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'
]
});
}
});
</script>
@endsection
@@ -0,0 +1,143 @@
@extends('layouts.app')
@section('title')
Dashboard
@endsection
@section('admin-content')
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Active Budgets</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
</li>
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-4 col-6">
<div class="small-box bg-info">
<div class="inner">
<h3>Rp {{ number_format(2000000, 0, ',', '.') }}</h3>
<p>Total Budget Bulan Ini</p>
</div>
<div class="icon">
<i class="fas fa-wallet"></i>
</div>
</div>
</div>
<div class="col-lg-4 col-6">
<div class="small-box bg-success">
<div class="inner">
<h3>Rp {{ number_format(2000000, 0, ',', '.') }}</h3>
<p>Total Budget Tersedia</p>
</div>
<div class="icon">
<i class="fas fa-check-circle"></i>
</div>
</div>
</div>
<div class="col-lg-4 col-6">
<div class="small-box bg-danger">
<div class="inner">
<h3 class="text-white">Rp {{ number_format(2000000, 0, ',', '.') }}</h3>
<p class="text-white">Total Budget Terpakai</p>
</div>
<div class="icon">
<i class="fas fa-times"></i>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="content">
<div class="container-fluid">
<div class="card card-primary card-outline">
<div class="card-body">
<h4 class="header-title float-left">Current Active Budget</h4>
<div class="clearfix"></div>
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable"
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
style="width:100%">
<thead class="bg-light text-capitalize">
<tr>
<th>#</th>
<th>Penerima</th>
<th>Cabang</th>
<th>Pengirim</th>
<th>Total</th>
<th>Keterangan</th>
<th>Periode</th>
<th>Tanggal Closing</th>
<th>Status</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $item->receiver->name }}</td>
<td>{{ $item->cabang->name }}</td>
<td>{{ $item->sender->name }}</td>
<td>{{ number_format($item->amount, 0, ',', '.') }}</td>
<td>{{ $item->remarks }}</td>
<td>{{ strtoupper($item->periode_month) }} {{ $item->periode_year }}</td>
<td>{{ \Carbon\Carbon::parse($item->closing_at)->locale('id')->isoFormat('D MMMM Y H:mm') }}</td>
<td>
@if ($item->status == 'Unassigned')
<span class="badge badge-warning text-white">{{ $item->status }}</span>
@elseif ($item->status == 'Assigned')
<span class="badge badge-success text-white">{{ $item->status }}</span>
@else
<span class="badge badge-danger text-white">{{ $item->status }}</span>
@endif
</td>
<td>
@if (auth()->user()->can('budget_control.delete'))
<form action="{{ route('budget_control.destroy', $item->id) }}" method="POST" class="d-inline" onsubmit="return confirm('Are you sure you want to delete this item?');">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger btn-sm">
<i class="fas fa-trash"></i>
</button>
</form>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
@section('scripts')
<script>
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: false,
dom: 'Bfrtip',
buttons: ['excel', 'pdf', 'print']
});
}
});
</script>
@endsection