diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart index 8c6ad3f6..205909c9 100644 --- a/lib/models/Appointments/DoctorListResponse.dart +++ b/lib/models/Appointments/DoctorListResponse.dart @@ -41,6 +41,7 @@ class DoctorList { dynamic serviceID; String? setupID; List? speciality; + List? specialityN; dynamic workingHours; dynamic decimalDoctorRate; @@ -87,6 +88,7 @@ class DoctorList { this.serviceID, this.setupID, this.speciality, + this.specialityN, this.workingHours, this.decimalDoctorRate}); @@ -133,6 +135,7 @@ class DoctorList { serviceID = json['ServiceID']; setupID = json['SetupID']; if (json.containsKey('Speciality') && json['Speciality'] != null) speciality = json['Speciality'].cast(); + if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast(); workingHours = json['WorkingHours']; decimalDoctorRate = json['DecimalDoctorRate']; } @@ -180,6 +183,7 @@ class DoctorList { data['ServiceID'] = this.serviceID; data['SetupID'] = this.setupID; data['Speciality'] = this.speciality; + data['SpecialityN'] = this.specialityN; data['WorkingHours'] = this.workingHours; data['DecimalDoctorRate'] = this.decimalDoctorRate; return data; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index d48247f8..cb1183ef 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -669,6 +669,7 @@ class _AnicllaryOrdersState extends State with SingleTic payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); log("failureResult: ${failureResult.toString()}"); AppToast.showErrorToast(message: failureResult.toString()); }, diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 9c448fd6..61bcb977 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -711,6 +711,7 @@ class _BookSuccessState extends State { payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); log("failureResult: ${failureResult.toString()}"); AppToast.showErrorToast(message: failureResult.toString()); }, diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart index 42c5f052..3d6ffb3a 100644 --- a/lib/pages/BookAppointment/widgets/DoctorView.dart +++ b/lib/pages/BookAppointment/widgets/DoctorView.dart @@ -36,7 +36,7 @@ class DoctorView extends StatefulWidget { DoctorView( {required this.doctor, - this.isLiveCareAppointment, + this.isLiveCareAppointment, this.isObGyneAppointment = false, this.isDoctorNameSearch = false, this.isContinueDentalPlan = false, @@ -50,6 +50,7 @@ class DoctorView extends StatefulWidget { } class _DoctorViewState extends State with AutomaticKeepAliveClientMixin { + late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel; @@ -99,10 +100,12 @@ class _DoctorViewState extends State with AutomaticKeepAliveClientMi style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), ), ), - widget.isShowDate ? Text( - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)), - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), - ) : Container(), + widget.isShowDate + ? Text( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), + ) + : Container(), ], ), if (widget.doctor.doctorTitle != null) SizedBox(height: 6), @@ -123,12 +126,20 @@ class _DoctorViewState extends State with AutomaticKeepAliveClientMi children: [ if (widget.doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", widget.doctor.clinicName!, context.read().isArabic), if (widget.doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, widget.doctor.projectName!, context.read().isArabic), - if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0) - Text( - this.widget.doctor.speciality![0].trim(), - // getDoctorSpeciality(this.doctor.speciality).trim(), - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), - ), + if (!projectViewModel.isArabic) + if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0) + Text( + this.widget.doctor.speciality![0].trim(), + // getDoctorSpeciality(this.doctor.speciality).trim(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), + ), + if (projectViewModel.isArabic) + if (widget.doctor.specialityN != null && widget.doctor.specialityN!.length > 0) + Text( + this.widget.doctor.specialityN![0].trim(), + // getDoctorSpeciality(this.doctor.speciality).trim(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), + ), if (widget.doctor.nearestFreeSlot != null) Text( getDate(widget.doctor.nearestFreeSlot), @@ -147,9 +158,18 @@ class _DoctorViewState extends State with AutomaticKeepAliveClientMi itemSize: 20, ignoreGestures: true, ratingWidget: RatingWidget( - full: Icon(Icons.star, color: CustomColors.accentColor,), - half: Icon(Icons.star_half, color: CustomColors.accentColor,), - empty: Icon(Icons.star, color: CustomColors.accentColor,), + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star, + color: CustomColors.accentColor, + ), ), tapOnlyMode: true, itemPadding: EdgeInsets.symmetric(horizontal: 4.0), @@ -267,8 +287,14 @@ class _DoctorViewState extends State with AutomaticKeepAliveClientMi } void next(BuildContext context) { - Navigator.push(context, - FadePage(page: ObGyneTimeSlots(projectID: widget.doctor.projectID!, selectedClinicID: widget.doctor.clinicID!, selectedDoctorID: widget.doctor.doctorID!, obGyneProcedureListResponse: widget.obGyneProcedureListResponse!))); + Navigator.push( + context, + FadePage( + page: ObGyneTimeSlots( + projectID: widget.doctor.projectID!, + selectedClinicID: widget.doctor.clinicID!, + selectedDoctorID: widget.doctor.doctorID!, + obGyneProcedureListResponse: widget.obGyneProcedureListResponse!))); } Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo, bool isContinueDentalPlan = false}) async { diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index b9c42d05..3606a696 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -1444,6 +1444,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); log("failureResult: ${failureResult.toString()}"); AppToast.showErrorToast(message: failureResult.toString()); }, diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 8b567556..c5fb2c2e 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -329,6 +329,7 @@ class _ConfirmPaymentPageState extends State { payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); log("failureResult: ${failureResult.toString()}"); AppToast.showErrorToast(message: failureResult.toString()); }, diff --git a/lib/pages/rateAppointment/rate_appointment_clinic.dart b/lib/pages/rateAppointment/rate_appointment_clinic.dart index 3f61f3e9..44484373 100644 --- a/lib/pages/rateAppointment/rate_appointment_clinic.dart +++ b/lib/pages/rateAppointment/rate_appointment_clinic.dart @@ -95,7 +95,7 @@ class _RateAppointmentClinicState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName, projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName ?? "", projectViewModel.isArabic), MyRichText(TranslationBase.of(context).date + ":", DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)), projectViewModel.isArabic), ], diff --git a/lib/services/payfort_services/payfort_service.dart b/lib/services/payfort_services/payfort_service.dart index 4cc203e2..5dba1b46 100644 --- a/lib/services/payfort_services/payfort_service.dart +++ b/lib/services/payfort_services/payfort_service.dart @@ -176,6 +176,7 @@ class PayfortService extends BaseService { merchantReference: merchantReference!, currency: currency, customerIp: (await _info.getWifiIP() ?? ''), + language: 'en' ); _payfort.callPayFortForApplePay(