admin user able to create test txs
This commit is contained in:
@@ -9,7 +9,6 @@ import 'package:provider/provider.dart';
|
||||
import '../models/bank.dart';
|
||||
import '../models/transaction_meta.dart';
|
||||
import '../providers/bank_provider.dart';
|
||||
import '../providers/preferences_provider.dart';
|
||||
import '../providers/tx_meta_provider.dart';
|
||||
import '../utils/app_theme.dart';
|
||||
import '../utils/connect_bank.dart';
|
||||
@@ -17,7 +16,6 @@ import '../utils/helpers.dart';
|
||||
import '../utils/navigation.dart';
|
||||
import '../utils/tx_calendar.dart';
|
||||
import '../widgets/empty_state.dart';
|
||||
import '../widgets/home_widgets_sheet.dart';
|
||||
import '../widgets/label_filter_dialog.dart';
|
||||
import '../widgets/loading_view.dart';
|
||||
import '../widgets/responsive_body.dart';
|
||||
@@ -277,28 +275,6 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _saveAsHomeWidget() async {
|
||||
final preferences = context.read<PreferencesController>();
|
||||
final created = await composeHomeFilterWidget(
|
||||
context,
|
||||
initialFilter: TransactionFilterSelection(
|
||||
labelIds: Set<String>.of(_labelFilters),
|
||||
labelMatch: _labelMatch,
|
||||
flow: _flowFilter,
|
||||
amountRange: _amountRange,
|
||||
query: _activeQuery,
|
||||
monthOnly: _searchInMonthOnly,
|
||||
),
|
||||
skipFilterDialog: true,
|
||||
);
|
||||
if (created == null) return;
|
||||
await preferences.addHomeFilterWidget(created);
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('Added “${created.name}” to Home')),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bank = context.watch<BankController>();
|
||||
@@ -307,11 +283,6 @@ class _TransactionsScreenState extends State<TransactionsScreen> {
|
||||
appBar: AppBar(
|
||||
title: const Text('Transactions'),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: 'Save as Home widget',
|
||||
onPressed: _saveAsHomeWidget,
|
||||
icon: const Icon(Icons.dashboard_customize_outlined),
|
||||
),
|
||||
...bankAppBarActions(
|
||||
context: context,
|
||||
onRefresh: bank.refresh,
|
||||
|
||||
Reference in New Issue
Block a user