Procedure updates

merge-requests/252/head
hussam al-habibeh 5 years ago
parent debcad3a3d
commit b0410dc744

@ -61,7 +61,7 @@ class _EntityListCheckboxSearchWidgetState
child: ListView( child: ListView(
children: [ children: [
TextFields( TextFields(
hintText: 'Search ', hintText: 'Search Procedure',
suffixIcon: EvaIcons.search, suffixIcon: EvaIcons.search,
onChanged: (value) { onChanged: (value) {
filterSearchResults(value); filterSearchResults(value);

@ -568,139 +568,154 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: DraggableScrollableSheet(
child: Container( minChildSize: 0.90,
height: 810, initialChildSize: 0.95,
child: Padding( maxChildSize: 1.0,
padding: EdgeInsets.all(12.0), builder: (BuildContext context, ScrollController scrollController) {
child: Column( return SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
children: [ height: MediaQuery.of(context).size.height * 1.20,
AppText( child: Padding(
'Select Procedure'.toUpperCase(), padding: EdgeInsets.all(12.0),
fontWeight: FontWeight.w900, child: Column(
), crossAxisAlignment: CrossAxisAlignment.start,
Container( children: [
height: screenSize.height * 0.070, AppText(
child: InkWell( 'Search Procedure Category'.toUpperCase(),
onTap: model.categoryList != null && fontWeight: FontWeight.w900,
model.categoryList.length > 0 ),
? () { SizedBox(
ListSelectDialog dialog = ListSelectDialog( height: 5.0,
list: model.categoryList, ),
attributeName: 'categoryName', Container(
attributeValueId: 'categoryId', height: screenSize.height * 0.070,
okText: TranslationBase.of(context).ok, child: InkWell(
okFunction: (selectedValue) { onTap: model.categoryList != null &&
setState(() { model.categoryList.length > 0
selectedCategory = selectedValue; ? () {
model.getProcedureCategory( ListSelectDialog dialog = ListSelectDialog(
categoryName: list: model.categoryList,
selectedCategory['categoryName']); attributeName: 'categoryName',
}); attributeValueId: 'categoryId',
}, okText: TranslationBase.of(context).ok,
); okFunction: (selectedValue) {
showDialog( setState(() {
barrierDismissible: false, selectedCategory = selectedValue;
context: context, model.getProcedureCategory(
builder: (BuildContext context) { categoryName: selectedCategory[
return dialog; 'categoryName']);
}, });
); },
//model.getProcedureCategory(); );
} showDialog(
: null, barrierDismissible: false,
child: TextField( context: context,
decoration: textFieldSelectorDecoration( builder: (BuildContext context) {
'Procedure Categorey', return dialog;
selectedCategory != null },
? selectedCategory['categoryName'] );
//model.getProcedureCategory();
}
: null, : null,
true, child: TextField(
suffixIcon: Icon( decoration: textFieldSelectorDecoration(
Icons.search, 'Procedure Categorey',
color: Colors.black, selectedCategory != null
)), ? selectedCategory['categoryName']
enabled: false, : null,
), true,
), suffixIcon: Icon(
), Icons.search,
if (widget.model.categoriesList.length != 0) color: Colors.black,
EntityListCheckboxSearchWidget( )),
model: widget.model, enabled: false,
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(
height: 15.0,
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Order Type'.toUpperCase(),
controller: procedureController,
), ),
), if (widget.model.categoriesList.length != 0)
SizedBox( NetworkBaseView(
height: 15.0, baseViewModel: model,
), child: EntityListCheckboxSearchWidget(
TextFields( model: widget.model,
hintText: 'Remarks', masterList:
controller: remarksController, widget.model.categoriesList[0].entityList,
minLines: 3, removeHistory: (item) {
maxLines: 5, setState(() {
), entityList.remove(item);
SizedBox( });
height: 50.0, },
), addHistory: (history) {
Container( setState(() {
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), entityList.add(history);
child: Wrap( });
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'add Selected Procedures'.toUpperCase(),
onPressed: () {
Navigator.pop(context);
postProcedure(
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
}, },
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
},
isEntityListSelected: (master) =>
isEntityListSelected(master),
), ),
], ),
SizedBox(
height: 15.0,
), ),
), Column(
], mainAxisAlignment: MainAxisAlignment.spaceBetween,
) children: [
], Container(
), decoration: BoxDecoration(
), borderRadius:
), BorderRadius.all(Radius.circular(6.0)),
), border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: 'Order Type'.toUpperCase(),
controller: procedureController,
),
),
SizedBox(
height: 15.0,
),
TextFields(
hintText: 'Remarks',
controller: remarksController,
minLines: 3,
maxLines: 5,
),
SizedBox(
height: 50.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
'add Selected Procedures'.toUpperCase(),
onPressed: () {
Navigator.pop(context);
postProcedure(
entityList: entityList,
patient: patient,
model: widget.model,
remarks: remarksController.text);
},
),
],
),
),
],
)
],
),
),
),
);
}),
), ),
); );
} }
@ -760,7 +775,7 @@ void updateProcedureForm(context,
isScrollControlled: true, isScrollControlled: true,
builder: (BuildContext bc) { builder: (BuildContext bc) {
return Container( return Container(
height: 400, height: MediaQuery.of(context).size.height * 0.55,
child: Form( child: Form(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),

Loading…
Cancel
Save