updates & fixes

pull/208/head
haroon amjad 1 day ago
parent 04cbb3db40
commit 3d39190c62

@ -365,7 +365,7 @@
"paymentOnline": "الخدمة", "paymentOnline": "الخدمة",
"onlineCheckIn": "تسجيل الوصول عبر الإنترنت", "onlineCheckIn": "تسجيل الوصول عبر الإنترنت",
"myBalances": "رصيدي", "myBalances": "رصيدي",
"myWallet": "محف<EFBFBD><EFBFBD>تي", "myWallet": "محفظتي",
"balanceAmount": "مبلغ المحفظة", "balanceAmount": "مبلغ المحفظة",
"totalBalance": "إجمالي الرصيد", "totalBalance": "إجمالي الرصيد",
"createAdvancedPayment": "إعادة شحن المحفظة", "createAdvancedPayment": "إعادة شحن المحفظة",
@ -489,7 +489,7 @@
"services2": "الخدمات", "services2": "الخدمات",
"cantSeeProfile": "لرؤية ملفك الطبي، يرجى تسجيل الدخول أو التسجيل الآن", "cantSeeProfile": "لرؤية ملفك الطبي، يرجى تسجيل الدخول أو التسجيل الآن",
"loginRegisterNow": "تسجيل الدخول أو التسجيل الآن", "loginRegisterNow": "تسجيل الدخول أو التسجيل الآن",
"hmgPharmacy": "صيدلية مجموعة الحبيب الطبية", "hmgPharmacy": "صيدلية الحبيب",
"ecommerceSolution": "حلول التجارة الإلكترونية", "ecommerceSolution": "حلول التجارة الإلكترونية",
"comprehensive": "شامل", "comprehensive": "شامل",
"onlineConsulting": "استشارات عبر الإنترنت", "onlineConsulting": "استشارات عبر الإنترنت",
@ -860,7 +860,7 @@
"onboardingBody1": "ببضع نقرات فقط يمكنك استشارة الطبيب الذي تختاره.", "onboardingBody1": "ببضع نقرات فقط يمكنك استشارة الطبيب الذي تختاره.",
"onboardingHeading2": "الوصول إلى السجل الطبي بين يديك", "onboardingHeading2": "الوصول إلى السجل الطبي بين يديك",
"onboardingBody2": "تتبع تاريخك الطبي بما في ذلك الفحوصات المخبرية، الوصفات الطبية، التأمين، وغيرها.", "onboardingBody2": "تتبع تاريخك الطبي بما في ذلك الفحوصات المخبرية، الوصفات الطبية، التأمين، وغيرها.",
"hmgHospitals": "مستشفيات مجموعة الحبيب الطبية", "hmgHospitals": "مستشفيات الحبيب",
"hmcMedicalClinic": "مراكز مجموعة الحبيب الطبية", "hmcMedicalClinic": "مراكز مجموعة الحبيب الطبية",
"applyFilter": "تطبيق الفلتر", "applyFilter": "تطبيق الفلتر",
"facilityAndLocation": "المرفق والموقع", "facilityAndLocation": "المرفق والموقع",

@ -152,9 +152,11 @@ class Utils {
static String getDayMonthYearDateFormatted(DateTime? dateTime) { static String getDayMonthYearDateFormatted(DateTime? dateTime) {
if (dateTime == null) return ""; if (dateTime == null) return "";
return appState.isArabic() return
? "${dateTime.day.toString()} ${getMonthArabic(dateTime.month)}, ${dateTime.year.toString()}" // appState.isArabic()
: "${dateTime.day.toString()} ${getMonth(dateTime.month)}, ${dateTime.year.toString()}"; // ? "${dateTime.day.toString()} ${getMonthArabic(dateTime.month)}, ${dateTime.year.toString()}"
// :
"${dateTime.day.toString()} ${getMonth(dateTime.month)}, ${dateTime.year.toString()}";
} }
/// get month by /// get month by

@ -296,10 +296,11 @@ extension EmailValidator on String {
style: TextStyle(height: 1, color: color ?? AppColors.blackColor, fontSize: 22.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal), style: TextStyle(height: 1, color: color ?? AppColors.blackColor, fontSize: 22.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal),
); );
Widget toText24({Color? color, bool isBold = false, bool isCenter = false, FontWeight? fontWeight, double? letterSpacing}) => Text( Widget toText24({Color? color, bool isBold = false, bool isCenter = false, FontWeight? fontWeight, double? letterSpacing, bool isEnglishOnly = false,}) => Text(
this, this,
textAlign: isCenter ? TextAlign.center : null, textAlign: isCenter ? TextAlign.center : null,
style: TextStyle( style: TextStyle(
fontFamily: (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
height: 23 / 24, color: color ?? AppColors.blackColor, fontSize: 24.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.normal), height: 23 / 24, color: color ?? AppColors.blackColor, fontSize: 24.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.normal),
); );

@ -153,6 +153,72 @@ class BookAppointmentsViewModel extends ChangeNotifier {
AppointmentNearestGateResponseModel? appointmentNearestGateResponseModel; AppointmentNearestGateResponseModel? appointmentNearestGateResponseModel;
///variables for laser clinic ///variables for laser clinic
bool isLaserHospitalsLoading = false;
List<PatientDoctorAppointmentList> laserHospitalsList = [];
int laserHospitalHmgCount = 0;
int laserHospitalHmcCount = 0;
Future<void> getLaserHospitals({Function(dynamic)? onSuccess, Function(String)? onError}) async {
isLaserHospitalsLoading = true;
laserHospitalsList.clear();
laserHospitalHmgCount = 0;
laserHospitalHmcCount = 0;
notifyListeners();
final result = await bookAppointmentsRepo.getDoctorsList(253, 0, false, 0, '');
result.fold(
(failure) async {
isLaserHospitalsLoading = false;
notifyListeners();
onError?.call(failure.message);
},
(apiResponse) async {
if (apiResponse.messageStatus == 1) {
var doctorList = apiResponse.data!;
var regionList = await DoctorMapper.getMappedDoctor(
doctorList,
isArabic: _appState.isArabic(),
lat: _appState.userLat,
long: _appState.userLong,
);
var isLocationEnabled = (_appState.userLat != 0) && (_appState.userLong != 0);
regionList = await DoctorMapper.sortList(isLocationEnabled, regionList);
// Flatten all hospitals across all regions into a single list
laserHospitalsList.clear();
Set<String> addedHospitals = {};
regionList.registeredDoctorMap?.forEach((region, regionData) {
for (var hospital in regionData?.hmgDoctorList ?? <PatientDoctorAppointmentList>[]) {
if (!addedHospitals.contains(hospital.filterName)) {
addedHospitals.add(hospital.filterName ?? '');
laserHospitalsList.add(hospital);
}
}
for (var hospital in regionData?.hmcDoctorList ?? <PatientDoctorAppointmentList>[]) {
if (!addedHospitals.contains(hospital.filterName)) {
addedHospitals.add(hospital.filterName ?? '');
laserHospitalsList.add(hospital);
}
}
});
laserHospitalHmgCount = laserHospitalsList.where((h) => h.isHMC != true).length;
laserHospitalHmcCount = laserHospitalsList.where((h) => h.isHMC == true).length;
isLaserHospitalsLoading = false;
notifyListeners();
onSuccess?.call(apiResponse);
} else {
isLaserHospitalsLoading = false;
notifyListeners();
onError?.call(apiResponse.errorMessage ?? 'Unknown error');
}
},
);
}
List<LaserCategoryType> femaleLaserCategory = [ List<LaserCategoryType> femaleLaserCategory = [
LaserCategoryType(1, 'bodyString'), LaserCategoryType(1, 'bodyString'),
LaserCategoryType(2, 'face'), LaserCategoryType(2, 'face'),

@ -73,6 +73,7 @@ class PatientAppointmentHistoryResponseModel {
num? patientShare; num? patientShare;
num? patientShareWithTax; num? patientShareWithTax;
num? patientTaxAmount; num? patientTaxAmount;
String? doctorNationalityFlagURL;
PatientAppointmentHistoryResponseModel({ PatientAppointmentHistoryResponseModel({
this.setupID, this.setupID,
@ -148,6 +149,7 @@ class PatientAppointmentHistoryResponseModel {
this.patientShare, this.patientShare,
this.patientShareWithTax, this.patientShareWithTax,
this.patientTaxAmount, this.patientTaxAmount,
this.doctorNationalityFlagURL,
}); });
PatientAppointmentHistoryResponseModel.fromJson(Map<String, dynamic> json) { PatientAppointmentHistoryResponseModel.fromJson(Map<String, dynamic> json) {
@ -235,6 +237,7 @@ class PatientAppointmentHistoryResponseModel {
patientShare = json['PatientShare']; patientShare = json['PatientShare'];
patientShareWithTax = json['PatientShareWithTax']; patientShareWithTax = json['PatientShareWithTax'];
patientTaxAmount = json['PatientTaxAmount']; patientTaxAmount = json['PatientTaxAmount'];
doctorNationalityFlagURL = json['DoctorNationalityFlagURL'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {

@ -165,7 +165,16 @@ class AppointmentCard extends StatelessWidget {
children: [ children: [
(isLoading ? 'Dr' : "${patientAppointmentHistoryResponseModel.doctorTitle}").toText16(isBold: true, maxlines: 1), (isLoading ? 'Dr' : "${patientAppointmentHistoryResponseModel.doctorTitle}").toText16(isBold: true, maxlines: 1),
(isLoading ? 'John Doe' : " ${patientAppointmentHistoryResponseModel.doctorNameObj!.truncate(20)}") (isLoading ? 'John Doe' : " ${patientAppointmentHistoryResponseModel.doctorNameObj!.truncate(20)}")
.toText16(isBold: true, maxlines: 1, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? "John Doe")) .toText16(isBold: true, maxlines: 1, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? "John Doe")),
SizedBox(width: 12.w),
(patientAppointmentHistoryResponseModel.doctorNationalityFlagURL != null && patientAppointmentHistoryResponseModel.doctorNationalityFlagURL!.isNotEmpty)
? Image.network(
patientAppointmentHistoryResponseModel.doctorNationalityFlagURL ?? "https://hmgwebservices.com/Images/flag/SAU.png",
width: 20.h,
height: 15.h,
fit: BoxFit.cover,
)
: SizedBox.shrink(),
], ],
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
SizedBox(height: 8.h), SizedBox(height: 8.h),

@ -71,20 +71,20 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
} }
}); });
}), }),
SizedBox(height: 16.h), // SizedBox(height: 16.h),
checkInOptionCard( // checkInOptionCard(O
AppAssets.checkin_nfc_icon, // AppAssets.checkin_nfc_icon,
LocaleKeys.nfcNearFieldCommunication.tr(context: context), // LocaleKeys.nfcNearFieldCommunication.tr(context: context),
LocaleKeys.scanPhoneViaNFC.tr(context: context), // LocaleKeys.scanPhoneViaNFC.tr(context: context),
).onPress(() { // ).onPress(() {
Future.delayed(const Duration(milliseconds: 500), () { // Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) { // showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () { // Future.delayed(const Duration(milliseconds: 100), () {
sendCheckInRequest(nfcId, 1, context); // sendCheckInRequest(nfcId, 1, context);
}); // });
}, onCancel: () {}); // }, onCancel: () {});
}); // });
}), // }),
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_qr_icon, AppAssets.checkin_qr_icon,

