From ed748a626ba71af2e53908cb48d3557d7629fa7c Mon Sep 17 00:00:00 2001 From: devamirsaleemahmad Date: Sun, 5 Nov 2023 15:33:12 +0300 Subject: [PATCH] changes --- lib/config/config.dart | 6 +- lib/core/service/client/base_app_client.dart | 20 +-- .../new_e_referral_step_one_page.dart | 8 +- lib/pages/BookAppointment/DoctorProfile.dart | 2 + lib/pages/ToDoList/ToDo.dart | 2 + lib/pages/final_products_page.dart | 2 + lib/pages/medical/eye/EyeHomePage.dart | 4 +- .../medical/labs/laboratory_result_page.dart | 2 +- .../prescription_items_page.dart | 4 +- .../authentication/auth_provider.dart | 4 +- .../LabResult/laboratory_result_widget.dart | 6 +- .../data_display/medical/doctor_card.dart | 4 +- .../medical/time_line_new_widget.dart | 2 +- lib/widgets/new_design/doctor_header.dart | 130 ++++++++++-------- .../others/app_expandable_notifier.dart | 1 + 15 files changed, 114 insertions(+), 83 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 2dd34047..bc7ed205 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; -var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; @@ -335,7 +335,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 10.8; +var VERSION_ID = 11.8; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index df7d1427..a64eee6b 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -137,22 +137,22 @@ class BaseAppClient { : user['OutSA']; body['SessionID'] = getSessionId(body['TokenID']); //getSe - headers = { - 'Content-Type': 'application/json', - 'Accept': 'application/json', - 'Authorization': pharmacyToken, - 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "", - 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', - 'Username': user['PatientID'].toString(), - }; + // headers = { + // 'Content-Type': 'application/json', + // 'Accept': 'application/json', + // 'Authorization': pharmacyToken, + // 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "", + // 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + // 'Username': user['PatientID'].toString(), + // }; } } } // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - // body['PatientID'] = 2001273; //3844083 - // body['TokenID'] = "@dm!n"; + body?['PatientID'] = 1231755; //3844083 + body?['TokenID'] = "@dm!n"; // Patient ID: 3027574 // Mobile no.: 0502303285 diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart index e6c7fb72..72d28f60 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart @@ -38,10 +38,10 @@ class _NewEReferralStepOnePageState extends State { TextEditingController _nameTextController = TextEditingController(); TextEditingController _requesterRelationTextController = TextEditingController(); - late GetAllRelationshipTypeResponseModel _selectedRelation; + GetAllRelationshipTypeResponseModel _selectedRelation = GetAllRelationshipTypeResponseModel(); String? email; - late AuthenticatedUser authenticatedUser; - late GetAllSharedRecordsByStatusList selectedPatientFamily; + AuthenticatedUser authenticatedUser = AuthenticatedUser(); + GetAllSharedRecordsByStatusList selectedPatientFamily = GetAllSharedRecordsByStatusList(); AdvanceModel advanceModel = AdvanceModel(); late ProjectViewModel projectViewModel; String mobileNo = ""; @@ -338,7 +338,7 @@ class _NewEReferralStepOnePageState extends State { // } String getRelationName() { - if (_selectedRelation != null) { + if (_selectedRelation !=null && _selectedRelation.textAr != null) { if (projectViewModel.isArabic) { return _selectedRelation.textAr!; } diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 7d1a3e7a..ccbe023a 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -334,6 +334,8 @@ class _DoctorProfileState extends State with TickerProviderStateM // emptyIcon: Icons.star, // ), child: RatingBar( + itemSize: 20.0, + allowHalfRating: true, initialRating: this.widget.doctor.actualDoctorRate!.toDouble(), ratingWidget: RatingWidget( full: Icon( diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index edafef9b..3490ee6a 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -312,6 +312,8 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { // emptyIcon: Icons.star_border, // ), RatingBar( + itemSize: 20.0, + allowHalfRating: true, initialRating: widget.appoList[index].actualDoctorRate!.toDouble(), ratingWidget: RatingWidget( full: Icon( diff --git a/lib/pages/final_products_page.dart b/lib/pages/final_products_page.dart index 745b8394..9d53012c 100644 --- a/lib/pages/final_products_page.dart +++ b/lib/pages/final_products_page.dart @@ -307,6 +307,8 @@ class _FinalProductsPageState extends State { // forceStars: true), RatingBar( + itemSize: 20.0, + allowHalfRating: true, initialRating: model.finalProducts[index].approvedRatingSum!.toDouble(), ratingWidget: RatingWidget( full: Icon( diff --git a/lib/pages/medical/eye/EyeHomePage.dart b/lib/pages/medical/eye/EyeHomePage.dart index 5b0dc86c..cf96ad21 100644 --- a/lib/pages/medical/eye/EyeHomePage.dart +++ b/lib/pages/medical/eye/EyeHomePage.dart @@ -233,9 +233,9 @@ class _EyeHomePageState extends State with SingleTickerProviderStat child: RatingBar( initialRating: this.widget.appointmentAllHistoryResultList!.actualDoctorRate!.toDouble(), direction: Axis.horizontal, - allowHalfRating: true, itemCount: 5, - itemSize: 35, + itemSize: 20.0, + allowHalfRating: true, ignoreGestures: true, ratingWidget: RatingWidget( full: Icon(Icons.star), diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 0656424d..c5cea5b2 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -85,7 +85,7 @@ class _LaboratoryResultPageState extends State { ), bottomSheet: Container( color: Colors.white, - height: MediaQuery.of(context).size.height * 0.081, + height: MediaQuery.of(context).size.height * 0.085, width: double.infinity, padding: EdgeInsets.all(12.0), child: Column( diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 311ae840..a7094c3e 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -54,11 +54,11 @@ class PrescriptionItemsPage extends StatelessWidget { prescriptions.doctorName!, prescriptions.doctorID!, prescriptions.doctorImageURL!, - prescriptions.speciality!, + prescriptions.speciality ?? [""], "", prescriptions.name!, DateUtil.convertStringToDate(prescriptions.appointmentDate!), - DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model!.prescriptionReportListINP![0].orderDate!)), + DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!)), prescriptions.nationalityFlagURL!, prescriptions.doctorRate, prescriptions.actualDoctorRate, diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index 26b60fcc..2a80cd33 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -30,8 +30,8 @@ import '../../locator.dart'; // SharedPreferences sharedPref = new SharedPreferences(); enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } -AppSharedPreferences sharedPref = new AppSharedPreferences(); -AppGlobal appGlobal = new AppGlobal(); +AppSharedPreferences sharedPref = AppSharedPreferences(); +AppGlobal appGlobal = AppGlobal(); const String INSERT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; const String SELECT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI'; diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index 5522cd42..11c233f4 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -47,12 +47,12 @@ class _LaboratoryResultWidgetState extends State { widget.patientLabOrder!.doctorName!, widget.patientLabOrder!.doctorID!, widget.patientLabOrder!.doctorImageURL!, - widget.patientLabOrder!.speciality!, + widget.patientLabOrder!.speciality ?? [""], widget.billNo!, - widget.patientLabOrder!.projectName!, + widget.patientLabOrder!.projectName ?? "", widget.patientLabOrder!.orderDate!, "", - widget.patientLabOrder!.nationalityFlagURL!, + widget.patientLabOrder!.nationalityFlagURL ?? "", widget.patientLabOrder!.doctorRate!, widget.patientLabOrder!.actualDoctorRate!, widget.patientLabOrder!.noOfPatientsRate!, diff --git a/lib/widgets/data_display/medical/doctor_card.dart b/lib/widgets/data_display/medical/doctor_card.dart index 39025efd..bee98dad 100644 --- a/lib/widgets/data_display/medical/doctor_card.dart +++ b/lib/widgets/data_display/medical/doctor_card.dart @@ -90,7 +90,7 @@ class DoctorCard extends StatelessWidget { decoration: isShowInOutPatient! ? BoxDecoration( //Colors.red[900] Color(0xff404545) - + color: Utils.isHMCProject(projectViewModel, projectID) ? Color(0xff3FACC8) : isLiveCareAppointment! @@ -203,6 +203,8 @@ class DoctorCard extends StatelessWidget { // emptyIcon: Icons.star_border, // ), RatingBar( + itemSize: 20.0, + allowHalfRating: true, initialRating: rating!, ratingWidget: RatingWidget( full: Icon( diff --git a/lib/widgets/data_display/medical/time_line_new_widget.dart b/lib/widgets/data_display/medical/time_line_new_widget.dart index 08e80ddb..7bb2346f 100644 --- a/lib/widgets/data_display/medical/time_line_new_widget.dart +++ b/lib/widgets/data_display/medical/time_line_new_widget.dart @@ -35,7 +35,7 @@ class TimeLineView extends StatefulWidget { class _TimeLineViewState extends State { List tempList = []; List dateObjs = []; - late DateObj selectedDateObj; + DateObj selectedDateObj = DateObj(DateTime.now().month,DateTime.now().year,DateTime.now().year.toString()); final authService = new auth.AuthProvider(); @override diff --git a/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart index 15ffe11d..539ac99d 100644 --- a/lib/widgets/new_design/doctor_header.dart +++ b/lib/widgets/new_design/doctor_header.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -26,14 +27,14 @@ class DoctorHeader extends StatelessWidget { DoctorHeader( {Key? key, - required this.headerModel, - this.buttonTitle, - this.onTap, + required this.headerModel, + this.buttonTitle, + this.onTap, this.isNeedToShowButton = true, this.isShowName = false, this.buttonIcon, this.showConfirmMessageDialog = true, - this.onRatingAndReviewTap}) + this.onRatingAndReviewTap}) : super(key: key); late ProjectViewModel projectViewModel; @@ -127,26 +128,25 @@ class DoctorHeader extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox(width: 21), - // RatingBar.readOnly( - // initialRating: headerModel.actualDoctorRate + 0.0, - // size: 15.0, - // filledColor: Color(0XFFD02127), - // emptyColor: Color(0XFFD02127), - // isHalfAllowed: true, - // halfFilledIcon: Icons.star_half, - // filledIcon: Icons.star, - // emptyIcon: Icons.star_border, - // ), RatingBar( - initialRating: headerModel.actualDoctorRate! + 0.0, - //size: 15.0, - // filledColor: , - // emptyColor: , - // isHalfAllowed: true, - // halfFilledIcon: Icons.star_half, - // filledIcon: , - ratingWidget: RatingWidget(full: Icon(Icons.star, color:Colors.yellow[700], size: 15,), half: Icon(Icons.star_half, color:Colors.grey[500], size: 15), empty: Icon(Icons.star_half, color:Colors.grey[500], size: 15)), onRatingUpdate: (double value) { }, - ), + itemSize: 20.0, + allowHalfRating: true, + initialRating: headerModel.actualDoctorRate! + 0.0, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}), SizedBox(width: 6), Text( "${headerModel.totalReviews == null ? 0 : headerModel.totalReviews} ${TranslationBase.of(context).reviews}", @@ -180,7 +180,7 @@ class DoctorHeader extends StatelessWidget { SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0), SizedBox(width: 6), Text( - buttonTitle! == null ? TranslationBase.of(context).sendEmail : buttonTitle!, + buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle!, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1), ), ], @@ -281,26 +281,53 @@ class DoctorHeader extends StatelessWidget { margin: EdgeInsets.symmetric(horizontal: 20.0), child: - // RatingBar.readOnly( - // initialRating: this.headerModel.decimalDoctorRate != null ? double.tryParse(this.headerModel.decimalDoctorRate) : this.headerModel.actualDoctorRate.toDouble(), - // size: 35.0, - // filledColor: Colors.yellow[700], - // emptyColor: Colors.grey[500], - // isHalfAllowed: true, - // halfFilledIcon: Icons.star_half, - // filledIcon: Icons.star, - // emptyIcon: Icons.star, - // ), + // RatingBar.readOnly( + // initialRating: this.headerModel.decimalDoctorRate != null ? double.tryParse(this.headerModel.decimalDoctorRate) : this.headerModel.actualDoctorRate.toDouble(), + // size: 35.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), RatingBar( - initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(), - //size: 15.0, - // filledColor: , - // emptyColor: , - // isHalfAllowed: true, - // halfFilledIcon: Icons.star_half, - // filledIcon: , - ratingWidget: RatingWidget(full: Icon(Icons.star, color:Colors.yellow[700], size: 15,), half: Icon(Icons.star_half, color:Colors.grey[500], size: 15), empty: Icon(Icons.star_half, color:Colors.grey[500], size: 15)), onRatingUpdate: (double value) { }, - ), + itemSize: 20.0, + allowHalfRating: true, + initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: Color(0XFFD02127), + ), + half: Icon( + Icons.star_half, + color: Color(0XFFD02127), + ), + empty: Icon( + Icons.star_border, + color: Color(0XFFD02127), + ), + ), + onRatingUpdate: (double value) {}), + // RatingBar( + // initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(), + // //size: 15.0, + // // filledColor: , + // // emptyColor: , + // // isHalfAllowed: true, + // // halfFilledIcon: Icons.star_half, + // // filledIcon: , + // ratingWidget: RatingWidget( + // full: Icon( + // Icons.star, + // color: Colors.yellow[700], + // size: 15, + // ), + // half: Icon(Icons.star_half, color: Colors.grey[500], size: 15), + // empty: Icon(Icons.star_half, color: Colors.grey[500], size: 15)), + // onRatingUpdate: (double value) {}, + // ), ), ], ), @@ -325,8 +352,7 @@ class DoctorHeader extends StatelessWidget { ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text(getRatingWidth(doctorDetailsList[0].ratio).round().toString() + "%", - style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text(getRatingWidth(doctorDetailsList[0].ratio).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), @@ -346,8 +372,7 @@ class DoctorHeader extends StatelessWidget { ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text(doctorDetailsList[1].ratio.round().toString() + "%", - style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text(doctorDetailsList[1].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), @@ -367,8 +392,7 @@ class DoctorHeader extends StatelessWidget { ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text(doctorDetailsList[2].ratio.round().toString() + "%", - style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text(doctorDetailsList[2].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), @@ -388,8 +412,7 @@ class DoctorHeader extends StatelessWidget { ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text(doctorDetailsList[3].ratio.round().toString() + "%", - style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text(doctorDetailsList[3].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), @@ -410,8 +433,7 @@ class DoctorHeader extends StatelessWidget { ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text(doctorDetailsList[4].ratio.round().toString() + "%", - style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text(doctorDetailsList[4].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), ), ], ), @@ -442,7 +464,7 @@ class DoctorHeader extends StatelessWidget { margin: EdgeInsets.only(top: 10.0), child: Stack(children: [ SizedBox( - width: 135.0, + width: 120.0, height: 4.0, child: Container( color: Colors.grey[300], diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index aa0566b0..8122286f 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -72,6 +72,7 @@ class _AppExpandableNotifier extends State { child: ExpandablePanel( // hasIcon: false, theme: const ExpandableThemeData( + hasIcon: false, headerAlignment: ExpandablePanelHeaderAlignment.center, tapBodyToCollapse: true, ),