A
Arturo Capellan

Bar Beverage Inventory Application

Blazor Inventory Manager provides a bottle inventory UI to add, weigh and track volumes using EditForm validation and a Bootstrap table with progress bars and inline edits.

LIVE DEMO
Generated using Instruct UI - An AI for Blazor UI Generation
## What's implemented - Summary cards (total bottles, with liquid, empty, total volume). - Form to add a bottle using EditForm with DataAnnotationsValidator and ValidationSummary. - Dropdowns (InputSelect) for brand and presentation (master data). - Measured-weight calculator (InputNumber) that converts grams → ounces → ml using InventoryService helpers. - Filters and search, button group for status filters. - Responsive Bootstrap table listing bottles with inline edit of volume, consume flow, delete and mark-empty actions. - Progress bar per row showing percentage remaining; status badges (Vacía/Llena/Parcial). ## Key components - EditForm, DataAnnotationsValidator, ValidationSummary - InputText, InputNumber, InputSelect (@bind-Value) - Table with progress bar and Bootstrap buttons - InventoryService singleton used for data, calculations and summary properties - State management via component fields and StateHasChanged ## How it works - Model binding uses EditForm and @bind-Value for Input* controls; DataAnnotations attributes on models enforce validation. - Masters (BottleMasterModel) seed demonstration data; selection changes are detected in OnAfterRender to update selection state. - ApplyMeasuredWeight calls InventoryService.CalculateOunces/CalculateMlFromWeight and fills the newBottle fields; AddBottle persists to in-memory InventoryService and resets the form. - Filters are computed in ApplyFilters(); inline editing toggles editingId/consumeId states and calls InventoryService.Update/Consume. ## Styling - Uses Bootstrap utility and component classes (container, row, col-*, card, btn, form-control, table, progress). - Layout is responsive via Bootstrap grid (col-12 / col-lg-*). No Tailwind or MudBlazor usage detected. ## Reuse steps 1. Add the Razor files and models to a Blazor project and register any required services if switching InventoryService to DI. 2. Ensure _Imports.razor or pages include System.ComponentModel.DataAnnotations and the component namespaces. 3. Provide Bootstrap CSS (via CDN or project bundle) and Font Awesome if icons are required. 4. If persistence is needed, replace InventoryService.Instance with an injected scoped service that uses a DbContext or API. 5. Adjust models and localisation strings, then wire authentication/authorization where necessary. ## Limitations & next steps - Demo uses an in-memory singleton (InventoryService.Instance); persistence, concurrency and multi-user concerns are not implemented. - No server-side validation beyond DataAnnotations; calculations assume valid master data (Ounces, weights). - Accessibility and keyboard focus management for inline edits need review. - Next steps: replace InventoryService with a repository or API, add unit tests for calculation helpers, and add confirmation dialogs for destructive actions.