jira bug fixing

merge-requests/312/head
hussam al-habibeh 5 years ago
parent d20e83faa5
commit 39d2fe879c

@ -214,16 +214,16 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
0]
.entityList[
index]
.startDate)
.createdOn)
.day
.toString(),
color: Colors
.green,
),
AppText(
Helpers.getMonth(model.prescriptionList[0].entityList[index].startDate !=
Helpers.getMonth(model.prescriptionList[0].entityList[index].createdOn !=
null
? (DateTime.parse(model.prescriptionList[0].entityList[index].startDate)
? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn)
.month)
: DateTime.now()
.month)
@ -261,9 +261,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
child:
AppText(
model
.prescriptionList[0]
.entityList[index]
.startDate,
.prescriptionList[
0]
.entityList[
index]
.startDate
.replaceAll("-",
"/"),
fontSize:
12.0,
),

@ -79,7 +79,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
@override
void initState() {
super.initState();
remarksController.text = widget.remarks;
indicationList = List();
dynamic indication1 = {"id": 545, "name": "Gingival Hyperplasia"};
@ -146,8 +146,9 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
minChildSize: 0.6,
builder:
(BuildContext context, ScrollController scrollController) {
return Container(
height: MediaQuery.of(context).size.height * 2.5,
return SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 2.0,
child: Form(
child: Padding(
padding: EdgeInsets.symmetric(
@ -237,7 +238,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
// height: 12,
// ),
Container(
height: MediaQuery.of(context).size.height *
height:
MediaQuery.of(context).size.height *
0.060,
width: double.infinity,
child: Row(
@ -261,7 +263,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
hintText: widget.doseStreangth,
fontSize: 15.0,
controller: strengthController,
keyboardType: TextInputType.number,
keyboardType:
TextInputType.number,
onChanged: (String value) {
setState(() {
strengthChar = value.length;
@ -322,7 +325,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
barrierDismissible:
false,
context: context,
builder: (BuildContext
builder:
(BuildContext
context) {
return dialog;
},
@ -348,7 +352,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
height: 12,
),
Container(
height: MediaQuery.of(context).size.height *
height:
MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationRouteList != null
@ -356,11 +361,12 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
Helpers.hideKeyboard(context);
ListSelectDialog dialog =
ListSelectDialog(
list: model.medicationRouteList,
list:
model.medicationRouteList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
okText: TranslationBase.of(
context)
.ok,
okFunction: (selectedValue) {
setState(() {
@ -382,7 +388,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration:
textFieldSelectorDecoration(
'Route',
route != null
? route['nameEn']
@ -396,7 +403,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
height:
MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationDoseTimeList !=
@ -409,8 +417,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
.medicationDoseTimeList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
okText: TranslationBase.of(
context)
.ok,
okFunction: (selectedValue) {
setState(() {
@ -429,7 +437,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration:
textFieldSelectorDecoration(
TranslationBase.of(context)
.doseTime,
doseTime != null
@ -444,7 +453,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
height:
MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationFrequencyList !=
@ -457,8 +467,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
.medicationFrequencyList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
okText: TranslationBase.of(
context)
.ok,
okFunction: (selectedValue) {
setState(() {
@ -478,11 +488,13 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration:
textFieldSelectorDecoration(
TranslationBase.of(context)
.frequency,
frequencyUpdate != null
? frequencyUpdate['nameEn']
? frequencyUpdate[
'nameEn']
: null,
true),
enabled: false,
@ -493,7 +505,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
height: 12.0,
),
Container(
height: MediaQuery.of(context).size.height *
height:
MediaQuery.of(context).size.height *
0.070,
child: InkWell(
onTap: model.medicationDurationList !=
@ -506,8 +519,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
.medicationDurationList,
attributeName: 'nameEn',
attributeValueId: 'id',
okText:
TranslationBase.of(context)
okText: TranslationBase.of(
context)
.ok,
okFunction: (selectedValue) {
setState(() {
@ -527,11 +540,13 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
decoration:
textFieldSelectorDecoration(
TranslationBase.of(context)
.duration,
updatedDuration != null
? updatedDuration['nameEn']
? updatedDuration[
'nameEn']
.toString()
: null,
true),
@ -618,8 +633,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
onTap: () =>
selectDate(context, widget.model),
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
decoration: Helpers
.textFieldSelectorDecoration(
widget.startDate,
selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
@ -644,7 +659,6 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
width: 1.0,
color: HexColor("#CCCCCC"))),
child: TextFields(
hintText: widget.remarks,
controller: remarksController,
maxLines: 7,
minLines: 4,
@ -654,7 +668,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
height: 10.0,
),
SizedBox(
height: MediaQuery.of(context).size.height *
height:
MediaQuery.of(context).size.height *
0.08,
),
Container(
@ -674,15 +689,14 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
.text.isNotEmpty
? strengthController
.text
: widget.doseStreangth,
newUnit:
units !=
null
: widget
.doseStreangth,
newUnit: units != null
? units['id'].toString()
: widget.doseUnit,
doseUnit: widget.doseUnit,
doseStreangth: widget
.doseStreangth,
doseStreangth:
widget.doseStreangth,
duration: widget.duration,
startDate: widget.startDate,
doseId: widget.dose,
@ -690,27 +704,25 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
routeId: widget.route,
patient: widget.patient,
model: widget.model,
newDuration:
updatedDuration !=
newDuration: updatedDuration !=
null
? updatedDuration[
'id']
? updatedDuration['id']
.toString()
: widget.duration,
drugId: widget.drugId,
remarks: remarksController.text,
route: route !=
null
remarks:
remarksController.text,
route: route != null
? route['id'].toString()
: widget.route,
frequency:
frequencyUpdate !=
frequency: frequencyUpdate !=
null
? frequencyUpdate['id']
.toString()
: widget.frequency,
dose: doseTime != null
? doseTime['id'].toString()
? doseTime['id']
.toString()
: widget.dose,
enteredRemarks:
widget.enteredRemarks);
@ -725,7 +737,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
],
),
),
));
)),
);
}),
),
),

Loading…
Cancel
Save