@ -87,7 +87,20 @@ class AppointmentDoctorCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
patientAppointmentHistoryResponseModel.doctorNameObj!.toText16(isBold: true, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? "")), Row(
children: [
patientAppointmentHistoryResponseModel.doctorNameObj!.toText16(isBold: true, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? "")),
SizedBox(width: 12.w),
(patientAppointmentHistoryResponseModel.doctorNationalityFlagURL != null && patientAppointmentHistoryResponseModel.doctorNationalityFlagURL!.isNotEmpty)
? Image.network(
patientAppointmentHistoryResponseModel.doctorNationalityFlagURL ?? "https://hmgwebservices.com/Images/flag/SAU.png",
width: 20.h,
height: 15.h,
fit: BoxFit.cover,
)
: SizedBox.shrink(),
],
),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,

@ -10,6 +10,8 @@ import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/
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/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'dart:ui' as ui;
class HospitalListItem extends StatelessWidget { class HospitalListItem extends StatelessWidget {
final PatientDoctorAppointmentList? hospitalData; final PatientDoctorAppointmentList? hospitalData;
final bool isLocationEnabled; final bool isLocationEnabled;
@ -76,12 +78,16 @@ class HospitalListItem extends StatelessWidget {
children: [ children: [
Visibility( Visibility(
visible: (hospitalData?.distanceInKMs != "0"), visible: (hospitalData?.distanceInKMs != "0"),
child: AppCustomChipWidget( child: Directionality(
labelText: "${hospitalData?.distanceInKMs ?? ""} km", textDirection: ui.TextDirection.ltr,
deleteIcon: AppAssets.location_red, child: AppCustomChipWidget(
deleteIconSize: Size(9, 12), labelText: "${hospitalData?.distanceInKMs ?? ""} km",
backgroundColor: AppColors.secondaryLightRedColor, deleteIcon: AppAssets.location_red,
textColor: AppColors.errorColor, deleteIconSize: Size(9, 12),
backgroundColor: AppColors.secondaryLightRedColor,
textColor: AppColors.errorColor,
isEnglishOnly: true,
),
), ),
), ),
Visibility( Visibility(

@ -16,6 +16,8 @@ import 'package:hmg_patient_app_new/features/book_appointments/book_appointments
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_clinic_list_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_clinic_list_response_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_livecare_clinics_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_livecare_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.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/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart'; import 'package:hmg_patient_app_new/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart'; import 'package:hmg_patient_app_new/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart';
@ -1027,6 +1029,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
//17 and 235 //17 and 235
void handleDoctorScreen(GetClinicsListResponseModel clinic) async { void handleDoctorScreen(GetClinicsListResponseModel clinic) async {
regionalViewModel.flush();
if (widget.isFromRegionFlow) { if (widget.isFromRegionFlow) {
//Dental Clinic Flow //Dental Clinic Flow
if (clinic.clinicID == 17) { if (clinic.clinicID == 17) {
@ -1061,8 +1064,22 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
); );
} }
} else { } else {
if (clinic.clinicID == 253) {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr(context: context));
await bookAppointmentsViewModel.getLaserHospitals(
onSuccess: (_) {
LoaderBottomSheet.hideLoader();
_showLaserHospitalBottomSheet();
},
onError: (err) {
LoaderBottomSheet.hideLoader();
},
);
return;
}
var bottomSheetType = RegionBottomSheetType.FOR_CLINIIC; var bottomSheetType = RegionBottomSheetType.FOR_CLINIIC;
if (clinic.clinicID == 17 || clinic.clinicID == 253) { if (clinic.clinicID == 17) {
regionalViewModel.setBottomSheetState(AppointmentViaRegionState.HOSPITAL_SELECTION);
bottomSheetType = RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER; bottomSheetType = RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER;
} }
openRegionListBottomSheet(context, bottomSheetType); openRegionListBottomSheet(context, bottomSheetType);
@ -1072,7 +1089,6 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
void openRegionListBottomSheet(BuildContext context, RegionBottomSheetType type) { void openRegionListBottomSheet(BuildContext context, RegionBottomSheetType type) {
bookAppointmentsViewModel.setProjectID(null); bookAppointmentsViewModel.setProjectID(null);
regionalViewModel.flush();
regionalViewModel.setBottomSheetType(type); regionalViewModel.setBottomSheetType(type);
// AppointmentViaRegionViewmodel? viewmodel = null; // AppointmentViaRegionViewmodel? viewmodel = null;
showCommonBottomSheetWithoutHeight(context, title: "", titleWidget: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) => getTitle(data)), isDismissible: false, showCommonBottomSheetWithoutHeight(context, title: "", titleWidget: Consumer<AppointmentViaRegionViewmodel>(builder: (_, data, __) => getTitle(data)), isDismissible: false,
@ -1350,4 +1366,60 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
// bookAppointmentsViewModel.getRegionMappedProjectList(); // bookAppointmentsViewModel.getRegionMappedProjectList();
} }
void _showLaserHospitalBottomSheet() {
final TextEditingController laserHospitalSearchController = TextEditingController();
List<PatientDoctorAppointmentList> filteredList = List.from(bookAppointmentsViewModel.laserHospitalsList);
showCommonBottomSheetWithoutHeight(
context,
title: LocaleKeys.selectHospital.tr(context: context),
isDismissible: true,
isCloseButtonVisible: true,
child: StatefulBuilder(
builder: (context, setModalState) {
return HospitalBottomSheetBody(
searchText: laserHospitalSearchController,
displayList: filteredList,
selectedFacility: FacilitySelection.ALL,
hmcCount: bookAppointmentsViewModel.laserHospitalHmcCount,
hmgCount: bookAppointmentsViewModel.laserHospitalHmgCount,
sortByLocation: false,
onFacilityClicked: (facility) {
setModalState(() {
if (facility == FacilitySelection.ALL) {
filteredList = List.from(bookAppointmentsViewModel.laserHospitalsList);
} else if (facility == FacilitySelection.HMG) {
filteredList = bookAppointmentsViewModel.laserHospitalsList.where((h) => h.isHMC != true).toList();
} else {
filteredList = bookAppointmentsViewModel.laserHospitalsList.where((h) => h.isHMC == true).toList();
}
});
},
onHospitalClicked: (hospital) {
Navigator.of(context).pop(); // close bottom sheet
final projectID = hospital.hospitalList.isNotEmpty ? hospital.hospitalList.first.iD?.toString() : hospital.patientDoctorAppointmentList?.first.projectID?.toString();
bookAppointmentsViewModel.setProjectID(projectID);
bookAppointmentsViewModel.resetLaserData();
bookAppointmentsViewModel.getLaserClinic();
Navigator.push(
context,
CustomPageRoute(page: LaserAppointment()),
);
},
onHospitalSearch: (value) {
setModalState(() {
if (value.isEmpty) {
filteredList = List.from(bookAppointmentsViewModel.laserHospitalsList);
} else {
filteredList = bookAppointmentsViewModel.laserHospitalsList.where((h) => h.filterName != null && h.filterName!.toLowerCase().contains(value.toLowerCase())).toList();
}
});
},
);
},
),
callBackFunc: () {},
);
}
} }

@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.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';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_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';
@ -146,14 +147,27 @@ class DoctorRatingDialog extends StatelessWidget {
color: averageRating == 0 || averageRating == 0.0 ? AppColors.greyF7Color : AppColors.textColor.withAlpha(20), color: averageRating == 0 || averageRating == 0.0 ? AppColors.greyF7Color : AppColors.textColor.withAlpha(20),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
child: Text( child: Row(
'${NumberFormat.decimalPattern().format(totalReviews)} ${LocaleKeys.reviews.tr(context: context)}', children: [
style: TextStyle( NumberFormat.decimalPattern().format(totalReviews).toText12(
fontSize: 14, fontWeight: FontWeight.w500,
fontWeight: FontWeight.w500, color: averageRating == 0 || averageRating == 0.0 ? AppColors.textColor : AppColors.whiteColor,
color: averageRating == 0 || averageRating == 0.0 ? AppColors.textColor : AppColors.whiteColor, isEnglishOnly: true
), ),
' ${LocaleKeys.reviews.tr(context: context)}'.toText12(
fontWeight: FontWeight.w500,
color: averageRating == 0 || averageRating == 0.0 ? AppColors.textColor : AppColors.whiteColor,
),
],
), ),
// child: Text(
// '${NumberFormat.decimalPattern().format(totalReviews)} ${LocaleKeys.reviews.tr(context: context)}',
// style: TextStyle(
// fontSize: 12.f,
// fontWeight: FontWeight.w500,
// color: averageRating == 0 || averageRating == 0.0 ? AppColors.textColor : AppColors.whiteColor,
// ),
// ),
), ),
], ],
), ),

@ -45,7 +45,7 @@ class FindUsPage extends StatelessWidget {
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1), activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [ tabs: [
CustomTabBarModel(null, LocaleKeys.hmgHospitals.tr()), CustomTabBarModel(null, LocaleKeys.hmgHospitals.tr()),
CustomTabBarModel(null, LocaleKeys.pharmaciesList.tr()), CustomTabBarModel(null, LocaleKeys.hmgPharmacy.tr()),
], ],
onTabChange: (index) { onTabChange: (index) {
contactUsVM.setHMGHospitalsListSelected(index == 0); contactUsVM.setHMGHospitalsListSelected(index == 0);

@ -18,6 +18,7 @@ import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:map_launcher/map_launcher.dart'; import 'package:map_launcher/map_launcher.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'dart:ui' as ui;
class FindUsItemCard extends StatelessWidget { class FindUsItemCard extends StatelessWidget {
FindUsItemCard({super.key, required this.getHMGLocationsModel}); FindUsItemCard({super.key, required this.getHMGLocationsModel});
@ -57,13 +58,17 @@ class FindUsItemCard extends StatelessWidget {
(getHMGLocationsModel.distanceInKilometers != 0 && contactUsViewModel.hasLocationEnabled) (getHMGLocationsModel.distanceInKilometers != 0 && contactUsViewModel.hasLocationEnabled)
? Column( ? Column(
children: [ children: [
AppCustomChipWidget( Directionality(
labelText: "${getHMGLocationsModel.distanceInKilometers ?? ""} km", textDirection: ui.TextDirection.ltr,
labelPadding: EdgeInsetsDirectional.only(start: -4.h, end: 8.w), child: AppCustomChipWidget(
icon: AppAssets.location_red, labelText: "${getHMGLocationsModel.distanceInKilometers ?? ""} km",
// iconColor: AppColors.primaryRedColor, labelPadding: EdgeInsetsDirectional.only(start: -4.h, end: 8.w),
// backgroundColor: AppColors.secondaryLightRedColor, icon: AppAssets.location_red,
// textColor: AppColors.errorColor, isEnglishOnly: true,
// iconColor: AppColors.primaryRedColor,
// backgroundColor: AppColors.secondaryLightRedColor,
// textColor: AppColors.errorColor,
),
), ),
SizedBox( SizedBox(
height: 16.h, height: 16.h,

@ -60,20 +60,20 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget {
} }
}); });
}), }),
SizedBox(height: 16.h), // SizedBox(height: 16.h),
checkInOptionCard( // checkInOptionCard(
AppAssets.checkin_nfc_icon, // AppAssets.checkin_nfc_icon,
LocaleKeys.nfcNearFieldCommunication.tr(context: context), // LocaleKeys.nfcNearFieldCommunication.tr(context: context),
LocaleKeys.scanPhoneViaNFC.tr(context: context), // LocaleKeys.scanPhoneViaNFC.tr(context: context),
).onPress(() { // ).onPress(() {
Future.delayed(const Duration(milliseconds: 500), () { // Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) { // showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () { // Future.delayed(const Duration(milliseconds: 100), () {
sendCheckInRequest(nfcId, context); // sendCheckInRequest(nfcId, context);
}); // });
}, onCancel: () {}); // }, onCancel: () {});
}); // });
}), // }),
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.checkin_qr_icon, AppAssets.checkin_qr_icon,

