pull/216/head
haroon amjad 2 days ago
parent 572c37785b
commit fe1e0fdb40

@ -1048,7 +1048,8 @@ class BookAppointmentsViewModel extends ChangeNotifier {
); );
LoaderBottomSheet.showLoader( LoaderBottomSheet.showLoader(
loadingText: LocaleKeys.reschedulingAppo.tr(context: navigationService.navigatorKey.currentContext!), // loadingText: LocaleKeys.reschedulingAppo.tr(context: navigationService.navigatorKey.currentContext!),
loadingText: LocaleKeys.loadingText.tr(context: navigationService.navigatorKey.currentContext!),
); );
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async { await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();

@ -15,6 +15,7 @@ import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.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:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:lottie/lottie.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class AppointmentQueuePage extends StatelessWidget { class AppointmentQueuePage extends StatelessWidget {
@ -32,13 +33,14 @@ class AppointmentQueuePage extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: LocaleKeys.queueing.tr(context: context), title: LocaleKeys.queueing.tr(context: context),
child: RefreshIndicator( child: RefreshIndicator(
color: AppColors.primaryRedColor, color: AppColors.primaryRedColor,
onRefresh: () async { onRefresh: () async {
await myAppointmentsVM.getPatientAppointmentQueueDetails(); await myAppointmentsVM.getPatientAppointmentQueueDetails();
}, },
child: SingleChildScrollView( child: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Padding( child: Padding(
padding: EdgeInsets.all(24.0), padding: EdgeInsets.all(24.0),
child: Column( child: Column(
@ -59,13 +61,21 @@ class AppointmentQueuePage extends StatelessWidget {
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: myAppointmentsVM.currentQueueStatus == 0 ? LocaleKeys.inQueue.tr(context: context) : LocaleKeys.yourTurn.tr(context: context), labelText: myAppointmentsVM.currentQueueStatus == 0 ? LocaleKeys.inQueue.tr(context: context) : LocaleKeys.yourTurn.tr(context: context),
backgroundColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus).withValues(alpha: 0.20), backgroundColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus).withValues(alpha: 0.20),
textColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus), textColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus),
), ),
Utils.buildSvgWithAssets(icon: AppAssets.waiting_icon, width: 24.h, height: 24.h), Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.greyColor,
borderRadius: 10.h,
hasShadow: false,
),
padding: EdgeInsets.all(6.h),
child: Lottie.asset(AppAnimations.hourGlass, repeat: true, reverse: false, frameRate: FrameRate(60), width: 40.h, height: 40.h, fit: BoxFit.fill)),
], ],
).toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading), ).toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 10.h), SizedBox(height: 10.h),
@ -189,9 +199,9 @@ class AppointmentQueuePage extends StatelessWidget {
], ],
), ),
), ),
),
), ),
), ),
),
), ),
Container( Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(

@ -168,7 +168,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
// page: AppointmentQueuePage(), // page: AppointmentQueuePage(),
// ), // ),
// ); // );
}, isFullScreen: false); }, isFullScreen: false, isAutoDismiss: true, isCloseButtonVisible: false);
}, },
onError: (error) { onError: (error) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();

@ -317,7 +317,8 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
void initiateBookAppointment() async { void initiateBookAppointment() async {
// LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: bookAppointmentsViewModel.isPatientRescheduleAppointment ? LocaleKeys.reschedulingAppo.tr(context: context) : LocaleKeys.bookingYourAppointment.tr(context: context)); // LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: bookAppointmentsViewModel.isPatientRescheduleAppointment ? LocaleKeys.reschedulingAppo.tr(context: context) : LocaleKeys.bookingYourAppointment.tr(context: context));
LoaderBottomSheet.showLoader(loadingText: bookAppointmentsViewModel.isPatientRescheduleAppointment ? LocaleKeys.reschedulingAppo.tr(context: context) : LocaleKeys.bookingYourAppointment.tr(context: context)); // LoaderBottomSheet.showLoader(loadingText: bookAppointmentsViewModel.isPatientRescheduleAppointment ? LocaleKeys.reschedulingAppo.tr(context: context) : LocaleKeys.bookingYourAppointment.tr(context: context));
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr(context: context));
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
if (bookAppointmentsViewModel.isLiveCareSchedule) { if (bookAppointmentsViewModel.isLiveCareSchedule) {

@ -44,7 +44,7 @@ class _NearestErPageState extends State<NearestErPage> {
children: [ children: [
TextInputWidget( TextInputWidget(
labelText: LocaleKeys.search.tr(), labelText: LocaleKeys.search.tr(),
hintText: 'Type any facility name', hintText: '',
controller: searchText, controller: searchText,
onChange: (value) { onChange: (value) {
debouncer.run(() { debouncer.run(() {

@ -59,7 +59,7 @@ class NearestERItem extends StatelessWidget {
Expanded( Expanded(
child: (nearestERItem.projectName?.toText16( child: (nearestERItem.projectName?.toText16(
color: AppColors.textColor, color: AppColors.textColor,
weight: FontWeight.w600, isBold: true
) ?? ) ??
SizedBox.shrink()).toShimmer2(isShow: isLoading), SizedBox.shrink()).toShimmer2(isShow: isLoading),
), ),
@ -84,7 +84,7 @@ class NearestERItem extends StatelessWidget {
Directionality( Directionality(
textDirection: ui.TextDirection.ltr, textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget( child: AppCustomChipWidget(
labelText: "Expected waiting time: ${nearestERItem.getTime()} mins", labelText: "${LocaleKeys.waitingTime.tr(context: context)} ${nearestERItem.getTime()} ${LocaleKeys.mins.tr(context: context)}",
icon: AppAssets.waiting_time_clock, icon: AppAssets.waiting_time_clock,
iconHasColor: false, iconHasColor: false,
labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h), labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h),
@ -109,14 +109,14 @@ class NearestERItem extends StatelessWidget {
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
height: 40.h, height: 46.h,
fontSize: 14.f, fontSize: 14.f,
isBold: true, isBold: true,
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
SizedBox( SizedBox(
height: 40.h, height: 46.h,
width: 40.h, width: 40.h,
child: CustomButton( child: CustomButton(
text: '', text: '',
@ -124,12 +124,11 @@ class NearestERItem extends StatelessWidget {
icon: AppAssets.call_fill, icon: AppAssets.call_fill,
onPressed: () { onPressed: () {
context.read<EmergencyServicesViewModel>().openDialer( nearestERItem.phonenumber??""); context.read<EmergencyServicesViewModel>().openDialer( nearestERItem.phonenumber??"");
}, },
backgroundColor: AppColors.greyColor, backgroundColor: AppColors.greyColor,
iconColor: AppColors.textColor, iconColor: AppColors.textColor,
borderColor: AppColors.greyColor, borderColor: AppColors.greyColor,
height: 40.h, height: 46.h,
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
), ),
], ],

@ -265,8 +265,8 @@ class _LandingPageState extends State<LandingPage> {
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
fontSize: 14.f, fontSize: 14.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
borderRadius: 12.r, borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(12.h, 0, 12.h, 0), padding: EdgeInsets.fromLTRB(12.h, 0, 12.h, 0),
height: 40.h, height: 40.h,
), ),
@ -1013,17 +1013,21 @@ class _LandingPageState extends State<LandingPage> {
Widget _buildQueueHeader(int currentStatus) { Widget _buildQueueHeader(int currentStatus) {
return Row( return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: currentStatus == 0 ? LocaleKeys.inQueue.tr() : LocaleKeys.yourTurn.tr(), labelText: currentStatus == 0 ? LocaleKeys.inQueue.tr() : LocaleKeys.yourTurn.tr(),
backgroundColor: Utils.getCardBorderColor(currentStatus).withValues(alpha: 0.20), backgroundColor: Utils.getCardBorderColor(currentStatus).withValues(alpha: 0.20),
textColor: Utils.getCardBorderColor(currentStatus), textColor: Utils.getCardBorderColor(currentStatus),
), ),
Utils.buildSvgWithAssets( Container(
icon: AppAssets.waiting_icon, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
width: 24.h, color: AppColors.greyColor,
height: 24.h, borderRadius: 10.h,
), hasShadow: false,
),
padding: EdgeInsets.all(6.h),
child: Lottie.asset(AppAnimations.hourGlass, repeat: true, reverse: false, frameRate: FrameRate(60), width: 40.h, height: 40.h, fit: BoxFit.fill)),
], ],
); );
} }

Loading…
Cancel
Save