32 lines
737 B
Plaintext
32 lines
737 B
Plaintext
@page "/accounts"
|
|
|
|
<PageTitle>Accounts</PageTitle>
|
|
|
|
<h1>Accounts</h1>
|
|
|
|
<ul>
|
|
@foreach (var account in accounts)
|
|
{
|
|
<li>
|
|
<input type="checkbox" @bind="account.LastContacted" />
|
|
<input @bind="account.AccountName" />
|
|
</li>
|
|
}
|
|
</ul>
|
|
|
|
<input placeholder="Accounts Added" @bind="newAccount" />
|
|
<button @onclick="AddAccount">Add Account</button>
|
|
|
|
@code {
|
|
private List<AccountItem> accounts = new();
|
|
private string? newAccount;
|
|
|
|
private void AddAccount()
|
|
{
|
|
if (!string.IsNullOrWhiteSpace(newAccount))
|
|
{
|
|
accounts.Add(new AccountItem{ AccountName = newAccount });
|
|
newAccount = string.Empty;
|
|
}
|
|
}
|
|
} |