@ -23,7 +23,6 @@ class ErHistoryListing extends StatelessWidget {
return Scaffold( return Scaffold(
body: Column( body: Column(
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.history.tr(context: context), title: LocaleKeys.history.tr(context: context),
@ -31,15 +30,12 @@ class ErHistoryListing extends StatelessWidget {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
child: Column( child: Column(
children: [ children: [
Selector<EmergencyServicesViewModel,(List, bool)>( Selector<EmergencyServicesViewModel,(List, bool)>(
selector: (context, vm) => (vm.orderDisplayList, vm.historyLoading), selector: (context, vm) => (vm.orderDisplayList, vm.historyLoading),
builder: (context, data, _) { builder: (context, data, _) {
return Column( return Column(
children: [ children: [
orderChips(context, data.$2, data.$1), orderChips(context, data.$2, data.$1),
Visibility( Visibility(
visible:data.$1.isNotEmpty == true, visible:data.$1.isNotEmpty == true,
child: ListView.builder( child: ListView.builder(

@ -13,6 +13,7 @@ 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/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
import '../../../../core/utils/utils.dart'; import '../../../../core/utils/utils.dart';
@ -37,11 +38,11 @@ class AmbulanceHistoryItem extends StatelessWidget {
spacing: 8.h, spacing: 8.h,
children: [ children: [
RequestStatus(status: order.statusId ?? 0), RequestStatus(status: order.statusId ?? 0),
"Req ID: ${order.iD}".toText16(color: AppColors.textColor, weight: FontWeight.w600), "Req ID: ${order.iD}".toText16(color: AppColors.textColor, weight: FontWeight.w600, isEnglishOnly: true),
Row( Row(
spacing: 4.w, spacing: 4.w,
children: [ children: [
chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor), chip(Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor),
chip(LocaleKeys.ambulancerequest.tr(context: context), AppAssets.ambulance, AppColors.blackBgColor), chip(LocaleKeys.ambulancerequest.tr(context: context), AppAssets.ambulance, AppColors.blackBgColor),
], ],
), ),
@ -71,11 +72,15 @@ class AmbulanceHistoryItem extends StatelessWidget {
} }
chip(String title, String iconString, Color iconColor) { chip(String title, String iconString, Color iconColor) {
return AppCustomChipWidget( return Directionality(
labelText: title, textDirection: ui.TextDirection.ltr,
icon: iconString, child: AppCustomChipWidget(
iconColor: iconColor, labelText: title,
iconSize: 12.h, icon: iconString,
iconColor: iconColor,
iconSize: 12.h,
isEnglishOnly: true,
),
); );
} }

@ -13,6 +13,7 @@ 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/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
import '../../../../core/utils/utils.dart'; import '../../../../core/utils/utils.dart';
@ -37,11 +38,11 @@ class RRTItem extends StatelessWidget {
spacing: 8.h, spacing: 8.h,
children: [ children: [
RequestStatus(status: order.statusId ?? 0), RequestStatus(status: order.statusId ?? 0),
"Req ID: ${order.iD}".toText16(color: AppColors.textColor, weight: FontWeight.w600), "Req ID: ${order.iD}".toText16(color: AppColors.textColor, weight: FontWeight.w600, isEnglishOnly: true),
Row( Row(
spacing: 4.w, spacing: 4.w,
children: [ children: [
chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor), chip(Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor),
chip(LocaleKeys.rapidResponseTeam.tr(context: context), AppAssets.ic_rrt_vehicle, AppColors.blackBgColor), chip(LocaleKeys.rapidResponseTeam.tr(context: context), AppAssets.ic_rrt_vehicle, AppColors.blackBgColor),
], ],
), ),
@ -65,11 +66,15 @@ class RRTItem extends StatelessWidget {
} }
chip(String title, String iconString, Color iconColor) { chip(String title, String iconString, Color iconColor) {
return AppCustomChipWidget( return Directionality(
labelText: title, textDirection: ui.TextDirection.ltr,
icon: iconString, child: AppCustomChipWidget(
iconColor: iconColor, labelText: title,
iconSize: 12.h, icon: iconString,
iconColor: iconColor,
iconSize: 12.h,
isEnglishOnly: true,
),
); );
} }

@ -13,6 +13,8 @@ import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
class NearestERItem extends StatelessWidget { class NearestERItem extends StatelessWidget {
final ProjectAvgERWaitingTime nearestERItem; final ProjectAvgERWaitingTime nearestERItem;
final bool isLoading; final bool isLoading;
@ -68,20 +70,28 @@ class NearestERItem extends StatelessWidget {
Row( Row(
spacing: 8.h, spacing: 8.h,
children: [ children: [
AppCustomChipWidget( Directionality(
labelText: "${nearestERItem.distanceInKilometers} km", textDirection: ui.TextDirection.ltr,
icon: AppAssets.location, child: AppCustomChipWidget(
iconHasColor: false, labelText: "${nearestERItem.distanceInKilometers} km",
labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h), icon: AppAssets.location,
padding: EdgeInsets.all(8.h), iconHasColor: false,
).toShimmer2(isShow: isLoading), labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h),
AppCustomChipWidget( padding: EdgeInsets.all(8.h),
labelText: "Expected waiting time: ${nearestERItem.getTime()} mins", isEnglishOnly: true,
icon: AppAssets.waiting_time_clock, ).toShimmer2(isShow: isLoading),
iconHasColor: false, ),
labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h), Directionality(
padding: EdgeInsets.all(8.h), textDirection: ui.TextDirection.ltr,
).toShimmer2(isShow: isLoading), child: AppCustomChipWidget(
labelText: "Expected waiting time: ${nearestERItem.getTime()} mins",
icon: AppAssets.waiting_time_clock,
iconHasColor: false,
labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h),
padding: EdgeInsets.all(8.h),
isEnglishOnly: true,
).toShimmer2(isShow: isLoading),
),
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),

@ -74,7 +74,7 @@ class _HabibWalletState extends State<HabibWalletPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"${_appState.getAuthenticatedUser()!.firstName!} ${_appState.getAuthenticatedUser()!.lastName!}".toText19(isBold: true, color: Colors.white), "${_appState.getAuthenticatedUser()!.firstName!} ${_appState.getAuthenticatedUser()!.lastName!}".toText19(isBold: true, color: Colors.white),
"MRN: ${_appState.getAuthenticatedUser()!.patientId!}".toText14(weight: FontWeight.w500, color: AppColors.greyTextColor), "MRN: ${_appState.getAuthenticatedUser()!.patientId!}".toText14(weight: FontWeight.w500, color: AppColors.greyTextColor, isEnglishOnly: true),
], ],
).expanded, ).expanded,
Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, width: 24.h, height: 24.h, applyThemeColor: false), Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, width: 24.h, height: 24.h, applyThemeColor: false),

@ -140,7 +140,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
children: [ children: [
(habibWalletVM.getSelectedRechargeTypeValue()).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), (habibWalletVM.getSelectedRechargeTypeValue()).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
"${LocaleKeys.medicalFile.tr(context: context)}: ${habibWalletVM.fileNumber}" "${LocaleKeys.medicalFile.tr(context: context)}: ${habibWalletVM.fileNumber}"
.toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2), .toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2, isEnglishOnly: true),
], ],
), ),
], ],
@ -203,7 +203,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.email.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), LocaleKeys.email.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
"${appState.getAuthenticatedUser()!.emailAddress}".toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2), "${appState.getAuthenticatedUser()!.emailAddress}".toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2, isEnglishOnly: true),
], ],
), ),
], ],

@ -62,7 +62,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: "Select Payment Method", title: LocaleKeys.selectPaymentOption.tr(context: context),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -169,9 +169,17 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
spacing: 4.h, spacing: 4.h,
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: "${LocaleKeys.fileno.tr(context: context)}.: ${habibWalletVM.fileNumber}"), AppCustomChipWidget(
AppCustomChipWidget(labelText: "${LocaleKeys.mobileNumber.tr(context: context)}: ${habibWalletVM.mobileNumber}"), labelText: "${LocaleKeys.fileno.tr(context: context)}.: ${habibWalletVM.fileNumber}",
AppCustomChipWidget(labelText: "${habibWalletVM.selectedHospital!.name}"), isEnglishOnly: true,
),
AppCustomChipWidget(
labelText: "${LocaleKeys.mobileNumber.tr(context: context)}: ${habibWalletVM.mobileNumber}",
isEnglishOnly: true,
),
AppCustomChipWidget(
labelText: "${habibWalletVM.selectedHospital!.name}",
),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
@ -181,7 +189,9 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
LocaleKeys.totalAmountToPay.tr(context: context).toText16(isBold: true), LocaleKeys.totalAmountToPay.tr(context: context).toText16(isBold: true),
Utils.getPaymentAmountWithSymbol(habibWalletVM.walletRechargeAmount.toString().toText24(isBold: true), AppColors.blackColor, 15.h, isSaudiCurrency: true), Utils.getPaymentAmountWithSymbol(
NumberFormat.decimalPattern().format(habibWalletVM.walletRechargeAmount).toString().toText24(isBold: true, isEnglishOnly: true), AppColors.blackColor, 15.h,
isSaudiCurrency: true),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 12.h), SizedBox(height: 12.h),

@ -1,6 +1,7 @@
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: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/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
@ -57,7 +58,9 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
SizedBox( SizedBox(
width: 12.w, width: 12.w,
), ),
Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, width: 24.w, height: 24.h, fit: BoxFit.contain, iconColor: AppColors.textColor), Transform.flip(
flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, width: 24.w, height: 24.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
], ],
).paddingAll(16.w)) ).paddingAll(16.w))
.onPress(() { .onPress(() {
@ -86,7 +89,9 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
), ),
), ),
SizedBox(width: 12.w), SizedBox(width: 12.w),
Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, width: 24.w, height: 24.h, fit: BoxFit.contain, iconColor: AppColors.textColor), Transform.flip(
flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, width: 24.w, height: 24.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
], ],
).paddingAll(16.w)) ).paddingAll(16.w))
.onPress(() { .onPress(() {

@ -2,6 +2,8 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.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/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/route_extensions.dart'; import 'package:hmg_patient_app_new/extensions/route_extensions.dart';
@ -56,12 +58,15 @@ Widget buildHealthTrackerCard({
), ),
), ),
SizedBox(width: 12.w), SizedBox(width: 12.w),
Utils.buildSvgWithAssets( Transform.flip(
icon: AppAssets.arrowRight, flipX: getIt.get<AppState>().isArabic(),
width: 24.w, child: Utils.buildSvgWithAssets(
height: 24.h, icon: AppAssets.arrowRight,
fit: BoxFit.contain, width: 24.w,
iconColor: AppColors.textColor, height: 24.h,
fit: BoxFit.contain,
iconColor: AppColors.textColor,
),
), ),
], ],
).paddingAll(16.w), ).paddingAll(16.w),

@ -16,6 +16,8 @@ import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
class InsuranceApprovalDetailsPage extends StatelessWidget { class InsuranceApprovalDetailsPage extends StatelessWidget {
InsuranceApprovalDetailsPage({super.key, required this.insuranceApprovalResponseModel}); InsuranceApprovalDetailsPage({super.key, required this.insuranceApprovalResponseModel});
@ -36,7 +38,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 24.h, borderRadius: 24.h,
hasShadow: true, hasShadow: false,
), ),
child: Padding( child: Padding(
padding: EdgeInsets.all(14.h), padding: EdgeInsets.all(14.h),
@ -84,21 +86,42 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
(insuranceApprovalResponseModel.doctorName!).toText16(isBold: true), (insuranceApprovalResponseModel.doctorName!).toText16(isBold: true),
SizedBox(height: 8.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 3.h, spacing: 3.h,
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: insuranceApprovalResponseModel.clinicName!), AppCustomChipWidget(labelText: insuranceApprovalResponseModel.clinicName!),
AppCustomChipWidget(labelText: "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}"), AppCustomChipWidget(labelText: "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}", isEnglishOnly: true),
AppCustomChipWidget(labelText: "${LocaleKeys.unusedCount.tr(context: context)} ${insuranceApprovalResponseModel.unUsedCount}"), AppCustomChipWidget(labelText: "${LocaleKeys.unusedCount.tr(context: context)} ${insuranceApprovalResponseModel.unUsedCount}", isEnglishOnly: true),
AppCustomChipWidget(labelText: "${LocaleKeys.companyName.tr(context: context)} ${insuranceApprovalResponseModel.companyName}"), AppCustomChipWidget(labelText: "${LocaleKeys.companyName.tr(context: context)} ${insuranceApprovalResponseModel.companyName}"),
AppCustomChipWidget( AppCustomChipWidget(
labelText: richText: Row(
"${LocaleKeys.receiptOn.tr(context: context)} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.receiptOn), false)}"), mainAxisSize: MainAxisSize.min,
children: [
"${LocaleKeys.receiptOn.tr(context: context)} ".toText10(),
Directionality(
textDirection: ui.TextDirection.ltr,
child: DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.receiptOn), false).toText10(isEnglishOnly: true)),
],
),
isEnglishOnly: true,
),
AppCustomChipWidget( AppCustomChipWidget(
labelText: richText: Row(
"${LocaleKeys.expiryOn.tr(context: context)} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.expiryDate), false)}"), mainAxisSize: MainAxisSize.min,
children: [
"${LocaleKeys.expiryOn.tr(context: context)} ".toText10(),
Directionality(
textDirection: ui.TextDirection.ltr,
child: DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.expiryDate), false).toText10(isEnglishOnly: true)),
],
),
isEnglishOnly: true,
),
], ],
), ),
], ],
@ -115,7 +138,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 24.h, borderRadius: 24.h,
hasShadow: true, hasShadow: false,
), ),
child: Padding( child: Padding(
padding: EdgeInsets.all(16.h), padding: EdgeInsets.all(16.h),
@ -138,7 +161,6 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
child: AnimatedContainer( child: AnimatedContainer(
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
curve: Curves.easeInOut, curve: Curves.easeInOut,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

@ -15,6 +15,8 @@ import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.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 'dart:ui' as ui;
class InsuranceApprovalCard extends StatelessWidget { class InsuranceApprovalCard extends StatelessWidget {
InsuranceApprovalCard({super.key, required this.insuranceApprovalResponseModel, required this.isLoading, required this.appState}); InsuranceApprovalCard({super.key, required this.insuranceApprovalResponseModel, required this.isLoading, required this.appState});
@ -88,6 +90,7 @@ class InsuranceApprovalCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
(isLoading ? "John Smith" : insuranceApprovalResponseModel.doctorName!).toText16(isBold: true).toShimmer2(isShow: isLoading), (isLoading ? "John Smith" : insuranceApprovalResponseModel.doctorName!).toText16(isBold: true).toShimmer2(isShow: isLoading),
SizedBox(height: 8.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 3.h, spacing: 3.h,
@ -98,14 +101,17 @@ class InsuranceApprovalCard extends StatelessWidget {
// textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor, // textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
// ).toShimmer2(isShow: isLoading), // ).toShimmer2(isShow: isLoading),
AppCustomChipWidget(labelText: isLoading ? "Cardiology" : insuranceApprovalResponseModel.clinicName!).toShimmer2(isShow: isLoading), AppCustomChipWidget(labelText: isLoading ? "Cardiology" : insuranceApprovalResponseModel.clinicName!).toShimmer2(isShow: isLoading),
AppCustomChipWidget( Directionality(
icon: AppAssets.doctor_calendar_icon, textDirection: ui.TextDirection.ltr,
labelText: isLoading ? "Cardiology" : DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.submitOn), false)) child: AppCustomChipWidget(
.toShimmer2(isShow: isLoading), icon: AppAssets.doctor_calendar_icon,
labelText: isLoading ? "Cardiology" : DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.submitOn), false), isEnglishOnly: true,)
.toShimmer2(isShow: isLoading),
),
isLoading isLoading
? SizedBox.shrink() ? SizedBox.shrink()
: AppCustomChipWidget( : AppCustomChipWidget(
labelText: isLoading ? LocaleKeys.approvalNo.tr(context: context) : "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}") labelText: isLoading ? LocaleKeys.approvalNo.tr(context: context) : "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}", isEnglishOnly: true,)
.toShimmer2(isShow: isLoading), .toShimmer2(isShow: isLoading),
], ],
), ),

