From 7b470172168623c0c7ce2491cac7332bf4364c88 Mon Sep 17 00:00:00 2001 From: { Aman } Date: Sun, 7 Dec 2025 17:59:59 +0530 Subject: [PATCH] resolved basic bugs from this app --- lib/Components/recent_payment_list.dart | 2 +- lib/Screens/cateogary_history.dart | 4 ++-- lib/Screens/transaction_search.dart | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Components/recent_payment_list.dart b/lib/Components/recent_payment_list.dart index 3decd24..78c24a2 100755 --- a/lib/Components/recent_payment_list.dart +++ b/lib/Components/recent_payment_list.dart @@ -33,7 +33,7 @@ class RecentPaymentList extends StatelessWidget { // Fetch all transactions involving this user (sent or received) final txStream = FirebaseFirestore.instance .collection('users').doc(FirebaseAuth.instance.currentUser?.email).collection('transactions') - .orderBy('createdAt', descending: true) + .orderBy('date', descending: true) //transaction for today's date only starting from midnight 12 AM // .where('createdAt', isGreaterThanOrEqualTo: DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 0, 0, 0)) .snapshots(); diff --git a/lib/Screens/cateogary_history.dart b/lib/Screens/cateogary_history.dart index 2683e56..57cb473 100644 --- a/lib/Screens/cateogary_history.dart +++ b/lib/Screens/cateogary_history.dart @@ -66,8 +66,8 @@ class _CategoryTransactionsScreenState extends State .doc(user.email) .collection('transactions') .where('category', isEqualTo: widget.categoryName) - .where('date', isGreaterThanOrEqualTo: _startOfMonth) - .where('date', isLessThanOrEqualTo: _endOfMonth) + // .where('date', isGreaterThanOrEqualTo: _startOfMonth) + // .where('date', isLessThanOrEqualTo: _endOfMonth) .orderBy('date', descending: true) .snapshots(), builder: (context, snapshot) { diff --git a/lib/Screens/transaction_search.dart b/lib/Screens/transaction_search.dart index bf8de75..5656911 100644 --- a/lib/Screens/transaction_search.dart +++ b/lib/Screens/transaction_search.dart @@ -38,6 +38,7 @@ class _TransactionSearchPageState extends State { .collection("users") .doc(user.email) .collection("transactions") + .orderBy("date", descending: true) .get(); final List all = snap.docs