private async Task OnViewEmployeeClickAsync(string username) { SelectedEmployee = EmployeeList.FirstOrDefault(e => e.Username == username); if (SelectedEmployee != null) { await EmployeeModal.ToggleModal(); await InvokeAsync(() => StateHasChanged()); } }
private async void LoadEmployeeData() { EmployeeList = await _employeeService.GetEmployees(); SelectedEmployee = EmployeeList == null ? null : EmployeeList.FirstOrDefault(); }