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_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/expense/expense_actions.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/app_bottom_bar.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_scaffold.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_list_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/expense/expense_presenter.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 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'expense_screen_vm.dart';
|
import 'expense_screen_vm.dart';
|
||||||
|
|
||||||
|
|
@ -91,6 +93,16 @@ class ExpenseScreen extends StatelessWidget {
|
||||||
body: ExpenseListBuilder(),
|
body: ExpenseListBuilder(),
|
||||||
bottomNavigationBar: AppBottomBar(
|
bottomNavigationBar: AppBottomBar(
|
||||||
entityType: EntityType.expense,
|
entityType: EntityType.expense,
|
||||||
|
iconButtons: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||||
|
onPressed: () {
|
||||||
|
store.dispatch(ViewSettings(
|
||||||
|
section: kSettingsExpenses,
|
||||||
|
company: state.company,
|
||||||
|
));
|
||||||
|
})
|
||||||
|
],
|
||||||
tableColumns: ExpensePresenter.getAllTableFields(userCompany),
|
tableColumns: ExpensePresenter.getAllTableFields(userCompany),
|
||||||
defaultTableColumns:
|
defaultTableColumns:
|
||||||
ExpensePresenter.getDefaultTableFields(userCompany),
|
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_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/payment/payment_actions.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/app_bottom_bar.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_scaffold.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_list_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/payment/payment_presenter.dart';
|
import 'package:invoiceninja_flutter/ui/payment/payment_presenter.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/payment/payment_screen_vm.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';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
|
|
||||||
class PaymentScreen extends StatelessWidget {
|
class PaymentScreen extends StatelessWidget {
|
||||||
|
|
@ -107,6 +109,16 @@ class PaymentScreen extends StatelessWidget {
|
||||||
body: PaymentListBuilder(),
|
body: PaymentListBuilder(),
|
||||||
bottomNavigationBar: AppBottomBar(
|
bottomNavigationBar: AppBottomBar(
|
||||||
entityType: EntityType.payment,
|
entityType: EntityType.payment,
|
||||||
|
iconButtons: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||||
|
onPressed: () {
|
||||||
|
store.dispatch(ViewSettings(
|
||||||
|
section: kSettingsPaymentSettings,
|
||||||
|
company: state.company,
|
||||||
|
));
|
||||||
|
})
|
||||||
|
],
|
||||||
tableColumns: PaymentPresenter.getAllTableFields(userCompany),
|
tableColumns: PaymentPresenter.getAllTableFields(userCompany),
|
||||||
defaultTableColumns:
|
defaultTableColumns:
|
||||||
PaymentPresenter.getDefaultTableFields(userCompany),
|
PaymentPresenter.getDefaultTableFields(userCompany),
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,21 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Package imports:
|
// Package imports:
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
|
import 'package:invoiceninja_flutter/constants.dart';
|
||||||
|
|
||||||
// Project imports:
|
// Project imports:
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/product/product_actions.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/app_bottom_bar.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_scaffold.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_list_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/product/product_presenter.dart';
|
import 'package:invoiceninja_flutter/ui/product/product_presenter.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/product/product_screen_vm.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';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
|
|
||||||
class ProductScreen extends StatelessWidget {
|
class ProductScreen extends StatelessWidget {
|
||||||
|
|
@ -60,6 +63,16 @@ class ProductScreen extends StatelessWidget {
|
||||||
body: ProductListBuilder(),
|
body: ProductListBuilder(),
|
||||||
bottomNavigationBar: AppBottomBar(
|
bottomNavigationBar: AppBottomBar(
|
||||||
entityType: EntityType.product,
|
entityType: EntityType.product,
|
||||||
|
iconButtons: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||||
|
onPressed: () {
|
||||||
|
store.dispatch(ViewSettings(
|
||||||
|
section: kSettingsProducts,
|
||||||
|
company: state.company,
|
||||||
|
));
|
||||||
|
})
|
||||||
|
],
|
||||||
tableColumns: ProductPresenter.getAllTableFields(userCompany),
|
tableColumns: ProductPresenter.getAllTableFields(userCompany),
|
||||||
defaultTableColumns:
|
defaultTableColumns:
|
||||||
ProductPresenter.getDefaultTableFields(userCompany),
|
ProductPresenter.getDefaultTableFields(userCompany),
|
||||||
|
|
|
||||||
|
|
@ -104,12 +104,11 @@ class TaskScreen extends StatelessWidget {
|
||||||
bottomNavigationBar: AppBottomBar(
|
bottomNavigationBar: AppBottomBar(
|
||||||
entityType: EntityType.task,
|
entityType: EntityType.task,
|
||||||
iconButtons: [
|
iconButtons: [
|
||||||
if (state.prefState.showKanban)
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(getEntityIcon(EntityType.settings)),
|
icon: Icon(getEntityIcon(EntityType.settings)),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(ViewSettings(
|
store.dispatch(ViewSettings(
|
||||||
section: kSettingsTaskStatuses,
|
section: kSettingsTasks,
|
||||||
company: state.company,
|
company: state.company,
|
||||||
));
|
));
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue