bug fixes

merge-requests/267/head
Sultan Khan 5 years ago
parent d55ce4c1ec
commit 735698ce90

@ -587,9 +587,9 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "There is no detail for this patient", 'en': "There is no detail for this patient",
'ar': "لا توجد تفاصيل لهذا المريض" 'ar': "لا توجد تفاصيل لهذا المريض"
}, },
'allergicTO': {'en': "ALLERGIC TO ", 'ar':" حساس من" }, 'allergicTO': {'en': "ALLERGIC TO ", 'ar': " حساس من"},
'normal': {'en': "Normal", 'ar':"عادي" }, 'normal': {'en': "Normal", 'ar': "عادي"},
'abnormal': {'en': "Abnormal", 'ar':" غير عادي" }, 'abnormal': {'en': "Abnormal", 'ar': " غير عادي"},
"systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"},
"diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"},
"mass": {"en": "Mass", "ar": "كتلة"}, "mass": {"en": "Mass", "ar": "كتلة"},
@ -620,15 +620,34 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
'updateProcedure': {'en': "Update Procedure", 'ar': "تحديث العملية"}, 'updateProcedure': {'en': "Update Procedure", 'ar': "تحديث العملية"},
'orderProcedure': {'en': "order procedure", 'ar': "طلب العمليات"}, 'orderProcedure': {'en': "order procedure", 'ar': "طلب العمليات"},
'nameOrICD': {'en': "Name or ICD", 'ar':"الاسم او  ICD" }, 'nameOrICD': {'en': "Name or ICD", 'ar': "الاسم او  ICD"},
'dType': {'en': "Type", 'ar':"النوع" }, 'dType': {'en': "Type", 'ar': "النوع"},
'addAssessmentDetails': {'en': "Add Assessment Details", 'ar':"أضف تفاصيل التقييم" }, 'addAssessmentDetails': {
'progressNoteSOAP': {'en': "Progress Note", 'ar':"ملاحظة التقدم" }, 'en': "Add Assessment Details",
'addProgressNote': {'en': "Add Progress Note", 'ar':"أضف ملاحظة التقدم" }, 'ar': "أضف تفاصيل التقييم"
'createdBy': {'en': "Created By :", 'ar':"أضيفت : " }, },
'editedBy': {'en': "Edited By :", 'ar':"عدلت : " }, 'progressNoteSOAP': {'en': "Progress Note", 'ar': "ملاحظة التقدم"},
'currentMedications': {'en': "Current Medications", 'ar':"الأدوية الحالية" }, 'addProgressNote': {'en': "Add Progress Note", 'ar': "أضف ملاحظة التقدم"},
'noItem': {'en': "No items exists in this list", 'ar':"لا توجد عناصر في هذه القائمة" }, 'createdBy': {'en': "Created By :", 'ar': "أضيفت : "},
'postUcafSuccessMsg': {'en': "UCAF request send successfully", 'ar':"تم ارسال طلب UCAF بنجاح" }, 'editedBy': {'en': "Edited By :", 'ar': "عدلت : "},
'vitalSignDetailEmpty': {'en': "There is no data for this vital sign", 'ar':"لا توجد بيانات لهذه العلامة الحيوية" }, 'currentMedications': {'en': "Current Medications", 'ar': "الأدوية الحالية"},
'noItem': {
'en': "No items exists in this list",
'ar': "لا توجد عناصر في هذه القائمة"
},
'postUcafSuccessMsg': {
'en': "UCAF request send successfully",
'ar': "تم ارسال طلب UCAF بنجاح"
},
'vitalSignDetailEmpty': {
'en': "There is no data for this vital sign",
'ar': "لا توجد بيانات لهذه العلامة الحيوية"
},
'onlyOfftimeHoliday': {
'en': "You can only apply holiday or offtime from mobile app",
'ar': "يمكنك فقط تطبيق عطلة أو إجازة من تطبيق الهاتف"
},
'active': {'en': "Active", 'ar': "نشيط"},
'hold': {'en': "Hold", 'ar': "معلق"},
'loading': {'en': "Loading...", 'ar': "جار التحميل..."}
}; };

@ -100,7 +100,7 @@ class SickLeaveService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: {'PatientMRN': patientMRN}, body: {'PatientMRN': patientMRN, "Status": 0},
); );
} }

@ -114,18 +114,17 @@ class ProjectViewModel with ChangeNotifier {
} }
void getProfile() async { void getProfile() async {
// Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile);
// ProfileReqModel docInfo = new ProfileReqModel( ProfileReqModel docInfo = new ProfileReqModel(
// doctorID: doctorProfile.doctorID, doctorID: doctorProfile.doctorID,
// clinicID: doctorProfile.clinicID, clinicID: doctorProfile.clinicID,
// license: true, license: true,
// projectID: doctorProfile.projectID, projectID: doctorProfile.projectID,
// tokenID: '', );
// languageID: 2);
Provider.of<AuthViewModel>(AppGlobal.CONTEX, listen: false) Provider.of<AuthViewModel>(AppGlobal.CONTEX, listen: false)
.getDocProfiles(ProfileReqModel().toJson()) .getDocProfiles(docInfo.toJson())
.then((res) async { .then((res) async {
sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]);
}).catchError((err) { }).catchError((err) {

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -120,18 +121,9 @@ class _LoginsreenState extends State<Loginsreen> {
), ),
], ],
) )
// : Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: <Widget>[
// AuthHeader(loginType.unknownUser),
// KnownUserLogin(),
// ],
// ),
])) ]))
]) ])
: Center(child: CircularProgressIndicator()), : Center(child: AppLoaderWidget()),
), ),
)); ));
} }

@ -116,7 +116,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
IsLoginForDoctorApp: true, IsLoginForDoctorApp: true,
PatientOutSA: false); PatientOutSA: false);
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
//onModelReady: (model) => model.getDashboard(), onModelReady: (model) => model.getDashboard(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.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/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_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';
@ -34,57 +35,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Padding( PatientPageHeaderWidget(patient),
padding: EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
AvatarWidget(
Icon(
patient.genderDescription == "Male"
? DoctorApp.male
: DoctorApp.female_icon,
size: 70,
color: Colors.white,
),
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 5.0,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
],
)
],
),
),
Divider( Divider(
height: 1.0, height: 1.0,
thickness: 1.0, thickness: 1.0,

@ -210,7 +210,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
], ],
), ),
), ),
(item.status == 1) (item.status == 2)
? Expanded( ? Expanded(
flex: 1, flex: 1,
child: IconButton( child: IconButton(

@ -54,8 +54,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
var clinicID; var clinicID;
var fromTime; var fromTime;
var toTime; var toTime;
TextEditingController _controller4; TextEditingController _controller4 = new TextEditingController();
TextEditingController _controller5; TextEditingController _controller5 = new TextEditingController();
void _presentDatePicker(id) { void _presentDatePicker(id) {
var date = new DateTime.now(); var date = new DateTime.now();
var initialDate = id == 'fromDate' var initialDate = id == 'fromDate'
@ -718,10 +718,16 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
? TranslationBase.of(context).update ? TranslationBase.of(context).update
: TranslationBase.of(context).add, : TranslationBase.of(context).add,
onPressed: () { onPressed: () {
if (widget.isUpdate == true) { if (offTime == '1' || offTime == '2') {
updateRecheduleLeave(model2); if (widget.isUpdate == true) {
updateRecheduleLeave(model2);
} else {
addRecheduleLeave(model2);
}
} else { } else {
addRecheduleLeave(model2); DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.onlyOfftimeHoliday);
} }
}, },
), ),
@ -750,9 +756,21 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
this.profile = p; this.profile = p;
if (widget.updateData != null) { if (widget.updateData != null) {
this.clinicID = widget.updateData.clinicId; this.clinicID = widget.updateData.clinicId;
final df = new DateFormat('HH:mm:ss');
final dateFormat = new DateFormat('yyyy-MM-dd');
_toDateController.text = widget.updateData.dateTimeFrom; _toDateController.text =
_toDateController2.text = widget.updateData.dateTimeTo; dateFormat.format(DateTime.parse(widget.updateData.dateTimeFrom));
//df.format(DateTime.parse(widget.updateData.dateTimeFrom));
this.fromTime =
df.format(DateTime.parse(widget.updateData.dateTimeFrom));
this.toTime = df.format(DateTime.parse(widget.updateData.dateTimeTo));
_toDateController2.text =
dateFormat.format(DateTime.parse(widget.updateData.dateTimeTo));
_controller5.text = toTime;
_controller4.text = fromTime;
toDate = _toDateController2.text;
fromDate = _toDateController.text;
} }
}); });
} }
@ -827,20 +845,29 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
} }
updateRecheduleLeave(model) { updateRecheduleLeave(model) {
final df = new DateFormat('yyyy-MM-ddThh:mm:ss'); final df = new DateFormat('yyyy-MM-ddTHH:MM:ss');
final dateFormat = new DateFormat('yyyy-MM-dd'); final dateFormat = new DateFormat('yyyy-MM-dd');
var fromDates = fromDate;
var toDates = toDate;
if (offTime == '1') { if (offTime == '1') {
fromDate = dateFormat.format(fromDate) + 'T' + fromTime + '00'; fromDate = df.format(DateTime.parse(fromDates)) +
toDate = dateFormat.format(fromDate) + 'T' + toTime + '00'; 'T' +
fromTime +
':' +
DateTime.now().second.toString();
toDate = df.format(DateTime.parse(fromDates)) +
'T' +
toTime +
':' +
DateTime.now().second.toString();
} else { } else {
fromDate = df.format(fromDate); fromDate = df.format(fromDates);
toDate = df.format(toDate); toDate = df.format(toDates);
} }
Map<String, dynamic> request = { Map<String, dynamic> request = {
"Requisition": { "Requisition": {
"requisitionNo": 0, "requisitionNo": widget.updateData.requisitionNo,
"requisitionType": offTime, "requisitionType": offTime,
"clinicId": this.profile['ClinicID'], "clinicId": this.profile['ClinicID'],
"doctorId": this.profile['DoctorID'], "doctorId": this.profile['DoctorID'],

@ -56,20 +56,22 @@ class AddSickLeavScreen extends StatelessWidget {
item.status == 1 item.status == 1
? TranslationBase.of( ? TranslationBase.of(
context) context)
.approved .hold
: item.status == 2 : item.status == 2
? TranslationBase.of( ? TranslationBase.of(
context) context)
.extended .active
: TranslationBase.of( : TranslationBase.of(
context) context)
.pending, .all,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white, color: Colors.white,
), ),
color: item.status == 1 color: item.status == 1
? Colors.green ? Colors.yellow[800]
: Colors.yellow[800], : item.status == 2
? Colors.green
: Colors.black,
), ),
Row( Row(
children: [ children: [
@ -96,7 +98,7 @@ class AddSickLeavScreen extends StatelessWidget {
), ),
Row(children: [ Row(children: [
AppText( AppText(
item.remarks, item.remarks ?? "",
) )
]), ]),
], ],

@ -317,7 +317,7 @@ class Helpers {
listOfHours.forEach((element) { listOfHours.forEach((element) {
WorkingHours workingHours = WorkingHours(); WorkingHours workingHours = WorkingHours();
var from = element.substring( var from = element.substring(
element.indexOf('m ') + 2, element.indexOf('To') - 2); element.indexOf('m ') + 2, element.indexOf('To') - 1);
workingHours.from = from.trim(); workingHours.from = from.trim();
var to = element.substring(element.indexOf('To') + 2); var to = element.substring(element.indexOf('To') + 2);
workingHours.to = to.trim(); workingHours.to = to.trim();

@ -997,11 +997,9 @@ class TranslationBase {
String get orderProcedure => String get orderProcedure =>
localizedValues['orderProcedure'][locale.languageCode]; localizedValues['orderProcedure'][locale.languageCode];
String get nameOrICD => String get nameOrICD => localizedValues['nameOrICD'][locale.languageCode];
localizedValues['nameOrICD'][locale.languageCode];
String get dType => String get dType => localizedValues['dType'][locale.languageCode];
localizedValues['dType'][locale.languageCode];
String get addAssessmentDetails => String get addAssessmentDetails =>
localizedValues['addAssessmentDetails'][locale.languageCode]; localizedValues['addAssessmentDetails'][locale.languageCode];
@ -1012,19 +1010,21 @@ class TranslationBase {
String get addProgressNote => String get addProgressNote =>
localizedValues['addProgressNote'][locale.languageCode]; localizedValues['addProgressNote'][locale.languageCode];
String get createdBy => String get createdBy => localizedValues['createdBy'][locale.languageCode];
localizedValues['createdBy'][locale.languageCode];
String get editedBy => String get editedBy => localizedValues['editedBy'][locale.languageCode];
localizedValues['editedBy'][locale.languageCode];
String get currentMedications => String get currentMedications =>
localizedValues['currentMedications'][locale.languageCode]; localizedValues['currentMedications'][locale.languageCode];
String get noItem => String get noItem => localizedValues['noItem'][locale.languageCode];
localizedValues['noItem'][locale.languageCode];
String get postUcafSuccessMsg => String get postUcafSuccessMsg =>
localizedValues['postUcafSuccessMsg'][locale.languageCode]; localizedValues['postUcafSuccessMsg'][locale.languageCode];
String get vitalSignDetailEmpty => String get vitalSignDetailEmpty =>
localizedValues['vitalSignDetailEmpty'][locale.languageCode]; localizedValues['vitalSignDetailEmpty'][locale.languageCode];
String get onlyOfftimeHoliday =>
localizedValues['onlyOfftimeHoliday'][locale.languageCode];
String get active => localizedValues['active'][locale.languageCode];
String get hold => localizedValues['hold'][locale.languageCode];
String get loading => localizedValues['loading'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/lookups/hospital_lookup.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
@ -41,7 +42,7 @@ class _LoginFormState extends State<LoginForm> {
bool _isInit = true; bool _isInit = true;
FocusNode focusPass = FocusNode(); FocusNode focusPass = FocusNode();
FocusNode focusProject = FocusNode(); FocusNode focusProject = FocusNode();
HospitalViewModel projectsProv;
var userInfo = UserModel( var userInfo = UserModel(
userID: '', userID: '',
password: '', password: '',
@ -56,24 +57,13 @@ class _LoginFormState extends State<LoginForm> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
initPlatformState();
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
authProv = Provider.of<AuthViewModel>(context);
if (_isInit) {
if (projectsList.length == 0) {
getProjectsList();
}
}
_isInit = false;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
authProv = Provider.of<AuthViewModel>(context);
projectsProv = Provider.of<HospitalViewModel>(context);
getProjects();
return Form( return Form(
key: loginFormKey, key: loginFormKey,
child: Container( child: Container(
@ -128,25 +118,33 @@ class _LoginFormState extends State<LoginForm> {
}, },
), ),
buildSizedBox(), buildSizedBox(),
TextFormField( projectsList.length > 0
focusNode: focusProject, ? TextFormField(
controller: projectIdController, focusNode: focusProject,
onTap: () { controller: projectIdController,
helpers.showCupertinoPicker( onTap: () {
context, projectsList, 'Name', onSelectProject); helpers.showCupertinoPicker(
}, context, projectsList, 'Name', onSelectProject);
showCursor: false, },
readOnly: true, showCursor: false,
decoration: buildInputDecoration( readOnly: true,
context, decoration: buildInputDecoration(
TranslationBase.of(context).selectYourProject, context,
'assets/images/password_icon.png'), TranslationBase.of(context).selectYourProject,
validator: (value) { 'assets/images/password_icon.png'),
if (value.isEmpty) { validator: (value) {
return TranslationBase.of(context).pleaseEnterYourProject; if (value.isEmpty) {
} return TranslationBase.of(context)
return null; .pleaseEnterYourProject;
}), }
return null;
})
: TextFormField(
readOnly: true,
decoration: buildInputDecoration(
context,
TranslationBase.of(context).loading,
'assets/images/password_icon.png')),
buildSizedBox(), buildSizedBox(),
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@ -325,8 +323,9 @@ class _LoginFormState extends State<LoginForm> {
} }
getProjectsList() { getProjectsList() {
HospitalViewModel projectsProv = Provider.of<HospitalViewModel>(context); //showLoading();
projectsProv.getProjectsList().then((res) { projectsProv.getProjectsList().then((res) {
//hideLoading();
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
projectsList = res['ListProject']; projectsList = res['ListProject'];
@ -371,4 +370,13 @@ class _LoginFormState extends State<LoginForm> {
hideLoading() { hideLoading() {
Navigator.pop(context); Navigator.pop(context);
} }
getProjects() {
if (_isInit) {
if (projectsList.length == 0) {
getProjectsList();
}
}
_isInit = false;
}
} }

@ -118,199 +118,188 @@ class _VerificationMethodsState extends State<VerificationMethods> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
height: SizeConfig.realScreenHeight * 0.6, // height: SizeConfig.realScreenHeight * 0.6,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
user != null && isMoreOption == false user != null && isMoreOption == false
? Column( ? Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceEvenly, MainAxisAlignment.spaceEvenly,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.welcomeBack + .welcomeBack +
' ' + ' ' +
user.doctorName, user.doctorName,
fontSize: fontSize:
SizeConfig.textMultiplier * 3.5, SizeConfig.textMultiplier * 3.5,
), ),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).accountInfo,
.accountInfo, fontSize:
fontSize: SizeConfig.textMultiplier * 2.5,
SizeConfig.textMultiplier * 2.5, ),
), SizedBox(
SizedBox( height: 20,
height: 20, ),
), Card(
Card( color: Colors.grey[300],
color: Colors.grey[300], child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Flexible(
Flexible( child: ListTile(
child: ListTile( title: Text(
title: Text( TranslationBase.of(context)
.lastLoginAt,
textAlign: TextAlign.center,
overflow:
TextOverflow.ellipsis,
),
subtitle: Text(
user.editedOn != null
? formatDate(Helpers
.convertStringToDate(
user.editedOn))
: user.createdOn != null
? formatDate(Helpers
.convertStringToDate(user
.createdOn))
: '--',
overflow:
TextOverflow.ellipsis,
textAlign:
TextAlign.center),
)),
Flexible(
child: ListTile(
title: Text(
TranslationBase.of(context) TranslationBase.of(context)
.lastLoginAt, .lastLoginWith,
textAlign: TextAlign.center,
overflow: overflow:
TextOverflow.ellipsis, TextOverflow.ellipsis,
), textAlign:
subtitle: Text( TextAlign.center),
user.editedOn != null subtitle: Text(
? formatDate(Helpers getType(user.logInTypeID,
.convertStringToDate( context),
user overflow:
.editedOn)) TextOverflow.ellipsis,
: user.createdOn != textAlign:
null TextAlign.center),
? formatDate(Helpers ))
.convertStringToDate(user ],
.createdOn)) )),
: '--', ],
overflow: )
TextOverflow.ellipsis, : Column(
textAlign: mainAxisAlignment:
TextAlign.center), MainAxisAlignment.spaceEvenly,
)), crossAxisAlignment:
Flexible( CrossAxisAlignment.start,
child: ListTile( children: <Widget>[
title: Text( this.onlySMSBox == false
TranslationBase.of( ? AppText(
context) TranslationBase.of(context)
.lastLoginWith, .verifyLoginWith,
overflow: fontSize:
TextOverflow.ellipsis, SizeConfig.textMultiplier *
textAlign: 3.5,
TextAlign.center), textAlign: TextAlign.left,
subtitle: Text( )
getType(user.logInTypeID, : AppText(
context), TranslationBase.of(context)
overflow: .verifyFingerprint2,
TextOverflow.ellipsis, fontSize:
textAlign: SizeConfig.textMultiplier *
TextAlign.center), 2.5,
)) textAlign: TextAlign.start,
], ),
)), ]),
], user != null && isMoreOption == false
) ? Column(
: Column( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: crossAxisAlignment:
MainAxisAlignment.spaceEvenly, CrossAxisAlignment.start,
crossAxisAlignment: children: <Widget>[
CrossAxisAlignment.start, Row(
children: <Widget>[
this.onlySMSBox == false
? AppText(
TranslationBase.of(context)
.verifyLoginWith,
fontSize: SizeConfig
.textMultiplier *
3.5,
textAlign: TextAlign.left,
)
: AppText(
TranslationBase.of(context)
.verifyFingerprint2,
fontSize: SizeConfig
.textMultiplier *
2.5,
textAlign: TextAlign.start,
),
]),
user != null && isMoreOption == false
? Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(
3,
BiometricType
.face
.index,
authProv)
},
child: getButton(
user.logInTypeID,
authProv))),
Expanded(
child:
getButton(5, authProv))
])
])
: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: getButton(
3, authProv)),
Expanded(
child: getButton(
4, authProv))
],
)
: SizedBox(),
Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: child: InkWell(
getButton(1, authProv)), onTap: () => {
authenticateUser(
3,
BiometricType
.face.index,
authProv)
},
child: getButton(
user.logInTypeID,
authProv))),
Expanded( Expanded(
child: getButton(2, authProv)) child: getButton(5, authProv))
], ])
), ])
]), : Column(
Expanded( mainAxisAlignment: MainAxisAlignment.start,
flex: 1, crossAxisAlignment:
child: Column( CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: getButton(
3, authProv)),
Expanded(
child: getButton(
4, authProv))
],
)
: SizedBox(),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: getButton(1, authProv)),
Expanded(
child: getButton(2, authProv))
],
),
]),
// )
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
user != null
? Row(
children: <Widget>[ children: <Widget>[
user != null Expanded(
? Row( child: Button(
children: <Widget>[ title: TranslationBase.of(context)
Expanded( .useAnotherAccount,
child: Button( onTap: () {
title: Navigator.of(context).pushNamed(LOGIN);
TranslationBase.of(context) },
.useAnotherAccount, )),
onTap: () {
Navigator.of(context)
.pushNamed(LOGIN);
},
)),
],
)
: SizedBox(),
], ],
), )
) : SizedBox(),
], ],
)) ),
], ],
), ),
)); ));

@ -24,13 +24,15 @@ class MyScheduleWidget extends StatelessWidget {
Column( Column(
children: [ children: [
Divider( Divider(
height: 10, height: 1,
color: Colors.grey, color: Colors.grey,
thickness: 1.0, thickness: 1.0,
), ),
Text('${workingHoursTable.date.day}')
], ],
), ),
SizedBox(
height: 10,
),
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
@ -50,44 +52,19 @@ class MyScheduleWidget extends StatelessWidget {
return Container( return Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( SizedBox(
children: <Widget>[ height: 5,
Column( ),
crossAxisAlignment: CrossAxisAlignment.start, AppText(
children: <Widget>[ work.from + ' - ' + work.to,
SizedBox( fontSize: 2.0 * SizeConfig.textMultiplier,
height: 5, fontWeight: FontWeight.w300,
),
AppText(
work.from + ' - ',
fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
AppText(
work.to,
fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
),
],
),
],
) )
], ],
), ),
); );
}).toList(), }).toList(),
), ),
SizedBox(
width: 8,
)
], ],
), ),
), ),

@ -98,7 +98,9 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
if (selectedPatientType != 0 && selectedPatientType != 5 && selectedPatientType != 7) if (selectedPatientType != 0 &&
selectedPatientType != 5 &&
selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -144,7 +146,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).list, nameLine2: TranslationBase.of(context).list,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
if (selectedPatientType != 0 && selectedPatientType != 5) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -26,6 +27,7 @@ class AppDrawer extends StatefulWidget {
class _AppDrawerState extends State<AppDrawer> { class _AppDrawerState extends State<AppDrawer> {
bool _isInit = true; bool _isInit = true;
Helpers helpers = new Helpers(); Helpers helpers = new Helpers();
ProjectViewModel projectsProvider;
// @override // @override
// void didChangeDependencies() { // void didChangeDependencies() {
// super.didChangeDependencies(); // super.didChangeDependencies();
@ -38,6 +40,7 @@ class _AppDrawerState extends State<AppDrawer> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AuthViewModel authProvider = Provider.of(context); AuthViewModel authProvider = Provider.of(context);
projectsProvider = Provider.of(context);
return RoundedContainer( return RoundedContainer(
child: Container( child: Container(
color: Colors.white, color: Colors.white,
@ -84,7 +87,13 @@ class _AppDrawerState extends State<AppDrawer> {
)) ))
: SizedBox(), : SizedBox(),
AppText( AppText(
"Director of medical records", //TODO: Make The Dr Title Dynamic and check overflow issue. projectsProvider.isArabic
? authProvider
.doctorProfile.titleDescriptionN ??
""
: authProvider
.doctorProfile?.titleDescription ??
"",
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black87), color: Colors.black87),
RaisedButton( RaisedButton(

Loading…
Cancel
Save