pull/204/head
haroon amjad 1 day ago
parent 078b236b67
commit 841fca027c

@ -1597,8 +1597,9 @@
"tests": "تحليل", "tests": "تحليل",
"calendarPermissionAlert": "يرجى منح إذن الوصول إلى التقويم من إعدادات التطبيق لضبط تذكير تناول الدواء.", "calendarPermissionAlert": "يرجى منح إذن الوصول إلى التقويم من إعدادات التطبيق لضبط تذكير تناول الدواء.",
"sortByNearestLocation": "فرز حسب الأقرب إلى موقعك", "sortByNearestLocation": "فرز حسب الأقرب إلى موقعك",
"giveLocationPermissionForNearestList": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق لعرض أقرب المواقع." "giveLocationPermissionForNearestList": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق لعرض أقرب المواقع.",
"sortByLocation": "الترتيب حسب الموقع", "sortByLocation": "الترتيب حسب الموقع",
"timeForFirstReminder": "وقت التذكير الأول", "timeForFirstReminder": "وقت التذكير الأول",
"reminderRemovalNote": "يمكنك إزالتها من التقويم الخاص بك لاحقاً عن طريق إيقاف تشغيل التذكير" "reminderRemovalNote": "يمكنك إزالتها من التقويم الخاص بك لاحقاً عن طريق إيقاف تشغيل التذكير",
"communicationLanguage": "لغة التواصل"
} }

@ -1591,8 +1591,9 @@
"tests": "tests", "tests": "tests",
"calendarPermissionAlert": "Please grant calendar access permission from app settings to set medication reminder.", "calendarPermissionAlert": "Please grant calendar access permission from app settings to set medication reminder.",
"timeForFirstReminder": "Time for 1st reminder", "timeForFirstReminder": "Time for 1st reminder",
"reminderRemovalNote": "You can remove it from your calendar later by switching off the reminder" "reminderRemovalNote": "You can remove it from your calendar later by switching off the reminder",
"sortByLocation": "Sort by location", "sortByLocation": "Sort by location",
"sortByNearestLocation": "Sort by nearest to your location", "sortByNearestLocation": "Sort by nearest to your location",
"giveLocationPermissionForNearestList": "Please grant location permission from app settings to see the nearest locations." "giveLocationPermissionForNearestList": "Please grant location permission from app settings to see the nearest locations.",
"communicationLanguage": "Communication Language"
} }

@ -382,7 +382,7 @@ class Utils {
children: [ children: [
Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h), SizedBox(height: 8.h),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor), (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 8.h), SizedBox(height: 8.h),
], ],
).center; ).center;
@ -396,7 +396,7 @@ class Utils {
Lottie.asset(AppAnimations.errorAnimation, Lottie.asset(AppAnimations.errorAnimation,
repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h), SizedBox(height: 8.h),
(loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor), (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 8.h), SizedBox(height: 8.h),
], ],
).center; ).center;
@ -749,20 +749,20 @@ class Utils {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Image.asset(AppAssets.mada, width: 25.h, height: 25.h), Image.asset(AppAssets.mada, width: 35.h, height: 35.h),
Image.asset( Image.asset(
AppAssets.tamaraEng, AppAssets.tamaraEng,
width: 25.h, width: 35.h,
height: 25.h, height: 35.h,
fit: BoxFit.contain, fit: BoxFit.contain,
errorBuilder: (context, error, stackTrace) { errorBuilder: (context, error, stackTrace) {
debugPrint('Failed to load Tamara PNG in payment methods: $error'); debugPrint('Failed to load Tamara PNG in payment methods: $error');
return Utils.buildSvgWithAssets(icon: AppAssets.tamara, width: 25.h, height: 25.h, fit: BoxFit.contain); return Utils.buildSvgWithAssets(icon: AppAssets.tamara, width: 35.h, height: 35.h, fit: BoxFit.contain);
}, },
), ),
Image.asset(AppAssets.visa, width: 25.h, height: 25.h), Image.asset(AppAssets.visa, width: 35.h, height: 35.h),
Image.asset(AppAssets.mastercard, width: 25.h, height: 25.h), Image.asset(AppAssets.mastercard, width: 35.h, height: 25.h),
Image.asset(AppAssets.applePay, width: 25.h, height: 25.h), Image.asset(AppAssets.applePay, width: 35.h, height: 35.h),
], ],
); );
} }

@ -1590,10 +1590,11 @@ abstract class LocaleKeys {
static const verifyInsurance = 'verifyInsurance'; static const verifyInsurance = 'verifyInsurance';
static const tests = 'tests'; static const tests = 'tests';
static const calendarPermissionAlert = 'calendarPermissionAlert'; static const calendarPermissionAlert = 'calendarPermissionAlert';
static const sortByLocation = 'sortByLocation';
static const sortByNearestLocation = 'sortByNearestLocation'; static const sortByNearestLocation = 'sortByNearestLocation';
static const giveLocationPermissionForNearestList = 'giveLocationPermissionForNearestList'; static const giveLocationPermissionForNearestList = 'giveLocationPermissionForNearestList';
static const sortByLocation = 'sortByLocation';
static const timeForFirstReminder = 'timeForFirstReminder'; static const timeForFirstReminder = 'timeForFirstReminder';
static const reminderRemovalNote = 'reminderRemovalNote'; static const reminderRemovalNote = 'reminderRemovalNote';
static const communicationLanguage = 'communicationLanguage';
} }

@ -286,7 +286,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Positioned( Positioned(
bottom: 0, bottom: 0,
child: SizedBox( child: SizedBox(
width: MediaQuery.of(context).size.width * 0.785, width: MediaQuery.of(context).size.width - 85.w,
child: CustomButton( child: CustomButton(
onPressed: () async { onPressed: () async {
if (widget.patientAppointmentHistoryResponseModel.projectID == 130 || widget.patientAppointmentHistoryResponseModel.projectID == 120) { if (widget.patientAppointmentHistoryResponseModel.projectID == 130 || widget.patientAppointmentHistoryResponseModel.projectID == 120) {
@ -394,7 +394,6 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
}, },
isMultiAllowed: true, isMultiAllowed: true,
onMultiDateSuccess: (int selectedIndex) async { onMultiDateSuccess: (int selectedIndex) async {
isEventAddedOrRemoved = await calender.createOrUpdateEvent( isEventAddedOrRemoved = await calender.createOrUpdateEvent(
title: title:
"Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}", "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}",
@ -822,8 +821,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: LocaleKeys.upcomingPaymentNow child: LocaleKeys.upcomingPaymentNow
.tr(context: context) .tr(context: context)
.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)), .toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)),
"VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})" "VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})".toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -0.64),
.toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2),
], ],
), ),
SizedBox(height: 18.h), SizedBox(height: 18.h),
@ -831,7 +829,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox( SizedBox(
width: 150.h, width: 200.h,
child: Utils.getPaymentMethods(), child: Utils.getPaymentMethods(),
), ),
Row( Row(

@ -7,12 +7,14 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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/core/utils/utils.dart' show Utils; import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils;
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.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/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/hospital_bottom_sheet/hospital_list_items.dart'; import 'package:hmg_patient_app_new/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart';
import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors; import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors;
import 'package:hmg_patient_app_new/widgets/input_widget.dart'; import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:provider/provider.dart';
import '../../../emergency_services/call_ambulance/widgets/type_selection_widget.dart' show TypeSelectionWidget; import '../../../emergency_services/call_ambulance/widgets/type_selection_widget.dart' show TypeSelectionWidget;
@ -131,91 +133,104 @@ class HospitalBottomSheetBody extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<BookAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
return Column( if (myAppointmentsVM.isRegionListLoading) {
crossAxisAlignment: CrossAxisAlignment.start, return Container(
children: [ height: MediaQuery.of(context).size.height * 0.3,
TextInputWidget( decoration: BoxDecoration(
labelText: LocaleKeys.search.tr(context: context), color: AppColors.whiteColor,
hintText: LocaleKeys.searchHospital.tr(context: context), borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
controller: searchText, ),
onChange: (value) { child: Center(
debouncer.run((){ child: Utils.getLoadingWidget(),
onHospitalSearch(value??"");
});
},
isEnable: true,
prefix: null,
autoFocus: false,
isBorderAllowed: false,
keyboardType: TextInputType.text,
isAllowLeadingIcon: true,
selectionType: SelectionTypeEnum.search,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(10).h,
horizontal: ResponsiveExtension(15).h,
), ),
), );
SizedBox(height: 16.h), } else {
if (onSortByLocationToggle != null) return Column(
Padding( crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.symmetric(horizontal: 4.w), children: [
child: Row( TextInputWidget(
mainAxisAlignment: MainAxisAlignment.spaceBetween, labelText: LocaleKeys.search.tr(context: context),
children: [ hintText: LocaleKeys.searchHospital.tr(context: context),
Row( controller: searchText,
onChange: (value) {
debouncer.run(() {
onHospitalSearch(value ?? "");
});
},
isEnable: true,
prefix: null,
autoFocus: false,
isBorderAllowed: false,
keyboardType: TextInputType.text,
isAllowLeadingIcon: true,
selectionType: SelectionTypeEnum.search,
padding: EdgeInsets.symmetric(
vertical: ResponsiveExtension(10).h,
horizontal: ResponsiveExtension(15).h,
),
),
SizedBox(height: 16.h),
if (onSortByLocationToggle != null)
Padding(
padding: EdgeInsets.symmetric(horizontal: 4.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.location, iconColor: AppColors.greyTextColor, width: 18.h, height: 18.h), Row(
SizedBox(width: 8.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.sortByLocation.tr(context: context).toText14(isBold: true), Utils.buildSvgWithAssets(icon: AppAssets.location, iconColor: AppColors.greyTextColor, width: 18.h, height: 18.h),
// SizedBox(height: 4.h), SizedBox(width: 8.w),
LocaleKeys.sortByNearestLocation.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500), Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.sortByLocation.tr(context: context).toText14(isBold: true),
// SizedBox(height: 4.h),
LocaleKeys.sortByNearestLocation.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
],
),
], ],
), ),
Switch(
value: sortByLocation,
onChanged: onSortByLocationToggle,
activeThumbColor: AppColors.successColor,
activeTrackColor: AppColors.successColor.withValues(alpha: 0.15),
),
], ],
), ),
Switch(
value: sortByLocation,
onChanged: onSortByLocationToggle,
activeThumbColor: AppColors.successColor,
activeTrackColor: AppColors.successColor.withValues(alpha: 0.15),
),
],
),
),
if (onSortByLocationToggle != null) SizedBox(height: 8.h),
TypeSelectionWidget(
selectedFacility:selectedFacility ,
hmcCount: hmcCount.toString(),
hmgCount: hmgCount.toString(),
onitemClicked: (selectedValue){
onFacilityClicked(selectedValue);
},
),
SizedBox(height: 21.h),
SizedBox(
height: MediaQuery.sizeOf(context).height * .4,
child: ListView.separated(
itemBuilder: (_, index)
{
var hospital = displayList?[index];
return HospitalListItem(
hospitalData: hospital,
isLocationEnabled: sortByLocation,
).onPress(() {
onHospitalClicked(hospital!);
});},
separatorBuilder: (_, __) => SizedBox(
height: 16.h,
), ),
itemCount: displayList?.length ?? 0, if (onSortByLocationToggle != null) SizedBox(height: 8.h),
)) TypeSelectionWidget(
], selectedFacility: selectedFacility,
); hmcCount: hmcCount.toString(),
hmgCount: hmgCount.toString(),
onitemClicked: (selectedValue) {
onFacilityClicked(selectedValue);
},
),
SizedBox(height: 21.h),
SizedBox(
height: MediaQuery.sizeOf(context).height * .4,
child: ListView.separated(
itemBuilder: (_, index) {
var hospital = displayList?[index];
return HospitalListItem(
hospitalData: hospital,
isLocationEnabled: sortByLocation,
).onPress(() {
onHospitalClicked(hospital!);
});
},
separatorBuilder: (_, __) => SizedBox(
height: 16.h,
),
itemCount: displayList?.length ?? 0,
))
],
);
}
});
} }
} }

