pull/324/head
haroon amjad 1 month ago
parent 68248f0cf0
commit 171a6a2d74

@ -735,7 +735,9 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
onError?.call(selectedClinic.clinicID == 23 ? failure.message : LocaleKeys.noDoctorFound.tr()); if (onError != null) {
onError.call(selectedClinic.clinicID == 23 ? failure.message : LocaleKeys.noDoctorFound.tr());
}
}, },
(apiResponse) async { (apiResponse) async {
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {

@ -323,7 +323,7 @@ class PrescriptionsViewModel extends ChangeNotifier {
isGmsAvailable: getIt.get<AppState>().isGMSAvailable, isGmsAvailable: getIt.get<AppState>().isGMSAvailable,
), ),
direction: AxisDirection.down), direction: AxisDirection.down),
); ) ?? false;
print("Location Selected: $result"); print("Location Selected: $result");
if (result) { if (result) {
LocationViewModel locationViewModel = getIt.get<LocationViewModel>(); LocationViewModel locationViewModel = getIt.get<LocationViewModel>();

@ -98,21 +98,24 @@ class AppointmentDoctorCard extends StatelessWidget {
children: [ children: [
Row( Row(
children: [ children: [
patientAppointmentHistoryResponseModel.doctorNameObj!.toText16( Expanded(
isBold: true, child: patientAppointmentHistoryResponseModel.doctorNameObj!.toText16(
isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? ""), isBold: true,
textOverflow: TextOverflow.ellipsis, isEnglishOnly: !Utils.isArabicText(patientAppointmentHistoryResponseModel.doctorNameObj ?? ""),
textOverflow: TextOverflow.ellipsis,
maxlines: 2
),
), ),
SizedBox(width: 12.w), SizedBox(width: 12.w),
(patientAppointmentHistoryResponseModel.doctorNationalityFlagURL != null && // (patientAppointmentHistoryResponseModel.doctorNationalityFlagURL != null &&
patientAppointmentHistoryResponseModel.doctorNationalityFlagURL!.isNotEmpty) // patientAppointmentHistoryResponseModel.doctorNationalityFlagURL!.isNotEmpty)
? Image.network( // ? Image.network(
patientAppointmentHistoryResponseModel.doctorNationalityFlagURL ?? "https://hmgwebservices.com/Images/flag/SAU.png", // patientAppointmentHistoryResponseModel.doctorNationalityFlagURL ?? "https://hmgwebservices.com/Images/flag/SAU.png",
width: 20.h, // width: 20.h,
height: 15.h, // height: 15.h,
fit: BoxFit.cover, // fit: BoxFit.cover,
) // )
: SizedBox.shrink(), // : SizedBox.shrink(),
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),

@ -213,6 +213,24 @@ class _LandingPageState extends State<LandingPage> {
// Refresh Immediate LiveCare Data // Refresh Immediate LiveCare Data
immediateLiveCareViewModel.initImmediateLiveCare(); immediateLiveCareViewModel.initImmediateLiveCare();
immediateLiveCareViewModel.getPatientLiveCareHistory(); immediateLiveCareViewModel.getPatientLiveCareHistory();
appointmentRatingViewModel.getLastRatingAppointment(
onSuccess: (response) {
if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
appointmentRatingViewModel.getAppointmentDetails(
appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!,
appointmentRatingViewModel.appointmentRatedList.last.projectID!,
onSuccess: ((response) {
appointmentRatingViewModel.setClinicOrDoctor(false);
appointmentRatingViewModel.setTitle(LocaleKeys.rateDoctor.tr(context: context));
appointmentRatingViewModel.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context));
openLastRating();
appState.setRatedVisible(true);
}),
);
}
},
);
} }
}, },
child: SingleChildScrollView( child: SingleChildScrollView(

@ -1,11 +1,13 @@
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/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/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart'; import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
@ -130,7 +132,7 @@ class _UpdateEmailDialogState extends State<UpdateEmailDialog> {
profileSettingsViewModel!.clearEmailError(); profileSettingsViewModel!.clearEmailError();
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.success.tr(context: context), child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.success.tr(context: context), child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()),
callBackFunc: () async { callBackFunc: () async {
Navigator.of(context).pop(); Navigator.of(getIt<NavigationService>().navigatorKey.currentContext!).pop();
profileSettingsViewModel!.getProfileSettings(); profileSettingsViewModel!.getProfileSettings();
}, isFullScreen: false, isAutoDismiss: true); }, isFullScreen: false, isAutoDismiss: true);
}, },

Loading…
Cancel
Save