diff --git a/MoneyMap/Pages/Upload.cshtml b/MoneyMap/Pages/Upload.cshtml index aea6bed..64c9199 100644 --- a/MoneyMap/Pages/Upload.cshtml +++ b/MoneyMap/Pages/Upload.cshtml @@ -165,9 +165,9 @@ else
- + - +
@@ -228,7 +228,7 @@ else
- +
} diff --git a/MoneyMap/wwwroot/js/upload.js b/MoneyMap/wwwroot/js/upload.js index 8604fa1..8c8572d 100644 --- a/MoneyMap/wwwroot/js/upload.js +++ b/MoneyMap/wwwroot/js/upload.js @@ -113,4 +113,14 @@ document.addEventListener('DOMContentLoaded', function() { if (totalRows > pageSize) { showPage(0); } + + // Enable/disable preview button based on file selection + const csvFileInput = document.getElementById('csvFileInput'); + const previewButton = document.getElementById('previewButton'); + + if (csvFileInput && previewButton) { + csvFileInput.addEventListener('change', function() { + previewButton.disabled = !this.files || this.files.length === 0; + }); + } });