@ -188,7 +188,11 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
isShowConfirmDialog: true, isShowConfirmDialog: true,
onSuccess: (latLng) { onSuccess: (latLng) {
regionalViewModel.setSortByLocation(true); regionalViewModel.setSortByLocation(true);
myAppointmentsViewModel.getRegionMappedProjectList(); if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION || regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) {
myAppointmentsViewModel.getRegionMappedProjectList();
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
myAppointmentsViewModel.getMappedDoctors();
}
}, },
onFailure: () { onFailure: () {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
@ -236,7 +240,11 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
final appState = getIt.get<AppState>(); final appState = getIt.get<AppState>();
appState.resetLocation(); appState.resetLocation();
regionalViewModel.setSortByLocation(false); regionalViewModel.setSortByLocation(false);
myAppointmentsViewModel.getRegionMappedProjectList(); if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION || regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) {
myAppointmentsViewModel.getRegionMappedProjectList();
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
myAppointmentsViewModel.getMappedDoctors();
}
} }
} }
} }

@ -7,6 +7,7 @@ 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/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/int_extensions.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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';
@ -82,9 +83,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"), AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
AppCustomChipWidget( AppCustomChipWidget(labelText: "${LocaleKeys.gender.tr(context: context)}: ${appState.getAuthenticatedUser()?.gender == 1 ? LocaleKeys.malE.tr(context: context) : LocaleKeys.femaleGender.tr(context: context)}"),
labelText:
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceName) ?? ""}"),
], ],
), ),
], ],
@ -105,17 +104,28 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
), ),
child: Padding( child: Padding(
padding: EdgeInsets.all(16.h), padding: EdgeInsets.all(16.h),
child: Row( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppCustomChipWidget(
labelText:
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceName) ?? ""}"),
SizedBox(height: 16.h),
1.divider,
SizedBox(height: 16.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Utils.buildSvgWithAssets(icon: getLiveCareTypeIcon(immediateLiveCareVM.liveCareSelectedCallType), width: 32.h, height: 32.h, fit: BoxFit.contain, applyThemeColor: false), Row(
SizedBox(width: 8.h), children: [
getLiveCareType(context, immediateLiveCareVM.liveCareSelectedCallType).toText16(isBold: true), Utils.buildSvgWithAssets(icon: getLiveCareTypeIcon(immediateLiveCareVM.liveCareSelectedCallType), width: 32.h, height: 32.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(width: 8.h),
getLiveCareType(context, immediateLiveCareVM.liveCareSelectedCallType).toText16(isBold: true),
],
),
Utils.buildSvgWithAssets(icon: AppAssets.edit_icon, width: 24.h, height: 24.h, fit: BoxFit.contain),
], ],
), ),
Utils.buildSvgWithAssets(icon: AppAssets.edit_icon, width: 24.h, height: 24.h, fit: BoxFit.contain),
], ],
), ),
), ),
@ -202,7 +212,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox(width: 150.h, child: Utils.getPaymentMethods()), SizedBox(width: 200.h, child: Utils.getPaymentMethods()),
Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.blackColor, 17, Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.blackColor, 17,
isSaudiCurrency: (immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" || isSaudiCurrency: (immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" ||
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال")), immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال")),

@ -109,8 +109,8 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
SizedBox(height: 12.h), SizedBox(height: 12.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 8.h, spacing: 4.h,
runSpacing: 8.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${LocaleKeys.clinic.tr(context: context)}: ${bookAppointmentsViewModel.selectedDoctor.clinicName}", labelText: "${LocaleKeys.clinic.tr(context: context)}: ${bookAppointmentsViewModel.selectedDoctor.clinicName}",
@ -156,7 +156,15 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
children: [ children: [
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText16(isBold: true), "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText16(isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} Years Old"), Wrap(
direction: Axis.horizontal,
spacing: 4.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} Years Old"),
AppCustomChipWidget(labelText: "${LocaleKeys.gender.tr(context: context)}: ${appState.getAuthenticatedUser()?.gender == 1 ? LocaleKeys.malE.tr(context: context) : LocaleKeys.femaleGender.tr(context: context)}"),
],
),
], ],
), ),
], ],

@ -1340,6 +1340,13 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
} }
} }
bookAppointmentsViewModel.addListener(listener); bookAppointmentsViewModel.addListener(listener);
bookAppointmentsViewModel.getRegionMappedProjectList();
if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION || regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) {
bookAppointmentsViewModel.getRegionMappedProjectList();
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
bookAppointmentsViewModel.getMappedDoctors();
}
// bookAppointmentsViewModel.getRegionMappedProjectList();
} }
} }

