Skip to content

Instantly share code, notes, and snippets.

@explorer14
Created July 4, 2020 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save explorer14/76c172910c4c92184bd63a365ac8c092 to your computer and use it in GitHub Desktop.
Save explorer14/76c172910c4c92184bd63a365ac8c092 to your computer and use it in GitHub Desktop.
<table class="table">
<thead>
<tr>
<th style="width:10%">Pot</th>
<th style="width:15%">Expense Date</th>
<th>Description</th>
<th>Spend</th>
</tr>
</thead>
<tbody>
@foreach (var expense in expenseLogs)
{
<tr>
<td>@expense.Pot</td>
<td>@expense.ExpenseDate.ToString("dd/MM/yyyy")</td>
<td>@expense.Description</td>
<td>@expense.FormattedSpend</td>
</tr>
}
</tbody>
</table>
@code {
private IReadOnlyCollection<ExpenseLogItem> expenseLogs =
new List<ExpenseLogItem>();
protected override async Task OnInitializedAsync()
{
expenseLogs = await traxpenseApi.GetAllExpenses();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment