finish the new design on the progress note (SOAP)

merge-requests/463/head
Mohammad Aljammal 4 years ago
parent 7e33130ec7
commit 3a734f4718

@ -62,14 +62,13 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
)), )),
); );
} }
TextEditingController typeController = TextEditingController();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
if(widget.patientProgressNote.planNote !=null ){ if(widget.patientProgressNote.planNote !=null ){
setState(() { setState(() {
isAddProgress = true; isAddProgress = false;
}); });
} }
} }
@ -94,7 +93,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn; widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn;
widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn; widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn;
widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName; widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName;
setState(() {
isAddProgress = false;
});
} }
widget.changeLoadingState(false); widget.changeLoadingState(false);
}, },
@ -195,7 +196,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
children: [ children: [
Expanded( Expanded(
child: Texts( child: Texts(
progressNoteController.text+"asdasd sdakfjhg gfadsfg dashkfgasd hgd sfnbsd,fbnsdafbasdnzb", progressNoteController.text,
fontSize: 10, fontSize: 10,
), ),
@ -204,6 +205,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
onTap: (){ onTap: (){
setState(() { setState(() {
isAddProgress = true; isAddProgress = true;
widget.changePageViewIndex(3,isChangeState:false);
}); });
}, },
child: Icon(DoctorApp.edit,size: 18,)) child: Icon(DoctorApp.edit,size: 18,))
@ -266,10 +268,10 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.patientProgressNote.planNote = progressNoteController.text; widget.patientProgressNote.planNote = progressNoteController.text;
isAddProgress = !isAddProgress; isAddProgress = !isAddProgress;
}); });
submitPlan(model);
} else{ } else{
var asd =""; Navigator.of(context).pop();
// submitPlan(model);
} }
}, },
), ),
@ -309,7 +311,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else { } else {
Navigator.of(context).pop(); widget.changePageViewIndex(4,isChangeState:false);
} }
} else { } else {
helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg);

@ -38,9 +38,13 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel patientProgressNote =
GetPatientProgressNoteResModel(); GetPatientProgressNoteResModel();
changePageViewIndex(pageIndex) { changePageViewIndex(pageIndex,{isChangeState = true}) {
if (pageIndex != _currentIndex) changeLoadingState(true); if (pageIndex != _currentIndex && isChangeState)
changeLoadingState(true);
_controller.jumpToPage(pageIndex); _controller.jumpToPage(pageIndex);
setState(() {
_currentIndex = pageIndex;
});
} }
bool _isLoading = true; bool _isLoading = true;

Loading…
Cancel
Save