@ -59,7 +59,7 @@ class PatientInsuranceCardUpdateCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
insuranceViewModel.patientInsuranceUpdateResponseModel!.memberName!.toText16(weight: FontWeight.w600), insuranceViewModel.patientInsuranceUpdateResponseModel!.memberName!.toText16(weight: FontWeight.w600),
"Policy: ${insuranceViewModel.patientInsuranceUpdateResponseModel!.policyNumber}".toText12(isBold: true, color: AppColors.lightGrayColor), LocaleKeys.policyNumberInsurancePage.tr(namedArgs: {'number': insuranceViewModel.patientInsuranceUpdateResponseModel!.policyNumber.toString()}).toText12(isBold: true, color: AppColors.lightGrayColor, isEnglishOnly: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Row( Row(
children: [ children: [
@ -87,9 +87,10 @@ class PatientInsuranceCardUpdateCard extends StatelessWidget {
icon: AppAssets.doctor_calendar_icon, icon: AppAssets.doctor_calendar_icon,
labelText: labelText:
"${LocaleKeys.expiryOn.tr(context: context)} ${DateUtil.formatDateToDate(DateTime.parse(insuranceViewModel.patientInsuranceUpdateResponseModel!.effectiveTo!), false)}", "${LocaleKeys.expiryOn.tr(context: context)} ${DateUtil.formatDateToDate(DateTime.parse(insuranceViewModel.patientInsuranceUpdateResponseModel!.effectiveTo!), false)}",
isEnglishOnly: true,
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Member ID: ${insuranceViewModel.patientInsuranceUpdateResponseModel!.memberID!}", labelText: "Member ID: ${insuranceViewModel.patientInsuranceUpdateResponseModel!.memberID!}", isEnglishOnly: true,
), ),
], ],
), ),

