diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index e56d861..d937f6b 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -618,7 +618,7 @@ "general": "General", "profile": "ملفي", "notifications": "إشعارات", - "notificationDetails": "تفاصيل الاشعار", + "notificationDetails": "Notification Details", "notificationDetailsa": "تفاصيل الاشعار", "infoMyDoctorPoints": "", "infoMyDoctor": "This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:", diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 8319c9d..87ca2f8 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -83,6 +83,7 @@ var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +var SEND_PRESCRIPTION_EMAIL_NEW = 'Services/Notifications.svc/REST/SendPrescriptionEmail_New'; var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; ///Lab Order diff --git a/lib/core/utils/penguin_method_channel.dart b/lib/core/utils/penguin_method_channel.dart index 1f19037..69ef4be 100644 --- a/lib/core/utils/penguin_method_channel.dart +++ b/lib/core/utils/penguin_method_channel.dart @@ -7,7 +7,7 @@ class PenguinMethodChannel { return await rootBundle.load("assets/images/progress-loading-red-crop-1.gif").then((data) => data.buffer.asUint8List()); } - Future launch(String storyboardName, String languageCode, String username, {NavigationClinicDetails? details}) async { + Future launch(String storyboardName, String languageCode, String username, bool isClinicNavigation, {NavigationClinicDetails? details}) async { // Uint8List image = await loadGif(); try { await _channel.invokeMethod('launchPenguin', { @@ -31,7 +31,7 @@ class PenguinMethodChannel { "isEnableReportIssue": true, "languageCode": languageCode, "mapBoxKey": "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ", - "clinicID": details?.clinicId ?? "", + "clinicID": isClinicNavigation ? "${details?.projectId}-${details?.clinicId}" : details?.clinicId ?? "", // "clinicID": "108", // 46 ,49, 133 "patientID": details?.patientId ?? "", "projectID": int.parse(details?.projectId ?? "-1"), diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index 4d8fec0..673ef73 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -978,4 +978,13 @@ class Utils { return checkDate == today; } + static bool isClinicAllowedForRebook(int clinicID) { + bool isAllowed = true; + + if (clinicID == 23 || clinicID == 47 || clinicID == 265 || clinicID == 253 || clinicID == 134) { + isAllowed = false; + } + + return isAllowed; + } } diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index c49554f..b48912d 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -581,7 +581,8 @@ class AuthenticationViewModel extends ChangeNotifier { if (!_appState.getIsChildLoggedIn) { await medicalVm.getFamilyFiles(status: 0); // await medicalVm.getAllPendingRecordsByResponseId(); - _navigationService.replaceAllRoutesAndNavigateToLanding(); + // _navigationService.replaceAllRoutesAndNavigateToLanding(); + _navigationService.popUntilNamed(AppRoutes.landingScreen); } } else { if (activation.list != null && activation.list!.isNotEmpty) { diff --git a/lib/features/hospital/hospital_selection_view_model.dart b/lib/features/hospital/hospital_selection_view_model.dart index c0cab2a..57bd360 100644 --- a/lib/features/hospital/hospital_selection_view_model.dart +++ b/lib/features/hospital/hospital_selection_view_model.dart @@ -97,10 +97,11 @@ class HospitalSelectionBottomSheetViewModel extends ChangeNotifier { initPenguinSDK(hospital.iD, clinicID: clinicID); } - initPenguinSDK(int projectID, {String clinicID = ""}) async { + initPenguinSDK(int projectID, {String clinicID = "1"}) async { NavigationClinicDetails data = NavigationClinicDetails(); data.projectId = projectID.toString(); data.clinicId = clinicID; + // data.clinicId = "1"; final bool permited = await AppPermission.askPenguinPermissions(); if (!permited) { Map statuses = await [ @@ -110,7 +111,7 @@ class HospitalSelectionBottomSheetViewModel extends ChangeNotifier { Permission.bluetoothScan, Permission.activityRecognition, ].request().whenComplete(() { - PenguinMethodChannel().launch("penguin", appState.isArabic() ? "ar" : "en", appState.getAuthenticatedUser()?.patientId?.toString()??"", details: data); + PenguinMethodChannel().launch("penguin", appState.isArabic() ? "ar" : "en", appState.getAuthenticatedUser()?.patientId?.toString() ?? "", false, details: data); }); } } diff --git a/lib/features/my_appointments/models/resp_models/patient_appointment_share_response_model.dart b/lib/features/my_appointments/models/resp_models/patient_appointment_share_response_model.dart index 1dc1cbe..b412a2e 100644 --- a/lib/features/my_appointments/models/resp_models/patient_appointment_share_response_model.dart +++ b/lib/features/my_appointments/models/resp_models/patient_appointment_share_response_model.dart @@ -5,14 +5,14 @@ class PatientAppointmentShareResponseModel { int? appointmentNo; dynamic cardNumber; dynamic cardType; - int? cashPrice; - int? cashPriceTax; - int? cashPriceWithTax; + num? cashPrice; + num? cashPriceTax; + num? cashPriceWithTax; int? clinicID; String? clinicName; int? companyId; String? companyName; - int? companyShareWithTax; + num? companyShareWithTax; int? doctorID; String? doctorImageURL; String? doctorNameObj; @@ -39,7 +39,7 @@ class PatientAppointmentShareResponseModel { int? patientStatusType; num? patientTaxAmount; String? patientType; - int? paymentAmount; + num? paymentAmount; String? paymentDate; dynamic paymentMethodName; dynamic paymentReferenceNumber; @@ -57,7 +57,7 @@ class PatientAppointmentShareResponseModel { int? statusCode; dynamic statusDesc; String? subPolicyNo; - int? tax; + num? tax; int? userID; PatientAppointmentShareResponseModel({ diff --git a/lib/features/my_appointments/my_appointments_view_model.dart b/lib/features/my_appointments/my_appointments_view_model.dart index f287803..25e41ee 100644 --- a/lib/features/my_appointments/my_appointments_view_model.dart +++ b/lib/features/my_appointments/my_appointments_view_model.dart @@ -220,9 +220,23 @@ class MyAppointmentsViewModel extends ChangeNotifier { } Future getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async { - isPatientHasQueueAppointment = false; + if (patientArrivedAppointmentsHistoryList.isNotEmpty) { + isPatientHasQueueAppointment = false; + notifyListeners(); + if (Utils.isDateToday(DateUtil.convertStringToDate(patientArrivedAppointmentsHistoryList.first.appointmentDate))) { + // getPatientAppointmentQueueDetails(appointmentNo: patientArrivedAppointmentsHistoryList.first.appointmentNo, patientID: patientArrivedAppointmentsHistoryList.first.patientID); + getPatientAppointmentQueueDetails(); + } + } if (!isAppointmentDataToBeLoaded) return; + debugPrint('getPatientAppointments CALLED!!!'); + + patientAppointmentsByClinic.clear(); + patientAppointmentsByHospital.clear(); + patientAppointmentsViewList.clear(); + + patientTimelineAppointmentsList.clear(); filteredAppointmentList.clear(); patientAppointmentsHistoryList.clear(); patientUpcomingAppointmentsHistoryList.clear(); @@ -276,6 +290,8 @@ class MyAppointmentsViewModel extends ChangeNotifier { _groupAppointmentsByClinicAndHospital(); if (patientArrivedAppointmentsHistoryList.isNotEmpty) { + isPatientHasQueueAppointment = false; + notifyListeners(); if (Utils.isDateToday(DateUtil.convertStringToDate(patientArrivedAppointmentsHistoryList.first.appointmentDate))) { // getPatientAppointmentQueueDetails(appointmentNo: patientArrivedAppointmentsHistoryList.first.appointmentNo, patientID: patientArrivedAppointmentsHistoryList.first.patientID); getPatientAppointmentQueueDetails(); diff --git a/lib/features/prescriptions/prescriptions_repo.dart b/lib/features/prescriptions/prescriptions_repo.dart index c6e7150..2eb5d43 100644 --- a/lib/features/prescriptions/prescriptions_repo.dart +++ b/lib/features/prescriptions/prescriptions_repo.dart @@ -167,29 +167,44 @@ class PrescriptionsRepoImp implements PrescriptionsRepo { @override Future> getPrescriptionPDF( {required PatientPrescriptionsResponseModel prescriptionsResponseModel, required List prescriptionDetailsList}) async { + // Map mapDevice = { + // "AppointmentDate": prescriptionsResponseModel.appointmentDate, + // "ClinicName": prescriptionsResponseModel.clinicDescription, + // "DoctorName": prescriptionsResponseModel.doctorName, + // "ProjectID": prescriptionsResponseModel.projectID, + // "DoctorID": prescriptionsResponseModel.doctorID, + // "ClinicID": prescriptionsResponseModel.clinicID, + // "DateofBirth": Utils.appState.getAuthenticatedUser()!.dateofBirth, + // "ListPrescriptions": prescriptionDetailsList, + // "PatientIditificationNum": Utils.appState.getAuthenticatedUser()!.patientIdentificationNo, + // "PatientMobileNumber": Utils.appState.getAuthenticatedUser()!.mobileNumber, + // "PatientName": "${Utils.appState.getAuthenticatedUser()!.firstName!} ${Utils.appState.getAuthenticatedUser()!.lastName!}", + // "To": Utils.appState.getAuthenticatedUser()!.emailAddress, + // "SetupID": prescriptionsResponseModel.setupID, + // "IsDownload": true, + // "isDentalAllowedBackend": false, + // }; + Map mapDevice = { - "AppointmentDate": prescriptionsResponseModel.appointmentDate, - "ClinicName": prescriptionsResponseModel.clinicDescription, - "DoctorName": prescriptionsResponseModel.doctorName, - "ProjectID": prescriptionsResponseModel.projectID, - "DoctorID": prescriptionsResponseModel.doctorID, - "ClinicID": prescriptionsResponseModel.clinicID, - "DateofBirth": Utils.appState.getAuthenticatedUser()!.dateofBirth, - "ListPrescriptions": prescriptionDetailsList, - "PatientIditificationNum": Utils.appState.getAuthenticatedUser()!.patientIdentificationNo, - "PatientMobileNumber": Utils.appState.getAuthenticatedUser()!.mobileNumber, - "PatientName": "${Utils.appState.getAuthenticatedUser()!.firstName!} ${Utils.appState.getAuthenticatedUser()!.lastName!}", - "To": Utils.appState.getAuthenticatedUser()!.emailAddress, + "AppointmentNo": prescriptionsResponseModel.appointmentNo, "SetupID": prescriptionsResponseModel.setupID, + "EpisodeID": prescriptionsResponseModel.episodeID, + "ClinicID": prescriptionsResponseModel.clinicID, + "ProjectID": prescriptionsResponseModel.projectID, + "DischargeNo": prescriptionsResponseModel.dischargeNo, "IsDownload": true, - "isDentalAllowedBackend": false, + // "To": Utils.appState.getAuthenticatedUser()!.emailAddress, + "To": "amjad.haroon@cloudsolutions.com.sa", + "ClinicName": prescriptionsResponseModel.clinicDescription, + "DoctorName": prescriptionsResponseModel.doctorName, }; try { GenericApiModel? apiResponse; Failure? failure; await apiClient.post( - SEND_PRESCRIPTION_EMAIL, + // SEND_PRESCRIPTION_EMAIL, + SEND_PRESCRIPTION_EMAIL_NEW, body: mapDevice, onFailure: (error, statusCode, {messageStatus, failureType}) { failure = failureType; diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index e93d604..023bdee 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -107,6 +107,9 @@ class _AppointmentDetailsPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppointmentDoctorCard( + renderWidgetForERDisplay: ((widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) || + (widget.patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) || + !Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID)), patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, onAskDoctorTap: () async { LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context)); @@ -755,12 +758,15 @@ class _AppointmentDetailsPageState extends State { ], ).paddingOnly(left: 16.h, top: 24.h, right: 16.h, bottom: 0.h), AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel) - ? !widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment! + ? + (widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment! || + widget.patientAppointmentHistoryResponseModel.isExecludeDoctor! || + Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID)) ? CustomButton( text: LocaleKeys.rebookAppointment.tr(context: context), onPressed: () { - openDoctorScheduleCalendar(); - }, + openDoctorScheduleCalendar(); + }, backgroundColor: AppColors.successColor, borderColor: AppColors.successColor, textColor: AppColors.whiteColor, @@ -777,7 +783,6 @@ class _AppointmentDetailsPageState extends State { : CustomButton( text: AppointmentType.getNextActionText(widget.patientAppointmentHistoryResponseModel.nextAction), onPressed: () { - myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); handleAppointmentNextAction(widget.patientAppointmentHistoryResponseModel.nextAction); }, backgroundColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction), @@ -855,6 +860,9 @@ class _AppointmentDetailsPageState extends State { myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.getPatientAppointments(true, false); showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr(context: context)), callBackFunc: (str) { + myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); + myAppointmentsViewModel.initAppointmentsViewModel(); + myAppointmentsViewModel.getPatientAppointments(true, false); Navigator.of(context).pop(); }, title: "", diff --git a/lib/presentation/appointments/appointment_payment_page.dart b/lib/presentation/appointments/appointment_payment_page.dart index dc9213f..097efaf 100644 --- a/lib/presentation/appointments/appointment_payment_page.dart +++ b/lib/presentation/appointments/appointment_payment_page.dart @@ -403,6 +403,9 @@ class _AppointmentPaymentPageState extends State { patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, onSuccess: (apiResponse) { Future.delayed(Duration(milliseconds: 500), () { + myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); + myAppointmentsViewModel.initAppointmentsViewModel(); + myAppointmentsViewModel.getPatientAppointments(true, false); LoaderBottomSheet.hideLoader(); Navigator.pushAndRemoveUntil( context, @@ -421,6 +424,9 @@ class _AppointmentPaymentPageState extends State { isFollowUp: myAppointmentsViewModel.patientAppointmentShareResponseModel!.isFollowup!, onSuccess: (apiResponse) { Future.delayed(Duration(milliseconds: 500), () { + myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); + myAppointmentsViewModel.initAppointmentsViewModel(); + myAppointmentsViewModel.getPatientAppointments(true, false); LoaderBottomSheet.hideLoader(); Navigator.pushAndRemoveUntil( context, @@ -485,6 +491,8 @@ class _AppointmentPaymentPageState extends State { patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, onSuccess: (apiResponse) { Future.delayed(Duration(milliseconds: 500), () { + myAppointmentsViewModel.initAppointmentsViewModel(); + myAppointmentsViewModel.getPatientAppointments(true, false); LoaderBottomSheet.hideLoader(); Navigator.pushAndRemoveUntil( context, @@ -503,6 +511,8 @@ class _AppointmentPaymentPageState extends State { isFollowUp: myAppointmentsViewModel.patientAppointmentShareResponseModel!.isFollowup!, onSuccess: (apiResponse) { Future.delayed(Duration(milliseconds: 500), () { + myAppointmentsViewModel.initAppointmentsViewModel(); + myAppointmentsViewModel.getPatientAppointments(true, false); LoaderBottomSheet.hideLoader(); Navigator.pushAndRemoveUntil( context, diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart index a8735d0..493d15b 100644 --- a/lib/presentation/appointments/widgets/appointment_card.dart +++ b/lib/presentation/appointments/widgets/appointment_card.dart @@ -184,9 +184,9 @@ class AppointmentCard extends StatelessWidget { AppCustomChipWidget( labelText: isLoading ? 'Olaya' - : patientAppointmentHistoryResponseModel.projectName!.length > 15 - ? '${patientAppointmentHistoryResponseModel.projectName!.substring(0, 15)}...' - : patientAppointmentHistoryResponseModel.projectName!) + : (patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital").length > 15 + ? '${(patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital").substring(0, 15)}...' + : patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital") .toShimmer2(isShow: isLoading), AppCustomChipWidget( labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w), @@ -226,7 +226,10 @@ class AppointmentCard extends StatelessWidget { } Widget _buildActionArea(BuildContext context, AppState appState) { - if ((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) && AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) { + if ((((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) || + (patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) || + !Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) && + AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) { return CustomButton( text: isFromMedicalReport ? LocaleKeys.selectAppointment.tr(context: context) : LocaleKeys.viewDetails.tr(context: context), onPressed: () { @@ -425,8 +428,8 @@ class AppointmentCard extends StatelessWidget { ), ) .then((_) { - myAppointmentsViewModel.initAppointmentsViewModel(); - myAppointmentsViewModel.getPatientAppointments(true, false); + // myAppointmentsViewModel.initAppointmentsViewModel(); + // myAppointmentsViewModel.getPatientAppointments(true, false); }); } } diff --git a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart index b87a0a3..d1abf2f 100644 --- a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart +++ b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart @@ -58,17 +58,17 @@ class AppointmentCheckinBottomSheet extends StatelessWidget { projectDetailListModel = Utils.getProjectDetailObj(appState, patientAppointmentHistoryResponseModel.projectID); double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000; print(dist); - if (dist <= projectDetailListModel.geofenceRadius!) { + // if (dist <= projectDetailListModel.geofenceRadius!) { sendCheckInRequest(projectDetailListModel.checkInQrCode!, 3, context); - } else { - showCommonBottomSheetWithoutHeight(context, - title: LocaleKeys.error.tr(context: context), - child: Utils.getErrorWidget( - loadingText: LocaleKeys.ensureWithinHospitalLocation.tr(context: context), - ), callBackFunc: () { - Navigator.of(context).pop(); - }, isFullScreen: false); - } + // } else { + // showCommonBottomSheetWithoutHeight(context, + // title: LocaleKeys.error.tr(context: context), + // child: Utils.getErrorWidget( + // loadingText: LocaleKeys.ensureWithinHospitalLocation.tr(context: context), + // ), callBackFunc: () { + // Navigator.of(context).pop(); + // }, isFullScreen: false); + // } }); }), SizedBox(height: 16.h), @@ -150,6 +150,9 @@ class AppointmentCheckinBottomSheet extends StatelessWidget { scannedCode: scannedCode, checkInType: checkInType, onSuccess: (apiResponse) { + myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); + myAppointmentsViewModel.initAppointmentsViewModel(); + myAppointmentsViewModel.getPatientAppointments(true, false); LoaderBottomSheet.hideLoader(); showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.success.tr(context: context), child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async { await myAppointmentsViewModel.getPatientAppointmentQueueDetails(); diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart index 6eaa379..0e3ade7 100644 --- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart +++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart @@ -95,11 +95,11 @@ class AppointmentDoctorCard extends StatelessWidget { labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w), ), AppCustomChipWidget( - labelText: patientAppointmentHistoryResponseModel.projectName!, + labelText: patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital", labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w), ), AppCustomChipWidget( - labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w), + labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w), icon: AppAssets.doctor_calendar_icon, labelText: "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)} ${DateUtil.formatDateToTimeLang( DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), @@ -107,7 +107,7 @@ class AppointmentDoctorCard extends StatelessWidget { )}", ), AppCustomChipWidget( - labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w), + labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w), icon: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon, diff --git a/lib/presentation/book_appointment/review_appointment_page.dart b/lib/presentation/book_appointment/review_appointment_page.dart index ebd9773..b874e16 100644 --- a/lib/presentation/book_appointment/review_appointment_page.dart +++ b/lib/presentation/book_appointment/review_appointment_page.dart @@ -178,7 +178,7 @@ class _ReviewAppointmentPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - bookAppointmentsViewModel.selectedDoctor.projectName!.toText16(isBold: true), + (bookAppointmentsViewModel.selectedDoctor.projectName ?? "Habib Hospital").toText16(isBold: true), SizedBox(height: 8.h), bookAppointmentsViewModel.appointmentNearestGateResponseModel != null ? Wrap( diff --git a/lib/presentation/notifications/notification_details_page.dart b/lib/presentation/notifications/notification_details_page.dart index 949b872..1607e8f 100644 --- a/lib/presentation/notifications/notification_details_page.dart +++ b/lib/presentation/notifications/notification_details_page.dart @@ -20,26 +20,18 @@ class NotificationDetailsPage extends StatelessWidget { @override Widget build(BuildContext context) { - // Debug logging - print('=== Notification Details ==='); - print('Message: ${notification.message}'); - print('MessageType: ${notification.messageType}'); - print('MessageTypeData: ${notification.messageTypeData}'); - print('VideoURL: ${notification.videoURL}'); - print('========================'); - return CollapsingListView( title: LocaleKeys.notificationDetails.tr(), - trailing: IconButton( - icon: Icon( - Icons.share_outlined, - size: 24.h, - color: AppColors.textColor, - ), - onPressed: () { - _shareNotification(); - }, - ), + // trailing: IconButton( + // icon: Icon( + // Icons.share_outlined, + // size: 24.h, + // color: AppColors.textColor, + // ), + // onPressed: () { + // _shareNotification(); + // }, + // ), child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -230,21 +222,21 @@ class NotificationDetailsPage extends StatelessWidget { ), // Additional notification info - if (notification.notificationType != null && notification.notificationType!.isNotEmpty) - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - LocaleKeys.typeNotification.tr().toText14( - weight: FontWeight.w600, - color: AppColors.greyTextColor, - ), - SizedBox(height: 8.h), - notification.notificationType!.toText16( - weight: FontWeight.w400, - color: AppColors.textColor, - ), - ], - ), + // if (notification.notificationType != null && notification.notificationType!.isNotEmpty) + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // LocaleKeys.typeNotification.tr().toText14( + // weight: FontWeight.w600, + // color: AppColors.greyTextColor, + // ), + // SizedBox(height: 8.h), + // notification.notificationType!.toText16( + // weight: FontWeight.w400, + // color: AppColors.textColor, + // ), + // ], + // ), ], ), ); diff --git a/lib/presentation/notifications/notifications_list_page.dart b/lib/presentation/notifications/notifications_list_page.dart index c5f5d12..6c344b2 100644 --- a/lib/presentation/notifications/notifications_list_page.dart +++ b/lib/presentation/notifications/notifications_list_page.dart @@ -23,7 +23,7 @@ class NotificationsListPage extends StatelessWidget { @override Widget build(BuildContext context) { return CollapsingListView( - title: LocaleKeys.notifications.tr(context: context), + title: LocaleKeys.notification.tr(context: context), child: SingleChildScrollView( child: Consumer(builder: (context, notificationsVM, child) { return Container( diff --git a/lib/presentation/prescriptions/prescription_detail_page.dart b/lib/presentation/prescriptions/prescription_detail_page.dart index 796bfdd..5bb9cbd 100644 --- a/lib/presentation/prescriptions/prescription_detail_page.dart +++ b/lib/presentation/prescriptions/prescription_detail_page.dart @@ -139,7 +139,7 @@ class _PrescriptionDetailPageState extends State { labelText: LocaleKeys.ratingValue.tr(namedArgs: {'rating': widget.prescriptionsResponseModel.decimalDoctorRate.toString()}, context: context), ), AppCustomChipWidget( - labelText: widget.prescriptionsResponseModel.name!, + labelText: widget.prescriptionsResponseModel.name ?? "", ), ], ), diff --git a/lib/presentation/prescriptions/prescriptions_list_page.dart b/lib/presentation/prescriptions/prescriptions_list_page.dart index c2d97f8..cd507d4 100644 --- a/lib/presentation/prescriptions/prescriptions_list_page.dart +++ b/lib/presentation/prescriptions/prescriptions_list_page.dart @@ -165,7 +165,7 @@ class _PrescriptionsListPageState extends State { ], ), SizedBox(height: 8.h), - model.patientPrescriptionOrdersViewList[index].filterName!.toText16(isBold: true) + (model.patientPrescriptionOrdersViewList[index].filterName ?? "").toText16(isBold: true) ], ), ), @@ -217,7 +217,7 @@ class _PrescriptionsListPageState extends State { labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false), ), AppCustomChipWidget( - labelText: model.isSortByClinic ? prescription.name! : prescription.clinicDescription!, + labelText: model.isSortByClinic ? prescription.name ?? "" : prescription.clinicDescription!, ), ], ),