minor fixes
This commit is contained in:
@@ -35,45 +35,47 @@
|
||||
<div class="clearfix"></div>
|
||||
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<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</th>
|
||||
<th>Account Number</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($categories as $category)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $category->name }}</td>
|
||||
<td>{{ $category->account_number }}</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.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'))
|
||||
<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') }}
|
||||
</a>
|
||||
<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</th>
|
||||
<th>Account Number</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($categories as $category)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $category->name }}</td>
|
||||
<td>{{ $category->account_number }}</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.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'))
|
||||
<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') }}
|
||||
</a>
|
||||
|
||||
<form id="delete-form-{{ $category->id }}"
|
||||
action="{{ route('admin.category.destroy', $category->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<form id="delete-form-{{ $category->id }}"
|
||||
action="{{ route('admin.category.destroy', $category->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,7 +88,7 @@
|
||||
$(document).ready(function () {
|
||||
if ($('#dataTable').length) {
|
||||
$('#dataTable').DataTable({
|
||||
responsive: true,
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'excel', 'pdf', 'print'
|
||||
|
||||
@@ -35,45 +35,47 @@
|
||||
<div class="clearfix"></div>
|
||||
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<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>Code</th>
|
||||
<th>Nama</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($costs as $cost)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $cost->code }}</td>
|
||||
<td>{{ $cost->name }}</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.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'))
|
||||
<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') }}
|
||||
</a>
|
||||
<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>Code</th>
|
||||
<th>Nama</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($costs as $cost)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $cost->code }}</td>
|
||||
<td>{{ $cost->name }}</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.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'))
|
||||
<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') }}
|
||||
</a>
|
||||
|
||||
<form id="delete-form-{{ $cost->id }}"
|
||||
action="{{ route('admin.cost.destroy', $cost->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<form id="delete-form-{{ $cost->id }}"
|
||||
action="{{ route('admin.cost.destroy', $cost->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,7 +88,7 @@
|
||||
$(document).ready(function () {
|
||||
if ($('#dataTable').length) {
|
||||
$('#dataTable').DataTable({
|
||||
responsive: true,
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'excel', 'pdf', 'print'
|
||||
|
||||
@@ -35,45 +35,47 @@
|
||||
<div class="clearfix"></div>
|
||||
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<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>Code</th>
|
||||
<th>Nama</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rayons as $rayon)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $rayon->code }}</td>
|
||||
<td>{{ $rayon->name }}</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.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'))
|
||||
<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') }}
|
||||
</a>
|
||||
<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>Code</th>
|
||||
<th>Nama</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rayons as $rayon)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $rayon->code }}</td>
|
||||
<td>{{ $rayon->name }}</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.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'))
|
||||
<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') }}
|
||||
</a>
|
||||
|
||||
<form id="delete-form-{{ $rayon->id }}"
|
||||
action="{{ route('admin.rayon.destroy', $rayon->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<form id="delete-form-{{ $rayon->id }}"
|
||||
action="{{ route('admin.rayon.destroy', $rayon->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user