82 lines
2.6 KiB
Plaintext
82 lines
2.6 KiB
Plaintext
@page "/accounts"
|
|
|
|
<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[0]<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 tasks)
|
|
{
|
|
<li>
|
|
@task[0]
|
|
</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 Dictionary<string, Dictionary<string, string>> accounts =
|
|
new Dictionary<string, Dictionary<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))
|
|
{
|
|
newAccount = new Dictionary<string, Dictionary<string, string>>();
|
|
newAccount = string.Empty;
|
|
}
|
|
}
|
|
//private void addTask()
|
|
//{
|
|
// {
|
|
// newTask = new Dictionary<string, string>();
|
|
// string key = "accountboxvalue";
|
|
// if (accounts.TryGetValue(key, out tasks))
|
|
// {
|
|
// tasks = new Dictionary<string, string>();
|
|
// accounts.Add(key(key.ToString), tasks);
|
|
// newTask = string.Empty;
|
|
// }
|
|
// return;
|
|
// }
|
|
// }
|
|
} |