pull/222/head
haroon amjad 3 days ago
parent ad0cbe1e21
commit 5b44329972

@ -0,0 +1,5 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.875 8.75C11.875 8.05965 12.4346 7.5 13.125 7.5L21.875 7.5C22.5654 7.5 23.125 8.05965 23.125 8.75C23.125 9.44036 22.5654 10 21.875 10L13.125 10C12.4346 10 11.875 9.44036 11.875 8.75Z" fill="#2E3039"/>
<path d="M13.125 12.5C12.4346 12.5 11.875 13.0596 11.875 13.75C11.875 14.4404 12.4346 15 13.125 15H17.5C18.1904 15 18.75 14.4404 18.75 13.75C18.75 13.0596 18.1904 12.5 17.5 12.5H13.125Z" fill="#2E3039"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.0703 1.70757C22.9908 1.56243 21.6268 1.56246 19.9726 1.5625L14.9137 1.5625C13.2596 1.56246 11.8955 1.56243 10.8159 1.70757C9.6825 1.85996 8.6815 2.19219 7.88001 2.99369C7.07851 3.79518 6.74627 4.79619 6.59389 5.92962C6.44874 7.00921 6.44878 8.37325 6.44882 10.0274L6.44882 19.1364C6.44882 19.4899 6.44882 19.6667 6.33899 19.7765C6.22915 19.8864 6.05237 19.8864 5.69881 19.8864L5.1043 19.8864C4.5742 19.8862 4.03689 19.886 3.59055 19.9603C3.05657 20.0492 2.49845 20.266 2.06822 20.803C1.66663 21.3043 1.54538 21.8484 1.56439 22.3879C1.57941 22.814 1.6877 23.2915 1.78692 23.7289C2.03287 24.816 2.48165 26.0118 3.20368 26.8876C3.95427 27.798 5.02349 28.4375 6.40497 28.4375L23.5434 28.4375C25.2852 28.4375 26.5975 27.7012 27.4152 26.4548C28.1809 25.2875 28.4375 23.7913 28.4375 22.3296V10.0275C28.4375 8.37327 28.4375 7.00921 28.2924 5.92962C28.14 4.79619 27.8078 3.79518 27.0063 2.99369C26.2048 2.19219 25.2038 1.85996 24.0703 1.70757ZM9.64221 19.8864C9.28866 19.8864 9.11188 19.8864 9.00205 19.7766C8.89221 19.6668 8.89221 19.49 8.89221 19.1364L8.89221 10.1137C8.89221 8.35157 8.89481 7.15287 9.01549 6.25522C9.13145 5.39271 9.33591 4.99322 9.6078 4.72133C9.87969 4.44944 10.2792 4.24498 11.1417 4.12902C12.0393 4.00833 13.238 4.00574 15.0002 4.00574L19.8865 4.00574C21.6487 4.00574 22.8474 4.00833 23.745 4.12902C24.6075 4.24498 25.007 4.44944 25.2789 4.72133C25.5508 4.99322 25.7552 5.39271 25.8712 6.25522C25.9919 7.15287 25.9945 8.35157 25.9945 10.1137V22.3296C25.9945 23.5665 25.7669 24.5135 25.3725 25.1147C25.03 25.6368 24.506 25.9944 23.5436 25.9944C23.0042 25.9944 22.5905 25.7739 22.2274 25.3334C21.8357 24.8583 21.5233 24.1393 21.325 23.2628C21.1929 22.6787 21.0635 22.1067 20.9328 21.7044C20.8046 21.3095 20.5948 20.7891 20.1326 20.4205C19.6995 20.0749 19.209 19.9703 18.8049 19.9269C18.428 19.8863 17.9679 19.8864 17.479 19.8864L9.64221 19.8864Z" fill="#2E3039"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -1691,5 +1691,7 @@
"generateAiAnalysisRadResult": "بإنشاء تحليل الذكاء الاصطناعي لهذا التقرير", "generateAiAnalysisRadResult": "بإنشاء تحليل الذكاء الاصطناعي لهذا التقرير",
"grantLocationPermission": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق للحصول على نتائج أفضل.", "grantLocationPermission": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق للحصول على نتائج أفضل.",
"NoBookedAppointments": "لا توجد مواعيد محجوزة", "NoBookedAppointments": "لا توجد مواعيد محجوزة",
"aiDisclaimerRad": "سيتم مشاركة بيانات نتائج الأشعة الخاصة بك بشكل آمن مع محلل الذكاء الاصطناعي لدينا لتحليلها. يساعد هذا في توفير رؤى صحية مخصصة. هل ترغب في المتابعة؟" "aiDisclaimerRad": "سيتم مشاركة بيانات نتائج الأشعة الخاصة بك بشكل آمن مع محلل الذكاء الاصطناعي لدينا لتحليلها. يساعد هذا في توفير رؤى صحية مخصصة. هل ترغب في المتابعة؟",
"sendingAskDrRequest": "جارٍ إرسال الطلب...",
"askDrRequestSentSuccess": "تم إرسال الطلب بنجاح، وسيتواصل معك الطبيب قريباً."
} }

@ -1683,5 +1683,7 @@
"generateAiAnalysisRadResult": "Generate AI analysis for this result", "generateAiAnalysisRadResult": "Generate AI analysis for this result",
"grantLocationPermission": "Please grant location permission from app settings to see better results.", "grantLocationPermission": "Please grant location permission from app settings to see better results.",
"NoBookedAppointments": "No Booked Appointments", "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."
} }

@ -25,6 +25,7 @@ class ApiConsts {
static String GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; 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://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="; 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_INSTALLMENTS_URL = "https://mdlaboratories.com/tamaralive/Home/GetInstallments";
GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/'; 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="; CHAT_URL = "https://chat.hmg.com/Index.aspx?RequestedId=";
break; break;
case AppEnvironmentTypeEnum.dev: case AppEnvironmentTypeEnum.dev:
@ -80,7 +81,7 @@ class ApiConsts {
GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments"; 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='; GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/'; 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="; CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId=";
break; break;
case AppEnvironmentTypeEnum.qa: case AppEnvironmentTypeEnum.qa:

@ -357,6 +357,7 @@ class AppAssets {
static const String biometricLockIcon = '$svgBasePath/biometric_lock_icon.svg'; static const String biometricLockIcon = '$svgBasePath/biometric_lock_icon.svg';
static const String imageIcon = '$svgBasePath/image_icon.svg'; static const String imageIcon = '$svgBasePath/image_icon.svg';
static const String appointmentRatingIcon = '$svgBasePath/appointment_rating_icon.svg'; static const String appointmentRatingIcon = '$svgBasePath/appointment_rating_icon.svg';
static const String invoiceListIcon = '$svgBasePath/invoice_list_icon.svg';
// PNGS // // PNGS //
static const String hmgLogo = '$pngBasePath/hmg_logo.png'; static const String hmgLogo = '$pngBasePath/hmg_logo.png';

@ -77,7 +77,7 @@ abstract class MyAppointmentsRepo {
Future<Either<Failure, GenericApiModel<void>>> sendDoctorRate( Future<Either<Failure, GenericApiModel<void>>> sendDoctorRate(
int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName); int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName);
Future<Either<Failure, GenericApiModel<List<PatientQueueDetails>>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID}); Future<Either<Failure, GenericApiModel<List<PatientQueueDetails>>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID, required int clinicID});
Future<Either<Failure, GenericApiModel<dynamic>>> convertPatientToCash({required int projectID}); Future<Either<Failure, GenericApiModel<dynamic>>> convertPatientToCash({required int projectID});
@ -833,8 +833,8 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
} }
@override @override
Future<Either<Failure, GenericApiModel<List<PatientQueueDetails>>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID}) async { Future<Either<Failure, GenericApiModel<List<PatientQueueDetails>>>> getPatientAppointmentQueueDetails({required int appointmentNo, required int patientID, required int clinicID}) async {
Map<String, dynamic> mapDevice = {"appointmentNo": appointmentNo, "patientID": patientID, "apiKey": "EE17D21C7943485D9780223CCE55DCE5"}; Map<String, dynamic> mapDevice = {"appointmentNo": appointmentNo, "patientID": patientID, "ClinicID": clinicID, "apiKey": "EE17D21C7943485D9780223CCE55DCE5"};
try { try {
GenericApiModel<List<PatientQueueDetails>>? apiResponse; GenericApiModel<List<PatientQueueDetails>>? apiResponse;
Failure? failure; Failure? failure;

@ -932,6 +932,7 @@ class MyAppointmentsViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
final result = await myAppointmentsRepo.getPatientAppointmentQueueDetails( final result = await myAppointmentsRepo.getPatientAppointmentQueueDetails(
clinicID: patientArrivedAppointmentsHistoryList.first.clinicID,
appointmentNo: patientArrivedAppointmentsHistoryList.first.appointmentNo, patientID: patientArrivedAppointmentsHistoryList.first.patientID); appointmentNo: patientArrivedAppointmentsHistoryList.first.appointmentNo, patientID: patientArrivedAppointmentsHistoryList.first.patientID);
isAppointmentQueueDetailsLoading = false; isAppointmentQueueDetailsLoading = false;

@ -1683,5 +1683,7 @@ abstract class LocaleKeys {
static const grantLocationPermission = 'grantLocationPermission'; static const grantLocationPermission = 'grantLocationPermission';
static const NoBookedAppointments = 'NoBookedAppointments'; static const NoBookedAppointments = 'NoBookedAppointments';
static const aiDisclaimerRad = 'aiDisclaimerRad'; static const aiDisclaimerRad = 'aiDisclaimerRad';
static const sendingAskDrRequest = 'sendingAskDrRequest';
static const askDrRequestSentSuccess = 'askDrRequestSentSuccess';
} }

@ -243,88 +243,88 @@ class AppointmentCard extends StatelessWidget {
(patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) || (patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) && !Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) { AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) {
if (((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) && // if (((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) &&
DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15)) { // DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15)) {
return Row( // return Row(
children: [ // children: [
Expanded( // Expanded(
flex: 6, // flex: 6,
child: CustomButton( // child: CustomButton(
text: LocaleKeys.askDoctor.tr(context: context), // text: LocaleKeys.askDoctor.tr(context: context),
onPressed: () async { // onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context)); // LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
await myAppointmentsViewModel.isDoctorAvailable( // await myAppointmentsViewModel.isDoctorAvailable(
projectID: patientAppointmentHistoryResponseModel.projectID, // projectID: patientAppointmentHistoryResponseModel.projectID,
doctorId: patientAppointmentHistoryResponseModel.doctorID, // doctorId: patientAppointmentHistoryResponseModel.doctorID,
clinicId: patientAppointmentHistoryResponseModel.clinicID, // clinicId: patientAppointmentHistoryResponseModel.clinicID,
onSuccess: (value) async { // onSuccess: (value) async {
if (value) { // if (value) {
await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) { // await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
LoaderBottomSheet.hideLoader(); // LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( // showCommonBottomSheetWithoutHeight(
context, // context,
title: LocaleKeys.askDoctor.tr(context: context), // title: LocaleKeys.askDoctor.tr(context: context),
child: AskDoctorRequestTypeSelect( // child: AskDoctorRequestTypeSelect(
askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList, // askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
myAppointmentsViewModel: myAppointmentsViewModel, // myAppointmentsViewModel: myAppointmentsViewModel,
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, // patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
), // ),
callBackFunc: () {}, // callBackFunc: () {},
isFullScreen: false, // isFullScreen: false,
isCloseButtonVisible: true, // isCloseButtonVisible: true,
); // );
}); // });
} else { // } else {
print("Doctor is not available"); // print("Doctor is not available");
} // }
}); // });
}, // },
backgroundColor: AppColors.secondaryLightRedColor, // backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, // borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, // textColor: AppColors.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f, // fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
borderRadius: 12.r, // borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w), // padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: isTablet || isFoldable ? 46.h : 40.h, // // height: isTablet || isFoldable ? 46.h : 40.h,
height: 40.h, // height: 40.h,
icon: AppAssets.ask_doctor_icon, // icon: AppAssets.ask_doctor_icon,
iconColor: AppColors.primaryRedColor, // iconColor: AppColors.primaryRedColor,
iconSize: 16.h, // iconSize: 16.h,
), // ),
), // ),
SizedBox(width: 8.h), // SizedBox(width: 8.h),
Expanded( // Expanded(
flex: 1, // flex: 1,
child: Container( // child: Container(
height: (isFoldable || isTablet) ? 50.h : 40.h, // height: (isFoldable || isTablet) ? 50.h : 40.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.textColor, // color: AppColors.textColor,
borderRadius: 10.h, // borderRadius: 10.h,
side: BorderSide( // side: BorderSide(
color: AppColors.textColor, // color: AppColors.textColor,
width: 1.2, // width: 1.2,
), // ),
), // ),
child: Transform.flip( // child: Transform.flip(
flipX: appState.isArabic(), // flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( // child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, // icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.whiteColor, // iconColor: AppColors.whiteColor,
width: 24.w, // width: 24.w,
height: 24.h, // height: 24.h,
fit: BoxFit.contain, // fit: BoxFit.contain,
), // ),
), // ),
).toShimmer2(isShow: isLoading).onPress(() { // ).toShimmer2(isShow: isLoading).onPress(() {
_goToDetails(context); // _goToDetails(context);
}), // }),
), // ),
], // ],
); // );
} else { // } else {
return CustomButton( return CustomButton(
text: isFromMedicalReport ? LocaleKeys.selectAppointment.tr(context: context) : LocaleKeys.viewDetails.tr(context: context), text: isFromMedicalReport ? LocaleKeys.selectAppointment.tr(context: context) : LocaleKeys.viewDetails.tr(context: context),
onPressed: () { onPressed: () {
if (isFromMedicalReport) { if (isFromMedicalReport) {
if (isForFeedback) { if (isForFeedback) {
@ -359,7 +359,7 @@ class AppointmentCard extends StatelessWidget {
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
iconSize: 16.h, iconSize: 16.h,
); );
} // }
} else { } else {
if (isFromMedicalReport) { if (isFromMedicalReport) {
if (isForEyeMeasurements) { if (isForEyeMeasurements) {
@ -446,53 +446,53 @@ class AppointmentCard extends StatelessWidget {
} }
Widget _getArrivedButton(BuildContext context) { Widget _getArrivedButton(BuildContext context) {
final isRecent = DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15; // final isRecent = DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15;
//
if (isRecent) { // if (isRecent) {
return CustomButton( // return CustomButton(
text: LocaleKeys.askDoctor.tr(context: context), // text: LocaleKeys.askDoctor.tr(context: context),
onPressed: () async { // onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context)); // LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
await myAppointmentsViewModel.isDoctorAvailable( // await myAppointmentsViewModel.isDoctorAvailable(
projectID: patientAppointmentHistoryResponseModel.projectID, // projectID: patientAppointmentHistoryResponseModel.projectID,
doctorId: patientAppointmentHistoryResponseModel.doctorID, // doctorId: patientAppointmentHistoryResponseModel.doctorID,
clinicId: patientAppointmentHistoryResponseModel.clinicID, // clinicId: patientAppointmentHistoryResponseModel.clinicID,
onSuccess: (value) async { // onSuccess: (value) async {
if (value) { // if (value) {
await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) { // await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
LoaderBottomSheet.hideLoader(); // LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( // showCommonBottomSheetWithoutHeight(
context, // context,
title: LocaleKeys.askDoctor.tr(context: context), // title: LocaleKeys.askDoctor.tr(context: context),
child: AskDoctorRequestTypeSelect( // child: AskDoctorRequestTypeSelect(
askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList, // askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
myAppointmentsViewModel: myAppointmentsViewModel, // myAppointmentsViewModel: myAppointmentsViewModel,
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, // patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
), // ),
callBackFunc: () {}, // callBackFunc: () {},
isFullScreen: false, // isFullScreen: false,
isCloseButtonVisible: true, // isCloseButtonVisible: true,
); // );
}); // });
} else { // } else {
print("Doctor is not available"); // print("Doctor is not available");
} // }
}); // });
}, // },
backgroundColor: AppColors.secondaryLightRedColor, // backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, // borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, // textColor: AppColors.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f, // fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
borderRadius: 12.r, // borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w), // padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: isTablet || isFoldable ? 46.h : 40.h, // // height: isTablet || isFoldable ? 46.h : 40.h,
height: 40.h, // height: 40.h,
icon: AppAssets.ask_doctor_icon, // icon: AppAssets.ask_doctor_icon,
iconColor: AppColors.primaryRedColor, // iconColor: AppColors.primaryRedColor,
iconSize: 16.h, // iconSize: 16.h,
); // );
} // }
return CustomButton( return CustomButton(
borderSide: BorderSide( borderSide: BorderSide(

@ -126,7 +126,7 @@ class AppointmentDoctorCard extends StatelessWidget {
DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate),
false, false,
)}" )}"
.toText10(isEnglishOnly: true), .toText10(isBold: true),
), ),
), ),
AppCustomChipWidget( AppCustomChipWidget(

@ -1,5 +1,6 @@
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/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/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/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/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/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
@ -95,8 +97,8 @@ class AskDoctorRequestTypeSelect extends StatelessWidget {
child: CustomButton( child: CustomButton(
text: LocaleKeys.confirm.tr(), text: LocaleKeys.confirm.tr(),
onPressed: () async { onPressed: () async {
Navigator.pop(context); Navigator.of(context).pop();
LoaderBottomSheet.showLoader(loadingText: "Sending Request..."); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingAskDrRequest.tr(context: context));
await myAppointmentsViewModel.sendAskDocCallRequest( await myAppointmentsViewModel.sendAskDocCallRequest(
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
requestType: selectedParameterCodeValue.toString(), requestType: selectedParameterCodeValue.toString(),
@ -104,17 +106,10 @@ class AskDoctorRequestTypeSelect extends StatelessWidget {
userMobileNumber: myAppointmentsViewModel.appState.getAuthenticatedUser()!.mobileNumber!, userMobileNumber: myAppointmentsViewModel.appState.getAuthenticatedUser()!.mobileNumber!,
onSuccess: (val) { onSuccess: (val) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(GetIt.instance<NavigationService>().navigatorKey.currentContext!,
context, child: Padding(padding: EdgeInsets.symmetric(horizontal: 24.h), child: Utils.getSuccessWidget(loadingText: LocaleKeys.askDrRequestSentSuccess.tr())), callBackFunc: () {
child: Utils.getSuccessWidget(loadingText: "Request has been sent successfully, you will be contacted soon."), Navigator.of(context).pop();
callBackFunc: () { }, title: "", isCloseButtonVisible: false, isDismissible: false, isFullScreen: false, isAutoDismiss: true);
Navigator.of(context).pop();
},
title: "",
isCloseButtonVisible: true,
isDismissible: false,
isFullScreen: false,
);
}, },
onError: (errMessage) { onError: (errMessage) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();

@ -92,7 +92,7 @@ class _SavedLogin extends State<SavedLogin> {
Container( Container(
padding: EdgeInsets.all(16.h), 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), BoxShadow(color: Color(0x0D000000), blurRadius: 16.h, offset: Offset(0, 0), spreadRadius: 5.h),
]), ]),
child: Column( child: Column(

@ -355,10 +355,10 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.add_new_family_icon, height: 64.h, width: 64.h), Utils.buildSvgWithAssets(icon: AppAssets.add_new_family_icon, height: 64.h, width: 64.h, applyThemeColor: false),
SizedBox( SizedBox(
width: 80.w, width: 80.w,
child: LocaleKeys.add.tr(context: context).toText12( child: LocaleKeys.add.tr(context: context).toText12(
color: AppColors.textColor, color: AppColors.textColor,
isBold: true, isBold: true,
isCenter: true, isCenter: true,

@ -142,6 +142,16 @@ class LandingPageData {
textColor: AppColors.blackColor, textColor: AppColors.blackColor,
isBold: false, 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<ServiceCardData> get getServiceCardsList => [ static List<ServiceCardData> get getServiceCardsList => [

@ -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/insurance/insurance_home_page.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_orders_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/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/parking/paking_page.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_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'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
@ -92,6 +93,13 @@ class SmallServiceCard extends StatelessWidget {
), ),
); );
break; break;
case "my_invoice":
Navigator.of(context).push(
CustomPageRoute(
page: MyInvoicesList(),
),
);
break;
case "prescriptions": case "prescriptions":
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(

@ -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/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.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:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:open_filex/open_filex.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../widgets/buttons/custom_button.dart'; import '../../widgets/buttons/custom_button.dart';
@ -215,23 +216,36 @@ class _MyInvoicesListState extends State<MyInvoicesList> {
child: InvoiceListCard( child: InvoiceListCard(
getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index], getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index],
onTap: () async { onTap: () async {
myInvoicesVM.setInvoiceDetailLoading(); if (Utils.isVidaPlusProject(myInvoicesVM.allInvoicesList[index].projectId ?? 0)) {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingInvoiceDetails.tr(context: context)); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingEmailPleaseWait.tr(context: context));
await myInvoicesVM.getInvoiceDetails( await myInvoicesViewModel.sendInvoiceEmail(
appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!, 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!, invoiceNo: myInvoicesVM.allInvoicesList[index].invoiceNo!,
projectID: myInvoicesVM.allInvoicesList[index].projectId!, 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) { onError: (err) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
@ -241,8 +255,56 @@ class _MyInvoicesListState extends State<MyInvoicesList> {
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, 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,
// );
// });
// },
), ),
), ),
), ),

@ -140,7 +140,8 @@ class InvoiceListCard extends StatelessWidget {
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
CustomButton( 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: () { onPressed: () {
if (onTap != null) { if (onTap != null) {
onTap!(); onTap!();

@ -47,9 +47,9 @@ class _PreferredLanguageWidgetState extends State<PreferredLanguageWidget> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
child: Column( child: Column(
children: [ children: [
languageItem("English", "2"),
1.divider,
languageItem("العربية", "1"), languageItem("العربية", "1"),
1.divider,
languageItem("English", "2"),
], ],
), ),
), ),
@ -104,7 +104,7 @@ class _PreferredLanguageWidgetState extends State<PreferredLanguageWidget> {
}, },
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 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(() { ).paddingOnly(left: 16, right: 16).onPress(() {
setState(() { setState(() {

@ -103,7 +103,7 @@ class _AppLanguageChangeState extends State<AppLanguageChange> {
}, },
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 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(() { ).paddingOnly(left: 16, right: 16).onPress(() {
setState(() { setState(() {

@ -238,7 +238,7 @@ void showCommonBottomSheetWithoutHeight(
duration: Duration(milliseconds: 500), duration: Duration(milliseconds: 500),
reverseDuration: Duration(milliseconds: 300), 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, context: context,
isScrollControlled: true, isScrollControlled: true,

Loading…
Cancel
Save