|
|
|
|
@ -7,7 +7,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
|
|
|
|
|
@ -22,9 +21,9 @@ class InPatientListPage extends StatefulWidget {
|
|
|
|
|
final bool isAllClinic;
|
|
|
|
|
final bool showBottomSheet;
|
|
|
|
|
final String? selectedClinicName;
|
|
|
|
|
final Function onChangeValue;
|
|
|
|
|
final Function? onChangeValue;
|
|
|
|
|
|
|
|
|
|
InPatientListPage({this.isMyInPatient = false, this.patientSearchViewModel, this.selectedClinicName, required this.onChangeValue, this.isAllClinic = false, this.showBottomSheet = false});
|
|
|
|
|
InPatientListPage({this.isMyInPatient = false, this.patientSearchViewModel, this.selectedClinicName, this.onChangeValue, this.isAllClinic = false, this.showBottomSheet = false});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_InPatientListPageState createState() => _InPatientListPageState();
|
|
|
|
|
@ -65,7 +64,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
groupValue: widget.isAllClinic ? 1 : 2,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.onChangeValue(isAllClinic: true, showBottomSheet: false, selectedClinicName: null);
|
|
|
|
|
widget.onChangeValue!(isAllClinic: true, showBottomSheet: false, selectedClinicName: null);
|
|
|
|
|
|
|
|
|
|
widget.patientSearchViewModel!.setDefaultInPatientList();
|
|
|
|
|
});
|
|
|
|
|
@ -79,7 +78,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
widget.onChangeValue(isAllClinic: true, showBottomSheet: false, selectedClinicName: null);
|
|
|
|
|
widget.onChangeValue!(isAllClinic: true, showBottomSheet: false, selectedClinicName: null);
|
|
|
|
|
|
|
|
|
|
widget.patientSearchViewModel!.setDefaultInPatientList();
|
|
|
|
|
},
|
|
|
|
|
@ -88,7 +87,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (widget.patientSearchViewModel!.InpatientClinicList.length > 0) {
|
|
|
|
|
widget.onChangeValue(isAllClinic: false, showBottomSheet: true, selectedClinicName: widget.selectedClinicName);
|
|
|
|
|
widget.onChangeValue!(isAllClinic: false, showBottomSheet: true, selectedClinicName: widget.selectedClinicName);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
@ -98,7 +97,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
groupValue: widget.isAllClinic ? 1 : 2,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
if (widget.patientSearchViewModel!.InpatientClinicList.length > 0) {
|
|
|
|
|
widget.onChangeValue(isAllClinic: false, showBottomSheet: true, selectedClinicName: widget.selectedClinicName);
|
|
|
|
|
widget.onChangeValue!(isAllClinic: false, showBottomSheet: true, selectedClinicName: widget.selectedClinicName);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
activeColor: Colors.red,
|
|
|
|
|
@ -135,7 +134,8 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
isSortDes = !isSortDes;
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
},
|
|
|
|
|
), onFieldSubmitted: (){},
|
|
|
|
|
),
|
|
|
|
|
onFieldSubmitted: () {},
|
|
|
|
|
),
|
|
|
|
|
widget.patientSearchViewModel!.state == ViewState.Idle
|
|
|
|
|
? (widget.isMyInPatient && widget.patientSearchViewModel!.myIinPatientList.length > 0)
|
|
|
|
|
@ -171,7 +171,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
widget.onChangeValue(isAllClinic: widget.isAllClinic, showBottomSheet: false, selectedClinicName: widget.selectedClinicName);
|
|
|
|
|
widget.onChangeValue!(isAllClinic: widget.isAllClinic, showBottomSheet: false, selectedClinicName: widget.selectedClinicName);
|
|
|
|
|
},
|
|
|
|
|
child: Icon(DoctorApp.close_1, size: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5, color: Color(0xFF2B353E)))
|
|
|
|
|
],
|
|
|
|
|
@ -198,7 +198,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
widget.onChangeValue(isAllClinic: false, showBottomSheet: false, selectedClinicName: widget.patientSearchViewModel!.InpatientClinicList[index]);
|
|
|
|
|
widget.onChangeValue!(isAllClinic: false, showBottomSheet: false, selectedClinicName: widget.patientSearchViewModel!.InpatientClinicList[index]);
|
|
|
|
|
|
|
|
|
|
widget.patientSearchViewModel!.filterByClinic(clinicName: widget.patientSearchViewModel!.InpatientClinicList[index]);
|
|
|
|
|
},
|
|
|
|
|
@ -209,7 +209,7 @@ class _InPatientListPageState extends State<InPatientListPage> {
|
|
|
|
|
groupValue: widget.selectedClinicName,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.onChangeValue(isAllClinic: false, showBottomSheet: false, selectedClinicName: widget.patientSearchViewModel!.InpatientClinicList[index]);
|
|
|
|
|
widget.onChangeValue!(isAllClinic: false, showBottomSheet: false, selectedClinicName: widget.patientSearchViewModel!.InpatientClinicList[index]);
|
|
|
|
|
widget.patientSearchViewModel!.filterByClinic(clinicName: value!);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|