@ -99,12 +99,12 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
showNavigationArrow: true, showNavigationArrow: true,
headerHeight: 60.h, headerHeight: 60.h,
headerStyle: CalendarHeaderStyle( headerStyle: CalendarHeaderStyle(
backgroundColor: AppColors.scaffoldBgColor, backgroundColor: AppColors.transparent,
textAlign: TextAlign.start, textAlign: TextAlign.start,
textStyle: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.primaryRedColor, fontFamily: "Poppins"), textStyle: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.primaryRedColor, fontFamily: "Poppins"),
), ),
viewHeaderStyle: ViewHeaderStyle( viewHeaderStyle: ViewHeaderStyle(
backgroundColor: AppColors.scaffoldBgColor, // backgroundColor: AppColors.scaffoldBgColor,
dayTextStyle: TextStyle(fontSize: 14.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.textColor, fontFamily: "Poppins"), dayTextStyle: TextStyle(fontSize: 14.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.textColor, fontFamily: "Poppins"),
), ),
view: CalendarView.month, view: CalendarView.month,

@ -127,23 +127,23 @@ class DoctorCard extends StatelessWidget {
spacing: 3.h, spacing: 3.h,
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(
labelText: "${isLoading ? "Cardiologist" : doctorsListResponseModel.clinicName}",
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText: "${isLoading ? "Olaya Hospital" : doctorsListResponseModel.projectName}",
).toShimmer2(isShow: isLoading),
bookAppointmentsViewModel.isNearestAppointmentSelected bookAppointmentsViewModel.isNearestAppointmentSelected
? doctorsListResponseModel.nearestFreeSlot != null ? doctorsListResponseModel.nearestFreeSlot != null
? AppCustomChipWidget( ? AppCustomChipWidget(
// labelText: (isLoading ? "Cardiologist" : DateUtil.getDateStringForNearestSlot(doctorsListResponseModel.nearestFreeSlot)), labelText: (isLoading ? "Cardiologist" : DateUtil.getDateStringForNearestSlot(doctorsListResponseModel.nearestFreeSlot)),
richText: (isLoading ? "Cardiologist" : DateUtil.getDateStringForNearestSlot(doctorsListResponseModel.nearestFreeSlot)) // richText: (isLoading ? "Cardiologist" : DateUtil.getDateStringForNearestSlot(doctorsListResponseModel.nearestFreeSlot))
.toText10(isEnglishOnly: true, color: AppColors.whiteColor), // .toText10(isEnglishOnly: true, color: AppColors.textColor),
backgroundColor: AppColors.successColor, // backgroundColor: AppColors.successColor,
textColor: AppColors.whiteColor, textColor: AppColors.textColor,
).toShimmer2(isShow: isLoading) ).toShimmer2(isShow: isLoading)
: SizedBox.shrink() : SizedBox.shrink()
: SizedBox.shrink(), : SizedBox.shrink(),
AppCustomChipWidget(
labelText: "${isLoading ? "Cardiologist" : doctorsListResponseModel.clinicName}",
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText: "${isLoading ? "Olaya Hospital" : doctorsListResponseModel.projectName}",
).toShimmer2(isShow: isLoading),
], ],
), ),
], ],
@ -155,7 +155,7 @@ class DoctorCard extends StatelessWidget {
), ),
], ],
), ),
SizedBox(height: 12.h), SizedBox(height: 16.h),
CustomButton( CustomButton(
text: LocaleKeys.bookAppo.tr(context: context), text: LocaleKeys.bookAppo.tr(context: context),
onPressed: () async { onPressed: () async {

@ -12,6 +12,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/rrt_request_type_select.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/rrt_request_type_select.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/ambulance_option_selection_bottomsheet.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/ambulance_option_selection_bottomsheet.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/pickup_location.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/pickup_location.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/history/er_history_listing.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/history/er_history_listing.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/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -284,64 +285,67 @@ class EmergencyServicesPage extends StatelessWidget {
Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, width: 13.h, height: 13.h), Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, width: 13.h, height: 13.h),
], ],
).onPress(() { ).onPress(() {
showCommonBottomSheetWithoutHeight( if (emergencyServicesViewModel.patientHasAdvanceERBalance) {
context, Navigator.of(context).push(CustomPageRoute(page: ErOnlineCheckinHome()));
child: Container( } else {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.primaryRedColor, borderRadius: 24.h), showCommonBottomSheetWithoutHeight(
child: Padding( context,
padding: EdgeInsets.all(24.h), child: Container(
child: Column( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.primaryRedColor, borderRadius: 24.h),
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: [ padding: EdgeInsets.all(24.h),
Row( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"".toText14(), Row(
Utils.buildSvgWithAssets( mainAxisAlignment: MainAxisAlignment.spaceBetween,
icon: AppAssets.cancel_circle_icon, children: [
iconColor: AppColors.whiteColor, "".toText14(),
width: 24.h, Utils.buildSvgWithAssets(
height: 24.h, icon: AppAssets.cancel_circle_icon,
fit: BoxFit.contain, iconColor: AppColors.whiteColor,
).onPress(() { width: 24.h,
height: 24.h,
fit: BoxFit.contain,
).onPress(() {
Navigator.of(context).pop();
}),
],
),
Lottie.asset(AppAnimations.ambulanceAlert, repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h),
LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true),
SizedBox(height: 8.h),
LocaleKeys.areYouSureYouWantToMakeERCheckIn.tr().toText14(color: Colors.white, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
text: LocaleKeys.confirm.tr(context: context),
onPressed: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
}), LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingYourERAppointmentStatus.tr());
], await context.read<EmergencyServicesViewModel>().checkPatientERAdvanceBalance(onSuccess: (dynamic response) {
), LoaderBottomSheet.hideLoader();
Lottie.asset(AppAnimations.ambulanceAlert, context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn();
repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain), });
SizedBox(height: 8.h), },
LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true), backgroundColor: Colors.white,
SizedBox(height: 8.h), borderColor: Colors.white,
LocaleKeys.areYouSureYouWantToMakeERCheckIn.tr().toText14(color: Colors.white, weight: FontWeight.w500), textColor: AppColors.primaryRedColor,
SizedBox(height: 24.h), icon: AppAssets.checkmark_icon,
CustomButton( iconColor: AppColors.primaryRedColor,
text: LocaleKeys.confirm.tr(context: context), ),
onPressed: () async { SizedBox(height: 8.h),
Navigator.of(context).pop(); ],
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingYourERAppointmentStatus.tr()); ),
await context.read<EmergencyServicesViewModel>().checkPatientERAdvanceBalance(onSuccess: (dynamic response) {
LoaderBottomSheet.hideLoader();
context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn();
});
},
backgroundColor: Colors.white,
borderColor: Colors.white,
textColor: AppColors.primaryRedColor,
icon: AppAssets.checkmark_icon,
iconColor: AppColors.primaryRedColor,
),
SizedBox(height: 8.h),
],
), ),
), ),
), isFullScreen: false,
isFullScreen: false, isCloseButtonVisible: false,
isCloseButtonVisible: false, hasBottomPadding: false,
hasBottomPadding: false, backgroundColor: AppColors.primaryRedColor,
backgroundColor: AppColors.primaryRedColor, callBackFunc: () {},
callBackFunc: () {}, );
); }
}), }),
), ),
], ],

