Add shortcut to relevant setting
This commit is contained in:
parent
8686a55c72
commit
98cb0c2596
|
|
@ -10,11 +10,13 @@ import 'package:invoiceninja_flutter/data/models/models.dart';
|
|||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
import 'package:invoiceninja_flutter/redux/expense/expense_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/list_scaffold.dart';
|
||||
import 'package:invoiceninja_flutter/ui/expense/expense_list_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/expense/expense_presenter.dart';
|
||||
import 'package:invoiceninja_flutter/utils/icons.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'expense_screen_vm.dart';
|
||||
|
||||
|
|
@ -91,6 +93,16 @@ class ExpenseScreen extends StatelessWidget {
|
|||
body: ExpenseListBuilder(),
|
||||
bottomNavigationBar: AppBottomBar(
|
||||
entityType: EntityType.expense,
|
||||
iconButtons: [
|
||||
IconButton(
|
||||
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||
onPressed: () {
|
||||
store.dispatch(ViewSettings(
|
||||
section: kSettingsExpenses,
|
||||
company: state.company,
|
||||
));
|
||||
})
|
||||
],
|
||||
tableColumns: ExpensePresenter.getAllTableFields(userCompany),
|
||||
defaultTableColumns:
|
||||
ExpensePresenter.getDefaultTableFields(userCompany),
|
||||
|
|
|
|||
|
|
@ -11,12 +11,14 @@ import 'package:invoiceninja_flutter/data/models/static/payment_status_model.dar
|
|||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/list_scaffold.dart';
|
||||
import 'package:invoiceninja_flutter/ui/payment/payment_list_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/payment/payment_presenter.dart';
|
||||
import 'package:invoiceninja_flutter/ui/payment/payment_screen_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/icons.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
|
||||
class PaymentScreen extends StatelessWidget {
|
||||
|
|
@ -107,6 +109,16 @@ class PaymentScreen extends StatelessWidget {
|
|||
body: PaymentListBuilder(),
|
||||
bottomNavigationBar: AppBottomBar(
|
||||
entityType: EntityType.payment,
|
||||
iconButtons: [
|
||||
IconButton(
|
||||
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||
onPressed: () {
|
||||
store.dispatch(ViewSettings(
|
||||
section: kSettingsPaymentSettings,
|
||||
company: state.company,
|
||||
));
|
||||
})
|
||||
],
|
||||
tableColumns: PaymentPresenter.getAllTableFields(userCompany),
|
||||
defaultTableColumns:
|
||||
PaymentPresenter.getDefaultTableFields(userCompany),
|
||||
|
|
|
|||
|
|
@ -3,18 +3,21 @@ import 'package:flutter/material.dart';
|
|||
|
||||
// Package imports:
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:invoiceninja_flutter/constants.dart';
|
||||
|
||||
// Project imports:
|
||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
import 'package:invoiceninja_flutter/redux/product/product_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/list_scaffold.dart';
|
||||
import 'package:invoiceninja_flutter/ui/product/product_list_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/product/product_presenter.dart';
|
||||
import 'package:invoiceninja_flutter/ui/product/product_screen_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/icons.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
|
||||
class ProductScreen extends StatelessWidget {
|
||||
|
|
@ -60,6 +63,16 @@ class ProductScreen extends StatelessWidget {
|
|||
body: ProductListBuilder(),
|
||||
bottomNavigationBar: AppBottomBar(
|
||||
entityType: EntityType.product,
|
||||
iconButtons: [
|
||||
IconButton(
|
||||
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||
onPressed: () {
|
||||
store.dispatch(ViewSettings(
|
||||
section: kSettingsProducts,
|
||||
company: state.company,
|
||||
));
|
||||
})
|
||||
],
|
||||
tableColumns: ProductPresenter.getAllTableFields(userCompany),
|
||||
defaultTableColumns:
|
||||
ProductPresenter.getDefaultTableFields(userCompany),
|
||||
|
|
|
|||
|
|
@ -104,15 +104,14 @@ class TaskScreen extends StatelessWidget {
|
|||
bottomNavigationBar: AppBottomBar(
|
||||
entityType: EntityType.task,
|
||||
iconButtons: [
|
||||
if (state.prefState.showKanban)
|
||||
IconButton(
|
||||
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||
onPressed: () {
|
||||
store.dispatch(ViewSettings(
|
||||
section: kSettingsTaskStatuses,
|
||||
company: state.company,
|
||||
));
|
||||
})
|
||||
IconButton(
|
||||
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||
onPressed: () {
|
||||
store.dispatch(ViewSettings(
|
||||
section: kSettingsTasks,
|
||||
company: state.company,
|
||||
));
|
||||
})
|
||||
],
|
||||
hideListOptions: state.prefState.showKanban,
|
||||
tableColumns: TaskPresenter.getAllTableFields(userCompany),
|
||||
|
|
|
|||
Loading…
Reference in New Issue