hot fixes

merge-requests/607/head
Mohammad Aljammal 4 years ago
parent 60eb7adab1
commit 21fd90ea8c

@ -152,7 +152,7 @@ class PatientSearchViewModel extends BaseViewModel{
setState(ViewState.Busy);
else
setState(ViewState.BusyLocal);
await _inPatientService.getInPatientList(requestModel, isMyInpatient);
await _inPatientService.getInPatientList(requestModel, false);
if (_inPatientService.hasError) {
error = _inPatientService.error;
setState(ViewState.Error);

@ -101,32 +101,60 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> {
// const SizedBox(
// height: 16,
// ),
...model.filteredInPatientItems.map((item) {
return PatientCard(
patientInfo: item,
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: _activeTab!=0? false:item.doctorId==model.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
...List.generate(model.filteredInPatientItems.length, (index) {
if(_activeTab == 0)
return PatientCard(
patientInfo: model.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": item,
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
});
},
);
}).toList(),
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": model.filteredInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
});
},
);
else if(model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID && _activeTab==1)
return PatientCard(
patientInfo: model.filteredInPatientItems[index],
patientType: "1",
arrivalType: "1",
isInpatient: true,
isMyPatient: model.filteredInPatientItems[index].doctorId==model.doctorProfile.doctorID,
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient": model.filteredInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
"isSearch": false,
"isInpatient": true,
"arrivalType": "1",
});
},
);
else return SizedBox();
}),
SizedBox(height: 15,)
],
),
),
@ -173,12 +201,14 @@ class _PatientInPatientScreenState extends State<PatientInPatientScreen> {
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
}
GifLoaderDialogUtils.showMyDialog(
context);
await model.getInPatientList(requestModel,
isMyInpatient: _activeTab == 1, isFirstTime: false);
GifLoaderDialogUtils.hideDialog(
context);
if (_activeTab==0) {
GifLoaderDialogUtils.showMyDialog(
context);
await model.getInPatientList(requestModel,
isMyInpatient: _activeTab == 1, isFirstTime: false);
GifLoaderDialogUtils.hideDialog(
context);
}
},
child: Center(
child: Container(

@ -92,7 +92,8 @@ class DrAppSharedPreferances {
clear() async {
final SharedPreferences prefs = await _prefs;
prefs.clear();
var vvas= await prefs.clear();
var asd;
}
remove(String key) async {

Loading…
Cancel
Save