Compare commits

...

1 Commits

Author SHA1 Message Date
spouliot ebd474ae81 Fix log material dropdown showing undefined - camelCase JSON serialization
System.Text.Json defaults to PascalCase; JS reads camelCase. Add
JsonNamingPolicy.CamelCase to the InventoryItemsForModal serialization.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 21:15:23 -04:00
@@ -503,7 +503,9 @@ public class JobsController : Controller
.OrderBy(i => i.Name)
.Select(i => new { i.Id, i.Name, i.UnitOfMeasure, i.QuantityOnHand })
.ToList();
ViewBag.InventoryItemsForModal = System.Text.Json.JsonSerializer.Serialize(inventoryItemsForModal);
ViewBag.InventoryItemsForModal = System.Text.Json.JsonSerializer.Serialize(
inventoryItemsForModal,
new System.Text.Json.JsonSerializerOptions { PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase });
// Pre-logged powder grouped by InventoryItemId (for Complete Job modal pre-fill)
ViewBag.PreLoggedPowder = allJobTransactions