From 123367c7bf692ac18258f38988f9a2605d880d96 Mon Sep 17 00:00:00 2001 From: AJ Date: Sun, 12 Oct 2025 13:39:43 -0400 Subject: [PATCH] Convert duplicate warnings to blocking modal dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed duplicate detection from informational alert to a modal dialog that requires user decision before proceeding with upload. Upload Flow Changes: 1. Initial upload detects duplicates and uploads temporarily 2. If duplicates found: - Deletes the uploaded file - Stores warnings and filename in TempData - Redirects to show modal 3. Modal blocks with two options: - Cancel: Don't upload (returns to page) - Upload Anyway: Re-upload with confirmation flag Modal Features: - Non-dismissible (static backdrop, no keyboard close) - Yellow warning header - Table showing all potential duplicates with: - Receipt ID and filename - Upload timestamp - Reason for match (hash/name+size) - Transaction mapping status - View button to compare - Clear explanation of options - Prompts user to re-select file for confirmed upload Benefits: - Prevents accidental duplicate uploads - Forces user acknowledgment - Provides context for decision-making - Links to view existing receipts for comparison - Better UX than passive alert banner 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- MoneyMap/Pages/Receipts.cshtml | 114 ++++++++++++++++++++++-------- MoneyMap/Pages/Receipts.cshtml.cs | 66 +++++++++++++---- 2 files changed, 136 insertions(+), 44 deletions(-) diff --git a/MoneyMap/Pages/Receipts.cshtml b/MoneyMap/Pages/Receipts.cshtml index 2a84a16..ab2b48c 100644 --- a/MoneyMap/Pages/Receipts.cshtml +++ b/MoneyMap/Pages/Receipts.cshtml @@ -18,37 +18,93 @@ } - -@if (Model.DuplicateWarnings.Any()) + +@if (Model.ShowDuplicateModal && Model.DuplicateWarnings.Any()) { -