File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 11import { ToastManager } from "./managers/toast" ;
22const toastManager = new ToastManager ( document . getElementById ( 'toast-container' ) ) ;
33
4+ // Global variables
5+ let currentTransactionType = 'income' ; // Default transaction type
6+ let currentFilter = null ; // null = show all, 'income' = only income, 'expense' = only expenses
7+ let editingTransactionId = null ;
8+ let currentSortField = 'date' ;
9+ let currentSortDirection = 'desc' ;
10+
411// Theme toggle functionality
512function getBaseUrl ( ) {
613 // First try to get it from the server-provided meta tag
@@ -314,19 +321,6 @@ async function handleFetchResponse(response) {
314321 return response ;
315322}
316323
317- // Add currentFilter variable at the top with other shared variables
318- let currentFilter = null ; // null = show all, 'income' = only income, 'expense' = only expenses
319-
320- // Add at the top with other variables
321- let editingTransactionId = null ;
322-
323- // Add at the top with other shared variables
324- let currentSortField = 'date' ;
325- let currentSortDirection = 'desc' ;
326-
327- // Add currentTransactionType as a global variable
328- let currentTransactionType = 'income' ; // Default transaction type
329-
330324// Update loadTransactions function
331325async function loadTransactions ( ) {
332326 try {
You can’t perform that action at this time.
0 commit comments