diff --git a/MoneyMap/Pages/Cards.cshtml b/MoneyMap/Pages/Cards.cshtml index 1f8b42d..d590113 100644 --- a/MoneyMap/Pages/Cards.cshtml +++ b/MoneyMap/Pages/Cards.cshtml @@ -39,9 +39,9 @@ + - - + @@ -50,9 +50,27 @@ @foreach (var item in Model.Cards) { + - - +
Card OwnerIssuerLast 4Linked Account Transactions Actions
+
+ @item.Card.Issuer •••• @item.Card.Last4 + @if (!string.IsNullOrEmpty(item.Card.Nickname)) + { +
+ @item.Card.Nickname + } +
+
@item.Card.Owner@item.Card.Issuer•••• @item.Card.Last4 + @if (item.Card.Account != null) + { + @item.Card.Account.DisplayLabel + } + else + { + None + } + @item.TransactionCount
diff --git a/MoneyMap/Pages/Cards.cshtml.cs b/MoneyMap/Pages/Cards.cshtml.cs index a75ddb0..5708436 100644 --- a/MoneyMap/Pages/Cards.cshtml.cs +++ b/MoneyMap/Pages/Cards.cshtml.cs @@ -29,6 +29,7 @@ namespace MoneyMap.Pages public async Task OnGetAsync() { var cards = await _db.Cards + .Include(c => c.Account) .OrderBy(c => c.Owner) .ThenBy(c => c.Last4) .ToListAsync(); diff --git a/MoneyMap/Pages/EditCard.cshtml b/MoneyMap/Pages/EditCard.cshtml index cc12bfe..8bfa391 100644 --- a/MoneyMap/Pages/EditCard.cshtml +++ b/MoneyMap/Pages/EditCard.cshtml @@ -40,6 +40,33 @@
The last 4 digits of the card number
+
+ + + +
A friendly name to help identify this card
+
+ +
+ + + +
+ Link this card to the bank account it draws from or pays to + @if (!Model.AvailableAccounts.Any()) + { +
+ No accounts available. Create one first. + } +
+
+