From 6ea06ce4424a63904c420d431b1483839c9d22ef Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 8 Aug 2021 14:18:35 +0300 Subject: [PATCH 01/10] PAP-729 --- .../my_trackers/blood_pressure/AddBloodPressurePage.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 98058bcf..e3d59ac4 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), From 146fc5d2b290dc56cc4bca9f2cd8f5cda45437dc Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 8 Aug 2021 15:34:38 +0300 Subject: [PATCH 02/10] PAP-777 --- .../medical/reports/report_list_widget.dart | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) 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, + ), ), ), ) From 29249dc9a9d9c2b8edca2493fa74c25f25ae047a Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 9 Aug 2021 13:34:01 +0300 Subject: [PATCH 03/10] PAP-664 --- .../health_calculator/body_fat/body_fat.dart | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) 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..a169de0b 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,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(heightCm.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: heightController, + decoration: InputDecoration( + labelText: heightCm.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( @@ -476,7 +488,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(neck.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: neckController, + decoration: InputDecoration( + labelText: neck.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( @@ -642,7 +662,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(waist.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: waistController, + decoration: InputDecoration( + labelText: waist.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( @@ -808,7 +836,15 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: Text(hip.toString()), + child: TextFormField( + keyboardType: TextInputType.number, + controller: hipController, + decoration: InputDecoration( + labelText: hip.toString(), + labelStyle: TextStyle( + color: Colors.black, + )), + ), ), ), Container( From 352fd912de1acbbfcfe7ad5eae8a43fe7c1faa47 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 9 Aug 2021 14:05:49 +0300 Subject: [PATCH 04/10] PAP-664 --- .../health_calculator/body_fat/body_fat.dart | 76 +++++++++++-------- 1 file changed, 44 insertions(+), 32 deletions(-) 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 a169de0b..7f0d0c5c 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -314,14 +314,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: heightController, - decoration: InputDecoration( - labelText: heightCm.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + 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, + )), + ), ), ), ), @@ -488,14 +491,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: neckController, - decoration: InputDecoration( - labelText: neck.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + 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, + )), + ), ), ), ), @@ -662,14 +668,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: waistController, - decoration: InputDecoration( - labelText: waist.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + 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, + )), + ), ), ), ), @@ -836,14 +845,17 @@ class _BodyFatState extends State { children: [ Expanded( child: Center( - child: TextFormField( - keyboardType: TextInputType.number, - controller: hipController, - decoration: InputDecoration( - labelText: hip.toString(), - labelStyle: TextStyle( - color: Colors.black, - )), + 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, + )), + ), ), ), ), From 02df6f4d853281068b75c77e1c39c184fd4d7028 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 9 Aug 2021 14:29:32 +0300 Subject: [PATCH 05/10] PAP-664 --- .../my_trackers/blood_pressure/AddBloodPressurePage.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 37eb3529..1b8f70e3 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -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 From 50070641053a361458939a84d6f52db5fc8dcbd9 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 9 Aug 2021 17:17:22 +0300 Subject: [PATCH 06/10] Jira fixes --- .../components/SearchByDoctor.dart | 11 ++++-- .../MyAppointments/AppointmentDetails.dart | 38 ++++++++++++++----- .../appointment_services/GetDoctorsList.dart | 2 +- 3 files changed, 37 insertions(+), 14 deletions(-) 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..f0791d02 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,37 @@ class _AppointmentDetailsState extends State TabBar( onTap: (index) { setState(() { - index == 1 - ? AppointmentDetails.showFooterButton = true - : AppointmentDetails.showFooterButton = false; - print(AppointmentDetails.showFooterButton); + // index == 1 + // ? AppointmentDetails.showFooterButton = true + // : AppointmentDetails.showFooterButton = false; + + if (index == 1) { + if (widget.appo.clinicID == 17 || + widget.appo.clinicID == 23) { + _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 + ? 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/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 7ca568ae..fb55d538 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, From 90db04cee1be9c04687770d99424e046534c5e63 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 10 Aug 2021 16:30:01 +0300 Subject: [PATCH 07/10] Jira Fixes --- lib/config/localized_values.dart | 2 +- .../service/medical/radiology_service.dart | 2 +- .../LiveCare/LiveCareClinicsListResponse.dart | 4 +- .../all_habib_medical_service_page.dart | 47 +++++++++++++++---- lib/pages/BookAppointment/DoctorProfile.dart | 9 ++++ .../MyAppointments/AppointmentDetails.dart | 19 ++++---- .../MyAppointments/models/ArrivedButtons.dart | 2 +- .../insurance_card_update_details.dart | 1 + lib/pages/landing/home_page.dart | 2 +- lib/pages/livecare/widgets/clinic_card.dart | 4 +- lib/pages/livecare/widgets/clinic_list.dart | 11 +++-- lib/pages/login/forgot-password.dart | 5 +- .../radiology/radiology_details_page.dart | 1 + .../vital_sign/vital_sign_details_screen.dart | 2 +- .../medical/vital_sign/vital_sign_item.dart | 2 +- 15 files changed, 79 insertions(+), 34 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 748efe62..50d4b4c6 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1493,7 +1493,7 @@ const Map localizedValues = { "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" }, "scan-now": { - "en": "If you have a card / Document Scan now", + "en": "If you have a card/Document Scan now", "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان" }, "liveCare": {"en": "Live Care", "ar": "لايف كير"}, diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart index b0b96e71..965fa752 100644 --- a/lib/core/service/medical/radiology_service.dart +++ b/lib/core/service/medical/radiology_service.dart @@ -11,7 +11,7 @@ class RadiologyService extends BaseService { hasError = false; final Map body = new Map(); body['InvoiceNo'] = invoiceNo; - body['LineIt emNo'] = lineItem; + body['LineItemNo'] = lineItem; body['ProjectID'] = projectId; await baseAppClient.post(GET_RAD_IMAGE_URL, 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 355300c4..c4c5d5d6 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,13 +17,15 @@ 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/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'; @@ -50,9 +54,13 @@ 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(); + @override void initState() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { @@ -232,12 +240,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( @@ -254,8 +263,7 @@ class _AllHabibMedicalServiceState extends State { ServicesContainer( onTap: () => Navigator.push( context, - FadePage( - page: EReferralPage()), + FadePage(page: EReferralPage()), ), imageLocation: 'assets/images/ereferral_service_icon.png', title: TranslationBase.of(context).ereferral, @@ -282,7 +290,7 @@ class _AllHabibMedicalServiceState extends State { title: TranslationBase.of(context).childVaccine, ), ServicesContainer( - onTap: (){ + onTap: () { Navigator.pop(context); LandingPage.shared.switchToDoFromHMGServices(); }, @@ -401,6 +409,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( 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/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index f0791d02..68781795 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -178,13 +178,10 @@ class _AppointmentDetailsState extends State TabBar( onTap: (index) { setState(() { - // index == 1 - // ? AppointmentDetails.showFooterButton = true - // : AppointmentDetails.showFooterButton = false; - if (index == 1) { if (widget.appo.clinicID == 17 || - widget.appo.clinicID == 23) { + widget.appo.clinicID == 23 || + widget.appo.isExecludeDoctor) { _tabController.index = _tabController.previousIndex; AppointmentDetails.showFooterButton = false; @@ -198,12 +195,14 @@ class _AppointmentDetailsState extends State Tab( child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))), - widget.appo.clinicID == 17 || widget.appo.clinicID == 23 + widget.appo.clinicID == 17 || + widget.appo.clinicID == 23 || + widget.appo.isExecludeDoctor ? Tab( - child: Text( - TranslationBase.of(context).availableAppo, - style: TextStyle(color: Colors.grey)), - ) + child: Text( + TranslationBase.of(context).availableAppo, + style: TextStyle(color: Colors.grey)), + ) : Tab( child: Text( TranslationBase.of(context).availableAppo, 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 3f25217c..58829bb5 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -785,7 +785,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 0bc93081..e1db8730 100644 --- a/lib/pages/login/forgot-password.dart +++ b/lib/pages/login/forgot-password.dart @@ -23,6 +23,7 @@ class _ForgotPassword extends State { final TextEditingController nationalIDorFile = null; String mobileNo = ""; var con; + @override Widget build(BuildContext context) { con = context; @@ -76,8 +77,8 @@ class _ForgotPassword extends State { child: DefaultButton( TranslationBase.of(context).submit, () { - sendPatientIDBySMS(); -// print(mobileNo.text); + if (mobileNo.length >= 9 == true) + sendPatientIDBySMS(); }, color: mobileNo.length >= 9 == true ? Colors.grey[900] diff --git a/lib/pages/medical/radiology/radiology_details_page.dart b/lib/pages/medical/radiology/radiology_details_page.dart index 742e3ddf..9d5afd8f 100644 --- a/lib/pages/medical/radiology/radiology_details_page.dart +++ b/lib/pages/medical/radiology/radiology_details_page.dart @@ -71,6 +71,7 @@ class RadiologyDetailsPage extends StatelessWidget { width: MediaQuery.of(context).size.width * 0.8, child: Button( onTap: () { + print(model.radImageURL); launch(model.radImageURL); }, label: TranslationBase.of(context).openRad, 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'), ), From 97d7f9225e6420cfff32ef9caae48e90bb86c2f4 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Tue, 10 Aug 2021 17:15:08 +0300 Subject: [PATCH 08/10] package name changed --- android/app/build.gradle | 8 +++++--- android/app/google-services.json | 2 +- android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 2 +- .../com/cloud/diplomaticquarterapp/MainActivity.kt | 4 ++-- .../diplomaticquarterapp/geofence/GeoZoneModel.kt | 2 +- .../diplomaticquarterapp/geofence/HMG_Geofence.kt | 8 ++++---- .../intent_receivers/GeofenceBroadcastReceiver.kt | 8 ++++---- .../GeofenceBroadcastReceiverWithJobService.kt | 4 ++-- .../intent_receivers/GeofenceErrorMessages.kt | 6 +++--- .../GeofenceTransitionsJobIntentService.kt | 8 ++++---- .../GeofencingRebootBroadcastReceiver.kt | 6 +++--- .../LocationProviderChangeReceiver.kt | 8 ++++---- .../intent_receivers/ReregisterGeofenceJobService.kt | 6 +++--- .../cloud/diplomaticquarterapp/hmgwifi/HMG_Guest.kt | 8 ++++---- .../diplomaticquarterapp/hmgwifi/HMG_Internet.kt | 8 ++++---- .../com/cloud/diplomaticquarterapp/hmgwifi/WPA.kt | 6 +++--- .../com/cloud/diplomaticquarterapp/utils/API.kt | 2 +- .../cloud/diplomaticquarterapp/utils/Constants.kt | 2 +- .../cloud/diplomaticquarterapp/utils/FlutterText.kt | 2 +- .../com/cloud/diplomaticquarterapp/utils/HMGUtils.kt | 10 +++++----- .../cloud/diplomaticquarterapp/utils/HMG_Wifi_.kt | 6 +++--- .../com/cloud/diplomaticquarterapp/utils/Logs.kt | 4 ++-- .../diplomaticquarterapp/utils/PlatformBridge.kt | 12 ++++++------ android/app/src/profile/AndroidManifest.xml | 2 +- lib/config/config.dart | 4 ++-- lib/services/authentication/auth_provider.dart | 7 +++++-- 27 files changed, 76 insertions(+), 71 deletions(-) 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 100755 --- 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/config/config.dart b/lib/config/config.dart index f8bca863..1a309e96 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -//const BASE_URL = 'https://uat.hmgwebservices.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +//const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs //const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index 3ad128d4..926ee2bc 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,7 @@ class AuthProvider with ChangeNotifier { request['DeviceTypeID'] = DeviceTypeID; request['LanguageID'] = LANGUAGE_ID; var requestN = RegisterUserRequest.fromJson(request); + requestN.patientOutSA = requestN.patientobject.patientOutSA; // request.tokenID = ''; dynamic localRes; try { From bd85854fa4eadc7959489be7ce838524df77b5c8 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 11 Aug 2021 09:38:39 +0300 Subject: [PATCH 09/10] changes --- lib/config/config.dart | 2 +- .../Authentication/register_user_requet.dart | 15 +++++++++------ lib/pages/login/login.dart | 5 ----- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index f4c5e559..0c18ecbb 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -262,7 +262,7 @@ const IS_DENTAL_ALLOWED_BACKEND = false; const PATIENT_TYPE = 1; const PATIENT_TYPE_ID = 1; var DEVICE_TOKEN = ""; -var IS_VOICE_COMMAND_CLOSED = false; +var IS_VOICE_COMMAND_CLOSED = true; var IS_TEXT_COMPLETED = false; var DeviceTypeID = Platform.isIOS ? 1 : 2; const LANGUAGE_ID = 2; 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/pages/login/login.dart b/lib/pages/login/login.dart index c5da90d5..1c0fd13e 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -64,11 +64,6 @@ class _Login extends State { void initState() { // getDeviceToken(); super.initState(); - - if(BASE_URL.contains("uat.")){ - nationalIDorFile.text = "1231755"; - mobileNumberController.text = mobileNo = "537503378"; - } } getDeviceToken() async { From b1453b52e3c04af9cbeac9dedfefbba45eae62bf Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 11 Aug 2021 16:31:47 +0300 Subject: [PATCH 10/10] registration --- lib/pages/login/register-info.dart | 32 ++++++++++++++++--- .../authentication/auth_provider.dart | 1 + 2 files changed, 29 insertions(+), 4 deletions(-) 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/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index 926ee2bc..dcc5599b 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -328,6 +328,7 @@ class AuthProvider with ChangeNotifier { request['LanguageID'] = LANGUAGE_ID; var requestN = RegisterUserRequest.fromJson(request); requestN.patientOutSA = requestN.patientobject.patientOutSA; + await sharedPref.remove(USER_PROFILE); // request.tokenID = ''; dynamic localRes; try {