@ -54,11 +54,12 @@ class PatientInsuranceCard extends StatelessWidget {
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.4, width: MediaQuery.of(context).size.width * 0.4,
child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true, textOverflow: TextOverflow.clip, isEnglishOnly: true)), child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true, textOverflow: TextOverflow.clip, isEnglishOnly: true)),
Row( LocaleKeys.policyNumberInsurancePage.tr(namedArgs: {'number': insuranceCardDetailsModel.insurancePolicyNo.toString()}).toText12(isBold: true, color: AppColors.lightGrayColor, isEnglishOnly: true),
children: [ // Row(
"${LocaleKeys.policyNumber.tr(context: context)}${insuranceCardDetailsModel.insurancePolicyNo}".toText12(isBold: true, color: AppColors.lightGrayColor), // children: [
], // "${LocaleKeys.policyNumber.tr(context: context)}${insuranceCardDetailsModel.insurancePolicyNo}".toText12(isBold: true, color: AppColors.lightGrayColor),
), // ],
// ),
], ],
), ),
isShowButtons ? AppCustomChipWidget( isShowButtons ? AppCustomChipWidget(

@ -199,11 +199,12 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
], ],
), ),
SizedBox(width: 4.h), SizedBox(width: 4.h),
Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, height: 22.h, width: 22.w) Transform.flip(flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, height: 22.h, width: 22.w))
], ],
).onPress(() { ).onPress(() {
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
direction: AxisDirection.down,
page: FamilyMedicalScreen(), page: FamilyMedicalScreen(),
), ),
); );

@ -20,6 +20,8 @@ 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:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
class MyInvoicesDetailsPage extends StatefulWidget { class MyInvoicesDetailsPage extends StatefulWidget {
GetInvoiceDetailsResponseModel getInvoiceDetailsResponseModel; GetInvoiceDetailsResponseModel getInvoiceDetailsResponseModel;
GetInvoicesListResponseModel getInvoicesListResponseModel; GetInvoicesListResponseModel getInvoicesListResponseModel;
@ -147,7 +149,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
(getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.doctorNameN! : widget.getInvoiceDetailsResponseModel.doctorName!).toText16(isBold: true), (getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.doctorNameN ?? LocaleKeys.doctor.tr(context: context) : widget.getInvoiceDetailsResponseModel.doctorName!).toText16(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
@ -155,23 +157,28 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
runSpacing: 6.h, runSpacing: 6.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${LocaleKeys.invoiceNo}: ${widget.getInvoiceDetailsResponseModel.invoiceNo!}", labelText: "${LocaleKeys.invoiceNo.tr(context: context)}: ${widget.getInvoiceDetailsResponseModel.invoiceNo!}",
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w), labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
isEnglishOnly: true,
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: (widget.getInvoiceDetailsResponseModel.clinicDescription!.length > 15 labelText: ((getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.clinicDescriptionN : widget.getInvoiceDetailsResponseModel.clinicDescription ?? "")!.length > 15
? '${widget.getInvoiceDetailsResponseModel.clinicDescription!.substring(0, 12)}...' ? '${widget.getInvoiceDetailsResponseModel.clinicDescription!.substring(0, 12)}...'
: widget.getInvoiceDetailsResponseModel.clinicDescription!), : getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.clinicDescriptionN : widget.getInvoiceDetailsResponseModel.clinicDescription ?? ""),
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w), labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: widget.getInvoiceDetailsResponseModel.projectName!, labelText: widget.getInvoiceDetailsResponseModel.projectName!,
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w), labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
), ),
AppCustomChipWidget( Directionality(
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w), textDirection: ui.TextDirection.ltr,
icon: AppAssets.doctor_calendar_icon, child: AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.getInvoiceDetailsResponseModel.appointmentDate), false), labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.getInvoiceDetailsResponseModel.appointmentDate), false),
isEnglishOnly: true,
),
), ),
], ],
), ),
@ -196,12 +203,12 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Insurance Details".toText16(isBold: true), LocaleKeys.insurance.tr(context: context).toText16(isBold: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
widget.getInvoiceDetailsResponseModel.groupName!.toText14(isBold: true), (getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.groupNameN : widget.getInvoiceDetailsResponseModel.groupName)!.toText14(isBold: true),
Row( Row(
children: [ children: [
Expanded(child: widget.getInvoiceDetailsResponseModel.companyName!.toText14(isBold: true)), Expanded(child: (widget.getInvoiceDetailsResponseModel.companyName ?? "").toText14(isBold: true)),
], ],
), ),
SizedBox(height: 12.h), SizedBox(height: 12.h),
@ -210,6 +217,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Insurance ID: ${widget.getInvoiceDetailsResponseModel.insuranceID ?? "-"}", labelText: "Insurance ID: ${widget.getInvoiceDetailsResponseModel.insuranceID ?? "-"}",
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w), labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
isEnglishOnly: true,
), ),
], ],
), ),
@ -254,9 +262,9 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
child: Row( child: Row(
children: [ children: [
Expanded(flex: 3, child: (consultation.procedureName ?? '-').toText12(fontWeight: FontWeight.w500)), Expanded(flex: 3, child: (consultation.procedureName ?? '-').toText12(fontWeight: FontWeight.w500)),
Expanded(flex: 1, child: '${consultation.quantity ?? '-'}'.toText12(fontWeight: FontWeight.w500, isCenter: true)), Expanded(flex: 1, child: '${consultation.quantity ?? '-'}'.toText12(fontWeight: FontWeight.w500, isCenter: true, isEnglishOnly: true)),
Expanded(flex: 2, child: '${NumberFormat.decimalPattern().format(consultation.price) ?? '-'}'.toText12(fontWeight: FontWeight.w500, isCenter: true)), Expanded(flex: 2, child: (NumberFormat.decimalPattern().format(consultation.price) ?? '-').toText12(fontWeight: FontWeight.w500, isCenter: true, isEnglishOnly: true)),
Expanded(flex: 2, child: '${NumberFormat.decimalPattern().format(consultation.total) ?? '-'}'.toText12(fontWeight: FontWeight.w500, isCenter: true)), Expanded(flex: 2, child: (NumberFormat.decimalPattern().format(consultation.total) ?? '-').toText12(fontWeight: FontWeight.w500, isCenter: true, isEnglishOnly: true)),
], ],
), ),
), ),
@ -291,7 +299,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
children: [ children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalShare).toString().toText16(isBold: true), AppColors.blackColor, 13, NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalShare).toString().toText16(isBold: true, isEnglishOnly: true), AppColors.blackColor, 13,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
@ -303,7 +311,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
NumberFormat.decimalPattern() NumberFormat.decimalPattern()
.format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalVATAmount!) .format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalVATAmount!)
.toString() .toString()
.toText14(isBold: true, color: AppColors.greyTextColor), .toText14(isBold: true, color: AppColors.greyTextColor, isEnglishOnly: true),
AppColors.greyTextColor, AppColors.greyTextColor,
13, 13,
isSaudiCurrency: true), isSaudiCurrency: true),
@ -318,7 +326,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
NumberFormat.decimalPattern() NumberFormat.decimalPattern()
.format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.discountAmount!) .format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.discountAmount!)
.toString() .toString()
.toText14(isBold: true, color: AppColors.primaryRedColor), .toText14(isBold: true, color: AppColors.primaryRedColor, isEnglishOnly: true),
AppColors.primaryRedColor, 13, AppColors.primaryRedColor, 13,
isSaudiCurrency: true), isSaudiCurrency: true),
], ],
@ -328,7 +336,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
children: [ children: [
LocaleKeys.paid.tr(context: context).toText14(isBold: true), LocaleKeys.paid.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.grandTotal!).toString().toText14(isBold: true, color: AppColors.textColor), NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.grandTotal!).toString().toText14(isBold: true, color: AppColors.textColor, isEnglishOnly: true),
AppColors.textColor, AppColors.textColor,
13, 13,
isSaudiCurrency: true), isSaudiCurrency: true),

