jira bugs

merge-update-with-lab-changes
hussam al-habibeh 5 years ago
parent 6dc0d89f61
commit d5c76b5400

@ -80,9 +80,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: widget.isUpdate appBarTitle: widget.isUpdate ? TranslationBase.of(context).update : TranslationBase.of(context).add,
? TranslationBase.of(context).update
: TranslationBase.of(context).add,
appBarIcons: widget.isUpdate appBarIcons: widget.isUpdate
? [ ? [
IconButton( IconButton(
@ -98,14 +96,10 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo).then((value) {
.deactivateDiabeticStatus(
lineItemNo: widget.lineItemNo)
.then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.ErrorLocal) if (widget.model.state == ViewState.ErrorLocal)
AppToast.showErrorToast( AppToast.showErrorToast(message: widget.model.error);
message: widget.model.error);
else else
Navigator.pop(context); Navigator.pop(context);
}).catchError((e) { }).catchError((e) {
@ -156,9 +150,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -185,17 +177,13 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
bloodSugarDate = date; bloodSugarDate = date;
}, },
); );
}, }, currentTime: bloodSugarDate, locale: projectViewModel.localeType);
currentTime: bloodSugarDate,
locale: projectViewModel.localeType);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -210,30 +198,22 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
DatePicker.showTimePicker(context, showTitleActions: true, DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) {
onConfirm: (date) {
setState( setState(
() { () {
timeSugarDate = date; timeSugarDate = date;
}, },
); );
}, }, currentTime: timeSugarDate, locale: projectViewModel.localeType);
currentTime: timeSugarDate,
locale: projectViewModel.localeType);
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(TranslationBase.of(context).time), Texts(getTime())],
Texts(TranslationBase.of(context).time),
Texts(getTime())
],
), ),
), ),
), ),
@ -251,12 +231,9 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
loading: widget.model.state == ViewState.BusyLocal, loading: widget.model.state == ViewState.BusyLocal,
label: TranslationBase.of(context).save.toUpperCase(), label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white, textColor: Colors.white,
color: isButtonDisabled color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
? Colors.grey[900]
: Colors.grey,
onTap: () async { onTap: () async {
if (_bloodSystolicValueController.text.isNotEmpty && if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) {
_bloodDiastolicValueController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
widget.model widget.model
@ -264,10 +241,8 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
isUpdate: widget.isUpdate, isUpdate: widget.isUpdate,
bloodPressureDate: bloodPressureDate:
'${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00',
diastolicPressure: diastolicPressure: _bloodDiastolicValueController.text.toString(),
_bloodDiastolicValueController.text.toString(), systolicePressure: _bloodSystolicValueController.text.toString(),
systolicePressure:
_bloodSystolicValueController.text.toString(),
measuredArm: measuredArm, measuredArm: measuredArm,
) )
.then((value) { .then((value) {
@ -315,7 +290,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
} }
void validateForm() { void validateForm() {
print("_bloodSystolicValueController "+_bloodSystolicValueController.text.length.toString()); print("_bloodSystolicValueController " + _bloodSystolicValueController.text.length.toString());
if (measureTimeSelectedType != 'Left Arm' && if (measureTimeSelectedType != 'Left Arm' &&
_bloodSystolicValueController.text.length > 0 && _bloodSystolicValueController.text.length > 0 &&
_bloodDiastolicValueController.text.length > 0) { _bloodDiastolicValueController.text.length > 0) {
@ -345,5 +320,4 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
// }); // });
// } // }
} }
} }

@ -195,9 +195,7 @@ class Utils {
List<Widget> medical = List(); List<Widget> medical = List();
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(5) onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null,
? Navigator.push(context, FadePage(page: MyAppointments()))
: null,
child: isLogin child: isLogin
? Stack(children: [ ? Stack(children: [
MedicalProfileItem( MedicalProfileItem(
@ -225,7 +223,8 @@ class Utils {
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'my_appointment_icon.png',
subTitle: TranslationBase.of(context).myAppointmentsList, subTitle: TranslationBase.of(context).myAppointmentsList,
hasBadge: true,isEnable: projectViewModel.havePrivilege(5), hasBadge: true,
isEnable: projectViewModel.havePrivilege(5),
), ),
)); ));
if (projectViewModel.havePrivilege(10)) { if (projectViewModel.havePrivilege(10)) {
@ -239,11 +238,9 @@ class Utils {
)); ));
} }
medical.add(InkWell( medical.add(InkWell(
onTap: () =>projectViewModel.havePrivilege(7) onTap: () =>
? Navigator.push(context, FadePage(page: RadiologyHomePage())) projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
imagePath: 'radiology_icon.png', imagePath: 'radiology_icon.png',
@ -253,9 +250,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) onTap: () =>
? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medicines, title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png', imagePath: 'prescription_icon.png',
@ -279,11 +275,9 @@ class Utils {
), ),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () =>projectViewModel.havePrivilege(48) onTap: () =>
? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical, title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png', imagePath: 'active_medications.png',
@ -309,9 +303,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) onTap: () =>
? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).eye, title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png', imagePath: 'eye_measurement_icon.png',
@ -321,9 +314,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22) onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
? Navigator.push(context, FadePage(page: InsuranceCard()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).insurance, title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png', imagePath: 'insurance_card_icon.png',
@ -344,9 +335,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18) onTap: () =>
? Navigator.push(context, FadePage(page: InsuranceApproval())) projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval, title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
@ -356,9 +346,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
? Navigator.push(context, FadePage(page: AllergiesPage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).allergies, title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png', imagePath: 'my_allergies_icon.png',
@ -368,9 +356,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
? Navigator.push(context, FadePage(page: MyVaccines()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines, title: TranslationBase.of(context).myVaccines,
imagePath: 'my_vaccines_icon.png', imagePath: 'my_vaccines_icon.png',
@ -380,9 +366,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) onTap: () =>
? Navigator.push(context, FadePage(page: HomeReportPage())) projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medical, title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png', imagePath: 'medical_reports_icon.png',
@ -392,9 +377,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) onTap: () =>
? Navigator.push(context, FadePage(page: MonthlyReportsPage())) projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).monthly, title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png', imagePath: 'monthly_reports_icon.png',
@ -404,9 +388,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) onTap: () =>
? Navigator.push(context, FadePage(page: PatientSickLeavePage())) projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).sick, title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png', imagePath: 'sick_leaves_icons.png',
@ -416,9 +399,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
? Navigator.push(context, FadePage(page: MyBalancePage()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance, title: TranslationBase.of(context).myBalance,
imagePath: 'check-in.png', imagePath: 'check-in.png',
@ -436,9 +417,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
? Navigator.push(context, FadePage(page: MyTrackers()))
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers, title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png', imagePath: 'my_tracker_icon.png',
@ -448,9 +427,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) onTap: () =>
? Navigator.push(context, FadePage(page: SmartWatchInstructions())) projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches, title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png', imagePath: 'smartwatch_icon.png',
@ -460,9 +438,8 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) onTap: () =>
? Navigator.push(context, FadePage(page: AskDoctorHomPage())) projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, title: TranslationBase.of(context).askYour,
imagePath: 'ask_doctor_icon.png', imagePath: 'ask_doctor_icon.png',
@ -501,9 +478,7 @@ class Utils {
} }
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
? launch('whatsapp://send?phone=18885521858&text=')
: null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot, title: TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
@ -515,8 +490,7 @@ class Utils {
return medical; return medical;
} }
static Widget loadNetworkImage( static Widget loadNetworkImage({@required String url, BoxFit fitting = BoxFit.cover}) {
{@required String url, BoxFit fitting = BoxFit.cover}) {
return CachedNetworkImage( return CachedNetworkImage(
placeholderFadeInDuration: Duration(milliseconds: 250), placeholderFadeInDuration: Duration(milliseconds: 250),
fit: fitting, fit: fitting,
@ -569,8 +543,7 @@ extension IndexedIterable<E> on Iterable<E> {
openAppStore({String androidPackageName, String iOSAppID}) async { openAppStore({String androidPackageName, String iOSAppID}) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
assert(!(androidPackageName == null), assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter");
"Should have valid value in androidPackageName parameter");
if ((await FlutterHmsGmsAvailability.isGmsAvailable)) launch("market://details?id=com.ejada.hmg"); if ((await FlutterHmsGmsAvailability.isGmsAvailable)) launch("market://details?id=com.ejada.hmg");
if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg"); if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg");
} else if (Platform.isIOS) { } else if (Platform.isIOS) {

Loading…
Cancel
Save