diff --git a/htdocs/app/Http/Controllers/BiorepositoryController.php b/htdocs/app/Http/Controllers/BiorepositoryController.php index 0f934dfd..0f8457c9 100644 --- a/htdocs/app/Http/Controllers/BiorepositoryController.php +++ b/htdocs/app/Http/Controllers/BiorepositoryController.php @@ -23,6 +23,10 @@ class BiorepositoryController extends Controller $data['totalCabinets'] = BioCabinet::count(); $data['totalRacks'] = BioRack::count(); $data['totalSpecimens'] = BioSpecimen::count(); + $data['specimenRows'] = BioSpecimen::with(['cabinet', 'rack']) + ->orderBy('stored_at', 'DESC') + ->orderBy('id', 'DESC') + ->get(); $data['cabinets'] = BioCabinet::with([ 'racks' => function ($query) { diff --git a/htdocs/resources/views/admin/biorepository.blade.php b/htdocs/resources/views/admin/biorepository.blade.php index 4666c11b..24940303 100644 --- a/htdocs/resources/views/admin/biorepository.blade.php +++ b/htdocs/resources/views/admin/biorepository.blade.php @@ -44,6 +44,7 @@ padding: 7px 0; cursor: pointer; text-align: center; + width: 100%; } .slot-btn.slot-filled { background: #fce8e8; @@ -57,6 +58,12 @@ border-radius: 10px; padding: 12px; } + #biorepoTable tfoot input { + width: 100%; + min-width: 90px; + font-size: 11px; + padding: 4px 6px; + } @endpush @@ -101,119 +108,48 @@
Total Lemari

{{ $totalCabinets }}

+
Total Rack

{{ $totalRacks }}

+
Total Spesimen

{{ $totalSpecimens }}

+
-
-
-
-
Tambah Lemari
-

-
- @csrf -
- - -
-
- - -
-
- - -
-
- - -
- -
-
-
+
+ -
-
-
Tambah Rack
-

-
- @csrf -
- - -
-
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
-
- -
-
-
+
+

Spesimen dengan Waktu Simpan Paling Lama

@if($oldestSpecimen) -
+
{{ $oldestSpecimen->specimen_code }} - {{ $oldestSpecimen->bacteria_name ?? $oldestSpecimen->specimen_name }}
Lemari: {{ $oldestSpecimen->cabinet->name ?? '-' }} | Rack: {{ $oldestSpecimen->rack->name ?? '-' }}
Disimpan sejak: {{ $oldestSpecimen->stored_at }} ({{ $oldestStorageDays }} hari)
@else -
Belum ada data spesimen.
+
Belum ada data spesimen.
@endif -
-
-
-
-
-

Visualisasi Lemari, Rack, dan Slot

Klik slot berwarna biru untuk mengisi spesimen. Slot merah artinya sudah terisi.

@@ -267,11 +203,165 @@
Belum ada data lemari biorepository.
@endforelse
+ +
+

List Biorepository

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @foreach($specimenRows as $row) + + + + + + + + + + + + + + + + @endforeach + +
Kode SampleKategoriShelfRackSlotBoxTubeBacteryStrainLemariNama RackTgl SimpanInput By
Kode SampleKategoriShelfRackSlotBoxTubeBacteryStrainLemariNama RackTgl SimpanInput By
{{ $row->specimen_code }}{{ $row->category_storage }}{{ $row->shelf_number }}{{ $row->rack_number }}{{ $row->slot_number }}{{ $row->box_number }}{{ $row->tube_number }}{{ $row->bacteria_name ?? $row->specimen_name }}{{ $row->strain }}{{ $row->cabinet->code ?? '-' }}{{ $row->rack->name ?? '-' }}{{ $row->stored_at }}{{ $row->input_by }}
+
+
+ + + +