|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
|
|
|
|
|
@ -7,6 +8,7 @@ import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
@ -161,7 +163,7 @@ class _FilterDatePageState extends State<FilterDatePage> {
|
|
|
|
|
.search,
|
|
|
|
|
padding: 10,
|
|
|
|
|
color: Color(0xFF359846),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
if (selectedFromDate == null ||
|
|
|
|
|
selectedToDate == null) {
|
|
|
|
|
Helpers.showErrorToast(
|
|
|
|
|
@ -177,9 +179,16 @@ class _FilterDatePageState extends State<FilterDatePage> {
|
|
|
|
|
PatientSearchRequestModel currentModel = PatientSearchRequestModel();
|
|
|
|
|
currentModel.to = dateTo;
|
|
|
|
|
currentModel.from= dateFrom;
|
|
|
|
|
widget.patientSearchViewModel.getOutPatient(
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await widget.patientSearchViewModel.getOutPatient(
|
|
|
|
|
currentModel, isLocalBusy: true);
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if(widget.patientSearchViewModel.state == ViewState.ErrorLocal) {
|
|
|
|
|
Helpers.showErrorToast(widget.patientSearchViewModel.error);
|
|
|
|
|
}else {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|