Online payments
This commit is contained in:
parent
bd64f724ea
commit
0546101733
|
|
@ -94,8 +94,9 @@ class CompanyGatewayListVM {
|
||||||
onRefreshed: (context) => _handleRefresh(context),
|
onRefreshed: (context) => _handleRefresh(context),
|
||||||
onRemovePressed: (gatewayId) {
|
onRemovePressed: (gatewayId) {
|
||||||
gatewayIds.remove(gatewayId);
|
gatewayIds.remove(gatewayId);
|
||||||
final settings = uiState.settings
|
final settings = uiState.settings.rebuild((b) => b
|
||||||
.rebuild((b) => b..companyGatewayIds = gatewayIds.join(','));
|
..companyGatewayIds =
|
||||||
|
gatewayIds.isEmpty ? '0' : gatewayIds.join(','));
|
||||||
store.dispatch(UpdateSettings(settings: settings));
|
store.dispatch(UpdateSettings(settings: settings));
|
||||||
},
|
},
|
||||||
onSortChanged: (int oldIndex, int newIndex) {
|
onSortChanged: (int oldIndex, int newIndex) {
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,25 @@ class CompanyGatewayScreen extends StatelessWidget {
|
||||||
onCancelPressed: (context) =>
|
onCancelPressed: (context) =>
|
||||||
store.dispatch(ClearCompanyGatewayMultiselect()),
|
store.dispatch(ClearCompanyGatewayMultiselect()),
|
||||||
)
|
)
|
||||||
else
|
else ...[
|
||||||
|
if (state.uiState.settingsUIState.isFiltered) ...[
|
||||||
|
FlatButton(
|
||||||
|
child: Text(localization.reset,
|
||||||
|
style: TextStyle(color: store.state.headerTextColor)),
|
||||||
|
onPressed: () {
|
||||||
|
final settings = store.state.uiState.settingsUIState.settings
|
||||||
|
.rebuild((b) => b..companyGatewayIds = '');
|
||||||
|
store.dispatch(UpdateSettings(settings: settings));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(width: 10),
|
||||||
|
],
|
||||||
SaveCancelButtons(
|
SaveCancelButtons(
|
||||||
isSaving: state.isSaving,
|
isSaving: state.isSaving,
|
||||||
onSavePressed: viewModel.onSavePressed,
|
onSavePressed: viewModel.onSavePressed,
|
||||||
onCancelPressed: (_) => store.dispatch(ResetSettings()),
|
onCancelPressed: (_) => store.dispatch(ResetSettings()),
|
||||||
),
|
)
|
||||||
|
],
|
||||||
],
|
],
|
||||||
body: CompanyGatewayListBuilder(),
|
body: CompanyGatewayListBuilder(),
|
||||||
bottomNavigationBar: AppBottomBar(
|
bottomNavigationBar: AppBottomBar(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue