Lab result fix

merge-update-with-lab-changes
haroon amjad 3 years ago
parent af90ab3aa3
commit 670991eca4

@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart';
@ -56,125 +55,127 @@ class _Register extends State<Register> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).register,
appBarTitle: TranslationBase.of(context).register, isShowAppBar: false,
isShowAppBar: false, isShowDecPage: false,
isShowDecPage: false, showNewAppBar: false,
showNewAppBar: false, showNewAppBarTitle: true,
showNewAppBarTitle: true, body: Column(
body: Column( children: [
children: [ Expanded(
Expanded( child: ListView(
child: ListView( padding: EdgeInsets.all(21),
padding: EdgeInsets.all(21), physics: BouncingScrollPhysics(),
physics: BouncingScrollPhysics(), children: [
children: [ SizedBox(height: 10),
SizedBox(height: 10), Padding(
Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), child: Text(
child: Text( TranslationBase.of(context).enterNationalId,
TranslationBase.of(context).enterNationalId, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), )),
)), SizedBox(height: 10),
SizedBox(height: 10), PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), SizedBox(height: 12),
SizedBox(height: 12), Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)), SizedBox(height: 20),
SizedBox(height: 20), Row(
Row( children: <Widget>[
children: <Widget>[ Expanded(
Expanded( child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Radio(
Radio( value: 1,
value: 1, groupValue: isHijri,
groupValue: isHijri, onChanged: (value) {
onChanged: (value) { setState(() {
setState(() { isHijri = value;
isHijri = value; });
}); validateForm();
validateForm(); },
}, ),
), Text(TranslationBase.of(context).hijriDate),
Text(TranslationBase.of(context).hijriDate), ],
],
),
), ),
Expanded( ),
child: Row( Expanded(
children: <Widget>[ child: Row(
Radio( children: <Widget>[
value: 0, Radio(
groupValue: isHijri, value: 0,
onChanged: (value) { groupValue: isHijri,
setState(() { onChanged: (value) {
isHijri = value; setState(() {
}); isHijri = value;
validateForm(); });
}, validateForm();
), },
Text(TranslationBase.of(context).gregorianDate), ),
], Text(TranslationBase.of(context).gregorianDate),
), ],
), ),
], ),
), ],
Row(children: <Widget>[ ),
Container( Row(children: <Widget>[
width: SizeConfig.realScreenWidth * .9, Container(
child: isHijri == 1 width: SizeConfig.realScreenWidth * .9,
? Directionality( child: isHijri == 1
textDirection: TextDirection.ltr, ? Directionality(
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob, textDirection: TextDirection.ltr,
isNumber: false, child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob,
suffix: Icon( isNumber: false,
Icons.calendar_today, suffix: Icon(
size: 16, Icons.calendar_today,
))) size: 16,
: Container( )))
child: InkWell( : Container(
onTap: () { child: InkWell(
if (isHijri != null) _selectDate(context); onTap: () {
}, if (isHijri != null) _selectDate(context);
child: Directionality( },
textDirection: TextDirection.ltr, child: Directionality(
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn, textDirection: TextDirection.ltr,
isNumber: false, child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn,
isEnable: false, isNumber: false,
suffix: Icon( isEnable: false,
Icons.calendar_today, suffix: Icon(
size: 16, Icons.calendar_today,
)))))), size: 16,
]) )))))),
], ])
), ],
), ),
Container( ),
width: double.maxFinite, Container(
// height: 80.0, width: double.maxFinite,
color: Colors.white, // height: 80.0,
// margin: EdgeInsets.only(bottom: 50.0), color: Colors.white,
child: Row( // margin: EdgeInsets.only(bottom: 50.0),
children: [ child: Row(
Expanded( children: [
child: Padding( Expanded(
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () { child: Padding(
Navigator.of(context).pop(); padding: EdgeInsets.all(10),
locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details'); child: DefaultButton(TranslationBase.of(context).cancel, () {
}, textColor: Colors.white, color: Color(0xffD02127))), Navigator.of(context).pop();
), locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details');
Expanded( }, textColor: Colors.white, color: Color(0xffD02127))),
child: Padding( ),
padding: EdgeInsets.all(10), Expanded(
child: DefaultButton(TranslationBase.of(context).next, (){ child: Padding(
startRegistration(); padding: EdgeInsets.all(10),
locator<GAnalytics>().loginRegistration.registration_enter_details(); child: DefaultButton(TranslationBase.of(context).next, () {
}, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))), startRegistration();
), locator<GAnalytics>().loginRegistration.registration_enter_details();
], }, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))),
),) ),
], ],
),); ),
)
],
),
);
} }
Future<Null> _selectDate(BuildContext context) async { Future<Null> _selectDate(BuildContext context) async {

@ -47,13 +47,26 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}, },
billNo: widget.patientLabOrders.invoiceNo, billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult[index].resultDataHTML, // details: model.patientLabSpecialResult[index].resultDataHTML,
details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model),
orderNo: widget.patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders, patientLabOrder: widget.patientLabOrders,
), ),
itemCount: model.patientLabSpecialResult.length, itemCount: 1,
), ),
), ),
); );
} }
String getSpecialResults(LabsViewModel model) {
String labResults = "";
model.patientLabSpecialResult.forEach((element) {
if (element.resultDataHTML != null) {
labResults += (element.resultDataHTML + "<br/> <br/>");
} else {
labResults += ("<h6>No Result Available</h6>");
}
});
return labResults;
}
} }

@ -224,7 +224,7 @@ class DoctorCard extends StatelessWidget {
onTap: onEmailTap, onTap: onEmailTap,
child: Icon( child: Icon(
Icons.email, Icons.email,
color: Theme.of(context).primaryColor, color: sickLeaveStatus != 3 ? Theme.of(context).primaryColor : Colors.grey[400],
), ),
) )
: onTap != null : onTap != null

Loading…
Cancel
Save