Settings
This commit is contained in:
parent
333f419271
commit
d8e244bf7a
|
|
@ -78,7 +78,6 @@ class CompanyGatewayScreen extends StatelessWidget {
|
||||||
SaveCancelButtons(
|
SaveCancelButtons(
|
||||||
isSaving: state.isSaving,
|
isSaving: state.isSaving,
|
||||||
onSavePressed: viewModel.onSavePressed,
|
onSavePressed: viewModel.onSavePressed,
|
||||||
onCancelPressed: viewModel.onCancelPressed,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
body: CompanyGatewayListBuilder(),
|
body: CompanyGatewayListBuilder(),
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ class CompanyGatewayScreenVM {
|
||||||
@required this.userCompany,
|
@required this.userCompany,
|
||||||
@required this.companyGatewayMap,
|
@required this.companyGatewayMap,
|
||||||
@required this.onSavePressed,
|
@required this.onSavePressed,
|
||||||
@required this.onCancelPressed,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
final bool isInMultiselect;
|
final bool isInMultiselect;
|
||||||
|
|
@ -48,7 +47,6 @@ class CompanyGatewayScreenVM {
|
||||||
final List<String> companyGatewayList;
|
final List<String> companyGatewayList;
|
||||||
final BuiltMap<String, CompanyGatewayEntity> companyGatewayMap;
|
final BuiltMap<String, CompanyGatewayEntity> companyGatewayMap;
|
||||||
final Function(BuildContext) onSavePressed;
|
final Function(BuildContext) onSavePressed;
|
||||||
final Function(BuildContext) onCancelPressed;
|
|
||||||
|
|
||||||
static CompanyGatewayScreenVM fromStore(Store<AppState> store) {
|
static CompanyGatewayScreenVM fromStore(Store<AppState> store) {
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
|
|
@ -64,7 +62,6 @@ class CompanyGatewayScreenVM {
|
||||||
),
|
),
|
||||||
userCompany: state.userCompany,
|
userCompany: state.userCompany,
|
||||||
isInMultiselect: state.companyGatewayListState.isInMultiselect(),
|
isInMultiselect: state.companyGatewayListState.isInMultiselect(),
|
||||||
onCancelPressed: (context) => store.dispatch(ResetSettings()),
|
|
||||||
onSavePressed: (context) {
|
onSavePressed: (context) {
|
||||||
final settingsUIState = state.uiState.settingsUIState;
|
final settingsUIState = state.uiState.settingsUIState;
|
||||||
switch (settingsUIState.entityType) {
|
switch (settingsUIState.entityType) {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ class _TaxSettingsState extends State<TaxSettings> {
|
||||||
return SettingsScaffold(
|
return SettingsScaffold(
|
||||||
title: localization.taxSettings,
|
title: localization.taxSettings,
|
||||||
onSavePressed: viewModel.onSavePressed,
|
onSavePressed: viewModel.onSavePressed,
|
||||||
onCancelPressed: viewModel.onCancelPressed,
|
|
||||||
body: AppForm(
|
body: AppForm(
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ class TaxSettingsVM {
|
||||||
@required this.onSettingsChanged,
|
@required this.onSettingsChanged,
|
||||||
@required this.onCompanyChanged,
|
@required this.onCompanyChanged,
|
||||||
@required this.onSavePressed,
|
@required this.onSavePressed,
|
||||||
@required this.onCancelPressed,
|
|
||||||
@required this.onConfigureRatesPressed,
|
@required this.onConfigureRatesPressed,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -50,10 +49,6 @@ class TaxSettingsVM {
|
||||||
onSettingsChanged: (settings) {
|
onSettingsChanged: (settings) {
|
||||||
store.dispatch(UpdateSettings(settings: settings));
|
store.dispatch(UpdateSettings(settings: settings));
|
||||||
},
|
},
|
||||||
onCancelPressed: (context) {
|
|
||||||
print('## onCancelPressed ##');
|
|
||||||
store.dispatch(ViewSettings(context: context));
|
|
||||||
},
|
|
||||||
onCompanyChanged: (company) =>
|
onCompanyChanged: (company) =>
|
||||||
store.dispatch(UpdateCompany(company: company)),
|
store.dispatch(UpdateCompany(company: company)),
|
||||||
onSavePressed: (context) {
|
onSavePressed: (context) {
|
||||||
|
|
@ -77,7 +72,6 @@ class TaxSettingsVM {
|
||||||
|
|
||||||
final AppState state;
|
final AppState state;
|
||||||
final Function(BuildContext) onSavePressed;
|
final Function(BuildContext) onSavePressed;
|
||||||
final Function(BuildContext) onCancelPressed;
|
|
||||||
final SettingsEntity settings;
|
final SettingsEntity settings;
|
||||||
final Function(SettingsEntity) onSettingsChanged;
|
final Function(SettingsEntity) onSettingsChanged;
|
||||||
final CompanyEntity company;
|
final CompanyEntity company;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue