From f844bb1fb7a95f5c0b673049d01c45c6003c395c Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Tue, 10 Feb 2026 14:29:09 +0700 Subject: [PATCH] Refactor: Improve audit log UI readability by adjusting layout, detailing stock changes, and adding an empty state. --- .../components/sections/ui/audit.blade.php | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/resources/views/components/sections/ui/audit.blade.php b/resources/views/components/sections/ui/audit.blade.php index 0e5abd6..f53f682 100644 --- a/resources/views/components/sections/ui/audit.blade.php +++ b/resources/views/components/sections/ui/audit.blade.php @@ -10,14 +10,22 @@ -
+
@forelse ($activityLogs as $log)
-
{{ $log->log_name }}
-
{{ formatDateLocalized($log->created_at) }}
-
{{ $log->causer?->employee?->full_name }}
- +
{{ $log->log_name }}
+
{{ formatDateLocalized($log->created_at) }}
+
+ +
+
+ {{ $log->properties['location_name'] ?? 'Lokasi Tidak Diketahui' }} + ({{ ucfirst($log->properties['location_type'] ?? '') }}) +
+ {{ $log->event['label'] }}
@@ -25,21 +33,37 @@
-
Stok Sebelumnya: {{ formatCurrencyNumber($log->properties['previous_stock']) }}
- -
Perubahan: {{ formatCurrencyNumber($log->properties['quantity_change']) }}
- -
Total Stok: {{ formatCurrencyNumber($log->properties['new_stock']) }}
+
Awal: {{ formatCurrencyNumber($log->properties['previous_stock'] ?? 0) }} +
+
-

- {{ $log->description }} +

+ +

+ {{ $log->causer?->employee?->full_name ?? ($log->causer?->name ?? 'System') }} +

+
+ +

+ "{{ $log->description }}"

@empty @include('components.animations.lottie.boxing-cat') +
+ Belum ada riwayat tercatat untuk barang ini. +
@endforelse