[CHANGE] Channel & Account list to view models
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Manager.App.Components.Dialogs;
|
||||
using Manager.App.Models.Library;
|
||||
using Manager.Data.Entities.LibraryContext;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MudBlazor;
|
||||
|
||||
@@ -8,14 +7,14 @@ namespace Manager.App.Components.Pages;
|
||||
|
||||
public partial class Accounts : ComponentBase
|
||||
{
|
||||
private MudTable<ClientAccountEntity>? _table;
|
||||
private MudTable<AccountListView>? _table;
|
||||
private readonly DialogOptions _dialogOptions = new() { BackdropClick = false, CloseButton = true, FullWidth = true, MaxWidth = MaxWidth.ExtraLarge };
|
||||
private string _search = "";
|
||||
|
||||
private async Task<TableData<ClientAccountEntity>> ServerReload(TableState state, CancellationToken token)
|
||||
private async Task<TableData<AccountListView>> ServerReload(TableState state, CancellationToken token)
|
||||
{
|
||||
var results = await LibraryService.GetAccountsAsync(_search, state.Page * state.PageSize, state.PageSize, token);
|
||||
return !results.IsSuccess ? new TableData<ClientAccountEntity>() : new TableData<ClientAccountEntity>() { Items = results.Value, TotalItems = results.Total };
|
||||
return !results.IsSuccess ? new TableData<AccountListView>() : new TableData<AccountListView> { Items = results.Value, TotalItems = results.Total };
|
||||
}
|
||||
|
||||
private void OnSearch(string text)
|
||||
|
||||
Reference in New Issue
Block a user