@ -128,7 +128,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox( SizedBox(
width: 150.h, width: 200.h,
child: Utils.getPaymentMethods(), child: Utils.getPaymentMethods(),
), ),
Row( Row(

@ -468,12 +468,12 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
context, context,
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)), child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () { callBackFunc: () {
Navigator.pushAndRemoveUntil( // Navigator.pushAndRemoveUntil(
context, // context,
CustomPageRoute( // CustomPageRoute(
page: LandingNavigation(), // page: LandingNavigation(),
), // ),
(r) => false); // (r) => false);
}, },
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,

@ -498,67 +498,67 @@ class _LandingPageState extends State<LandingPage> {
), ),
// Consumer for ER Online Check-In pending request // Consumer for ER Online Check-In pending request
Consumer<EmergencyServicesViewModel>( // Consumer<EmergencyServicesViewModel>(
builder: (context, emergencyServicesVM, child) { // builder: (context, emergencyServicesVM, child) {
return emergencyServicesVM.patientHasAdvanceERBalance // return emergencyServicesVM.patientHasAdvanceERBalance
? Column( // ? Column(
children: [ // children: [
SizedBox(height: 16.h), // SizedBox(height: 16.h),
Container( // Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, // color: AppColors.whiteColor,
borderRadius: 20.r, // borderRadius: 20.r,
hasShadow: false, // hasShadow: false,
side: BorderSide(color: AppColors.primaryRedColor, width: 3.h), // side: BorderSide(color: AppColors.primaryRedColor, width: 3.h),
), // ),
width: double.infinity, // width: double.infinity,
child: Padding( // child: Padding(
padding: EdgeInsets.all(16.h), // padding: EdgeInsets.all(16.h),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
// Row( // // Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [ // // children: [
// AppCustomChipWidget( // // AppCustomChipWidget(
// labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context), // // labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context),
// backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10), // // backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10),
// textColor: AppColors.primaryRedColor, // // textColor: AppColors.primaryRedColor,
// ), // // ),
// Utils.buildSvgWithAssets(icon: AppAssets.appointment_checkin_icon, width: 24.h, height: 24.h, iconColor: AppColors.primaryRedColor), // // Utils.buildSvgWithAssets(icon: AppAssets.appointment_checkin_icon, width: 24.h, height: 24.h, iconColor: AppColors.primaryRedColor),
// ], // // ],
// ), // // ),
SizedBox(height: 8.h), // SizedBox(height: 8.h),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
LocaleKeys.youHaveEROnlineCheckInRequest.tr(context: context).toText12(isBold: true), // LocaleKeys.youHaveEROnlineCheckInRequest.tr(context: context).toText12(isBold: true),
Transform.flip( // Transform.flip(
flipX: getIt.get<AppState>().isArabic(), // flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets( // child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, // icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, // iconColor: AppColors.blackColor,
width: 20.h, // width: 20.h,
height: 15.h, // height: 15.h,
fit: BoxFit.contain, // fit: BoxFit.contain,
), // ),
), // ),
], // ],
), // ),
], // ],
), // ),
), // ),
).paddingSymmetrical(24.h, 0.h).onPress(() { // ).paddingSymmetrical(24.h, 0.h).onPress(() {
Navigator.of(context).push(CustomPageRoute(page: ErOnlineCheckinHome())); // Navigator.of(context).push(CustomPageRoute(page: ErOnlineCheckinHome()));
// context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn(); // // context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn();
}), // }),
SizedBox(height: 12.h), // SizedBox(height: 12.h),
], // ],
) // )
: SizedBox(height: 0.h); // : SizedBox(height: 0.h);
}, // },
), // ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

