●
LIVE DEMO
Generated using
Instruct UI - An AI for Blazor UI Generation
## What's implemented
- Agent login form with DataAnnotations validation, remember/admin toggles and success/error alerts.
- Agent Dashboard with metric cards, recent activity list and quick navigation actions.
- Forms for Corporate Bus Booking and Individual Ticket Booking with fare/commission estimation and recent lists.
- Fleet management with add, inline edit of capacity, toggle availability and remove actions.
- Administration area (Places, Routes, Corporate Customers, Bus Suppliers) with Add forms and small tables/lists.
## Key components
- EditForm, DataAnnotationsValidator, ValidationSummary, ValidationMessage
- InputText, InputDate, InputSelect, InputNumber, InputCheckbox
- Native HTML tables (.table / .table-responsive) and Bootstrap cards/badges
- NavigationManager for in-page routing and mock redirects
## How it works
- Forms use EditForm with Model objects (e.g., TravelAgentLoginViewModel, CorporateBusBookingModel) and OnValidSubmit handlers.
- Two-way binding uses @bind-Value on Input* components; validation derives from DataAnnotations on model properties.
- Demo data is seeded in OnInitialized and stored in in-memory lists; UI updates use StateHasChanged implicitly or via event handlers.
- NavigationManager.NavigateTo is used for simple role-based routing after mock authentication.
## Styling
- Uses Bootstrap layout and utility classes (container, row, col-*, card, btn, form-control, form-select, badge).
- Responsive grid with Bootstrap breakpoints (col-*, d-flex, d-grid) and Font Awesome icons for visual affordances.
- AdminPanel includes a small component-scoped style block for admin-action-btn hover effects and responsive tweaks.
## Reuse steps
1. Add the Razor pages and model classes into a Blazor project and ensure _Imports.razor includes relevant namespaces.
2. Include Bootstrap CSS and Font Awesome in index.html/_Host.cshtml (or use CDN) and confirm layout supports container-fluid.
3. Keep DataAnnotations on models; wire a real authentication/authorization service instead of mock logic in HandleValidSubmit.
4. Replace in-memory lists with injected services or HttpClient calls; register services in Program.cs and add appropriate interfaces.
5. Optionally add paging/sorting components or a datagrid NuGet if large datasets are required.
## Limitations & next steps
- Pages use in-memory demo data and synchronous list operations; persistent storage, APIs and error handling are not implemented.
- Authentication is mocked; integrate ASP.NET Core Identity or a token-based auth service for production use.
- Tables lack server-side paging, sorting and search — add components or APIs for large datasets.
- Accessibility, localization, and unit tests are not included and should be added when integrating into a real app.