diff --git a/assets/images/svg/invoice_list_icon.svg b/assets/images/svg/invoice_list_icon.svg
new file mode 100644
index 00000000..6b9e698f
--- /dev/null
+++ b/assets/images/svg/invoice_list_icon.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index dac6aeb4..b39a0518 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -1691,5 +1691,7 @@
"generateAiAnalysisRadResult": "بإنشاء تحليل الذكاء الاصطناعي لهذا التقرير",
"grantLocationPermission": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق للحصول على نتائج أفضل.",
"NoBookedAppointments": "لا توجد مواعيد محجوزة",
- "aiDisclaimerRad": "سيتم مشاركة بيانات نتائج الأشعة الخاصة بك بشكل آمن مع محلل الذكاء الاصطناعي لدينا لتحليلها. يساعد هذا في توفير رؤى صحية مخصصة. هل ترغب في المتابعة؟"
+ "aiDisclaimerRad": "سيتم مشاركة بيانات نتائج الأشعة الخاصة بك بشكل آمن مع محلل الذكاء الاصطناعي لدينا لتحليلها. يساعد هذا في توفير رؤى صحية مخصصة. هل ترغب في المتابعة؟",
+ "sendingAskDrRequest": "جارٍ إرسال الطلب...",
+ "askDrRequestSentSuccess": "تم إرسال الطلب بنجاح، وسيتواصل معك الطبيب قريباً."
}
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 27a67857..c3869831 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -1683,5 +1683,7 @@
"generateAiAnalysisRadResult": "Generate AI analysis for this result",
"grantLocationPermission": "Please grant location permission from app settings to see better results.",
"NoBookedAppointments": "No Booked Appointments",
- "aiDisclaimerRad": "Your radiology result data will be securely shared with our AI Analyzer for analysis. This helps provide personalized health insights. Do you want to proceed?"
+ "aiDisclaimerRad": "Your radiology result data will be securely shared with our AI Analyzer for analysis. This helps provide personalized health insights. Do you want to proceed?",
+ "sendingAskDrRequest": "Sending Request...",
+ "askDrRequestSentSuccess": "Request has been sent successfully, The doctor will get back to you soon."
}
diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart
index d8fc9cc7..1e08f792 100644
--- a/lib/core/api_consts.dart
+++ b/lib/core/api_consts.dart
@@ -25,6 +25,7 @@ class ApiConsts {
static String GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid=';
static String QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail";
+ // static String QLINE_URL = "https://qline.hmg.com/api/PatientCall/PatientInQueue_Detail";
static String CHAT_URL = "https://chat.hmg.com/Index.aspx?RequestedId=";
@@ -44,7 +45,7 @@ class ApiConsts {
GET_TAMARA_INSTALLMENTS_URL = "https://mdlaboratories.com/tamaralive/Home/GetInstallments";
GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/';
- QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail";
+ QLINE_URL = "https://qline.hmg.com/api/PatientCall/PatientInQueue_Detail";
CHAT_URL = "https://chat.hmg.com/Index.aspx?RequestedId=";
break;
case AppEnvironmentTypeEnum.dev:
@@ -80,7 +81,7 @@ class ApiConsts {
GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments";
GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/';
- QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail";
+ QLINE_URL = "https://qline.hmg.com/api/PatientCall/PatientInQueue_Detail";
CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId=";
break;
case AppEnvironmentTypeEnum.qa:
diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart
index 21280f45..70f4b5d3 100644
--- a/lib/core/app_assets.dart
+++ b/lib/core/app_assets.dart
@@ -357,6 +357,7 @@ class AppAssets {
static const String biometricLockIcon = '$svgBasePath/biometric_lock_icon.svg';
static const String imageIcon = '$svgBasePath/image_icon.svg';
static const String appointmentRatingIcon = '$svgBasePath/appointment_rating_icon.svg';
+ static const String invoiceListIcon = '$svgBasePath/invoice_list_icon.svg';
// PNGS //
static const String hmgLogo = '$pngBasePath/hmg_logo.png';
diff --git a/lib/features/my_appointments/my_appointments_repo.dart b/lib/features/my_appointments/my_appointments_repo.dart
index 45c28c45..2c9391a4 100644
--- a/lib/features/my_appointments/my_appointments_repo.dart
+++ b/lib/features/my_appointments/my_appointments_repo.dart
@@ -77,7 +77,7 @@ abstract class MyAppointmentsRepo {
Future>> sendDoctorRate(
int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName);
- Future>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID});
+ Future>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID, required int clinicID});
Future>> convertPatientToCash({required int projectID});
@@ -833,8 +833,8 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
}
@override
- Future>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID}) async {
- Map mapDevice = {"appointmentNo": appointmentNo, "patientID": patientID, "apiKey": "EE17D21C7943485D9780223CCE55DCE5"};
+ Future>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID, required int clinicID}) async {
+ Map mapDevice = {"appointmentNo": appointmentNo, "patientID": patientID, "ClinicID": clinicID, "apiKey": "EE17D21C7943485D9780223CCE55DCE5"};
try {
GenericApiModel>? apiResponse;
Failure? failure;
diff --git a/lib/features/my_appointments/my_appointments_view_model.dart b/lib/features/my_appointments/my_appointments_view_model.dart
index bc0bfc74..5db21aee 100644
--- a/lib/features/my_appointments/my_appointments_view_model.dart
+++ b/lib/features/my_appointments/my_appointments_view_model.dart
@@ -932,6 +932,7 @@ class MyAppointmentsViewModel extends ChangeNotifier {
notifyListeners();
final result = await myAppointmentsRepo.getPatientAppointmentQueueDetails(
+ clinicID: patientArrivedAppointmentsHistoryList.first.clinicID,
appointmentNo: patientArrivedAppointmentsHistoryList.first.appointmentNo, patientID: patientArrivedAppointmentsHistoryList.first.patientID);
isAppointmentQueueDetailsLoading = false;
diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart
index 29656b23..dc0aeb6c 100644
--- a/lib/generated/locale_keys.g.dart
+++ b/lib/generated/locale_keys.g.dart
@@ -1683,5 +1683,7 @@ abstract class LocaleKeys {
static const grantLocationPermission = 'grantLocationPermission';
static const NoBookedAppointments = 'NoBookedAppointments';
static const aiDisclaimerRad = 'aiDisclaimerRad';
+ static const sendingAskDrRequest = 'sendingAskDrRequest';
+ static const askDrRequestSentSuccess = 'askDrRequestSentSuccess';
}
diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart
index fb24f689..4f50bae9 100644
--- a/lib/presentation/appointments/widgets/appointment_card.dart
+++ b/lib/presentation/appointments/widgets/appointment_card.dart
@@ -243,88 +243,88 @@ class AppointmentCard extends StatelessWidget {
(patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) {
- if (((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) &&
- DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15)) {
- return Row(
- children: [
- Expanded(
- flex: 6,
- child: CustomButton(
- text: LocaleKeys.askDoctor.tr(context: context),
- onPressed: () async {
- LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
- await myAppointmentsViewModel.isDoctorAvailable(
- projectID: patientAppointmentHistoryResponseModel.projectID,
- doctorId: patientAppointmentHistoryResponseModel.doctorID,
- clinicId: patientAppointmentHistoryResponseModel.clinicID,
- onSuccess: (value) async {
- if (value) {
- await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
- LoaderBottomSheet.hideLoader();
- showCommonBottomSheetWithoutHeight(
- context,
- title: LocaleKeys.askDoctor.tr(context: context),
- child: AskDoctorRequestTypeSelect(
- askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
- myAppointmentsViewModel: myAppointmentsViewModel,
- patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
- ),
- callBackFunc: () {},
- isFullScreen: false,
- isCloseButtonVisible: true,
- );
- });
- } else {
- print("Doctor is not available");
- }
- });
- },
- backgroundColor: AppColors.secondaryLightRedColor,
- borderColor: AppColors.secondaryLightRedColor,
- textColor: AppColors.primaryRedColor,
- fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
- fontWeight: FontWeight.w600,
- borderRadius: 12.r,
- padding: EdgeInsets.symmetric(horizontal: 10.w),
- // height: isTablet || isFoldable ? 46.h : 40.h,
- height: 40.h,
- icon: AppAssets.ask_doctor_icon,
- iconColor: AppColors.primaryRedColor,
- iconSize: 16.h,
- ),
- ),
- SizedBox(width: 8.h),
- Expanded(
- flex: 1,
- child: Container(
- height: (isFoldable || isTablet) ? 50.h : 40.h,
- decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.textColor,
- borderRadius: 10.h,
- side: BorderSide(
- color: AppColors.textColor,
- width: 1.2,
- ),
- ),
- child: Transform.flip(
- flipX: appState.isArabic(),
- child: Utils.buildSvgWithAssets(
- icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.whiteColor,
- width: 24.w,
- height: 24.h,
- fit: BoxFit.contain,
- ),
- ),
- ).toShimmer2(isShow: isLoading).onPress(() {
- _goToDetails(context);
- }),
- ),
- ],
- );
- } else {
- return CustomButton(
- text: isFromMedicalReport ? LocaleKeys.selectAppointment.tr(context: context) : LocaleKeys.viewDetails.tr(context: context),
+ // if (((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) &&
+ // DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15)) {
+ // return Row(
+ // children: [
+ // Expanded(
+ // flex: 6,
+ // child: CustomButton(
+ // text: LocaleKeys.askDoctor.tr(context: context),
+ // onPressed: () async {
+ // LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
+ // await myAppointmentsViewModel.isDoctorAvailable(
+ // projectID: patientAppointmentHistoryResponseModel.projectID,
+ // doctorId: patientAppointmentHistoryResponseModel.doctorID,
+ // clinicId: patientAppointmentHistoryResponseModel.clinicID,
+ // onSuccess: (value) async {
+ // if (value) {
+ // await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
+ // LoaderBottomSheet.hideLoader();
+ // showCommonBottomSheetWithoutHeight(
+ // context,
+ // title: LocaleKeys.askDoctor.tr(context: context),
+ // child: AskDoctorRequestTypeSelect(
+ // askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
+ // myAppointmentsViewModel: myAppointmentsViewModel,
+ // patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
+ // ),
+ // callBackFunc: () {},
+ // isFullScreen: false,
+ // isCloseButtonVisible: true,
+ // );
+ // });
+ // } else {
+ // print("Doctor is not available");
+ // }
+ // });
+ // },
+ // backgroundColor: AppColors.secondaryLightRedColor,
+ // borderColor: AppColors.secondaryLightRedColor,
+ // textColor: AppColors.primaryRedColor,
+ // fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
+ // fontWeight: FontWeight.w600,
+ // borderRadius: 12.r,
+ // padding: EdgeInsets.symmetric(horizontal: 10.w),
+ // // height: isTablet || isFoldable ? 46.h : 40.h,
+ // height: 40.h,
+ // icon: AppAssets.ask_doctor_icon,
+ // iconColor: AppColors.primaryRedColor,
+ // iconSize: 16.h,
+ // ),
+ // ),
+ // SizedBox(width: 8.h),
+ // Expanded(
+ // flex: 1,
+ // child: Container(
+ // height: (isFoldable || isTablet) ? 50.h : 40.h,
+ // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ // color: AppColors.textColor,
+ // borderRadius: 10.h,
+ // side: BorderSide(
+ // color: AppColors.textColor,
+ // width: 1.2,
+ // ),
+ // ),
+ // child: Transform.flip(
+ // flipX: appState.isArabic(),
+ // child: Utils.buildSvgWithAssets(
+ // icon: AppAssets.forward_arrow_icon,
+ // iconColor: AppColors.whiteColor,
+ // width: 24.w,
+ // height: 24.h,
+ // fit: BoxFit.contain,
+ // ),
+ // ),
+ // ).toShimmer2(isShow: isLoading).onPress(() {
+ // _goToDetails(context);
+ // }),
+ // ),
+ // ],
+ // );
+ // } else {
+ return CustomButton(
+ text: isFromMedicalReport ? LocaleKeys.selectAppointment.tr(context: context) : LocaleKeys.viewDetails.tr(context: context),
onPressed: () {
if (isFromMedicalReport) {
if (isForFeedback) {
@@ -359,7 +359,7 @@ class AppointmentCard extends StatelessWidget {
iconColor: AppColors.primaryRedColor,
iconSize: 16.h,
);
- }
+ // }
} else {
if (isFromMedicalReport) {
if (isForEyeMeasurements) {
@@ -446,53 +446,53 @@ class AppointmentCard extends StatelessWidget {
}
Widget _getArrivedButton(BuildContext context) {
- final isRecent = DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15;
-
- if (isRecent) {
- return CustomButton(
- text: LocaleKeys.askDoctor.tr(context: context),
- onPressed: () async {
- LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
- await myAppointmentsViewModel.isDoctorAvailable(
- projectID: patientAppointmentHistoryResponseModel.projectID,
- doctorId: patientAppointmentHistoryResponseModel.doctorID,
- clinicId: patientAppointmentHistoryResponseModel.clinicID,
- onSuccess: (value) async {
- if (value) {
- await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
- LoaderBottomSheet.hideLoader();
- showCommonBottomSheetWithoutHeight(
- context,
- title: LocaleKeys.askDoctor.tr(context: context),
- child: AskDoctorRequestTypeSelect(
- askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
- myAppointmentsViewModel: myAppointmentsViewModel,
- patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
- ),
- callBackFunc: () {},
- isFullScreen: false,
- isCloseButtonVisible: true,
- );
- });
- } else {
- print("Doctor is not available");
- }
- });
- },
- backgroundColor: AppColors.secondaryLightRedColor,
- borderColor: AppColors.secondaryLightRedColor,
- textColor: AppColors.primaryRedColor,
- fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
- fontWeight: FontWeight.w600,
- borderRadius: 12.r,
- padding: EdgeInsets.symmetric(horizontal: 10.w),
- // height: isTablet || isFoldable ? 46.h : 40.h,
- height: 40.h,
- icon: AppAssets.ask_doctor_icon,
- iconColor: AppColors.primaryRedColor,
- iconSize: 16.h,
- );
- }
+ // final isRecent = DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15;
+ //
+ // if (isRecent) {
+ // return CustomButton(
+ // text: LocaleKeys.askDoctor.tr(context: context),
+ // onPressed: () async {
+ // LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
+ // await myAppointmentsViewModel.isDoctorAvailable(
+ // projectID: patientAppointmentHistoryResponseModel.projectID,
+ // doctorId: patientAppointmentHistoryResponseModel.doctorID,
+ // clinicId: patientAppointmentHistoryResponseModel.clinicID,
+ // onSuccess: (value) async {
+ // if (value) {
+ // await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
+ // LoaderBottomSheet.hideLoader();
+ // showCommonBottomSheetWithoutHeight(
+ // context,
+ // title: LocaleKeys.askDoctor.tr(context: context),
+ // child: AskDoctorRequestTypeSelect(
+ // askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
+ // myAppointmentsViewModel: myAppointmentsViewModel,
+ // patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
+ // ),
+ // callBackFunc: () {},
+ // isFullScreen: false,
+ // isCloseButtonVisible: true,
+ // );
+ // });
+ // } else {
+ // print("Doctor is not available");
+ // }
+ // });
+ // },
+ // backgroundColor: AppColors.secondaryLightRedColor,
+ // borderColor: AppColors.secondaryLightRedColor,
+ // textColor: AppColors.primaryRedColor,
+ // fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
+ // fontWeight: FontWeight.w600,
+ // borderRadius: 12.r,
+ // padding: EdgeInsets.symmetric(horizontal: 10.w),
+ // // height: isTablet || isFoldable ? 46.h : 40.h,
+ // height: 40.h,
+ // icon: AppAssets.ask_doctor_icon,
+ // iconColor: AppColors.primaryRedColor,
+ // iconSize: 16.h,
+ // );
+ // }
return CustomButton(
borderSide: BorderSide(
diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart
index 474878ef..4b5df07b 100644
--- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart
+++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart
@@ -126,7 +126,7 @@ class AppointmentDoctorCard extends StatelessWidget {
DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate),
false,
)}"
- .toText10(isEnglishOnly: true),
+ .toText10(isBold: true),
),
),
AppCustomChipWidget(
diff --git a/lib/presentation/appointments/widgets/ask_doctor_request_type_select.dart b/lib/presentation/appointments/widgets/ask_doctor_request_type_select.dart
index 35b15399..bf74863a 100644
--- a/lib/presentation/appointments/widgets/ask_doctor_request_type_select.dart
+++ b/lib/presentation/appointments/widgets/ask_doctor_request_type_select.dart
@@ -1,5 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
+import 'package:get_it/get_it.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
@@ -10,6 +11,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
+import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
@@ -95,8 +97,8 @@ class AskDoctorRequestTypeSelect extends StatelessWidget {
child: CustomButton(
text: LocaleKeys.confirm.tr(),
onPressed: () async {
- Navigator.pop(context);
- LoaderBottomSheet.showLoader(loadingText: "Sending Request...");
+ Navigator.of(context).pop();
+ LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingAskDrRequest.tr(context: context));
await myAppointmentsViewModel.sendAskDocCallRequest(
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
requestType: selectedParameterCodeValue.toString(),
@@ -104,17 +106,10 @@ class AskDoctorRequestTypeSelect extends StatelessWidget {
userMobileNumber: myAppointmentsViewModel.appState.getAuthenticatedUser()!.mobileNumber!,
onSuccess: (val) {
LoaderBottomSheet.hideLoader();
- showCommonBottomSheetWithoutHeight(
- context,
- child: Utils.getSuccessWidget(loadingText: "Request has been sent successfully, you will be contacted soon."),
- callBackFunc: () {
- Navigator.of(context).pop();
- },
- title: "",
- isCloseButtonVisible: true,
- isDismissible: false,
- isFullScreen: false,
- );
+ showCommonBottomSheetWithoutHeight(GetIt.instance().navigatorKey.currentContext!,
+ child: Padding(padding: EdgeInsets.symmetric(horizontal: 24.h), child: Utils.getSuccessWidget(loadingText: LocaleKeys.askDrRequestSentSuccess.tr())), callBackFunc: () {
+ Navigator.of(context).pop();
+ }, title: "", isCloseButtonVisible: false, isDismissible: false, isFullScreen: false, isAutoDismiss: true);
},
onError: (errMessage) {
LoaderBottomSheet.hideLoader();
diff --git a/lib/presentation/authentication/saved_login_screen.dart b/lib/presentation/authentication/saved_login_screen.dart
index ffa5f529..6d326939 100644
--- a/lib/presentation/authentication/saved_login_screen.dart
+++ b/lib/presentation/authentication/saved_login_screen.dart
@@ -92,7 +92,7 @@ class _SavedLogin extends State {
Container(
padding: EdgeInsets.all(16.h),
- decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: false, isCustomShadow: [
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: false, isCustomShadow: [
BoxShadow(color: Color(0x0D000000), blurRadius: 16.h, offset: Offset(0, 0), spreadRadius: 5.h),
]),
child: Column(
diff --git a/lib/presentation/book_appointment/book_appointment_page.dart b/lib/presentation/book_appointment/book_appointment_page.dart
index bbc88214..47c4f968 100644
--- a/lib/presentation/book_appointment/book_appointment_page.dart
+++ b/lib/presentation/book_appointment/book_appointment_page.dart
@@ -355,10 +355,10 @@ class _BookAppointmentPageState extends State {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
- Utils.buildSvgWithAssets(icon: AppAssets.add_new_family_icon, height: 64.h, width: 64.h),
- SizedBox(
- width: 80.w,
- child: LocaleKeys.add.tr(context: context).toText12(
+ Utils.buildSvgWithAssets(icon: AppAssets.add_new_family_icon, height: 64.h, width: 64.h, applyThemeColor: false),
+ SizedBox(
+ width: 80.w,
+ child: LocaleKeys.add.tr(context: context).toText12(
color: AppColors.textColor,
isBold: true,
isCenter: true,
diff --git a/lib/presentation/home/data/landing_page_data.dart b/lib/presentation/home/data/landing_page_data.dart
index 33b12855..00142c23 100644
--- a/lib/presentation/home/data/landing_page_data.dart
+++ b/lib/presentation/home/data/landing_page_data.dart
@@ -142,6 +142,16 @@ class LandingPageData {
textColor: AppColors.blackColor,
isBold: false,
),
+ ServiceCardData(
+ serviceName: "my_invoice",
+ icon: AppAssets.invoiceListIcon,
+ title: LocaleKeys.invoiceList,
+ subtitle: LocaleKeys.myDoctorSubtitle,
+ backgroundColor: AppColors.whiteColor,
+ iconColor: AppColors.blackColor,
+ textColor: AppColors.blackColor,
+ isBold: false,
+ ),
];
static List get getServiceCardsList => [
diff --git a/lib/presentation/home/widgets/small_service_card.dart b/lib/presentation/home/widgets/small_service_card.dart
index ff834204..45023c3b 100644
--- a/lib/presentation/home/widgets/small_service_card.dart
+++ b/lib/presentation/home/widgets/small_service_card.dart
@@ -16,6 +16,7 @@ import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts
import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_orders_page.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/patient_sickleaves_list_page.dart';
+import 'package:hmg_patient_app_new/presentation/my_invoices/my_invoices_list.dart';
import 'package:hmg_patient_app_new/presentation/parking/paking_page.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
@@ -92,6 +93,13 @@ class SmallServiceCard extends StatelessWidget {
),
);
break;
+ case "my_invoice":
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: MyInvoicesList(),
+ ),
+ );
+ break;
case "prescriptions":
Navigator.of(context).push(
CustomPageRoute(
diff --git a/lib/presentation/my_invoices/my_invoices_list.dart b/lib/presentation/my_invoices/my_invoices_list.dart
index a935f0d1..5a8e9c70 100644
--- a/lib/presentation/my_invoices/my_invoices_list.dart
+++ b/lib/presentation/my_invoices/my_invoices_list.dart
@@ -20,6 +20,7 @@ import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
+import 'package:open_filex/open_filex.dart';
import 'package:provider/provider.dart';
import '../../widgets/buttons/custom_button.dart';
@@ -215,23 +216,36 @@ class _MyInvoicesListState extends State {
child: InvoiceListCard(
getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index],
onTap: () async {
- myInvoicesVM.setInvoiceDetailLoading();
- LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingInvoiceDetails.tr(context: context));
- await myInvoicesVM.getInvoiceDetails(
- appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!,
+ if (Utils.isVidaPlusProject(myInvoicesVM.allInvoicesList[index].projectId ?? 0)) {
+ LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingEmailPleaseWait.tr(context: context));
+ await myInvoicesViewModel.sendInvoiceEmail(
+ appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!,
+ projectID: myInvoicesVM.allInvoicesList[index].projectId!,
+ onSuccess: (val) {
+ LoaderBottomSheet.hideLoader();
+ showCommonBottomSheetWithoutHeight(context,
+ child: Utils.getSuccessWidget(loadingText: LocaleKeys.emailSentSuccessfullyMessage.tr(context: context)),
+ callBackFunc: () {},
+ isFullScreen: false,
+ isCloseButtonVisible: true,
+ isAutoDismiss: true);
+ },
+ onError: (err) {
+ LoaderBottomSheet.hideLoader();
+ showCommonBottomSheetWithoutHeight(
+ context,
+ child: Utils.getErrorWidget(loadingText: err),
+ callBackFunc: () {},
+ isFullScreen: false,
+ isCloseButtonVisible: true,
+ );
+ });
+ } else {
+ LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr(context: context));
+ myInvoicesViewModel.downloadInvoicePDF(
+ setupId: myInvoicesVM.allInvoicesList[index].setupId!,
invoiceNo: myInvoicesVM.allInvoicesList[index].invoiceNo!,
projectID: myInvoicesVM.allInvoicesList[index].projectId!,
- onSuccess: (val) {
- LoaderBottomSheet.hideLoader();
- Navigator.of(context).push(
- CustomPageRoute(
- page: MyInvoicesDetailsPage(
- getInvoiceDetailsResponseModel: myInvoicesVM.invoiceDetailsResponseModel,
- getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index],
- ),
- ),
- );
- },
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
@@ -241,8 +255,56 @@ class _MyInvoicesListState extends State {
isFullScreen: false,
isCloseButtonVisible: true,
);
- });
+ },
+ onSuccess: (value) async {
+ LoaderBottomSheet.hideLoader();
+ if (myInvoicesViewModel.downloadInvoicePDFBase64!.isNotEmpty) {
+ String path = await Utils.createFileFromString(myInvoicesViewModel.downloadInvoicePDFBase64!, "pdf");
+ try {
+ OpenFilex.open(path);
+ } catch (ex) {
+ showCommonBottomSheetWithoutHeight(
+ context,
+ child: Utils.getErrorWidget(loadingText: "Cannot open file"),
+ callBackFunc: () {},
+ isFullScreen: false,
+ isCloseButtonVisible: true,
+ );
+ }
+ }
+ },
+ );
+ }
},
+ // onTap: () async {
+ // myInvoicesVM.setInvoiceDetailLoading();
+ // LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingInvoiceDetails.tr(context: context));
+ // await myInvoicesVM.getInvoiceDetails(
+ // appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!,
+ // invoiceNo: myInvoicesVM.allInvoicesList[index].invoiceNo!,
+ // projectID: myInvoicesVM.allInvoicesList[index].projectId!,
+ // onSuccess: (val) {
+ // LoaderBottomSheet.hideLoader();
+ // Navigator.of(context).push(
+ // CustomPageRoute(
+ // page: MyInvoicesDetailsPage(
+ // getInvoiceDetailsResponseModel: myInvoicesVM.invoiceDetailsResponseModel,
+ // getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index],
+ // ),
+ // ),
+ // );
+ // },
+ // onError: (err) {
+ // LoaderBottomSheet.hideLoader();
+ // showCommonBottomSheetWithoutHeight(
+ // context,
+ // child: Utils.getErrorWidget(loadingText: err),
+ // callBackFunc: () {},
+ // isFullScreen: false,
+ // isCloseButtonVisible: true,
+ // );
+ // });
+ // },
),
),
),
diff --git a/lib/presentation/my_invoices/widgets/invoice_list_card.dart b/lib/presentation/my_invoices/widgets/invoice_list_card.dart
index 3aacb85c..42d2fd92 100644
--- a/lib/presentation/my_invoices/widgets/invoice_list_card.dart
+++ b/lib/presentation/my_invoices/widgets/invoice_list_card.dart
@@ -140,7 +140,8 @@ class InvoiceListCard extends StatelessWidget {
),
SizedBox(height: 16.h),
CustomButton(
- text: LocaleKeys.viewInvoiceDetails.tr(context: context),
+ // text: LocaleKeys.viewInvoiceDetails.tr(context: context),
+ text: Utils.isVidaPlusProject(getInvoicesListResponseModel.projectId ?? 0) ? LocaleKeys.sendEmail.tr(context: context) : LocaleKeys.downloadInvoice.tr(context: context),
onPressed: () {
if (onTap != null) {
onTap!();
diff --git a/lib/presentation/profile_settings/widgets/preferred_language_widget.dart b/lib/presentation/profile_settings/widgets/preferred_language_widget.dart
index 5b6fe7f9..4cecc651 100644
--- a/lib/presentation/profile_settings/widgets/preferred_language_widget.dart
+++ b/lib/presentation/profile_settings/widgets/preferred_language_widget.dart
@@ -47,9 +47,9 @@ class _PreferredLanguageWidgetState extends State {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
child: Column(
children: [
- languageItem("English", "2"),
- 1.divider,
languageItem("العربية", "1"),
+ 1.divider,
+ languageItem("English", "2"),
],
),
),
@@ -104,7 +104,7 @@ class _PreferredLanguageWidgetState extends State {
},
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
- title.toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1, fontFamily: _value == "1" ? 'GESSTwo' : 'Poppins').expanded,
+ title.toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1, fontFamily: _value == "1" ? 'CairoArabic' : 'Poppins').expanded,
],
).paddingOnly(left: 16, right: 16).onPress(() {
setState(() {
diff --git a/lib/widgets/app_language_change.dart b/lib/widgets/app_language_change.dart
index a6769b3e..f041cd85 100644
--- a/lib/widgets/app_language_change.dart
+++ b/lib/widgets/app_language_change.dart
@@ -103,7 +103,7 @@ class _AppLanguageChangeState extends State {
},
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
- title.toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1, fontFamily: _value == "ar" ? 'GESSTwo' : 'Poppins').expanded,
+ title.toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1, fontFamily: _value == "ar" ? 'CairoArabic' : 'Poppins').expanded,
],
).paddingOnly(left: 16, right: 16).onPress(() {
setState(() {
diff --git a/lib/widgets/common_bottom_sheet.dart b/lib/widgets/common_bottom_sheet.dart
index 85d50b48..d47971d7 100644
--- a/lib/widgets/common_bottom_sheet.dart
+++ b/lib/widgets/common_bottom_sheet.dart
@@ -238,7 +238,7 @@ void showCommonBottomSheetWithoutHeight(
duration: Duration(milliseconds: 500),
reverseDuration: Duration(milliseconds: 300),
),
- constraints: BoxConstraints(maxWidth: MediaQuery.sizeOf(context).width //MediaQuery.of(context).size.width, // Full width
+ constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width //MediaQuery.of(context).size.width, // Full width
),
context: context,
isScrollControlled: true,