Sanders
4e27dbf2ee
fix
2025-05-12 16:06:22 +03:00
Sanders
b3fd06f37b
chore: обновить зависимость flutter_web_auth до версии 0.6.0
2025-05-12 13:46:36 +03:00
Sanders
2f46e7a554
feat: добавить импорт TelegramAuth в ProfileScreen
2025-05-12 13:43:51 +03:00
Sanders
d90a3aef16
feat: Добавить зависимости для аутентификации и локального хранилища
2025-05-12 13:42:33 +03:00
Sanders
ed77c948d7
feat: Добавить сохранение данных пользователя после логина через Telegram
2025-05-12 13:39:00 +03:00
Sanders
2ac3f27d64
feat: добавить возможность логина через Telegram
2025-05-12 13:35:07 +03:00
Sanders
beb7e62d91
feat: Добавить поддержку userId в транзакциях и диалогах редактирования
2025-05-12 13:24:45 +03:00
Sanders
5a682ea4c6
feat: добавить ссылку на пользователя для категорий и транзакций
2025-05-12 13:23:08 +03:00
Sanders
b20e751437
feat: добавить сущность пользователь в базу данных
2025-05-12 13:20:40 +03:00
Sanders
7f6e608ff1
fix: Reduce minWidth of ToggleButtons in edit dialog
2025-05-09 00:19:39 +03:00
Sanders
3931c76623
feat: Add long press menu for transactions with edit/delete options
2025-05-09 00:16:42 +03:00
Sanders
84dec567e0
refactor: Assign specific colors to initial categories
2025-05-09 00:00:12 +03:00
Sanders
3545dfacd7
fix: Use category color from DB when editing
2025-05-08 23:56:53 +03:00
Sanders
184cc82469
feat: Use available colors for initial categories
2025-05-08 23:35:58 +03:00
Sanders
050153b5ec
refactor: Use alias for Color and Colors
2025-05-08 23:35:56 +03:00
Sanders
ddf3d45bf4
fix: Set default color to existing category color in edit dialog
2025-05-08 23:30:32 +03:00
Sanders
cfec739c97
refactor: Fix super constructor call in MultiStreamBuilder
2025-05-08 23:28:01 +03:00
Sanders
0a6267ec3a
feat: Add settings menu screen and rename category settings
2025-05-08 23:27:05 +03:00
Sanders
d9c70c1bb6
feat: Navigate to Settings screen from bottom nav bar
2025-05-08 23:17:48 +03:00
Sanders
4fee4b7eda
feat: add category update and delete methods
2025-05-05 14:47:42 +03:00
Sanders
28a7bd6ea7
feat: implement category settings screen
2025-05-05 14:43:44 +03:00
Sanders
024037a233
refactor: remove unused settop_component_outlined icon
2025-05-05 14:43:37 +03:00
Sanders
a1f020b141
fix: make icon picker grid scrollable in dialog
2025-05-04 22:57:17 +03:00
Sanders
65e72dbe9c
feat: add more icons and color selection for categories
2025-05-04 22:55:21 +03:00
Sanders
8ce8add138
feat: add icon picker to category dialog
2025-05-04 22:52:58 +03:00
Sanders
8c9196f67f
feat: add getIconFromString utility and use it
2025-05-04 22:49:57 +03:00
Sanders
c6d7018b4c
feat: add category creation dialog and integration
2025-05-04 22:47:36 +03:00
Sanders
a0f3c016fa
fix: insert initial data exclusively in onCreate
2025-05-04 22:40:49 +03:00
Sanders
f14cde0247
refactor: Rename Category table to Categories and fix references
2025-05-04 22:38:05 +03:00
Sanders
c5da00c013
refactor: rename Categories table to Category
2025-05-04 22:37:57 +03:00
Sanders
e90aa8c8cc
Вот исправленный файл с правильными именами таблиц и полей. Основные изменения:
...
1. Переименовал класс `Categories` в `Category` для единообразия
2. Обновил имя таблицы с `categories` на `category` в запросах
3. Исправил имена полей для соответствия новым названиям
4. Обновил типы полей (например, `categoryName` на `categoryId`)
Теперь ошибка "no such table" не должна возникать, так как все имена таблиц и полей согласованы.
Хотите, чтобы я показал полный обновленный файл с исправлениями?
2025-05-04 22:32:59 +03:00
Sanders
a4c6023483
fix
2025-05-04 22:16:43 +03:00
Sanders
119f86eecf
child: Column(
...
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
transaction.title,
style: theme.textTheme.subtitle1,
),
Text(
formattedAmount,
style: theme.textTheme.subtitle1,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
dateFormatter.format(transaction.date),
style: theme.textTheme.caption,
),
Text(
transaction.categoryName,
style: theme.textTheme.caption,
),
],
),
],
),
),
),
),
);
}
}
diff --git a/finance_app/lib/widgets/transaction_list_item.dart b/finance_app/lib/widgets/transaction_list_item.dart
index 1a2b3c4..a49954e 100644
--- a/finance_app/lib/widgets/transaction_list_item.dart
+++ b/finance_app/lib/widgets/transaction_list_item.dart
@@ -1,4 +1,4 @@
-import 'package:flutter/material.dart';
+import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:finance_app/models/transaction.dart';
import 'package:finance_app/utils/category_utils.dart';
@@ -18,10 +18,10 @@ class TransactionListItem extends StatelessWidget {
final theme = Theme.of(context);
final bool isIncome = transaction.type == 'income';
- // Get category details ONLY for expense
- final categoryDetails = !isIncome
- ? CategoryUtils.getCategoryDetails(transaction.categoryName)
- : null; // No specific category details needed for income display
+ // Get category details from the transaction's category reference
+ final categoryDetails = !isIncome && transaction.category != null
+ ? (iconCode: transaction.category!.iconCode, colorCode: transaction.category!.colorCode)
+ : null;
// Format dates
final dateFormatter = DateFormat.MMMd(); // e.g., Sep 10
@@ -51,8 +51,8 @@ class TransactionListItem extends StatelessWidget {
: (isDark ? Colors.redAccent.shade100 : Colors.red.shade700); // Red for expense
// Leading icon configuration
- IconData leadingIconData = isIncome ? Icons.arrow_downward_rounded : (categoryDetails?.iconCode ?? Icons.error_outline); // Default icon for expense if details missing
- Color leadingIconColor = isIncome ? amountColor : (categoryDetails?.colorCode ?? Colors.grey);
+ IconData leadingIconData = isIncome ? Icons.arrow_downward_rounded : (transaction.category?.iconCode ?? Icons.error_outline);
+ Color leadingIconColor = isIncome ? amountColor : (transaction.category?.colorCode ?? Colors.grey);
Color leadingBackgroundColor = leadingIconColor.withOpacity(isDark ? 0.25 : 0.18);
return Card(
refactor: update transaction list item to use category reference
2025-05-04 22:16:00 +03:00
Sanders
330cc4c14a
refactor: remove categoryName from TransactionRecord and use category reference
2025-05-04 22:11:43 +03:00
Sanders
1deea23783
>> refactor: replace icon/color fields with category reference in TransactionRecord
2025-05-04 22:07:21 +03:00
Sanders
5a8bd79387
feat: add categories table to database
2025-05-04 21:44:11 +03:00
Sanders
010604ac6f
fix: correct merchant column name and add null safety
2025-05-04 20:06:18 +03:00
Sanders
4e74cad421
# Commit message
...
refactor: Update transaction type handling in database and UI
2025-05-04 20:06:15 +03:00
Sanders
66ae257773
refactor: improve MultiStreamBuilder and snapshot handling
2025-05-04 16:43:21 +03:00
Sanders
f411106154
(no commit message provided)
2025-05-04 16:38:29 +03:00
Sanders
49238fbded
fix: improve snapshot handling and type safety in MultiStreamBuilder
2025-05-04 16:36:32 +03:00
Sanders
59265f53c2
(no commit message provided)
2025-05-04 16:16:22 +03:00
Sanders
7f8ed7245d
fix: Explicitly type lambda parameter in snapshots.any
2025-05-04 16:08:12 +03:00
Sanders
7e3a759282
fix: resolve errors in MultiStreamBuilder and income display
2025-05-04 16:04:30 +03:00
Sanders
305f263735
fix: use column default for transaction type
2025-05-04 15:55:35 +03:00
Sanders
ca522cde97
feat: add income tracking
2025-05-04 15:52:36 +03:00
Sanders
d64211acb3
feat: allow specifying time when adding transaction
2025-05-04 15:46:12 +03:00
Sanders
8ab4288cda
fix: Stop transaction list flicker during rebuilds
2025-05-04 15:40:52 +03:00
Sanders
7764ec092e
fix: Prevent transaction list flicker on state change
2025-05-04 15:38:15 +03:00
Sanders
a4d97db720
fix: remove duplicate category icon in add transaction form
2025-05-04 15:29:58 +03:00