first commit
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">Manajemen</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ $title }}</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card border">
|
||||
<div class="card-body">
|
||||
@include('components.datatable-header', [
|
||||
'title' => 'Daftar Verifikator',
|
||||
'description' => 'Berikut adalah daftar verifikator yang terdaftar dalam sistem',
|
||||
])
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered w-100" id="userTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>NIP</th>
|
||||
<th>Nama</th>
|
||||
@if($canAksi)
|
||||
<th>Aksi</th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
let table;
|
||||
|
||||
$(document).ready(function() {
|
||||
// Initialize DataTable
|
||||
table = $('#userTable').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: "{{ route('manajemen.user.data') }}"
|
||||
},
|
||||
columns: [{
|
||||
data: 'DT_RowIndex',
|
||||
name: 'DT_RowIndex',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
className: 'text-center',
|
||||
width: '5%'
|
||||
},
|
||||
{
|
||||
data: 'nip',
|
||||
name: 'nip'
|
||||
},
|
||||
{
|
||||
data: 'name',
|
||||
name: 'name'
|
||||
},
|
||||
@if($canAksi)
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
className: 'text-center',
|
||||
width: '10%'
|
||||
}
|
||||
@endif
|
||||
],
|
||||
language: {
|
||||
processing: "<div class='spinner'></div> Sedang Memuat...",
|
||||
}
|
||||
});
|
||||
|
||||
// Handle reset password with confirmation
|
||||
$(document).on('click', '.reset-password', function(e) {
|
||||
e.preventDefault();
|
||||
var url = $(this).attr('href');
|
||||
|
||||
if (confirm('Apakah Anda yakin ingin mereset password user ini?\n\nPassword akan diubah menjadi tanggal lahir (format: DDMMYYYY).')) {
|
||||
window.location.href = url;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user