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,7 +133,19 @@ class HospitalBottomSheetBody extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<BookAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
if (myAppointmentsVM.isRegionListLoading) {
return Container(
height: MediaQuery.of(context).size.height * 0.3,
decoration: BoxDecoration(
color: AppColors.whiteColor,
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
),
child: Center(
child: Utils.getLoadingWidget(),
),
);
} else {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -146,7 +160,6 @@ class HospitalBottomSheetBody extends StatelessWidget {
}, },
isEnable: true, isEnable: true,
prefix: null, prefix: null,
autoFocus: false, autoFocus: false,
isBorderAllowed: false, isBorderAllowed: false,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
@ -200,15 +213,15 @@ class HospitalBottomSheetBody extends StatelessWidget {
SizedBox( SizedBox(
height: MediaQuery.sizeOf(context).height * .4, height: MediaQuery.sizeOf(context).height * .4,
child: ListView.separated( child: ListView.separated(
itemBuilder: (_, index) itemBuilder: (_, index) {
{
var hospital = displayList?[index]; var hospital = displayList?[index];
return HospitalListItem( return HospitalListItem(
hospitalData: hospital, hospitalData: hospital,
isLocationEnabled: sortByLocation, isLocationEnabled: sortByLocation,
).onPress(() { ).onPress(() {
onHospitalClicked(hospital!); onHospitalClicked(hospital!);
});}, });
},
separatorBuilder: (_, __) => SizedBox( separatorBuilder: (_, __) => SizedBox(
height: 16.h, height: 16.h,
), ),
@ -217,5 +230,7 @@ class HospitalBottomSheetBody extends StatelessWidget {
], ],
); );
} }
});
}
} }

@ -188,7 +188,11 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
isShowConfirmDialog: true, isShowConfirmDialog: true,
onSuccess: (latLng) { onSuccess: (latLng) {
regionalViewModel.setSortByLocation(true); regionalViewModel.setSortByLocation(true);
if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION || regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) {
myAppointmentsViewModel.getRegionMappedProjectList(); 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);
if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION || regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) {
myAppointmentsViewModel.getRegionMappedProjectList(); 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,7 +104,16 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
), ),
child: Padding( child: Padding(
padding: EdgeInsets.all(16.h), padding: EdgeInsets.all(16.h),
child: Row( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
@ -118,6 +126,8 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
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),
], ],
), ),
],
),
), ),
).onPress(() { ).onPress(() {
showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareVM), callBackFunc: () async { showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareVM), callBackFunc: () async {
@ -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),
Wrap(
direction: Axis.horizontal,
spacing: 4.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} Years Old"), 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);
if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_REGION || regionalViewModel.regionBottomSheetType == RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER) {
bookAppointmentsViewModel.getRegionMappedProjectList(); 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,6 +285,9 @@ 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(() {
if (emergencyServicesViewModel.patientHasAdvanceERBalance) {
Navigator.of(context).push(CustomPageRoute(page: ErOnlineCheckinHome()));
} else {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Container( child: Container(
@ -308,8 +312,7 @@ class EmergencyServicesPage extends StatelessWidget {
}), }),
], ],
), ),
Lottie.asset(AppAnimations.ambulanceAlert, Lottie.asset(AppAnimations.ambulanceAlert, repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h), SizedBox(height: 8.h),
LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true), LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
@ -342,6 +345,7 @@ class EmergencyServicesPage extends StatelessWidget {
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,66 +498,66 @@ 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(
// // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// // children: [
// // AppCustomChipWidget(
// // labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context),
// // backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10),
// // textColor: AppColors.primaryRedColor,
// // ),
// // Utils.buildSvgWithAssets(icon: AppAssets.appointment_checkin_icon, width: 24.h, height: 24.h, iconColor: AppColors.primaryRedColor),
// // ],
// // ),
// SizedBox(height: 8.h),
// Row( // Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [ // children: [
// AppCustomChipWidget( // LocaleKeys.youHaveEROnlineCheckInRequest.tr(context: context).toText12(isBold: true),
// labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context), // Transform.flip(
// backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10), // flipX: getIt.get<AppState>().isArabic(),
// textColor: AppColors.primaryRedColor, // child: Utils.buildSvgWithAssets(
// icon: AppAssets.forward_arrow_icon_small,
// iconColor: AppColors.blackColor,
// width: 20.h,
// height: 15.h,
// fit: BoxFit.contain,
// ),
// ), // ),
// Utils.buildSvgWithAssets(icon: AppAssets.appointment_checkin_icon, width: 24.h, height: 24.h, iconColor: AppColors.primaryRedColor),
// ], // ],
// ), // ),
SizedBox(height: 8.h), // ],
Row( // ),
mainAxisAlignment: MainAxisAlignment.spaceBetween, // ),
children: [ // ).paddingSymmetrical(24.h, 0.h).onPress(() {
LocaleKeys.youHaveEROnlineCheckInRequest.tr(context: context).toText12(isBold: true), // Navigator.of(context).push(CustomPageRoute(page: ErOnlineCheckinHome()));
Transform.flip( // // context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn();
flipX: getIt.get<AppState>().isArabic(), // }),
child: Utils.buildSvgWithAssets( // SizedBox(height: 12.h),
icon: AppAssets.forward_arrow_icon_small, // ],
iconColor: AppColors.blackColor, // )
width: 20.h, // : SizedBox(height: 0.h);
height: 15.h, // },
fit: BoxFit.contain, // ),
),
),
],
),
],
),
),
).paddingSymmetrical(24.h, 0.h).onPress(() {
Navigator.of(context).push(CustomPageRoute(page: ErOnlineCheckinHome()));
// context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn();
}),
SizedBox(height: 12.h),
],
)
: SizedBox(height: 0.h);
},
),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -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,7 +115,7 @@ 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),
@ -124,9 +124,12 @@ class _ScrollWheelTimePickerState extends State<ScrollWheelTimePicker> {
? 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,7 +160,7 @@ 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(

Loading…
Cancel
Save