84 lines
2.7 KiB
Plaintext
84 lines
2.7 KiB
Plaintext
@page "/accounts"
|
|
@using SqliteWasmHelper
|
|
@using BlazorWasmExample.Data
|
|
@using Microsoft.EntityFrameworkCore
|
|
@inject ISqliteWasmDbContextFactory<ThingContext> Factory
|
|
|
|
<PageTitle>Accounts</PageTitle>
|
|
|
|
<h1>Accounts</h1>
|
|
|
|
<body>
|
|
<div class="box-wrapper">
|
|
<div class="left-column">
|
|
<p>Assigned Company Names</p>
|
|
<input placeholder="Accounts Added" @bind="newAccount" />
|
|
<button @onclick="addAccount">Add Account</button>
|
|
<ul>
|
|
@foreach (var account in accounts)
|
|
{
|
|
<td>
|
|
<input type="checkbox" bind="@accountboxvalue" /> @account.AccountName<br />
|
|
Boolvalue: @accountboxvalue<br />
|
|
<button onclick="@toggle">toggle</button>
|
|
</td>
|
|
}
|
|
</ul>
|
|
</div>
|
|
<div class="middle-column">
|
|
<h3>Tasks</h3>
|
|
{
|
|
@foreach (var tasks in accounts)
|
|
{
|
|
<li>@tasks.Tasks</li>
|
|
}
|
|
}
|
|
<input placeholder="Tasks Added" @bind="newTask" />
|
|
<button @onclick="addTask">Add Task</button>
|
|
<ul>
|
|
@foreach (var task in )
|
|
{
|
|
<li>
|
|
@task.TaskName
|
|
</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
@code {
|
|
//var accounts = new List<string, KeyValuePair<KeyValuePair<string, string>>>
|
|
// accounts list
|
|
//key: hubspot, value: key: call them, value: call today
|
|
public var accounts = new List<KeyValuePair<string, KeyValuePair<string, string>>>();
|
|
private string? newAccount;
|
|
private string? newTask;
|
|
private bool accountboxvalue { get; set; }
|
|
|
|
private void toggle()
|
|
{
|
|
accountboxvalue = !accountboxvalue;
|
|
}
|
|
private void addAccount()
|
|
{
|
|
if (!string.IsNullOrWhiteSpace(newAccount))
|
|
{
|
|
accounts.Add(new KeyValuePair<string, KeyValuePair<string, string>>(newAccount()));
|
|
newAccount = string.Empty;
|
|
}
|
|
}
|
|
private void addTask()
|
|
{
|
|
{
|
|
string key = "accountboxvalue";
|
|
bool keyExists = KeyValuePair.ContainsKey(key);
|
|
if (keyExists)
|
|
{
|
|
accounts.Add(new KeyValuePair<string,)
|
|
tasks.Add(newTask, "");
|
|
newTask = string.Empty;
|
|
}
|
|
}
|
|
}
|
|
} |