("Pattern")
.IsRequired()
.HasColumnType("nvarchar(max)");
@@ -514,7 +521,6 @@ namespace MoneyMap.Migrations
b.Navigation("Transactions");
});
-
modelBuilder.Entity("MoneyMap.Models.Card", b =>
{
b.Navigation("Transactions");
diff --git a/MoneyMap/Models/Transaction.cs b/MoneyMap/Models/Transaction.cs
index c1f1249..99cc729 100644
--- a/MoneyMap/Models/Transaction.cs
+++ b/MoneyMap/Models/Transaction.cs
@@ -29,6 +29,9 @@ public class Transaction
[MaxLength(100)]
public string Category { get; set; } = string.Empty;
+ [MaxLength(100)]
+ public string? Merchant { get; set; }
+
public string Notes { get; set; } = string.Empty;
// Primary container: Every transaction belongs to an Account (the source of CSV)
diff --git a/MoneyMap/Pages/CategoryMappings.cshtml b/MoneyMap/Pages/CategoryMappings.cshtml
index 1054b26..91280b1 100644
--- a/MoneyMap/Pages/CategoryMappings.cshtml
+++ b/MoneyMap/Pages/CategoryMappings.cshtml
@@ -100,12 +100,16 @@
{
+ onclick="openEditModal(@mapping.Id, '@Html.Raw(mapping.Category.Replace("'", "\\'"))', '@Html.Raw(mapping.Pattern.Replace("'", "\\'"))', @mapping.Priority, '@Html.Raw((mapping.Merchant ?? "").Replace("'", "\\'"))')">
@if (mapping.Priority > 0)
{
P@(mapping.Priority)
}
@mapping.Pattern
+ @if (!string.IsNullOrWhiteSpace(mapping.Merchant))
+ {
+ → @mapping.Merchant
+ }
+
+
+
+
Friendly name to assign to matching transactions (e.g., "Walmart" instead of "WAL-MART #1234")
+
+
@@ -213,6 +223,12 @@ else
+
+
+
+
Friendly name to assign to matching transactions (e.g., "Walmart" instead of "WAL-MART #1234")
+
+
@@ -268,11 +284,13 @@ else
{
"category": "Groceries",
"pattern": "WALMART",
+ "merchant": "Walmart",
"priority": 0
},
{
"category": "Gas & Auto",
"pattern": "SHELL",
+ "merchant": "Shell",
"priority": 100
}
]
@@ -289,13 +307,14 @@ else
@section Scripts {