Merge branch 'fix-issues' into 'development'

Fix issues

See merge request Cloud_Solution/doctor_app_flutter!471
merge-requests/472/merge
Mohammad Aljammal 5 years ago
commit e1c67ad8ce

@ -36,7 +36,8 @@ class LabsHomePage extends StatelessWidget {
builder: (context, ProcedureViewModel model, widget) => AppScaffold( builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', patientType), appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', patientType),
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( child: FractionallySizedBox(
@ -66,11 +67,24 @@ class LabsHomePage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43) if (patientType != null &&
patientType == '7' &&
patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {
addSelectedLabOrder(context, model, patient); Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedLabOrder(
patient: patient,
model: model,
)),
);
}, },
// () {
// addSelectedLabOrder(context, model, patient);
// },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
height: 140, height: 140,

@ -33,7 +33,8 @@ class RadiologyHomePage extends StatelessWidget {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
// appBarTitle: TranslationBase.of(context).radiology, // appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', arrivalType), appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType),
baseViewModel: model, baseViewModel: model,
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
@ -62,11 +63,23 @@ class RadiologyHomePage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && patientType == '7' && patient.patientStatusType == 43) if (patientType != null &&
patientType == '7' &&
patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {
addSelectedRadiologyOrder(context, model, patient); Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddSelectedRadiologyOrder(
patient: patient,
model: model,
)),
);
}, },
// () {
// addSelectedRadiologyOrder(context, model, patient);
// },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
height: 140, height: 140,
@ -108,25 +121,26 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
), ),
...List.generate(model.radiologyList.length, (index) => InkWell( ...List.generate(
onTap: () => Navigator.push( model.radiologyList.length,
context, (index) => InkWell(
FadePage( onTap: () => Navigator.push(
page: RadiologyDetailsPage( context,
finalRadiology: model.radiologyList[index], FadePage(
patient: patient, page: RadiologyDetailsPage(
), finalRadiology: model.radiologyList[index],
), patient: patient,
), ),
child: DoctorCard( ),
doctorName: model.radiologyList[index].doctorName, ),
profileUrl: model.radiologyList[index].doctorImageURL, child: DoctorCard(
invoiceNO: '${model.radiologyList[index].invoiceNo}', doctorName: model.radiologyList[index].doctorName,
branch: '${model.radiologyList[index].projectName}', profileUrl: model.radiologyList[index].doctorImageURL,
appointmentDate: model.radiologyList[index].orderDate, invoiceNO: '${model.radiologyList[index].invoiceNo}',
), branch: '${model.radiologyList[index].projectName}',
)), appointmentDate: model.radiologyList[index].orderDate,
),
)),
], ],
), ),
), ),

