@page "/robots" @rendermode RobotNet10.Components.RenderMode.InteractiveWebAssemblyNoPrerender Robot Management @using RobotNet10.FleetManager.Client.Services @using RobotNet10.FleetManager.Client.Components.RobotManager @using RobotNet10.FleetManager.Client.Components.RobotManager.Dialogs @using RobotNet10.FleetManager.Shared.DTOs.Robot @inject RobotApiService RobotApiService @inject RobotModelApiService RobotModelApiService @inject IDialogService DialogService @inject ISnackbar Snackbar @inject NavigationManager NavigationManager Robot Management Add Robot @code { private RobotTable? TableRef; private async Task HandleCreate() { var parameters = new DialogParameters { ["RobotApiService"] = RobotApiService, ["RobotModelApiService"] = RobotModelApiService }; var dialog = await DialogService.ShowAsync("Create Robot", parameters, new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true }); var result = await dialog.Result; if (result != null && !result.Canceled) { await TableRef?.LoadDataAsync()!; Snackbar.Add("Robot created successfully", Severity.Success); } } private async Task HandleDeleted() { await TableRef?.LoadDataAsync()!; Snackbar.Add("Robot deleted successfully", Severity.Success); } private async Task HandleUpdated() { await TableRef?.LoadDataAsync()!; Snackbar.Add("Robot updated successfully", Severity.Success); } }