diff --git a/lib/config/config.dart b/lib/config/config.dart index f402afd1..d981b062 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -36,8 +36,10 @@ const GET_PRESCRIPTION_REPORT_ENH = ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; +const GET_Patient_LAB_SPECIAL_RESULT = + 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +const SEND_LAB_RESULT_EMAIL = + 'Services/Notifications.svc/REST/SendLabReportEmail'; const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; const GET_Patient_LAB_ORDERS_RESULT = @@ -270,9 +272,10 @@ const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; -const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; -const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; - +const GET_PATIENT_INSURANCE_DETAILS = + "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +const UPLOAD_INSURANCE_CARD = + 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 485e897c..84ecb516 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -725,7 +725,8 @@ class _MyFamily extends State with TickerProviderStateMixin { this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID); await authenticatedUserObject.getUser(getUser: true); - + Provider.of(context, listen: false).user = + authenticatedUserObject.user; Provider.of(context, listen: false) .setUser(authenticatedUserObject.user); appointmentRateViewModel diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 37ce9bc2..4b37fb29 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -103,127 +103,132 @@ class _ConfirmLogin extends State { width: SizeConfig.realScreenWidth, child: Column( children: [ - Expanded( - flex: 3, - child: user != null && isMoreOption == false - ? Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/DQ/dq_logo_icon.png', - height: 90, - width: 90, - ), - AppText( - TranslationBase.of(context).welcomeBack + - ' ' + - user.name, - fontSize: SizeConfig.textMultiplier * 3.5, - ), - AppText( - TranslationBase.of(context).accountInfo, - fontSize: SizeConfig.textMultiplier * 2.5, - ), - Card( - color: Colors.grey[300], - child: Row( - children: [ - Expanded( - child: ListTile( - title: Text( - TranslationBase.of(context).lastLoginAt, - textAlign: TextAlign.center, - ), - subtitle: Text( - user.editedOn != null + user != null && isMoreOption == false + ? Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/DQ/dq_logo_icon.png', + height: 90, + width: 90, + ), + AppText( + TranslationBase.of(context).welcomeBack + + ' ' + + user.name, + fontSize: SizeConfig.textMultiplier * 3.5, + ), + SizedBox( + height: 20, + ), + AppText( + TranslationBase.of(context).accountInfo, + fontSize: SizeConfig.textMultiplier * 2.5, + ), + SizedBox( + height: 20, + ), + Card( + color: Colors.grey[300], + child: Row( + children: [ + Flexible( + child: ListTile( + title: Text( + TranslationBase.of(context).lastLoginAt, + textAlign: TextAlign.center, + overflow: TextOverflow.ellipsis, + ), + subtitle: Text( + user.editedOn != null + ? formatDate( + DateUtil.convertStringToDate( + user.editedOn)) + : user.createdOn != null ? formatDate( DateUtil.convertStringToDate( - user.editedOn)) + user.createdOn)) : '--', - textAlign: TextAlign.center), - )), - Expanded( - child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginWith, - textAlign: TextAlign.center), - subtitle: Text( - getType(user.logInType, context), - textAlign: TextAlign.center), - )) - ], + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center), + )), + Flexible( + child: ListTile( + title: Text( + TranslationBase.of(context).lastLoginWith, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center), + subtitle: Text( + getType(user.logInType, context), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center), )) - ], - ) - : Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/DQ/dq_logo_icon.png', - height: 90, - width: 90, - ), - 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, - ), - ])), + ], + )), + ], + ) + : Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/DQ/dq_logo_icon.png', + height: 90, + width: 90, + ), + 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 - ? Expanded( - flex: 2, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: InkWell( - onTap: () => { - authenticateUser( - 3, BiometricType.face.index) - }, - child: getButton(user.logInType))), - Expanded(child: getButton(5)) - ]) - ])) - : Expanded( - flex: 4, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - onlySMSBox == false - ? Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded(child: getButton(3)), - Expanded(child: getButton(2)) - ], - ) - : SizedBox(), - Row( + ? Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded(child: getButton(1)), - Expanded(child: getButton(4)) - ], - ), - ]), - ), + Expanded( + child: InkWell( + onTap: () => { + authenticateUser( + 3, BiometricType.face.index) + }, + child: getButton(user.logInType))), + Expanded(child: getButton(5)) + ]) + ]) + : Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + onlySMSBox == false + ? Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded(child: getButton(3)), + Expanded(child: getButton(2)) + ], + ) + : SizedBox(), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded(child: getButton(1)), + Expanded(child: getButton(4)) + ], + ), + ]), Expanded( flex: 1, child: Column( @@ -580,6 +585,9 @@ class _ConfirmLogin extends State { authenticatedUserObject.isLogin = true; appointmentRateViewModel.isLogin = true; projectViewModel.isLogin = true; + projectViewModel.user = authenticatedUserObject.user; + Provider.of(context, listen: false) + .setUser(authenticatedUserObject.user); getToDoCount(); appointmentRateViewModel .getIsLastAppointmentRatedList() @@ -627,7 +635,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(25, 10, 25, 10), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( children: [ Image.asset( @@ -653,7 +661,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -662,12 +670,17 @@ class _ConfirmLogin extends State { height: SizeConfig.imageSizeMultiplier * 13, width: SizeConfig.imageSizeMultiplier * 16, ), - SizedBox( - height: 20, - ), + projectViewModel.isArabic + ? SizedBox( + height: 0, + ) + : SizedBox( + height: 20, + ), AppText( TranslationBase.of(context).verifySMS, fontSize: SizeConfig.textMultiplier * 2, + textAlign: TextAlign.center, ) ], ), @@ -683,7 +696,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(25, 10, 25, 10), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( children: [ Image.asset( @@ -712,7 +725,7 @@ class _ConfirmLogin extends State { borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -755,9 +768,13 @@ class _ConfirmLogin extends State { height: SizeConfig.imageSizeMultiplier * 13, width: SizeConfig.imageSizeMultiplier * 16, ), - SizedBox( - height: 20, - ), + projectViewModel.isArabic + ? SizedBox( + height: 15, + ) + : SizedBox( + height: 20, + ), AppText( TranslationBase.of(context).moreVerification, fontSize: SizeConfig.textMultiplier * 2, diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index e42c1a2c..e20032c4 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -584,6 +584,8 @@ class _AppDrawerState extends State { this.sharedPref.setString(TOKEN, result.authenticationTokenID); // Navigator.of(context).pop(); await authenticatedUserObject.getUser(getUser: true); + Provider.of(context, listen: false).user = + authenticatedUserObject.user; Provider.of(context, listen: false) .setUser(authenticatedUserObject.user); appointmentRateViewModel