@ -343,6 +343,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
AppButton( AppButton(
title: TranslationBase.of(context) title: TranslationBase.of(context)
.addSelectedProcedures, .addSelectedProcedures,
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () { onPressed: () {
//print(entityList.toString()); //print(entityList.toString());
onPressed: onPressed:

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
@ -142,157 +143,158 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
onModelReady: (model) => model.getProcedureCategory( onModelReady: (model) => model.getProcedureCategory(
categoryName: "Laboratory", categoryID: "02"), categoryName: "Laboratory", categoryID: "02"),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( AppScaffold(
baseViewModel: model, isShowAppBar: false,
child: DraggableScrollableSheet( body: NetworkBaseView(
minChildSize: 0.90, baseViewModel: model,
initialChildSize: 0.95, child: DraggableScrollableSheet(
maxChildSize: 1.0, minChildSize: 0.90,
builder: (BuildContext context, ScrollController scrollController) { initialChildSize: 0.95,
return SingleChildScrollView( maxChildSize: 1.0,
child: Container( builder:
height: MediaQuery.of(context).size.height * 1.20, (BuildContext context, ScrollController scrollController) {
child: Padding( return SingleChildScrollView(
padding: EdgeInsets.all(12.0), child: Container(
child: Column( height: MediaQuery.of(context).size.height * 1.0,
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: [ padding: EdgeInsets.all(12.0),
Column( child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Row( children: [
children: [ Row(
InkWell( children: [
child: Icon( AppText(
Icons.close, 'New Lab Order',
size: 24.0, fontWeight: FontWeight.w700,
), fontSize: 20,
onTap: () { ),
Navigator.pop(context); SizedBox(
}, width: MediaQuery.of(context).size.width * 0.48,
), ),
], InkWell(
), child: Icon(
Row( Icons.close,
children: [ size: 28.0,
AppText(
'New Lab Order',
fontWeight: FontWeight.w700,
fontSize: 20,
), ),
], onTap: () {
), Navigator.pop(context);
],
),
SizedBox(
height: 10.0,
),
if (widget.model.categoriesList.length != 0)
NetworkBaseView(
baseViewModel: model,
child: EntityListCheckboxSearchWidget(
model: widget.model,
masterList:
widget.model.categoriesList[0].entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
}, },
isEntityListSelected: (master) => ),
isEntityListSelected(master), ],
)), ),
SizedBox( SizedBox(
height: 15.0, height: 10.0,
), ),
Column( if (widget.model.categoriesList.length != 0)
mainAxisAlignment: MainAxisAlignment.spaceBetween, NetworkBaseView(
children: [ baseViewModel: model,
// Container( child: EntityListCheckboxSearchWidget(
// child: Row( model: widget.model,
// children: [ masterList:
// AppText( widget.model.categoriesList[0].entityList,
// TranslationBase.of(context).orderType), removeHistory: (item) {
// Radio( setState(() {
// activeColor: Color(0xFFB9382C), entityList.remove(item);
// value: 1, });
// groupValue: selectedType, },
// onChanged: (value) { addHistory: (history) {
// setSelectedType(value); setState(() {
// }, entityList.add(history);
// ), });
// Text('routine'), },
// Radio( addSelectedHistories: () {
// activeColor: Color(0xFFB9382C), //TODO build your fun herr
// groupValue: selectedType, // widget.addSelectedHistories();
// value: 0, },
// onChanged: (value) { isEntityListSelected: (master) =>
// setSelectedType(value); isEntityListSelected(master),
// }, )),
// ), SizedBox(
// Text(TranslationBase.of(context).urgent), height: 15.0,
// ], ),
// ), Column(
// ), mainAxisAlignment: MainAxisAlignment.spaceBetween,
// SizedBox( children: [
// height: 15.0, // Container(
// ), // child: Row(
// TextFields( // children: [
// hintText: TranslationBase.of(context).remarks, // AppText(
// controller: remarksController, // TranslationBase.of(context).orderType),
// minLines: 3, // Radio(
// maxLines: 5, // activeColor: Color(0xFFB9382C),
// ), // value: 1,
SizedBox( // groupValue: selectedType,
height: 100.0, // onChanged: (value) {
), // setSelectedType(value);
Container( // },
margin: EdgeInsets.all( // ),
SizeConfig.widthMultiplier * 5), // Text('routine'),
child: Wrap( // Radio(
alignment: WrapAlignment.center, // activeColor: Color(0xFFB9382C),
children: <Widget>[ // groupValue: selectedType,
AppButton( // value: 0,
title: TranslationBase.of(context) // onChanged: (value) {
.addSelectedProcedures, // setSelectedType(value);
color: Color(0xff359846), // },
onPressed: () { // ),
//print(entityList.toString()); // Text(TranslationBase.of(context).urgent),
onPressed: // ],
if (entityList.isEmpty == true) { // ),
DrAppToastMsg.showErrorToast( // ),
"Fill the mandatory procedure details"); // SizedBox(
return; // height: 15.0,
} // ),
// TextFields(
// hintText: TranslationBase.of(context).remarks,
// controller: remarksController,
// minLines: 3,
// maxLines: 5,
// ),
SizedBox(
height: 100.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
"Add Lab Order", //TranslationBase.of(context)
fontWeight: FontWeight.w700,
//.addSelectedProcedures,
color: Color(0xff359846),
onPressed: () {
//print(entityList.toString());
onPressed:
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
"Fill the mandatory procedure details");
return;
}
Navigator.pop(context); Navigator.pop(context);
postProcedure( postProcedure(
orderType: selectedType.toString(), orderType: selectedType.toString(),
entityList: entityList, entityList: entityList,
patient: patient, patient: patient,
model: widget.model, model: widget.model,
remarks: remarksController.text); remarks: remarksController.text);
}, },
), ),
], ],
),
), ),
), ],
], )
) ],
], ),
), ),
), ),
), );
); }),
}), ),
), ),
); );
} }

