@if (viewMode == "grid") { } @if (HasActiveFilters) { }
@* Loading State *@ @if (isLoading) {
Lade Lagerplätze...
} else if (filteredLocations.Count == 0) {
📦

Keine Lagerplätze

@(string.IsNullOrEmpty(searchTerm) ? "Erstellen Sie Lagerplätze für Ihre Reifenlagerung." : "Keine Ergebnisse für Ihre Suche.")

@if (string.IsNullOrEmpty(searchTerm)) { }
} else if (viewMode == "grid") { @* Grid View - grouped by area and row *@ @foreach (var areaGroup in filteredLocations.GroupBy(l => l.Area).OrderBy(g => (int)g.Key)) {

@(areaGroup.Key == AreaType.Lager ? "🏭" : "🔧") @areaGroup.Key.GetDisplayName()

@foreach (var rowGroup in areaGroup.GroupBy(l => l.Row).OrderBy(g => g.Key)) { var rowKey = $"{areaGroup.Key}-{rowGroup.Key}"; var isCollapsed = collapsedRows.Contains(rowKey); var occupiedCount = rowGroup.Count(l => l.IsOccupied); var totalCount = rowGroup.Count();
@if (printErrorRowKey == rowKey && printError != null) { } @if (!isCollapsed) { @foreach (var posGroup in rowGroup.GroupBy(l => l.Position).OrderBy(g => (int)g.Key)) {

@posGroup.Key.GetDisplayName()

@foreach (var location in posGroup.OrderBy(l => l.SlotNumber)) { var storedTireStack = location.OccupiedTireStack;
@location.Code @location.SlotNumber
@if (location.IsOccupied && storedTireStack != null) {
@(storedTireStack.Customer?.FullName ?? storedTireStack.CatalogItem?.Name ?? "Lager") @if (storedTireStack.Vehicle != null) { 🚗 @storedTireStack.Vehicle.ShortName } @(storedTireStack.Season == TireSeason.Sommer ? "☀️" : storedTireStack.Season == TireSeason.Winter ? "❄️" : "🔄") @if (!string.IsNullOrEmpty(storedTireStack.TireSize)) { @storedTireStack.TireSize }
} else {
Frei
} @if (!location.IsAvailable) {
Gesperrt
}
}
} }
}
} } else { @* Table View *@
@foreach (var location in filteredLocations) { var storedTireStack = location.OccupiedTireStack; }
Code Gebäude Reihe Seite/Ebene Platz Kunde/Inhalt Reifen Saison Eingelagert
@location.Code @(location.Area == AreaType.Lager ? "🏭" : "🔧") @location.Area.GetDisplayName() @location.Row @location.Position.GetShortName() @location.SlotNumber @if (storedTireStack != null) { @if (storedTireStack.Customer != null) { @storedTireStack.Customer.FullName @if (storedTireStack.Vehicle != null) { 🚗 @storedTireStack.Vehicle.ShortName } } else { 📦 @(storedTireStack.CatalogItem?.Name ?? "Lager") } } else { - } @if (storedTireStack != null) { 1 (@TireStack.TiresPerStack) @if (!string.IsNullOrEmpty(storedTireStack.TireSize)) { @storedTireStack.TireSize } } else { - } @if (storedTireStack != null) { @(storedTireStack.Season == TireSeason.Sommer ? "☀️" : storedTireStack.Season == TireSeason.Winter ? "❄️" : "🔄") } else { - } @if (location.OccupiedSince.HasValue) { @location.OccupiedSince.Value.ToLocalTime().ToString("dd.MM.yy") } else { - }
} @* Batch Create Section *@
@if (showBatchCreate) {

Erstellen Sie mehrere Lagerplätze auf einmal – pro Platz werden alle 4 Positionen (links/rechts × oben/unten) angelegt.

-
Vorschau: @LocationCodeService.GenerateLocationCode(batchArea, batchRow, ShelfPosition.LinksOben, batchSlotStart) ... @LocationCodeService.GenerateLocationCode(batchArea, batchRow, ShelfPosition.RechtsUnten, batchSlotEnd)
@batchCount Plätze = @(batchCount * TireStack.TiresPerStack) Reifen Kapazität
@if (!string.IsNullOrEmpty(batchError)) {
@batchError
}
}
@* Location Details Modal *@ @if (selectedLocation != null) { } @* Delete Confirmation Modal *@ @if (showDeleteConfirm && locationToDelete != null) {
} @* Add/Edit Location Modal - Improved UI/UX *@ @if (showModal) { }