diff --git a/android/app/build.gradle b/android/app/build.gradle index 336e8e53..5fd11eb3 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -34,13 +34,15 @@ android { } lintOptions { - disable 'InvalidPackage' + disable 'MissingTranslation' + checkReleaseBuilds false + } + defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). -// applicationId "com.cloud.diplomaticquarterapp" - applicationId "com.ejada.hmg.uat" + applicationId "com.ejada.hmg" minSdkVersion 21 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() diff --git a/android/app/google-services.json b/android/app/google-services.json index 6d1d75a9..dd4038cf 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -10,7 +10,7 @@ "client_info": { "mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063", "android_client_info": { - "package_name": "com.ejada.hmg.uat" + "package_name": "com.ejada.hmg" } }, "oauth_client": [ diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index d8fd4e88..ab5e631b 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.ejada.hmg"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 63f94294..b90d91e3 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.ejada.hmg"> diff --git a/lib/models/Authentication/register_user_requet.dart b/lib/models/Authentication/register_user_requet.dart index 7758ce5b..12e59d0a 100644 --- a/lib/models/Authentication/register_user_requet.dart +++ b/lib/models/Authentication/register_user_requet.dart @@ -83,6 +83,7 @@ class Patientobject { String dateofBirth; int gender; String nationalityID; + String eHealthIDField; String dateofBirthN; String emailAddress; String sourceType; @@ -96,15 +97,16 @@ class Patientobject { this.mobileNumber, this.patientOutSA, this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, this.strDateofBirth, this.dateofBirth, this.gender, this.nationalityID, + this.eHealthIDField, this.dateofBirthN, this.emailAddress, this.sourceType, @@ -127,6 +129,7 @@ class Patientobject { dateofBirth = json['DateofBirth']; gender = json['Gender']; nationalityID = json['NationalityID']; + eHealthIDField = json['eHealthIDField']; dateofBirthN = json['DateofBirthN']; emailAddress = json['EmailAddress']; sourceType = json['SourceType']; @@ -152,10 +155,10 @@ class Patientobject { data['DateofBirth'] = this.dateofBirth; data['Gender'] = this.gender; data['NationalityID'] = this.nationalityID; + data['eHealthIDField'] = this.eHealthIDField; data['DateofBirthN'] = this.dateofBirthN; data['EmailAddress'] = this.emailAddress; data['SourceType'] = this.sourceType; - data['PreferredLanguage'] = this.preferredLanguage; data['Marital'] = this.marital; return data; diff --git a/lib/models/LiveCare/LiveCareClinicsListResponse.dart b/lib/models/LiveCare/LiveCareClinicsListResponse.dart index 094fb1a5..421f202f 100644 --- a/lib/models/LiveCare/LiveCareClinicsListResponse.dart +++ b/lib/models/LiveCare/LiveCareClinicsListResponse.dart @@ -35,10 +35,10 @@ class PatientERGetClinicsList { String createdOn; String createdBy; int isOnline; - Null endTime; + dynamic endTime; bool projectOutSA; List shiftTimings; - Null startTime; + dynamic startTime; PatientERGetClinicsList( {this.iD, diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 343580a9..3e3af59c 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/weather_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; @@ -15,14 +17,16 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dar import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; -import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart'; @@ -51,6 +55,9 @@ class AllHabibMedicalService extends StatefulWidget { class _AllHabibMedicalServiceState extends State { AppSharedPreferences sharedPref = AppSharedPreferences(); AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); LocationUtils locationUtils; var weather = '--'; WeatherService _weatherService = WeatherService(); @@ -224,12 +231,13 @@ class _AllHabibMedicalServiceState extends State { title: TranslationBase.of(context).emergencyService, ), ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: ParkingPage(), - ), - ), + onTap: () => getPharmacyToken(), + // Navigator.push( + // context, + // FadePage( + // page: ParkingPage(), + // ), + // ), imageLocation: 'assets/images/pharmacy_logo.png', title: TranslationBase.of(context).pharmacy), ServicesContainer( @@ -380,6 +388,25 @@ class _AllHabibMedicalServiceState extends State { ); } + getPharmacyToken() async { + if (!authProvider.isLogin) { + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } else { + GifLoaderDialogUtils.showMyDialog(context); + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (pharmacyModuleViewModel.error.isNotEmpty) { + await pharmacyModuleViewModel.createUser().then((value) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } + }); + } + } + getAuthUser() async { if (await this.sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart index 0ce34e42..7f0d0c5c 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -45,6 +45,10 @@ class _BodyFatState extends State { String dropdownValue; double calories = 0; String textResult = ''; + TextEditingController heightController = TextEditingController(); + TextEditingController neckController = TextEditingController(); + TextEditingController waistController = TextEditingController(); + TextEditingController hipController = TextEditingController(); void updateColorHeight(int type) { //MG/DLT card @@ -310,7 +314,18 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(heightCm.toString()), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: heightController, + decoration: InputDecoration( + labelText: heightCm.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), + ), ), ), Container( @@ -476,7 +491,18 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(neck.toString()), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: neckController, + decoration: InputDecoration( + labelText: neck.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), + ), ), ), Container( @@ -642,7 +668,18 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(waist.toString()), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: waistController, + decoration: InputDecoration( + labelText: waist.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), + ), ), ), Container( @@ -808,7 +845,18 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(hip.toString()), + child: Padding( + padding: const EdgeInsets.only(left: 10.0), + child: TextFormField( + keyboardType: TextInputType.number, + controller: hipController, + decoration: InputDecoration( + labelText: hip.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), + ), ), ), Container( diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 2a349cf2..fd89889f 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -121,6 +121,15 @@ class _DoctorProfileState extends State color: Colors.grey[900], letterSpacing: 1.0)), ), + Container( + margin: EdgeInsets.only(top: 10.0), + alignment: Alignment.center, + child: Text(widget.doctor.projectName, + style: TextStyle( + fontSize: 15.0, + color: Colors.grey[900], + letterSpacing: 1.0)), + ), Container( margin: EdgeInsets.only(top: 10.0), alignment: Alignment.center, diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 5b4f6dc3..3289fd74 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -19,6 +19,7 @@ class _SearchByDoctorState extends State { @override void initState() { + super.initState(); _isButtonDisabled = true; } @@ -120,11 +121,15 @@ class _SearchByDoctorState extends State { _patientDoctorAppointmentListHospital.add( PatientDoctorAppointmentList( filterName: element.projectName, - distanceInKMs: element.projectDistanceInKiloMeters.toString(), + distanceInKMs: + element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); } }); - } else {} + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorSearchMsg']); + } }); GifLoaderDialogUtils.hideDialog(context); navigateToSearchResults( @@ -167,7 +172,7 @@ class _SearchByDoctorState extends State { context, FadePage( page: SearchResults( - isLiveCareAppointment: false, + isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))); diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 9848b394..68781795 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -39,10 +39,10 @@ class _AppointmentDetailsState extends State void initState() { _tabController = new TabController(length: 2, vsync: this); AppointmentDetails.showFooterButton = false; + print(widget.appo.clinicID); super.initState(); } - @override void dispose() { super.dispose(); @@ -116,7 +116,8 @@ class _AppointmentDetailsState extends State Container( margin: EdgeInsets.only(top: 10.0), alignment: Alignment.center, - child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality), + child: Text( + getDoctorSpeciality(widget.appo.doctorSpeciality), style: TextStyle( fontSize: 12.0, color: Colors.grey[900], @@ -177,20 +178,36 @@ class _AppointmentDetailsState extends State TabBar( onTap: (index) { setState(() { - index == 1 - ? AppointmentDetails.showFooterButton = true - : AppointmentDetails.showFooterButton = false; - print(AppointmentDetails.showFooterButton); + if (index == 1) { + if (widget.appo.clinicID == 17 || + widget.appo.clinicID == 23 || + widget.appo.isExecludeDoctor) { + _tabController.index = + _tabController.previousIndex; + AppointmentDetails.showFooterButton = false; + } else { + AppointmentDetails.showFooterButton = true; + } + } }); }, tabs: [ Tab( child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))), - Tab( - child: Text(TranslationBase.of(context).availableAppo, - style: TextStyle(color: Colors.black)), - ) + widget.appo.clinicID == 17 || + widget.appo.clinicID == 23 || + widget.appo.isExecludeDoctor + ? Tab( + child: Text( + TranslationBase.of(context).availableAppo, + style: TextStyle(color: Colors.grey)), + ) + : Tab( + child: Text( + TranslationBase.of(context).availableAppo, + style: TextStyle(color: Colors.black)), + ) ], controller: _tabController, ), diff --git a/lib/pages/MyAppointments/models/ArrivedButtons.dart b/lib/pages/MyAppointments/models/ArrivedButtons.dart index 136bd30f..dc3ff3f9 100644 --- a/lib/pages/MyAppointments/models/ArrivedButtons.dart +++ b/lib/pages/MyAppointments/models/ArrivedButtons.dart @@ -30,7 +30,7 @@ class ArrivedButtons { { "title": TranslationBase.of(AppGlobal.context).raise, "subtitle": TranslationBase.of(AppGlobal.context).complaint, - "icon": "assets/images/new-design/Complaint_icon.png", + "icon": "assets/images/new-design/feedback_icon.png", "caller": "insertComplaint" }, { diff --git a/lib/pages/insurance/insurance_card_update_details.dart b/lib/pages/insurance/insurance_card_update_details.dart index 5e9db38a..87035e0c 100644 --- a/lib/pages/insurance/insurance_card_update_details.dart +++ b/lib/pages/insurance/insurance_card_update_details.dart @@ -264,6 +264,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget { textColor: Colors.white, label: TranslationBase.of(context).scanNow.toUpperCase(), color: Theme.of(context).primaryColor, + small: true, onTap: () async { confirmAttachInsuranceCardImageDialogDialog( context: context, diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 74feef0b..8793452a 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -901,7 +901,7 @@ class _HomePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts( - TranslationBase.of(context).contactUs, + TranslationBase.of(context).reachUs, color: Colors.white, fontWeight: FontWeight.normal, ), diff --git a/lib/pages/livecare/widgets/clinic_card.dart b/lib/pages/livecare/widgets/clinic_card.dart index 9ea12f01..0d9f056c 100644 --- a/lib/pages/livecare/widgets/clinic_card.dart +++ b/lib/pages/livecare/widgets/clinic_card.dart @@ -12,10 +12,12 @@ class ClinicCard extends StatefulWidget { bool isSelected; final PatientERGetClinicsList patientERGetClinicsList; var languageID; + int isOnline; ClinicCard( {this.isSelected, this.languageID, + this.isOnline, @required this.patientERGetClinicsList}); @override @@ -37,7 +39,7 @@ class _State extends State { children: [ Card( margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0), - color: widget.isSelected ? Colors.blue : Colors.white, + color: widget.isSelected ? Colors.blue : widget.isOnline == 1 ? Colors.white : Colors.grey, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), ), diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index ae7f1dca..0e8c64f1 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -385,7 +385,7 @@ class _clinic_listState extends State { } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: err); + // AppToast.showErrorToast(message: err); print(err); }); } @@ -555,8 +555,13 @@ class _clinic_listState extends State { itemBuilder: (context, index) { return InkWell( onTap: () { - updateSelectedIndex(liveCareClinicsListResponse - .patientERGetClinicsList[index]); + if(liveCareClinicsListResponse + .patientERGetClinicsList[index].isOnline == 1) { + updateSelectedIndex(liveCareClinicsListResponse + .patientERGetClinicsList[index]); + } else { + AppToast.showErrorToast(message: "Clinic is offline"); + } }, child: ClinicCard( isSelected: selectedClinicID == diff --git a/lib/pages/login/forgot-password.dart b/lib/pages/login/forgot-password.dart index b1c72111..e03a1225 100644 --- a/lib/pages/login/forgot-password.dart +++ b/lib/pages/login/forgot-password.dart @@ -24,6 +24,7 @@ class _ForgotPassword extends State { final TextEditingController nationalIDorFile = null; String mobileNo = ""; var con; + @override Widget build(BuildContext context) { con = context; @@ -138,6 +139,8 @@ class _ForgotPassword extends State { child: DefaultButton( TranslationBase.of(context).submit, () { + // if (mobileNo.length >= 9 == true) + // sendPatientIDBySMS(); if (mobileNo.length >= 9) sendPatientIDBySMS(); // print(mobileNo.text); }, diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index d28fea86..e1152032 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -2,8 +2,9 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; -import 'package:diplomaticquarterapp/models/Authentication/register_user_requet.dart'; -import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' + as checkActivation; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; @@ -20,6 +21,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hijri/hijri_calendar.dart'; import 'package:intl/intl.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:provider/provider.dart'; class RegisterInfo extends StatefulWidget { @override @@ -45,6 +50,13 @@ class _RegisterInfo extends State { String email = ''; String location = '1'; + AuthenticatedUserObject authenticatedUserObject = + locator(); + + ProjectViewModel projectViewModel; + + AppointmentRateViewModel appointmentRateViewModel = + locator(); @override void initState() { @@ -56,6 +68,8 @@ class _RegisterInfo extends State { @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( appBarTitle: TranslationBase.of(context).register, isShowAppBar: true, @@ -300,16 +314,17 @@ class _RegisterInfo extends State { } else { + result = checkActivation.CheckActivationCode.fromJson(result), result.list.isFamily = false, sharedPref.setObject(USER_PROFILE, result.list), this.sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), sharedPref.setString(TOKEN, result.authenticationTokenID), - Navigator.of(context).pushNamed(HOME) + this.setUser(result), } }) .catchError((err) { - GifLoaderDialogUtils.hideDialog(context); + // GifLoaderDialogUtils.hideDialog(context); ConfirmDialog dialog = new ConfirmDialog( context: context, confirmMessage: err, @@ -321,6 +336,15 @@ class _RegisterInfo extends State { }); } + setUser(result) async { + await authenticatedUserObject.getUser(getUser: true); + authenticatedUserObject.isLogin = true; + appointmentRateViewModel.isLogin = true; + projectViewModel.isLogin = true; + authenticatedUserObject.user = result.list; + Navigator.of(context).pushNamed(HOME); + } + getRegisterInfo() async { var data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA)); diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 7547bc4e..1b8f70e3 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State { ), InkWell( onTap: () { - confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); + confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeEnList : measureTimeArList); }, child: Container( padding: EdgeInsets.all(12), @@ -235,7 +235,8 @@ class _AddBloodPressurePageState extends State { textColor: Colors.white, color: isButtonDisabled ? Colors.grey[900] : Colors.grey, onTap: () async { - if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) { + if (_bloodSystolicValueController.text.isNotEmpty && + _bloodDiastolicValueController.text.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); widget.model diff --git a/lib/pages/medical/reports/report_list_widget.dart b/lib/pages/medical/reports/report_list_widget.dart index 922fb239..ece69c0f 100644 --- a/lib/pages/medical/reports/report_list_widget.dart +++ b/lib/pages/medical/reports/report_list_widget.dart @@ -60,23 +60,29 @@ class ReportListWidget extends StatelessWidget { height: 12, ), Texts(reportList[index].projectName), - Texts(reportList[index].clinicDescription), + Container( + //height: MediaQuery.of(context).size.height * 0.07, + width: MediaQuery.of(context).size.width * 0.35, + child: Texts(reportList[index].clinicDescription), + ), Texts(TranslationBase.of(context).invoiceNo + ': ${reportList[index].invoiceNo}'), SizedBox(height: 12), ], ), reportList[index].status == 2 - ? Container( - margin: EdgeInsets.only(left: 15.0, right: 15.0), - child: InkWell( - onTap: () { - showConfirmMessage(reportList[index]); - // sendReportEmail(reportList[index]); - }, - child: Icon( - Icons.email, - color: Theme.of(context).primaryColor, - size: 30.0, + ? Expanded( + child: Container( + margin: EdgeInsets.only(left: 15.0, right: 15.0), + child: InkWell( + onTap: () { + showConfirmMessage(reportList[index]); + // sendReportEmail(reportList[index]); + }, + child: Icon( + Icons.email, + color: Theme.of(context).primaryColor, + size: 30.0, + ), ), ), ) diff --git a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart index 4d141b5f..9f7b0f6d 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart @@ -163,7 +163,7 @@ class VitalSignDetailsScreen extends StatelessWidget { des: TranslationBase.of(context).respirationRate, icon: DQIcons.outline, lastVal: mode.respirationBeatPerMinute, - unit: TranslationBase.of(context).respirationSigns, + unit: TranslationBase.of(context).bpm, ), ), ], diff --git a/lib/pages/medical/vital_sign/vital_sign_item.dart b/lib/pages/medical/vital_sign/vital_sign_item.dart index fb44772d..1cad714e 100644 --- a/lib/pages/medical/vital_sign/vital_sign_item.dart +++ b/lib/pages/medical/vital_sign/vital_sign_item.dart @@ -78,7 +78,7 @@ class VitalSignItem extends StatelessWidget { children: [ TextSpan(text: lastVal), TextSpan( - text: unit, + text: " " + unit, style: TextStyle( color: HexColor('#B8382C'), ), diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 8296f3bd..d3741049 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -116,7 +116,7 @@ class DoctorsListService extends BaseService { "VersionID": req.VersionID, "Channel": req.Channel, "generalid": 'Cs2020@2016\$2958', - "PatientOutSA": authUser.outSA, + "PatientOutSA": authProvider.isLogin ? authUser.outSA : false, "TokenID": "", "DeviceTypeID": req.DeviceTypeID, "SessionID": null, diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index 3ad128d4..dcc5599b 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -117,8 +117,10 @@ class AuthProvider with ChangeNotifier { var imei = await sharedPref.getString(PUSH_TOKEN); // if (!request.) { newRequest.iMEI = imei; //imei!=null ? imei : ''; - newRequest.firstName = request.firstName??"" + " " + request.lastName??""; - newRequest.firstNameN = request.firstNameN??"" + " " + request.lastNameN??""; + newRequest.firstName = + request.firstName ?? "" + " " + request.lastName ?? ""; + newRequest.firstNameN = + request.firstNameN ?? "" + " " + request.lastNameN ?? ""; newRequest.lastNameN = request.lastNameN ?? ""; newRequest.outSA = request.outSA == 1 ? true : false; newRequest.biometricEnabled = false; @@ -325,6 +327,8 @@ class AuthProvider with ChangeNotifier { request['DeviceTypeID'] = DeviceTypeID; request['LanguageID'] = LANGUAGE_ID; var requestN = RegisterUserRequest.fromJson(request); + requestN.patientOutSA = requestN.patientobject.patientOutSA; + await sharedPref.remove(USER_PROFILE); // request.tokenID = ''; dynamic localRes; try {