Files

111 lines
3.6 KiB
PHP

@extends('layouts.main')
@section('css')
<style>
#userTable thead th {
background: #2563eb !important; background-color: #2563eb !important;
color: #fff !important;
border-color: #2563eb !important;
}
#userTable tbody tr:hover > * {
background-color: rgba(13, 110, 253, 0.08) !important;
box-shadow: none;
}
</style>
@endsection
@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-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>&nbsp; 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