|
|
|
|
@@ -1,10 +1,10 @@
|
|
|
|
|
<% content_for :title, "Dashboard Übersicht" %>
|
|
|
|
|
|
|
|
|
|
<div class="space-y-6">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- KENNZAHLEN-GRID -->
|
|
|
|
|
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Karte 1: Gesamtartikel -->
|
|
|
|
|
<div class="bg-white border border-gray-200 rounded-xl p-5 shadow-sm flex items-center gap-4">
|
|
|
|
|
<div class="p-3 bg-blue-50 text-blue-600 rounded-lg">
|
|
|
|
|
@@ -16,7 +16,7 @@
|
|
|
|
|
<h3 class="text-2xl font-bold text-gray-800"><%= @total_items %></h3>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Karte 2: Im Lager -->
|
|
|
|
|
<div class="bg-white border border-gray-200 rounded-xl p-5 shadow-sm flex items-center gap-4">
|
|
|
|
|
<div class="p-3 bg-amber-50 text-amber-600 rounded-lg">
|
|
|
|
|
@@ -51,7 +51,7 @@
|
|
|
|
|
<svg class="h-5 w-5 text-gray-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
|
|
|
|
Zuletzt registrierte Artikel
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if @recent_items.any? %>
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
<% @recent_items.each do |item| %>
|
|
|
|
|
@@ -83,4 +83,52 @@
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="bg-white border border-gray-200 rounded-xl shadow-sm p-6 mt-6">
|
|
|
|
|
<h2 class="text-base font-bold text-gray-800 mb-4 flex items-center gap-2">
|
|
|
|
|
<!-- Heroicon: arrows-right-left -->
|
|
|
|
|
<svg class="h-5 w-5 text-gray-500" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5" />
|
|
|
|
|
</svg>
|
|
|
|
|
Letzte Artikel-Zuordnungen & Bewegungen
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
<% if @recent_assignments.any? %>
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
<% @recent_assignments.each do |log| %>
|
|
|
|
|
<div class="flex items-start sm:items-center justify-between p-3 bg-gray-50 rounded-lg text-sm border border-gray-100 gap-4">
|
|
|
|
|
<div class="flex items-center gap-3 min-w-0">
|
|
|
|
|
<!-- Markantes blaues Badge für die Sticker-ID des bewegten Artikels -->
|
|
|
|
|
<span class="p-1.5 bg-blue-100 text-blue-700 rounded-md font-mono text-[10px] font-bold shrink-0">
|
|
|
|
|
#<%= log.item.sticker_id %>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<div class="min-w-0">
|
|
|
|
|
<p class="font-semibold text-gray-800 truncate">
|
|
|
|
|
<%= link_to log.item.name, item_path(log.item), class: "hover:text-blue-600 transition" %>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="text-xs text-gray-500 truncate">
|
|
|
|
|
<% if log.user.present? %>
|
|
|
|
|
Ausgegeben an: 👤 <%= log.user.name %>
|
|
|
|
|
<% elsif log.room.present? %>
|
|
|
|
|
Standort: 📍 <%= log.room.name_with_building %>
|
|
|
|
|
<% else %>
|
|
|
|
|
📦 Ins Hauptlager gelegt
|
|
|
|
|
<% end %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="text-xs text-gray-400 text-right shrink-0">
|
|
|
|
|
<%= time_ago_in_words(log.created_at) %> vor
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="text-center py-6 text-gray-400 text-sm">
|
|
|
|
|
Es wurden noch keine Artikel-Bewegungen im System registriert.
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|