@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
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/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
@ -142,157 +143,156 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
onModelReady: (model) => model.getProcedureCategory( onModelReady: (model) => model.getProcedureCategory(
categoryName: "Radiology", categoryID: "03"), categoryName: "Radiology", categoryID: "03"),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( AppScaffold(
baseViewModel: model, isShowAppBar: false,
child: DraggableScrollableSheet( body: NetworkBaseView(
minChildSize: 0.90, baseViewModel: model,
initialChildSize: 0.95, child: DraggableScrollableSheet(
maxChildSize: 1.0, minChildSize: 0.90,
builder: (BuildContext context, ScrollController scrollController) { initialChildSize: 0.95,
return SingleChildScrollView( maxChildSize: 1.0,
child: Container( builder:
height: MediaQuery.of(context).size.height * 1.20, (BuildContext context, ScrollController scrollController) {
child: Padding( return SingleChildScrollView(
padding: EdgeInsets.all(12.0), child: Container(
child: Column( height: MediaQuery.of(context).size.height * 1.0,
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: [ padding: EdgeInsets.all(12.0),
Column( child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Row( children: [
children: [ Row(
InkWell( children: [
child: Icon( AppText(
Icons.close, 'New Radiology Order',
size: 24.0, fontWeight: FontWeight.w700,
), fontSize: 20,
onTap: () { ),
Navigator.pop(context); SizedBox(
}, width: MediaQuery.of(context).size.width * 0.48,
), ),
], InkWell(
), child: Icon(
Row( Icons.close,
children: [ size: 28.0,
AppText(
'New Radiology Order',
fontWeight: FontWeight.w700,
fontSize: 20,
), ),
], onTap: () {
), Navigator.pop(context);
],
),
SizedBox(
height: 10.0,
),
if (widget.model.categoriesList.length != 0)
NetworkBaseView(
baseViewModel: model,
child: EntityListCheckboxSearchWidget(
model: widget.model,
masterList:
widget.model.categoriesList[0].entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
}, },
isEntityListSelected: (master) => ),
isEntityListSelected(master), ],
)), ),
SizedBox( SizedBox(
height: 15.0, height: 10.0,
), ),
Column( if (widget.model.categoriesList.length != 0)
mainAxisAlignment: MainAxisAlignment.spaceBetween, NetworkBaseView(
children: [ baseViewModel: model,
// Container( child: EntityListCheckboxSearchWidget(
// child: Row( model: widget.model,
// children: [ masterList:
// AppText( widget.model.categoriesList[0].entityList,
// TranslationBase.of(context).orderType), removeHistory: (item) {
// Radio( setState(() {
// activeColor: Color(0xFFB9382C), entityList.remove(item);
// value: 1, });
// groupValue: selectedType, },
// onChanged: (value) { addHistory: (history) {
// setSelectedType(value); setState(() {
// }, entityList.add(history);
// ), });
// Text('routine'), },
// Radio( addSelectedHistories: () {
// activeColor: Color(0xFFB9382C), //TODO build your fun herr
// groupValue: selectedType, // widget.addSelectedHistories();
// value: 0, },
// onChanged: (value) { isEntityListSelected: (master) =>
// setSelectedType(value); isEntityListSelected(master),
// }, )),
// ), SizedBox(
// Text(TranslationBase.of(context).urgent), height: 15.0,
// ], ),
// ), Column(
// ), mainAxisAlignment: MainAxisAlignment.spaceBetween,
// SizedBox( children: [
// height: 15.0, // Container(
// ), // child: Row(
// TextFields( // children: [
// hintText: TranslationBase.of(context).remarks, // AppText(
// controller: remarksController, // TranslationBase.of(context).orderType),
// minLines: 3, // Radio(
// maxLines: 5, // activeColor: Color(0xFFB9382C),
// ), // value: 1,
SizedBox( // groupValue: selectedType,
height: 100.0, // onChanged: (value) {
), // setSelectedType(value);
Container( // },
margin: EdgeInsets.all( // ),
SizeConfig.widthMultiplier * 5), // Text('routine'),
child: Wrap( // Radio(
alignment: WrapAlignment.center, // activeColor: Color(0xFFB9382C),
children: <Widget>[ // groupValue: selectedType,
AppButton( // value: 0,
title: TranslationBase.of(context) // onChanged: (value) {
.addSelectedProcedures, // setSelectedType(value);
color: Color(0xff359846), // },
onPressed: () { // ),
//print(entityList.toString()); // Text(TranslationBase.of(context).urgent),
onPressed: // ],
if (entityList.isEmpty == true) { // ),
DrAppToastMsg.showErrorToast( // ),
"Fill the mandatory procedure details"); // SizedBox(
return; // height: 15.0,
} // ),
// TextFields(
// hintText: TranslationBase.of(context).remarks,
// controller: remarksController,
// minLines: 3,
// maxLines: 5,
// ),
SizedBox(
height: 100.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'Add Radiology Order',
color: Color(0xff359846),
fontWeight: FontWeight.w700,
onPressed: () {
//print(entityList.toString());
onPressed:
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
"Fill the mandatory procedure details");
return;
}
Navigator.pop(context); Navigator.pop(context);
postProcedure( postProcedure(
orderType: selectedType.toString(), orderType: selectedType.toString(),
entityList: entityList, entityList: entityList,
patient: patient, patient: patient,
model: widget.model, model: widget.model,
remarks: remarksController.text); remarks: remarksController.text);
}, },
), ),
], ],
),
), ),
), ],
], )
) ],
], ),
), ),
), ),
), );
); }),
}), ),
), ),
); );
} }