@ -14,6 +14,8 @@ 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/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'dart:ui' as ui;
class InvoiceListCard extends StatelessWidget { class InvoiceListCard extends StatelessWidget {
final GetInvoicesListResponseModel getInvoicesListResponseModel; final GetInvoicesListResponseModel getInvoicesListResponseModel;
Function? onTap; Function? onTap;
@ -102,8 +104,9 @@ class InvoiceListCard extends StatelessWidget {
runSpacing: 6.h, runSpacing: 6.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${LocaleKeys.invoiceNo}: ${getInvoicesListResponseModel.invoiceNo!}", labelText: "${LocaleKeys.invoiceNo.tr(context: context)}: ${getInvoicesListResponseModel.invoiceNo!}",
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w), labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
isEnglishOnly: true,
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
@ -114,10 +117,14 @@ class InvoiceListCard extends StatelessWidget {
labelText: getInvoicesListResponseModel.projectName!, labelText: getInvoicesListResponseModel.projectName!,
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w), labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
), ),
AppCustomChipWidget( Directionality(
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w), textDirection: ui.TextDirection.ltr,
icon: AppAssets.doctor_calendar_icon, child: AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(getInvoicesListResponseModel.appointmentDate), false), labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(getInvoicesListResponseModel.appointmentDate), false),
isEnglishOnly: true,
),
), ),
], ],
), ),

@ -154,6 +154,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
icon: AppAssets.rating_icon, icon: AppAssets.rating_icon,
iconColor: AppColors.ratingColorYellow, iconColor: AppColors.ratingColorYellow,
labelText: LocaleKeys.ratingValue.tr(namedArgs: {'rating': widget.prescriptionsResponseModel.decimalDoctorRate.toString()}, context: context), labelText: LocaleKeys.ratingValue.tr(namedArgs: {'rating': widget.prescriptionsResponseModel.decimalDoctorRate.toString()}, context: context),
isEnglishOnly: true,
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: widget.prescriptionsResponseModel.name ?? "", labelText: widget.prescriptionsResponseModel.name ?? "",

@ -68,7 +68,7 @@ class PrescriptionItemView extends StatelessWidget {
labelText: "${LocaleKeys.dailyDoses.tr(context: context)}: ${isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].doseDailyQuantity}", labelText: "${LocaleKeys.dailyDoses.tr(context: context)}: ${isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].doseDailyQuantity}",
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${LocaleKeys.days.tr(context: context)}: ${isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].days}", labelText: "${LocaleKeys.days.tr(context: context)}: ${isLoading ? "" : prescriptionVM.prescriptionDetailsList[index].days}", isEnglishOnly: true,
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
], ],
).paddingSymmetrical(16.h, 0.h), ).paddingSymmetrical(16.h, 0.h),

@ -1,4 +1,3 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.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/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart';
@ -8,6 +7,8 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/appointment_details_resp_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/appointment_details_resp_model.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'dart:ui' as ui;
class BuildDoctorRow extends StatelessWidget { class BuildDoctorRow extends StatelessWidget {
bool isForClinic = false; bool isForClinic = false;
AppointmentDetails? appointmentDetails; AppointmentDetails? appointmentDetails;
@ -49,6 +50,7 @@ class BuildDoctorRow extends StatelessWidget {
icon: AppAssets.ic_date_filter, icon: AppAssets.ic_date_filter,
labelText: labelText:
DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false), DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false),
isEnglishOnly: true,
), ),
AppCustomChipWidget( AppCustomChipWidget(
@ -70,10 +72,14 @@ class BuildDoctorRow extends StatelessWidget {
labelText: labelText:
appointmentDetails!.clinicName.toString(), appointmentDetails!.clinicName.toString(),
), ),
AppCustomChipWidget( Directionality(
labelPadding: EdgeInsetsDirectional.only(start: -8.w, end: 6.w), textDirection: ui.TextDirection.ltr,
icon: AppAssets.ic_date_filter, child: AppCustomChipWidget(
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false), labelPadding: EdgeInsetsDirectional.only(start: -8.w, end: 6.w),
icon: AppAssets.ic_date_filter,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false),
isEnglishOnly: true,
),
), ),
], ],
), ),