@ -115,7 +115,7 @@ class HabibWalletCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox( SizedBox(
width: 150.h, width: 200.h,
child: Utils.getPaymentMethods(), child: Utils.getPaymentMethods(),
), ),
CustomButton( CustomButton(

@ -207,7 +207,7 @@ class PrescriptionItemView extends StatelessWidget {
initialHour: DateTime.now().hour, initialHour: DateTime.now().hour,
initialMinute: DateTime.now().minute, initialMinute: DateTime.now().minute,
use24HourFormat: true, use24HourFormat: true,
pickerHeight: 120.h, pickerHeight: 200.h,
itemExtent: 100.h, itemExtent: 100.h,
onTimeChanged: (time) { onTimeChanged: (time) {
// Handle selected time // Handle selected time

@ -20,7 +20,7 @@ class PrescriptionReminderView extends StatefulWidget {
} }
class _PrescriptionReminderViewState extends State<PrescriptionReminderView> { class _PrescriptionReminderViewState extends State<PrescriptionReminderView> {
final List<int> _options = [15, 30, 60, 90]; final List<int> _options = [60, 360, 720, 1440];
int _selectedOption = 0; // Nullable to represent no selection initially int _selectedOption = 0; // Nullable to represent no selection initially
@override @override
@ -54,7 +54,7 @@ class _PrescriptionReminderViewState extends State<PrescriptionReminderView> {
), ),
child: RadioListTile<int>( child: RadioListTile<int>(
title: Text( title: Text(
"${_options[index]} ${LocaleKeys.minute.tr(context: context)}", "${(_options[index] / 60).toInt()} ${LocaleKeys.hours.tr(context: context)}",
style: TextStyle( style: TextStyle(
fontSize: 16.h, fontSize: 16.h,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,

@ -260,7 +260,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
); );
}), }),
1.divider, 1.divider,
actionItem(AppAssets.language, LocaleKeys.preferredLanguage.tr(context: context), () { actionItem(AppAssets.language, LocaleKeys.communicationLanguage.tr(context: context), () {
profileVm.openPreferredLanguageBottomSheet(); profileVm.openPreferredLanguageBottomSheet();
}, },
trailingLabel: profileVm.isPatientProfileLoading trailingLabel: profileVm.isPatientProfileLoading

@ -41,7 +41,7 @@ class _PreferredLanguageWidgetState extends State<PreferredLanguageWidget> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
spacing: 24.h, spacing: 24.h,
children: [ children: [
LocaleKeys.languageSetting.tr(context: context).toText14(), LocaleKeys.communicationLanguage.tr(context: context).toText14(),
Container( Container(
padding: EdgeInsets.only(top: 4, bottom: 4), padding: EdgeInsets.only(top: 4, bottom: 4),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),

@ -640,7 +640,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox( SizedBox(
width: 150.h, width: 200.h,
child: Utils.getPaymentMethods(), child: Utils.getPaymentMethods(),
), ),
Row( Row(

@ -115,18 +115,21 @@ class _ScrollWheelTimePickerState extends State<ScrollWheelTimePicker> {
widget.use24HourFormat ? index : index + 1; widget.use24HourFormat ? index : index + 1;
final isSelected = hour == _selectedHour; final isSelected = hour == _selectedHour;
return Visibility( return Visibility(
visible: isSelected, visible: true,
child: Center( child: Center(
child: AnimatedDefaultTextStyle( child: AnimatedDefaultTextStyle(
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
style: digitStyle.copyWith( style: digitStyle.copyWith(
color: isSelected color: isSelected
? AppColors.textColor ? AppColors.textColor
: AppColors.textColor.withValues(alpha: 0.3), : AppColors.textColor.withValues(alpha: 0.3),
), ),
child: Text(hour.toString().padLeft(2, '0')), child: Text(
hour.toString().padLeft(2, '0'),
),
),
), ),
)); );
}, },
), ),
), ),
@ -157,8 +160,8 @@ class _ScrollWheelTimePickerState extends State<ScrollWheelTimePicker> {
builder: (context, index) { builder: (context, index) {
final isSelected = index == _selectedMinute; final isSelected = index == _selectedMinute;
return Visibility( return Visibility(
visible: isSelected, visible: true,
child: child:
Center( Center(
child: AnimatedDefaultTextStyle( child: AnimatedDefaultTextStyle(
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),

Loading…
Cancel
Save