@ -74,16 +74,18 @@ class _EntityListCheckboxSearchWidgetState
child: Container( child: Container(
margin: EdgeInsets.only(top: 15), margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(8),
color: Colors.white), color: Colors.white),
child: ListView( child: ListView(
children: [ children: [
TextFields( TextFields(
hintText: TranslationBase.of(context).searchProcedures, hintText: TranslationBase.of(context).searchProcedures,
suffixIcon: EvaIcons.search, suffixIcon: EvaIcons.search,
suffixIconColor: Color(0xff2B353E),
onChanged: (value) { onChanged: (value) {
filterSearchResults(value); filterSearchResults(value);
}, },
hasBorder: false,
), ),
SizedBox( SizedBox(
height: 15, height: 15,
@ -99,7 +101,7 @@ class _EntityListCheckboxSearchWidgetState
Checkbox( Checkbox(
value: widget.isEntityListSelected( value: widget.isEntityListSelected(
historyInfo), historyInfo),
activeColor: Colors.red[800], activeColor: Color(0xffD02127),
onChanged: (bool newValue) { onChanged: (bool newValue) {
setState(() { setState(() {
if (widget.isEntityListSelected( if (widget.isEntityListSelected(
@ -118,6 +120,7 @@ class _EntityListCheckboxSearchWidgetState
horizontal: 10, vertical: 0), horizontal: 10, vertical: 0),
child: Texts( child: Texts(
historyInfo.procedureName, historyInfo.procedureName,
fontSize: 14.0,
variant: "bodyText", variant: "bodyText",
bold: true, bold: true,
color: Color(0xff575757)), color: Color(0xff575757)),
@ -130,18 +133,32 @@ class _EntityListCheckboxSearchWidgetState
child: Padding( child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 12), horizontal: 12),
child: Row( child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
AppText( Row(
TranslationBase.of(context) children: [
.orderType, Padding(
fontWeight: FontWeight.w700, padding: const EdgeInsets
.symmetric(
horizontal: 11),
child: AppText(
TranslationBase.of(
context)
.orderType,
fontWeight:
FontWeight.w700,
color: Color(0xff2B353E),
),
),
],
), ),
Row( Row(
children: [ children: [
Radio( Radio(
activeColor: activeColor:
Color(0xFFB9382C), Color(0xFFD02127),
value: 0, value: 0,
groupValue: selectedType, groupValue: selectedType,
onChanged: (value) { onChanged: (value) {
@ -153,10 +170,14 @@ class _EntityListCheckboxSearchWidgetState
value.toString(); value.toString();
}, },
), ),
Text('routine'), AppText(
'routine',
color: Color(0xff575757),
fontWeight: FontWeight.w600,
),
Radio( Radio(
activeColor: activeColor:
Color(0xFFB9382C), Color(0xFFD02127),
groupValue: selectedType, groupValue: selectedType,
value: 1, value: 1,
onChanged: (value) { onChanged: (value) {
@ -168,9 +189,12 @@ class _EntityListCheckboxSearchWidgetState
value.toString(); value.toString();
}, },
), ),
Text(TranslationBase.of( AppText(
context) TranslationBase.of(context)
.urgent), .urgent,
color: Color(0xff575757),
fontWeight: FontWeight.w600,
),
], ],
), ),
], ],
@ -192,11 +216,13 @@ class _EntityListCheckboxSearchWidgetState
}, },
minLines: 3, minLines: 3,
maxLines: 5, maxLines: 5,
borderWidth: 0.5,
borderColor: Colors.grey[500],
), ),
), ),
DividerWithSpacesAround(),
], ],
), ),
DividerWithSpacesAround(),
], ],
); );
}).toList(), }).toList(),

Loading…
Cancel
Save