diff --git a/portal/station-assignment.html b/portal/station-assignment.html index 5b5968e..3bc6c01 100644 --- a/portal/station-assignment.html +++ b/portal/station-assignment.html @@ -500,13 +500,13 @@ if (data.OK) { // Only top-level items (not modifiers) - look for items with categories this.items = (data.Items || []).filter(item => - item.ItemParentItemID === 0 || item.ItemCategoryID > 0 + item.ParentItemID === 0 || item.CategoryID > 0 ); console.log('[StationAssignment] Filtered items count:', this.items.length); // Build assignments from existing data this.items.forEach(item => { - if (item.ItemStationID) { - this.assignments[item.ItemID] = item.ItemStationID; + if (item.StationID) { + this.assignments[item.ItemID] = item.StationID; } }); } else { @@ -527,7 +527,7 @@ // Group by category const categories = {}; this.items.forEach(item => { - const cat = item.ItemCategoryName || 'Uncategorized'; + const cat = item.ItemName || 'Uncategorized'; if (!categories[cat]) categories[cat] = []; categories[cat].push(item); }); @@ -540,7 +540,7 @@ Object.entries(categories).forEach(([catName, items]) => { const filteredItems = items.filter(item => - item.ItemName.toLowerCase().includes(filterLower) || + item.Name.toLowerCase().includes(filterLower) || catName.toLowerCase().includes(filterLower) ); @@ -581,8 +581,8 @@ ondragend="StationAssignment.onDragEnd(event)">