Skip to content

Commit

Permalink
Add enable button to “item tax rates are disabled”
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Aug 12, 2021
1 parent bc0c89a commit 3b16a14
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lib/ui/expense/edit/expense_edit_settings.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:invoiceninja_flutter/constants.dart';
import 'package:invoiceninja_flutter/data/models/entities.dart';
import 'package:invoiceninja_flutter/data/models/static/currency_model.dart';
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
import 'package:invoiceninja_flutter/ui/app/entity_dropdown.dart';
import 'package:invoiceninja_flutter/ui/app/forms/bool_dropdown_button.dart';
import 'package:invoiceninja_flutter/ui/app/forms/date_picker.dart';
Expand Down Expand Up @@ -293,7 +296,21 @@ class ExpenseEditSettingsState extends State<ExpenseEditSettings> {
)
: null,
children: company.numberOfItemTaxRates == 0
? [Text(localization.expenseTaxHelp)]
? [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(child: Text(localization.expenseTaxHelp)),
OutlinedButton(
onPressed: () {
final store = StoreProvider.of<AppState>(context);
store.dispatch(
ViewSettings(section: kSettingsTaxSettings));
},
child: Text(localization.settings))
],
)
]
: [
BoolDropdownButton(
label: localization.enterTaxes,
Expand Down

0 comments on commit 3b16a14

Please sign in to comment.