This commit is contained in:
Dwi Swandhana
2026-02-21 05:44:43 +07:00
parent f2e562564d
commit 5274d53681
3 changed files with 36 additions and 1 deletions
@@ -223,6 +223,7 @@
<th>Nama Rack</th>
<th>Tgl Simpan</th>
<th>Input By</th>
<th>Aksi</th>
</tr>
</thead>
<tfoot>
@@ -240,6 +241,7 @@
<th>Nama Rack</th>
<th>Tgl Simpan</th>
<th>Input By</th>
<th></th>
</tr>
</tfoot>
<tbody>
@@ -258,6 +260,12 @@
<td>{{ $row->rack->name ?? '-' }}</td>
<td>{{ $row->stored_at }}</td>
<td>{{ $row->input_by }}</td>
<td class="text-center">
<form method="POST" action="{{ route('biorepository.deleteSpecimen', $row->id) }}" class="d-inline js-delete-specimen">
@csrf
<button type="submit" class="btn btn-sm btn-danger">Hapus</button>
</form>
</td>
</tr>
@endforeach
</tbody>
@@ -478,7 +486,11 @@
$(function () {
$('#biorepoTable tfoot th').each(function () {
var title = $(this).text();
$(this).html('<input type="text" placeholder="Filter ' + title + '" />');
if (title !== '') {
$(this).html('<input type="text" placeholder="Filter ' + title + '" />');
} else {
$(this).html('');
}
});
var table = $('#biorepoTable').DataTable({
@@ -498,6 +510,12 @@
$('#btnOpenListTab').on('click', function () {
$('#tabListLink').tab('show');
});
$(document).on('submit', '.js-delete-specimen', function (e) {
if (!confirm('Yakin hapus spesimen ini?')) {
e.preventDefault();
}
});
});
</script>
@endpush