update
This commit is contained in:
@@ -168,7 +168,13 @@
|
||||
|
||||
@forelse($cabinets as $cabinet)
|
||||
<div class="cabinet-visual">
|
||||
<h5 class="m-b-15">{{ $cabinet->code }} - {{ $cabinet->name }} <small class="text-muted">({{ $cabinet->location ?? 'Lokasi belum diisi' }})</small></h5>
|
||||
<div class="d-flex justify-content-between align-items-start m-b-15">
|
||||
<h5 class="m-b-0">{{ $cabinet->code }} - {{ $cabinet->name }} <small class="text-muted">({{ $cabinet->location ?? 'Lokasi belum diisi' }})</small></h5>
|
||||
<form method="POST" action="{{ route('biorepository.deleteCabinet', $cabinet->id) }}" class="js-delete-cabinet">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-sm btn-danger">Delete Lemari</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="rack-grid">
|
||||
@forelse($cabinet->racks as $rack)
|
||||
@php
|
||||
@@ -182,7 +188,13 @@
|
||||
$tubeCapacity = (int) $rack->capacity;
|
||||
@endphp
|
||||
<div class="rack-box">
|
||||
<div class="rack-header">{{ $rack->code }} - {{ $rack->name }}</div>
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div class="rack-header">{{ $rack->code }} - {{ $rack->name }}</div>
|
||||
<form method="POST" action="{{ route('biorepository.deleteRack', $rack->id) }}" class="js-delete-rack">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-xs btn-danger">Delete Rack</button>
|
||||
</form>
|
||||
</div>
|
||||
<div style="font-size:12px;">Rack No {{ $rack->rack_number ?? $rack->id }} | Total Shelf {{ $shelfCount }} | 1 Box per Shelf | Tube per Box {{ $tubeCapacity }}</div>
|
||||
<div style="font-size:12px;">Terisi: {{ $rack->specimens->count() }}</div>
|
||||
|
||||
@@ -530,6 +542,16 @@
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
$(document).on('submit', '.js-delete-rack', function (e) {
|
||||
if (!confirm('Yakin hapus rack ini? Semua spesimen pada rack ini juga akan dihapus.')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
$(document).on('submit', '.js-delete-cabinet', function (e) {
|
||||
if (!confirm('Yakin hapus lemari ini? Semua rack dan spesimennya akan dihapus.')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user