87 Commits
Author SHA1 Message Date
Sanders 9b584a8169 Merge pull request 'dev_bloc' (#1) from dev_bloc into master
Reviewed-on: #1
2025-07-13 00:17:44 +03:00
Sanders 2fca5203e2 Improves SMS message display and interaction
Enhances the SMS message widget to provide a richer user experience.

Adds sender information, formatted date, message processing status and actions.
Includes localization support for new UI elements.
2025-07-13 00:16:21 +03:00
Sanders c23a3db59d Adds SMS processing settings
Adds a popup menu to SMS messages to allow access to processing settings.

This commit introduces the "Processing settings" option within a context menu
that appears when an SMS message is tapped. This prepares the UI for future
implementation of SMS processing configuration.
2025-07-12 23:53:50 +03:00
Sanders 85daede4a9 Implements authentication flow with user registration
This commit implements a complete authentication flow, including user registration.

- Introduces an `AuthRegisterRequested` event to handle user registration.
- Persists the user ID in settings upon successful authentication.
- Modifies `AuthBloc` to load the user based on the stored ID, improving app launch persistence.
- Refactors `UserCubit` to only manage the user state and removes authentication logic.
- Removes `UserCubit` initialization from `main.dart` and triggers `AuthStarted` to initiate the authentication process.
2025-07-12 22:40:31 +03:00
Sanders fd0c3dd9a8 Removes user-specific repository methods
Removes the now-unnecessary user-specific methods from the category and tag repositories. The repositories are now user-specific at the box level, so filtering by user ID within the repository methods is redundant.

Also, removes now-unused imports related to user logic in category and tag list pages, and the add transaction dialog.
2025-07-12 21:56:39 +03:00
Sanders 8b75299d41 Refactors data repositories for single-user mode
This commit refactors the data repositories to remove user-specific filtering. It simplifies the data access logic by retrieving all data from the Hive boxes and removing the need to filter by `userId` in the repository methods.

This change makes the app function in single-user mode and removes the need to manage multiple user contexts within the data layer.

Specifically:
- Removes `userId` parameter from repository methods.
- Updates the setting repository to use fixed keys.
- Removes user ID filtering from queries.
- Removes user ID parameters from Cubits and Blocs
- Updates initial data creation
2025-07-12 21:54:00 +03:00
Sanders fe61b50494 Fix navigation to CategoryListPage 2025-07-10 18:23:18 +03:00
Sanders 4b814a807d Update CategoryListPage to use CategoryCubit with userId 2025-07-10 18:23:18 +03:00
Sanders 193b79b38d Remove unused toMap and fromMap methods in User model 2025-07-10 18:23:17 +03:00
Sanders c829b0e6f5 Refactor CategoryCubit to manage user-specific categories 2025-07-10 18:23:17 +03:00
Sanders adafdb88f8 Improve error handling in HiveCategoryRepository 2025-07-10 18:23:17 +03:00
Sanders 4edde8a01b Remove manual adapter registration from HiveService 2025-07-10 18:23:17 +03:00
Sanders 56428e9a66 Register DateTime adapter for Hive 2025-07-10 18:23:17 +03:00
Sanders 1ceacf88fb Refactors HiveService and dependency injection
Improves the management of Hive boxes by introducing separate initialization for global and user-specific data.

This change enhances data isolation and allows for dynamic dependency injection based on the authentication state. It introduces `initGlobalDependencies` and `initUserSpecificDependencies` to manage the application's dependencies. User-scoped repositories and cubits are now registered/unregistered upon login/logout. The UserCubit is updated to allow dynamic injection of user-specific repositories after authentication. The TagCubit is refactored to use a repository.
2025-07-09 23:26:00 +03:00
Sanders 8040839ba3 Adds SMS handler settings to Hive
Adds the necessary classes and configurations to store and retrieve SMS handler settings using Hive database.

This includes registering the `SmsHandlerSettings` model, its adapter, and related enum adapters with Hive, opening a new box for storing settings and making it accessible via `HiveService`. Additionally, this change registers a new repository for accessing sms handler settings data.
2025-07-09 22:30:26 +03:00
Sanders d19f58d65e Adds user ID to SMS messages
Ensures SMS messages are associated with a specific user by adding a `userId` field to the `SmsMessage` model and passing the user ID when retrieving SMS messages.

This change ensures that SMS messages are correctly linked to the user they belong to, which is necessary for filtering and displaying the appropriate messages. It retrieves the user ID from the `UserCubit` state. Handles the case where the user state is not loaded, emitting an error state.
2025-07-09 22:06:28 +03:00
Sanders c997feac4a Fix login and settings 2025-07-07 18:44:08 +03:00
Sanders 4670cdf5fb Fix for loop 2025-07-07 18:11:03 +03:00
Sanders 9bae137d08 Refactors user management to use UserCubit
This commit refactors the user management system to utilize UserCubit, improving state management and separation of concerns.

- Replaces UserService with UserCubit for managing user state.
- Introduces AppSettings and GlobalSettings models and repositories for managing app-level settings and configurations.
- Modifies dependency injection to register the new repositories and cubits.
- Updates UI components (LoginPage, SettingsPage, HomePage, AddTransactionDialog, CategoryListPage, TagListPage) to interact with UserCubit and SettingsCubit.
- Removes direct dependency on UserRepository in favor of UserCubit for accessing user information.
- Streamlines the authentication process by using UserCubit to handle user creation and login.
- Improves settings management by using dedicated repositories and cubits for app settings.
2025-07-07 00:29:15 +03:00
Sanders a89ab1c910 Adds SMS message loading and processing
Implements the ability to load and process SMS messages to automatically create transaction records.

This includes:
- Adding an `SmsMessage` model and Hive adapter.
- Creating an `ISmsMessageRepository` and its Hive implementation.
- Integrating SMS loading functionality into the `SmsCubit`.
- Adding a UI element in settings to trigger SMS loading.
- Persisting last SMS sync time in user preferences.
2025-07-03 16:21:19 +03:00
Sanders f304660c74 fix 2025-06-30 17:49:46 +03:00
Sanders 368c62f3fb Adds category type functionality
Implements category type selection (income/expense) during category creation/editing.

This enhancement introduces a switch to define categories as either income or expense, providing more granular control over financial tracking.
It also includes localization support for new strings ("Icon", "Category type", "Add category").
A random color and icon are assigned to new categories for better user experience.
Finally, uses AnimatedList for categories in the list page.
2025-06-30 17:48:54 +03:00
Sanders 6da0da45b7 Adds category management feature
Adds the ability to manage categories in the settings page. This includes:
- Registers CategoryCubit in the dependency injection container.
- Introduces a new CategoryListPage for editing categories.
- Adds translations for category management related text.
- Adds unselected icon color to the theme.
- Updates the date format in the transaction dialog.
2025-06-30 15:59:43 +03:00
Sanders 829ca93d9b Adds SMS reading functionality
Implements SMS reading functionality to automatically track expenses.

- Adds necessary permissions for reading SMS messages in AndroidManifest.xml.
- Registers SmsService and SmsCubit in the dependency injection container.
- Adds a new SMS page to the bottom navigation bar.
- Introduces new localization strings for the SMS page title and permission denied message.
- Sets minSdk to 23.
2025-06-30 13:40:52 +03:00
Sanders 5ff11c5449 Improves transaction input and display
Adds a tag selection to transaction dialog and refines the display of transactions.

The changes introduce the ability to tag transactions, improving categorization and filtering.
It also modifies the transaction input dialog to include time, as well as refines the appearance of transaction items on the home page by using a custom widget wrapped in a card.

The UI of the summary widget is also improved by using theme colors and increasing the overall visibility.
2025-06-30 10:26:27 +03:00
Sanders 4ceb710782 fix 2025-06-29 23:34:57 +03:00
Sanders 82af8ac11a Adds localization support with English and Russian
Initializes internationalization (i18n) for the application.

Introduces `AppLocalizations` to manage localized strings, along with
English and Russian translations.

Configures Flutter to use the localization delegates and supported locales.
This allows the app to display text in the user's preferred language.
2025-06-29 23:04:28 +03:00
Sanders 42f8e20bf0 Improves: Internationalization and data models
- Adds new localization keys for transaction details.
- Deletes obsolete localization files, switching to a single ARB file per language.
- Adds `Equatable` to data models (`Category`, `Tag`, `TransactionRecord`, `User`) for improved state management and change detection.
- Introduces the transaction creation dialog.
- Adds development note to GEMINI.md

Improves internationalization and data models

- Adds new localization keys for transaction details, supporting enhanced user experience.
- Migrates to single ARB file for each language, streamlining the localization process.
- Implements Equatable in data models (Category, Tag, TransactionRecord, User) for improved state management and simplified change detection.
- Introduces transaction creation dialog, simplifying the transaction creation process.
- Adds development note to GEMINI.md
2025-06-29 23:03:17 +03:00
Sanders e0cb2d1e2c Fix summary 2025-06-29 13:07:39 +03:00
Sanders f2f9f7871f Add summary 2025-06-28 13:47:47 +03:00
Sanders 145e57f410 Small fixes 2025-06-28 00:49:21 +03:00
Sanders 14a69200d3 Small fixes 2025-06-28 00:02:41 +03:00
Sanders 65fe73b396 Transfer settings to user 2025-06-27 23:31:16 +03:00
Sanders 0d64d4ca0e Add cubit settings 2025-06-27 22:28:12 +03:00
Sanders 5856b59b54 Language 2025-06-27 18:42:02 +03:00
Sanders b2c8189cb2 Add bloc 2025-06-27 16:42:12 +03:00
Sanders 74f5b9872a Small fix 2025-06-27 16:02:39 +03:00
Sanders 5f78dfb603 Small fix 2025-06-27 16:02:30 +03:00
Sanders caff9bac1f Small fix 2025-06-27 12:24:47 +03:00
Sanders 33fb960397 feat: Добавить ссылку на пользователя в сущность транзакции 2025-06-10 23:55:35 +03:00
Sanders e4dc12666b refactor: Передать userId в getDefaultTags 2025-06-10 23:55:33 +03:00
Sanders 70851b65dc Small fix 2025-06-10 23:33:27 +03:00
Sanders fbefda5042 feat: реализовать привязку тегов к пользователю 2025-06-10 23:33:07 +03:00
Sanders 1b1fe1e89f Small fix 2025-06-10 11:58:41 +03:00
Sanders 6eb8a2d9bb refactor: удалить неиспользуемый импорт и обновить метод заполнения примеров транзакций 2025-06-09 23:33:40 +03:00
Sanders 00a9a1a549 feat: добавить системного пользователя и userId в создание категорий 2025-06-09 22:44:04 +03:00
Sanders 62e3cf9fb7 refactor: обновить утилиты категорий с поддержкой userId 2025-06-09 22:40:59 +03:00
Sanders df405685b8 feat: добавить userId в методы создания категорий 2025-06-09 22:39:30 +03:00
Sanders c68bd8b79c refactor: обновить модели категорий с добавлением userId 2025-06-09 22:39:27 +03:00
Sanders a68c2cd4b3 feat: добавить адаптеры Color и IconData для Hive 2025-06-09 22:30:13 +03:00
Sanders c638b6ee4f Основываясь на предоставленных изменениях, я предлагаю следующий коммит:
feat: добавить поддержку пользователей в приложение учета бюджета
2025-06-09 22:23:52 +03:00
Sanders f9e95a6df5 Small fix 2025-06-09 18:55:49 +03:00
Sanders 0cc4b26983 fix: добавить регистрацию SettingsService в GetIt 2025-06-09 18:55:01 +03:00
Sanders b99c43a731 refactor: удалить кнопку переключения темы из домашней страницы 2025-06-09 18:46:03 +03:00
Sanders 1032b09114 feat: внедрить сервис настроек с использованием Hive CE и dependency injection 2025-06-09 18:42:58 +03:00
Sanders e07cec7608 Small fix 2025-06-09 18:39:09 +03:00
Sanders db8e5f4a73 feat: добавить страницу настроек с сохранением темы 2025-06-09 17:39:09 +03:00
Sanders 881f57b70a refactor: добавить вызов flush после инициализации данных 2025-06-09 17:39:07 +03:00
Sanders 75c3b4c69a Small fix 2025-06-09 17:03:41 +03:00
Sanders 8414233e14 feat: добавить адаптер IconData для Hive 2025-06-09 17:00:21 +03:00
Sanders d578c72691 refactor: обновил импорты в hive_service.dart 2025-06-09 17:00:19 +03:00
Sanders f4642a8281 feat: добавить заполнение начальных данных и логирование в HiveService 2025-06-09 16:54:21 +03:00
Sanders fa3deff5f6 Small fix 2025-06-09 16:28:16 +03:00
Sanders 4eb3e1f700 Small fix 2025-06-09 16:27:01 +03:00
Sanders 7db4e35bf6 feat: добавить автогенерацию ID через UUID 2025-06-09 16:25:18 +03:00
Sanders 820528398d build: обновить зависимости hive на версии ce 2025-06-09 16:25:15 +03:00
Sanders c414403f8c fix: добавить аннотации HiveField для всех полей моделей 2025-06-09 16:17:27 +03:00
Sanders c5ec6d1dc9 build: обновил зависимости на hive_ce в моделях 2025-06-09 16:17:22 +03:00
Sanders 84b41bcf55 fix: исправить порядок импортов в transaction_record.dart 2025-06-09 16:11:30 +03:00
Sanders 06557638e8 feat: добавить поддержку Tag и TransactionRecord в Hive 2025-06-09 16:10:45 +03:00
Sanders 673ce8bfd3 feat: Добавить уникальный ID для транзакций 2025-06-09 16:10:43 +03:00
Sanders 5f867873ec feat: добавить репозитории Hive для тегов и транзакций 2025-06-09 16:04:57 +03:00
Sanders c63d90163d feat: добавить зависимости для работы с Hive 2025-06-09 15:54:09 +03:00
Sanders 1ee3a54d94 feat: добавить реализацию Hive базы с интерфейсами репозиториев 2025-06-09 15:53:42 +03:00
Sanders 36f9b380e3 feat: добавить зависимость hive_ce 2025-06-09 15:53:41 +03:00
Sanders 2e73141e7d feat: добавить утилиты для тегов и тестовых транзакций 2025-06-09 15:40:44 +03:00
Sanders a4f4f77fc6 feat: добавить утилиту для работы с категориями 2025-06-09 15:38:48 +03:00
Sanders cdc2086fd8 feat: добавить модели Category, Tag и TransactionRecord 2025-06-09 15:36:49 +03:00
Sanders 966e8f19d0 docs: добавить подробные комментарии в HomePage 2025-06-09 15:23:38 +03:00
Sanders 21660167fe refactor: вынести HomePage в отдельный файл 2025-06-09 15:22:04 +03:00
Sanders 114c6c1654 Small fix 2025-06-09 14:40:57 +03:00
Sanders 4dbdafe048 feat: добавить черно-белые темы и упростить main.dart 2025-06-09 14:38:23 +03:00
Sanders 6d32275e18 Sample 2025-06-09 10:28:29 +03:00
Sanders 8c427b55a0 docs: добавить комментарий о назначении Scaffold в Flutter 2025-06-08 23:23:47 +03:00
Sanders 73b717d184 feat: Обновить структуру main.dart с поддержкой темы и базовым интерфейсом 2025-06-08 22:57:16 +03:00
Sanders 94da7f3470 Sample 2025-06-08 22:46:37 +03:00
Sanders b524625b79 Sample 2025-06-08 22:45:16 +03:00