mirror of
https://github.com/koloideal/Casha.git
synced 2026-06-10 02:15:29 +03:00
update
This commit is contained in:
@@ -10,7 +10,8 @@ class AppStrings {
|
||||
String get appTitle => _ru ? 'Мои финансы' : 'My Finances';
|
||||
String get totalBalance => _ru ? 'ОБЩИЙ БАЛАНС' : 'TOTAL BALANCE';
|
||||
String get tapAndHoldToEdit => _ru ? 'удерживайте для редактирования' : 'tap and hold to edit';
|
||||
String get add => _ru ? 'Добавить счёт' : 'Add account';
|
||||
String get addAccount => _ru ? 'Добавить счёт' : 'Add account';
|
||||
String get addTransactionDashboard => _ru ? 'Добавить' : 'Add';
|
||||
String get transactions => _ru ? 'Транзакции' : 'Transactions';
|
||||
String get searchHint => _ru ? 'Поиск транзакций...' : 'Search transactions...';
|
||||
String get filterAll => _ru ? 'Все' : 'All';
|
||||
|
||||
@@ -160,7 +160,6 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
HapticService.medium();
|
||||
|
||||
if (isAddingAccount) {
|
||||
// Create new account (the id: 0 is a placeholder, SQLite ignores it on insert)
|
||||
final newAccount = Account(
|
||||
id: 0,
|
||||
name: tempAccountName.trim(),
|
||||
@@ -170,13 +169,14 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
createdAt: DateTime.now(),
|
||||
);
|
||||
|
||||
// Get the ACTUAL generated ID directly from the database insert
|
||||
final newId = await ref.read(accountRepositoryProvider).add(newAccount);
|
||||
|
||||
// Save colors securely using the exact database ID
|
||||
await ref
|
||||
.read(accountCardColorsProvider(newId).notifier)
|
||||
.save(tempPrimary, tempSecondary, tempGradientType);
|
||||
await CardColorService.save(
|
||||
tempPrimary,
|
||||
tempSecondary,
|
||||
tempGradientType,
|
||||
accountId: newId,
|
||||
);
|
||||
} else if (editingAccount != null) {
|
||||
// Existing edit logic
|
||||
// Save colors
|
||||
@@ -315,7 +315,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
||||
backgroundColor: const Color(0xFF7C6DED),
|
||||
foregroundColor: Colors.white,
|
||||
icon: const Icon(Icons.add),
|
||||
label: Text(s.add, style: const TextStyle(fontWeight: FontWeight.w600)),
|
||||
label: Text(s.addTransactionDashboard, style: const TextStyle(fontWeight: FontWeight.w600)),
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
|
||||
body: SafeArea(
|
||||
|
||||
@@ -973,7 +973,7 @@ class _AccountEditorOverlayState extends State<AccountEditorOverlay> {
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
),
|
||||
child: Text(
|
||||
dash.isAddingAccount ? s.add : s.apply,
|
||||
dash.isAddingAccount ? s.addAccount : s.apply,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w700, fontSize: 14)),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user