26 Commits
Author SHA1 Message Date
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 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 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 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 5856b59b54 Language 2025-06-27 18:42:02 +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 70851b65dc Small fix 2025-06-10 23:33:27 +03:00
Sanders fbefda5042 feat: реализовать привязку тегов к пользователю 2025-06-10 23:33:07 +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 c638b6ee4f Основываясь на предоставленных изменениях, я предлагаю следующий коммит:
feat: добавить поддержку пользователей в приложение учета бюджета
2025-06-09 22:23:52 +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 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 4eb3e1f700 Small fix 2025-06-09 16:27:01 +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 1ee3a54d94 feat: добавить реализацию Hive базы с интерфейсами репозиториев 2025-06-09 15:53:42 +03:00