Online payments
This commit is contained in:
parent
bd64f724ea
commit
0546101733
|
|
@ -94,8 +94,9 @@ class CompanyGatewayListVM {
|
|||
onRefreshed: (context) => _handleRefresh(context),
|
||||
onRemovePressed: (gatewayId) {
|
||||
gatewayIds.remove(gatewayId);
|
||||
final settings = uiState.settings
|
||||
.rebuild((b) => b..companyGatewayIds = gatewayIds.join(','));
|
||||
final settings = uiState.settings.rebuild((b) => b
|
||||
..companyGatewayIds =
|
||||
gatewayIds.isEmpty ? '0' : gatewayIds.join(','));
|
||||
store.dispatch(UpdateSettings(settings: settings));
|
||||
},
|
||||
onSortChanged: (int oldIndex, int newIndex) {
|
||||
|
|
|
|||
|
|
@ -64,12 +64,25 @@ class CompanyGatewayScreen extends StatelessWidget {
|
|||
onCancelPressed: (context) =>
|
||||
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(
|
||||
isSaving: state.isSaving,
|
||||
onSavePressed: viewModel.onSavePressed,
|
||||
onCancelPressed: (_) => store.dispatch(ResetSettings()),
|
||||
),
|
||||
)
|
||||
],
|
||||
],
|
||||
body: CompanyGatewayListBuilder(),
|
||||
bottomNavigationBar: AppBottomBar(
|
||||
|
|
|
|||
Loading…
Reference in New Issue