@ -35,7 +35,7 @@ class AncillaryOrderPaymentPage extends StatefulWidget {
final int orderNo; final int orderNo;
final int projectID; final int projectID;
final List<AncillaryOrderProcDetail> selectedProcedures; final List<AncillaryOrderProcDetail> selectedProcedures;
final double totalAmount; final num totalAmount;
const AncillaryOrderPaymentPage({ const AncillaryOrderPaymentPage({
super.key, super.key,

@ -24,6 +24,8 @@ import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.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:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
class AncillaryOrderDetailsList extends StatefulWidget { class AncillaryOrderDetailsList extends StatefulWidget {
final int appointmentNoVida; final int appointmentNoVida;
final int orderNo; final int orderNo;
@ -114,12 +116,13 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
} }
} }
double _getTotalAmount() { num _getTotalAmount() {
double total = 0.0; num total = 0.0;
for (var proc in selectedProcedures) { for (var proc in selectedProcedures) {
total += (proc.patientShareWithTax ?? 0); total += (proc.patientShareWithTax ?? 0);
} }
return total; return total;
// return 1234.50;
} }
@override @override
@ -253,8 +256,9 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
// icon: AppAssets.file_icon, // icon: AppAssets.file_icon,
labelText: "MRN: ${patientMRN ?? 'N/A'}", labelText: "${LocaleKeys.fileno.tr(context: context)}: ${patientMRN ?? 'N/A'}",
iconSize: 12.w, iconSize: 12.w,
isEnglishOnly: true,
), ),
// National ID // National ID
@ -263,20 +267,23 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
// icon: AppAssets.card_user, // icon: AppAssets.card_user,
labelText: "ID: $nationalID", labelText: "ID: $nationalID",
iconSize: 12.w, iconSize: 12.w,
isEnglishOnly: true,
), ),
// Appointment Number // Appointment Number
if (orderData.appointmentNo != null) if (orderData.appointmentNo != null)
AppCustomChipWidget( AppCustomChipWidget(
// icon: AppAssets.calendar, // icon: AppAssets.calendar,
labelText: "Appt #: ${orderData.appointmentNo}", labelText: "${LocaleKeys.appointment.tr(context: context)}: ${orderData.appointmentNo}",
iconSize: 12.w, iconSize: 12.w,
isEnglishOnly: true,
), ),
// Order Number // Order Number
if (orderData.ancillaryOrderProcDetailsList?.firstOrNull?.orderNo != null) if (orderData.ancillaryOrderProcDetailsList?.firstOrNull?.orderNo != null)
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Order #: ${orderData.ancillaryOrderProcDetailsList!.first.orderNo}", labelText: "Order #: ${orderData.ancillaryOrderProcDetailsList!.first.orderNo}",
isEnglishOnly: true,
), ),
// Blood Group // Blood Group
@ -297,12 +304,14 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
backgroundColor: AppColors.successColor.withValues(alpha: 0.15), backgroundColor: AppColors.successColor.withValues(alpha: 0.15),
iconSize: 12.w, iconSize: 12.w,
labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 8.w), labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 8.w),
isEnglishOnly: true,
), ),
// Policy Number // Policy Number
if (orderData.insurancePolicyNo != null && orderData.insurancePolicyNo!.isNotEmpty) if (orderData.insurancePolicyNo != null && orderData.insurancePolicyNo!.isNotEmpty)
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Policy: ${orderData.insurancePolicyNo}", labelText: "${LocaleKeys.policyNumber.tr(context: context)}: ${orderData.insurancePolicyNo}",
isEnglishOnly: true,
), ),
AppCustomChipWidget( AppCustomChipWidget(
@ -317,8 +326,12 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
labelText: "Clinic: ${orderData.clinicName!}", labelText: "Clinic: ${orderData.clinicName!}",
), ),
if (orderData.clinicName != null && orderData.clinicName!.isNotEmpty) if (orderData.clinicName != null && orderData.clinicName!.isNotEmpty)
AppCustomChipWidget( Directionality(
labelText: "Date: ${DateFormat('MMM dd, yyyy').format(orderData.appointmentDate!)}", textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget(
labelText: "${LocaleKeys.date.tr(context: context)}: ${DateFormat('MMM dd yyyy').format(orderData.appointmentDate!)}",
isEnglishOnly: true,
),
), ),
], ],
), ),
@ -557,7 +570,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Row( Row(
children: [ children: [
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
(procedure.patientShare ?? 0).toStringAsFixed(2).toText13(weight: FontWeight.w600), (procedure.patientShare ?? 0).toStringAsFixed(2).toText14(weight: FontWeight.w600, isEnglishOnly: true),
AppColors.textColorLight, AppColors.textColorLight,
13, 13,
isSaudiCurrency: true, isSaudiCurrency: true,
@ -576,7 +589,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Row( Row(
children: [ children: [
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
(procedure.patientTaxAmount ?? 0).toStringAsFixed(2).toText13(weight: FontWeight.w600), (procedure.patientTaxAmount ?? 0).toStringAsFixed(2).toText12(fontWeight: FontWeight.w600, isEnglishOnly: true),
AppColors.textColorLight, AppColors.textColorLight,
13, 13,
isSaudiCurrency: true, isSaudiCurrency: true,
@ -595,7 +608,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Row( Row(
children: [ children: [
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
(procedure.patientShareWithTax ?? 0).toStringAsFixed(2).toText13(weight: FontWeight.w600), (procedure.patientShareWithTax ?? 0).toStringAsFixed(2).toText12(fontWeight: FontWeight.w600, isEnglishOnly: true),
AppColors.textColorLight, AppColors.textColorLight,
13, 13,
isSaudiCurrency: true, isSaudiCurrency: true,
@ -646,7 +659,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Utils.getPaymentAmountWithSymbol(_getTotalAmount().toStringAsFixed(2).toText24(isBold: true), AppColors.blackColor, 17, isSaudiCurrency: true), Utils.getPaymentAmountWithSymbol(NumberFormat.decimalPattern().format(_getTotalAmount()).toText24(isBold: true, isEnglishOnly: true), AppColors.blackColor, 17, isSaudiCurrency: true),
], ],
), ),
], ],

@ -15,6 +15,8 @@ import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.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 'dart:ui' as ui;
class AncillaryOrdersList extends StatelessWidget { class AncillaryOrdersList extends StatelessWidget {
final List<AncillaryOrderItem> orders; final List<AncillaryOrderItem> orders;
final Function(AncillaryOrderItem order)? onCheckIn; final Function(AncillaryOrderItem order)? onCheckIn;
@ -173,20 +175,26 @@ class AncillaryOrderCard extends StatelessWidget {
if (order.orderNo != null || isLoading) if (order.orderNo != null || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
// icon: AppAssets.calendar, // icon: AppAssets.calendar,
labelText: "${LocaleKeys.orderNumber.tr(context: context)}${order.orderNo ?? '-'}", labelText: "${LocaleKeys.orderNumber.tr(context: context)}${order.orderNo ?? '-'}",
).toShimmer2(isShow: isLoading), isEnglishOnly: true)
.toShimmer2(isShow: isLoading),
// Appointment Date // Appointment Date
if (order.appointmentDate != null || isLoading) if (order.appointmentDate != null || isLoading)
AppCustomChipWidget( Directionality(
icon: AppAssets.appointment_calendar_icon, textDirection: ui.TextDirection.ltr,
labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!), child: AppCustomChipWidget(
).toShimmer2(isShow: isLoading), icon: AppAssets.appointment_calendar_icon,
labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!),
isEnglishOnly: true,
).toShimmer2(isShow: isLoading),
),
// Appointment Number // Appointment Number
if (order.appointmentNo != null || isLoading) if (order.appointmentNo != null || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: isLoading ? "Appt# : 98765" : "Appt #: ${order.appointmentNo}", labelText: isLoading ? "Appt# : 98765" : "${LocaleKeys.appointment.tr(context: context)}: ${order.appointmentNo}",
isEnglishOnly: true,
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Invoice Number // Invoice Number

@ -16,6 +16,8 @@ import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/graph/custom_graph.dart'; import 'package:hmg_patient_app_new/widgets/graph/custom_graph.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'dart:ui' as ui;
/// Which vital sign is being shown in the details screen. /// Which vital sign is being shown in the details screen.
enum VitalSignMetric { enum VitalSignMetric {
bmi, bmi,
@ -139,15 +141,13 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
title.toText28(isBold: true, color: AppColors.textColor, letterSpacing: -1), title.toText28(isBold: true, color: AppColors.textColor, letterSpacing: -1),
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
(latestDate != null (latestDate != null
? LocaleKeys.resultOf.tr(namedArgs: {'date': latestDate.toString().split(' ').first}) ? LocaleKeys.resultOf.tr(namedArgs: {'date': latestDate.toString().split(' ').first})
: LocaleKeys.resultOfNoDate.tr(context: context)) : LocaleKeys.resultOfNoDate.tr(context: context))
.toText11(weight: FontWeight.w500, color: AppColors.greyTextColor), .toText11(weight: FontWeight.w500, color: AppColors.greyTextColor, isEnglishOnly: true),
], ],
), ),
Row( Row(
@ -430,10 +430,14 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
dp.displayTime.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), dp.displayTime.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500, isEnglishOnly: true),
valueText.toText12( Directionality(
color: AppColors.textColor, textDirection: ui.TextDirection.ltr,
fontWeight: FontWeight.w600, child: valueText.toText12(
color: AppColors.textColor,
fontWeight: FontWeight.w600,
isEnglishOnly: true
),
), ),
], ],
), ),
@ -756,7 +760,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
top: 8.0, top: 8.0,
right: isLast ? 16.h : 0, right: isLast ? 16.h : 0,
), ),
child: label.toText8(fontWeight: FontWeight.w500), child: label.toText10(weight: FontWeight.w500, isEnglishOnly: true),
); );
} }

@ -192,7 +192,7 @@ class CustomGraph extends StatelessWidget {
return LineTooltipItem( return LineTooltipItem(
'${dataPoint.actualValue} ${dataPoint.unitOfMeasurement ?? ""} - ${dataPoint.displayTime}', '${dataPoint.actualValue} ${dataPoint.unitOfMeasurement ?? ""} - ${dataPoint.displayTime}',
TextStyle(color: Colors.black, fontSize: 12.f, fontWeight: FontWeight.w500), TextStyle(color: Colors.black, fontSize: 12.f, fontWeight: FontWeight.w500, fontFamily: "Poppins"),
); );
}).toList(); }).toList();
}, },

@ -159,8 +159,8 @@ class TextInputWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
_buildLabelText(labelColor).paddingOnly( _buildLabelText(labelColor).paddingOnly(
right: (appState.getLanguageCode() == "ar" ? 10 : 0), right: (appState.isArabic() ? 10 : 10),
left: (appState.getLanguageCode() == "en" ? 10 : 0), left: (!appState.isArabic() ? 10 : 10),
), ),
Row( Row(
children: [ children: [
@ -230,7 +230,8 @@ class TextInputWidget extends StatelessWidget {
language: appState.getLanguageCode()!, language: appState.getLanguageCode()!,
initialDate: DateTime.now(), initialDate: DateTime.now(),
showCalendarToggle: isHideSwitcher == true ? false : true, showCalendarToggle: isHideSwitcher == true ? false : true,
fontFamily: appState.getLanguageCode() == "ar" ? "GESSTwo" : "Poppins", // fontFamily: appState.getLanguageCode() == "ar" ? "GESSTwo" : "Poppins",
fontFamily: "Poppins",
okWidget: Padding(padding: EdgeInsets.only(right: 8.h), child: Utils.buildSvgWithAssets(icon: AppAssets.confirm, width: 24.h, height: 24.h)), okWidget: Padding(padding: EdgeInsets.only(right: 8.h), child: Utils.buildSvgWithAssets(icon: AppAssets.confirm, width: 24.h, height: 24.h)),
cancelWidget: Padding(padding: EdgeInsets.only(right: 8.h), child: Utils.buildSvgWithAssets(icon: AppAssets.cancel, iconColor: Colors.white, width: 24.h, height: 24.h)), cancelWidget: Padding(padding: EdgeInsets.only(right: 8.h), child: Utils.buildSvgWithAssets(icon: AppAssets.cancel, iconColor: Colors.white, width: 24.h, height: 24.h)),
onCalendarTypeChanged: (bool value) { onCalendarTypeChanged: (bool value) {

Loading…
Cancel
Save