updates & fixes

pull/206/head
haroon amjad 2 days ago
parent 93af246700
commit deca29b423

@ -1640,9 +1640,10 @@
"homeHealthCareServiceDescription": "نقدم لكم رعاية صحية عالية الجودة تصلكم إلى عتبة منزلكم. ممرضات ذوات خبرة يقدمون رعاية حانية في راحة منزلكم.", "homeHealthCareServiceDescription": "نقدم لكم رعاية صحية عالية الجودة تصلكم إلى عتبة منزلكم. ممرضات ذوات خبرة يقدمون رعاية حانية في راحة منزلكم.",
"profileOnlyText": "الملف الشخصي", "profileOnlyText": "الملف الشخصي",
"information": "معلومة", "information": "معلومة",
"noFavouriteDoctors": "ليس لديك أي أطباء مفضلين حتى الآن", "noFavouriteDoctors": "ليس لديك أي قائمة مفضلة حتى الآن",
"addDoctors": "إضافة الأطباء", "addDoctors": "إضافة الأطباء",
"favouriteList": "قائمة المفضلة", "favouriteList": "قائمة المفضلة",
"later": "لاحقاً" "later": "لاحقاً",
"cancelAppointmentConfirmMessage": "هل أنت متأكد من رغبتك في إلغاء هذا الموعد؟"
} }

@ -1632,8 +1632,9 @@
"homeHealthCareServiceDescription": "We bring quality healthcare to your doorstep. Experienced nurses providing compassionate care in the comfort of your home.", "homeHealthCareServiceDescription": "We bring quality healthcare to your doorstep. Experienced nurses providing compassionate care in the comfort of your home.",
"profileOnlyText": "Profile", "profileOnlyText": "Profile",
"information": "Information", "information": "Information",
"noFavouriteDoctors": "You don't have any favourite doctors yet", "noFavouriteDoctors": "You don't have any favourite list yet",
"addDoctors": "Add Doctors", "addDoctors": "Add Doctors",
"favouriteList": "Favourite List", "favouriteList": "Favourite List",
"later": "Later" "later": "Later",
"cancelAppointmentConfirmMessage": "Are you sure you want to cancel this appointment?"
} }

@ -919,8 +919,6 @@ class HmgServicesRepoImp implements HmgServicesRepo {
@override @override
Future<Either<Failure, GenericApiModel<List<VitalSignResModel>>>> getPatientVitalSign() async { Future<Either<Failure, GenericApiModel<List<VitalSignResModel>>>> getPatientVitalSign() async {
Map<String, dynamic> requestBody = { Map<String, dynamic> requestBody = {
}; };
try { try {

@ -513,7 +513,10 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
try { try {
final list = response['PatientDoctorAppointmentResultList']; final list = response['PatientDoctorAppointmentResultList'];
final appointmentsList = list.map((item) => PatientAppointmentHistoryResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientAppointmentHistoryResponseModel>(); List<PatientAppointmentHistoryResponseModel> appointmentsList =
list.map((item) => PatientAppointmentHistoryResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientAppointmentHistoryResponseModel>();
appointmentsList.removeWhere((element) => element.isActiveDoctorProfile == false);
apiResponse = GenericApiModel<List<PatientAppointmentHistoryResponseModel>>( apiResponse = GenericApiModel<List<PatientAppointmentHistoryResponseModel>>(
messageStatus: messageStatus, messageStatus: messageStatus,

@ -94,6 +94,10 @@ class MyAppointmentsViewModel extends ChangeNotifier {
selectedTabIndex = index; selectedTabIndex = index;
start = null; start = null;
end = null; end = null;
// if (index == 0) {
// filteredAppointmentList.clear();
// filteredAppointmentList.addAll(patientAppointmentsHistoryList);
// }
notifyListeners(); notifyListeners();
} }

@ -1636,5 +1636,6 @@ abstract class LocaleKeys {
static const addDoctors = 'addDoctors'; static const addDoctors = 'addDoctors';
static const favouriteList = 'favouriteList'; static const favouriteList = 'favouriteList';
static const later = 'later'; static const later = 'later';
static const cancelAppointmentConfirmMessage = 'cancelAppointmentConfirmMessage';
} }

@ -37,6 +37,7 @@ import 'package:hmg_patient_app_new/presentation/ask_doctor/doctor_response_page
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart'; import 'package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart';
import 'package:hmg_patient_app_new/services/dialog_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/appbar/collapsing_list_view.dart'; 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';
@ -148,41 +149,55 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
}); });
}, },
onCancelTap: () async { onCancelTap: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr(context: context)); showCommonBottomSheetWithoutHeight(
await myAppointmentsViewModel.cancelAppointment( title: LocaleKeys.notice.tr(context: context),
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel, context,
onSuccess: (apiResponse) { child: Utils.getWarningWidget(
LoaderBottomSheet.hideLoader(); loadingText: LocaleKeys.cancelAppointmentConfirmMessage.tr(context: context),
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true); isShowActionButtons: true,
myAppointmentsViewModel.getPatientAppointments(true, false); onCancelTap: () {
showCommonBottomSheetWithoutHeight( Navigator.of(context).pop();
context, },
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentCancelledSuccessfully.tr(context: context)), onConfirmTap: () async {
callBackFunc: () { Navigator.of(context).pop();
Navigator.of(context).pop(); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr(context: context));
}, await myAppointmentsViewModel.cancelAppointment(
title: "", patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
isCloseButtonVisible: true, onSuccess: (apiResponse) async {
isDismissible: false, LoaderBottomSheet.hideLoader();
isFullScreen: false, myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
); myAppointmentsViewModel.getPatientAppointments(true, false);
}, showCommonBottomSheet(
onError: (err) { context,
LoaderBottomSheet.hideLoader(); child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentCancelledSuccessfully.tr(context: context)),
showCommonBottomSheetWithoutHeight( callBackFunc: (str) {
context, Navigator.of(context).pop();
child: Utils.getErrorWidget(loadingText: err.toString()), },
callBackFunc: () {}, title: "",
title: "", isCloseButtonVisible: false,
isCloseButtonVisible: true, isDismissible: false,
isDismissible: false, isFullScreen: false,
isFullScreen: false, isAutoDismiss: true,
); height: ResponsiveExtension.screenHeight * 0.3,
}); );
var isEventAddedOrRemoved = await CalenderUtilsNew.instance.checkAndRemove( id:"${widget.patientAppointmentHistoryResponseModel.appointmentNo}", ); },
setState(() { onError: (err) {
myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel); LoaderBottomSheet.hideLoader();
}); showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err.toString()),
callBackFunc: () {},
title: "", isCloseButtonVisible: true, isDismissible: false, isFullScreen: false);
});
}),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
// var isEventAddedOrRemoved = await CalenderUtilsNew.instance.checkAndRemove( id:"${widget.patientAppointmentHistoryResponseModel.appointmentNo}", );
// setState(() {
// myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel);
// });
}, },
onRescheduleTap: () async { onRescheduleTap: () async {
openDoctorScheduleCalendar(); openDoctorScheduleCalendar();
@ -987,7 +1002,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
doctorImageURL: widget.patientAppointmentHistoryResponseModel.doctorImageURL, doctorImageURL: widget.patientAppointmentHistoryResponseModel.doctorImageURL,
doctorTitle: widget.patientAppointmentHistoryResponseModel.doctorTitle, doctorTitle: widget.patientAppointmentHistoryResponseModel.doctorTitle,
name: widget.patientAppointmentHistoryResponseModel.doctorNameObj, name: widget.patientAppointmentHistoryResponseModel.doctorNameObj,
nationalityFlagURL: "https://hmgwebservices.com/Images/flag/SYR.png", nationalityFlagURL: "",
speciality: [], speciality: [],
clinicName: widget.patientAppointmentHistoryResponseModel.clinicName, clinicName: widget.patientAppointmentHistoryResponseModel.clinicName,
projectName: widget.patientAppointmentHistoryResponseModel.projectName, projectName: widget.patientAppointmentHistoryResponseModel.projectName,
@ -1036,17 +1051,18 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
myAppointmentsViewModel.initAppointmentsViewModel(); myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false); myAppointmentsViewModel.getPatientAppointments(true, false);
Navigator.of(context).pop(); Navigator.of(context).pop();
}, }, title: "", height: ResponsiveExtension.screenHeight * 0.3, isAutoDismiss: true, isCloseButtonVisible: true, isDismissible: false, isFullScreen: false,
title: "",
height: ResponsiveExtension.screenHeight * 0.3,
isCloseButtonVisible: true,
isDismissible: false,
isFullScreen: false,
isSuccessDialog: true); isSuccessDialog: true);
}); });
// LoaderBottomSheet.hideLoader(); // LoaderBottomSheet.hideLoader();
case 15: case 15:
break; getIt.get<DialogService>().showCommonBottomSheetWithoutH(
message: LocaleKeys.upcomingPaymentPending.tr(context: context),
label: LocaleKeys.notice.tr(),
onOkPressed: () {},
okLabel: "confirm",
cancelLabel: LocaleKeys.confirm.tr(context: context),
);
case 20: case 20:
myAppointmentsViewModel.setIsPatientAppointmentShareLoading(true); myAppointmentsViewModel.setIsPatientAppointmentShareLoading(true);
Navigator.of(context).push( Navigator.of(context).push(

@ -144,7 +144,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
? myAppointmentsVM.patientAppointmentsViewList.length ? myAppointmentsVM.patientAppointmentsViewList.length
: 1, : 1,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final isExpanded = expandedIndex == index; final isExpanded = myAppointmentsVM.selectedTabIndex == 1 ? true : expandedIndex == index;
return myAppointmentsVM.isMyAppointmentsLoading return myAppointmentsVM.isMyAppointmentsLoading
? Container( ? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),

@ -456,7 +456,7 @@ class AppointmentCard extends StatelessWidget {
doctorImageURL: patientAppointmentHistoryResponseModel.doctorImageURL, doctorImageURL: patientAppointmentHistoryResponseModel.doctorImageURL,
doctorTitle: patientAppointmentHistoryResponseModel.doctorTitle, doctorTitle: patientAppointmentHistoryResponseModel.doctorTitle,
name: patientAppointmentHistoryResponseModel.doctorNameObj, name: patientAppointmentHistoryResponseModel.doctorNameObj,
nationalityFlagURL: 'https://hmgwebservices.com/Images/flag/SYR.png', nationalityFlagURL: '',
speciality: [], speciality: [],
clinicName: patientAppointmentHistoryResponseModel.clinicName, clinicName: patientAppointmentHistoryResponseModel.clinicName,
projectName: patientAppointmentHistoryResponseModel.projectName, projectName: patientAppointmentHistoryResponseModel.projectName,

@ -180,7 +180,7 @@ class DoctorProfilePage extends StatelessWidget {
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.information.tr(context: context).toText14(weight: FontWeight.w600, color: AppColors.textColor), LocaleKeys.information.tr(context: context).toText14(weight: FontWeight.w600, color: AppColors.textColor),
SizedBox(height: 6.h), SizedBox(height: 6.h),
bookAppointmentsViewModel.doctorsProfileResponseModel.doctorProfileInfo!.toText12(fontWeight: FontWeight.w600, color: AppColors.greyTextColor), (bookAppointmentsViewModel.doctorsProfileResponseModel.doctorProfileInfo ?? "").trim().toText12(fontWeight: FontWeight.w600, color: AppColors.greyTextColor),
SizedBox(height: 24.h), SizedBox(height: 24.h),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
@ -199,7 +199,12 @@ class DoctorProfilePage extends StatelessWidget {
bookAppointmentsViewModel.selectedDoctor.speciality = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty; bookAppointmentsViewModel.selectedDoctor.speciality = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty;
bookAppointmentsViewModel.selectedDoctor.specialityN = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty; bookAppointmentsViewModel.selectedDoctor.specialityN = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty;
bookAppointmentsViewModel.selectedDoctor.name = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorName; bookAppointmentsViewModel.selectedDoctor.name = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorName;
bookAppointmentsViewModel.selectedDoctor.name = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorName; bookAppointmentsViewModel.selectedDoctor.doctorImageURL = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorImageURL;
bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL = bookAppointmentsViewModel.doctorsProfileResponseModel.nationalityFlagURL;
bookAppointmentsViewModel.selectedDoctor.clinicName = bookAppointmentsViewModel.doctorsProfileResponseModel.clinicDescription;
bookAppointmentsViewModel.selectedDoctor.projectName = bookAppointmentsViewModel.doctorsProfileResponseModel.projectName;
LoaderBottomSheet.showLoader(); LoaderBottomSheet.showLoader();
bookAppointmentsViewModel.isLiveCareSchedule bookAppointmentsViewModel.isLiveCareSchedule
? await bookAppointmentsViewModel.getLiveCareDoctorFreeSlots( ? await bookAppointmentsViewModel.getLiveCareDoctorFreeSlots(

@ -93,6 +93,7 @@ class LaserAppointment extends StatelessWidget {
viewmodel.getLaserClinic(); viewmodel.getLaserClinic();
}, },
), ),
SizedBox(height: 8.h),
Selector<BookAppointmentsViewModel, int>( Selector<BookAppointmentsViewModel, int>(
selector: (_, vm) => vm.selectedBodyTypeIndex, selector: (_, vm) => vm.selectedBodyTypeIndex,
builder: (_, bodyType, __) { builder: (_, bodyType, __) {
@ -110,6 +111,7 @@ class LaserAppointment extends StatelessWidget {
}); });
}, },
), ),
SizedBox(height: 8.h),
Selector<BookAppointmentsViewModel, List<LaserBodyPart>>(selector: (_, vm) => vm.laserBodyPartsList, builder:(_, parts,__){ Selector<BookAppointmentsViewModel, List<LaserBodyPart>>(selector: (_, vm) => vm.laserBodyPartsList, builder:(_, parts,__){
return BodyPartsListing( return BodyPartsListing(
parts: parts, parts: parts,

@ -1,9 +1,12 @@
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_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/laser_body_parts_data.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/laser_body_parts_data.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/laser_body_parts.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/laser_body_parts.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -70,7 +73,7 @@ class BodyPartsListing extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AspectRatio( AspectRatio(
aspectRatio: 97 / 97, aspectRatio: 130 / 120,
child: FittedBox( child: FittedBox(
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
child: Stack( child: Stack(
@ -93,12 +96,12 @@ class BodyPartsListing extends StatelessWidget {
Container( Container(
width: 18.h, width: 18.h,
height: 18.h, height: 18.h,
child: Icon(Icons.done,
color: Colors.white, size: 12.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.primaryRedColor, color: AppColors.primaryRedColor,
borderRadius: BorderRadius.circular(30.h), borderRadius: BorderRadius.circular(30.h),
), ),
child: Icon(Icons.done,
color: Colors.white, size: 12.h),
), ),
], ],
), ),
@ -106,17 +109,19 @@ class BodyPartsListing extends StatelessWidget {
), ),
SizedBox(height: 6.h), SizedBox(height: 6.h),
Expanded( Expanded(
child: Text( child: Center(
context child: Column(
.read<BookAppointmentsViewModel>() children: [
.getLaserProcedureNameWRTLanguage(parts[index]), context.read<BookAppointmentsViewModel>().getLaserProcedureNameWRTLanguage(parts[index]).toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
style: TextStyle( Row(
fontSize: 12.f, mainAxisAlignment: MainAxisAlignment.center,
fontWeight: FontWeight.w600, children: [
color: Color(0xff2B353E), "${LocaleKeys.mins.tr()}: ".toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
letterSpacing: -0.48, parts[index].timeDuration!.toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
],
),
],
), ),
maxLines: 1,
), ),
), ),
], ],

@ -90,7 +90,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
.toString() .toString()
.toText16(isBold: true, maxlines: 1), .toText16(isBold: true, maxlines: 1),
SizedBox(width: 12.w), SizedBox(width: 12.w),
bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL!.isNotEmpty ? Image.network( (bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL != null && bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL!.isNotEmpty )? Image.network(
bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL ?? "https://hmgwebservices.com/Images/flag/SAU.png", bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL ?? "https://hmgwebservices.com/Images/flag/SAU.png",
width: 20.h, width: 20.h,
height: 15.h, height: 15.h,

@ -220,7 +220,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
], ],
).paddingSymmetrical(0.h, 0.h), ).paddingSymmetrical(0.h, 0.h),
if (bookAppointmentsViewModel.isGetDocForHealthCal && bookAppointmentsVM.showSortFilterButtons) SizedBox(height: 16.h), if (bookAppointmentsViewModel.isGetDocForHealthCal && bookAppointmentsVM.showSortFilterButtons) SizedBox(height: 16.h),
Row( bookAppointmentsVM.selectedClinic.clinicID != 17 ? Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Column( Column(
@ -241,7 +241,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
}, },
), ),
], ],
), ) : SizedBox.shrink(),
ListView.separated( ListView.separated(
padding: EdgeInsets.only(top: 16.h), padding: EdgeInsets.only(top: 16.h),
shrinkWrap: true, shrinkWrap: true,

@ -83,6 +83,8 @@ class ContactUs extends StatelessWidget {
LocaleKeys.liveChatWithHMG.tr(), LocaleKeys.liveChatWithHMG.tr(),
).onPress(() { ).onPress(() {
if (getIt.get<AppState>().isAuthenticated) { if (getIt.get<AppState>().isAuthenticated) {
Navigator.of(context).pop();
contactUsViewModel.getLiveChatProjectsList();
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: LiveChatPage(), page: LiveChatPage(),

@ -121,7 +121,9 @@ class LiveChatPage extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM") ("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}"
// "\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM"
)
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? Colors.white : AppColors.textColor), .toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? Colors.white : AppColors.textColor),
Transform.flip( Transform.flip(
flipX: getIt.get<AppState>().isArabic(), flipX: getIt.get<AppState>().isArabic(),

@ -365,6 +365,8 @@ class _LandingPageState extends State<LandingPage> {
), ),
], ],
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(24.h, 0.h).onPress(() {
myAppointmentsViewModel.onTabChange(0);
myAppointmentsViewModel.updateListWRTTab(0);
Navigator.of(context).push(CustomPageRoute(page: MyAppointmentsPage())); Navigator.of(context).push(CustomPageRoute(page: MyAppointmentsPage()));
}), }),
Consumer3<MyAppointmentsViewModel, ImmediateLiveCareViewModel, TodoSectionViewModel>( Consumer3<MyAppointmentsViewModel, ImmediateLiveCareViewModel, TodoSectionViewModel>(

@ -27,7 +27,7 @@ class LabResultList extends StatelessWidget {
shrinkWrap: true,itemCount: list.length,itemBuilder: (____, index) { shrinkWrap: true,itemCount: list.length,itemBuilder: (____, index) {
var labItem = list[index]; var labItem = list[index];
return LabOrderResultItem(onTap: () { return LabOrderResultItem(onTap: () {
model.getPatientLabResult(model.currentlySelectedPatientOrder!, labItem.description ?? "", labItem.testShortDescription!, labItem.uOM ?? ""); model.getPatientLabResult(model.currentlySelectedPatientOrder!, labItem.description ?? "", labItem.testShortDescription ?? "", labItem.uOM ?? "");
}, },
tests: labItem, tests: labItem,
index: index, index: index,

@ -546,7 +546,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
doctorImageURL: patientAppointmentHistoryResponseModel.doctorImageURL, doctorImageURL: patientAppointmentHistoryResponseModel.doctorImageURL,
doctorTitle: patientAppointmentHistoryResponseModel.doctorTitle, doctorTitle: patientAppointmentHistoryResponseModel.doctorTitle,
name: patientAppointmentHistoryResponseModel.doctorNameObj, name: patientAppointmentHistoryResponseModel.doctorNameObj,
nationalityFlagURL: "https://hmgwebservices.com/Images/flag/SYR.png", nationalityFlagURL: "",
speciality: [], speciality: [],
clinicName: patientAppointmentHistoryResponseModel.clinicName, clinicName: patientAppointmentHistoryResponseModel.clinicName,
projectName: patientAppointmentHistoryResponseModel.projectName, projectName: patientAppointmentHistoryResponseModel.projectName,
@ -1566,7 +1566,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
label: LocaleKeys.weight.tr(context: context), label: LocaleKeys.weight.tr(context: context),
value: vitalSign.weightKg?.toString() ?? '--', value: vitalSign.weightKg?.toString() ?? '--',
unit: 'kg', unit: 'kg',
status: vitalSign.weightKg != null ? "Normal" : null, status: vitalSign.weightKg != null ? _getWeightStatus(vitalSign.bodyMassIndex) : null,
onTap: onTap, onTap: onTap,
), ),
), ),
@ -1593,6 +1593,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
return VitalSignUiModel.bmiStatus(bmi); return VitalSignUiModel.bmiStatus(bmi);
} }
String? _getWeightStatus(dynamic bmi) {
if (bmi == null) return 'Normal';
return VitalSignUiModel.bmiStatus(bmi);
}
String? _getBloodPressureStatus({dynamic systolic, dynamic diastolic}) { String? _getBloodPressureStatus({dynamic systolic, dynamic diastolic}) {
return VitalSignUiModel.bloodPressureStatus(systolic: systolic, diastolic: diastolic); return VitalSignUiModel.bloodPressureStatus(systolic: systolic, diastolic: diastolic);
} }

@ -26,7 +26,7 @@ class RateAppointmentDoctor extends StatefulWidget {
class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> { class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
String note = ""; String note = "";
int rating = 5; int rating = 0;
// ProjectViewModel? projectViewModel; // ProjectViewModel? projectViewModel;
AppointmentRatingViewModel? appointmentRatingViewModel; AppointmentRatingViewModel? appointmentRatingViewModel;
@ -145,7 +145,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
decoration: InputDecoration.collapsed( decoration: InputDecoration.collapsed(
hintText: LocaleKeys.notes.tr(context: context), hintText: LocaleKeys.notes.tr(context: context),
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 16, fontSize: 16.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xff2B353E), color: Color(0xff2B353E),
letterSpacing: -0.64, letterSpacing: -0.64,

@ -36,32 +36,26 @@ class BuildDoctorRow extends StatelessWidget {
SizedBox(height: 8.h), SizedBox(height: 8.h),
isForClinic ? Wrap( isForClinic ? Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 3.h, spacing: 3.h,
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
appointmentDetails!.clinicName.toString(), appointmentDetails!.clinicName.toString(),
), ),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.ic_date_filter, icon: AppAssets.ic_date_filter,
labelText: labelText:
DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false), DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false),
), ),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.appointment_time_icon, icon: AppAssets.appointment_time_icon,
labelText: labelText:
appointmentDetails!.startTime.substring(0, appointmentDetails!.startTime.length - 3), appointmentDetails!.startTime.substring(0, appointmentDetails!.startTime.length - 3),
), ),
] ]
) : Wrap( ) : Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
@ -69,26 +63,26 @@ class BuildDoctorRow extends StatelessWidget {
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
appointmentDetails!.projectName.toString(), appointmentDetails!.projectName.toString(),
), ),
AppCustomChipWidget( AppCustomChipWidget(
labelText: labelText:
appointmentDetails!.clinicName.toString(), appointmentDetails!.clinicName.toString(),
),
) AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -8.w, end: 6.w),
] icon: AppAssets.ic_date_filter,
) labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false),
], ),
],
),
],
),
), ),
),
], ],
)); ),
);
} }
} }

@ -89,6 +89,21 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
), ),
_whatIsThisResultCard(context), _whatIsThisResultCard(context),
_historyCard(context, history: history), _historyCard(context, history: history),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 16.r,
hasShadow: false,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.history.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
SizedBox(height: 16.h),
_buildHistoryList(context, history),
],
).paddingSymmetrical(16.h, 16.h),
),
], ],
).paddingAll(24.h), ).paddingAll(24.h),
); );
@ -264,35 +279,27 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( LocaleKeys.historyFlowchart.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
_isGraphVisible ? LocaleKeys.historyFlowchart.tr(context: context) : LocaleKeys.history.tr(context: context),
style: TextStyle(
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( // Container(
width: 24.h, // width: 24.h,
height: 24.h, // height: 24.h,
alignment: Alignment.center, // alignment: Alignment.center,
child: InkWell( // child: InkWell(
onTap: () { // onTap: () {
setState(() { // setState(() {
_isGraphVisible = !_isGraphVisible; // _isGraphVisible = !_isGraphVisible;
}); // });
}, // },
child: Utils.buildSvgWithAssets( // child: Utils.buildSvgWithAssets(
icon: _isGraphVisible ? AppAssets.ic_list : AppAssets.ic_graph, // icon: _isGraphVisible ? AppAssets.ic_list : AppAssets.ic_graph,
width: 24.h, // width: 24.h,
height: 24.h, // height: 24.h,
), // ),
), // ),
), // ),
// SizedBox(width: 16.h), // SizedBox(width: 16.h),
// Container( // Container(
// width: 24.h, // width: 24.h,
@ -663,7 +670,8 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
case VitalSignMetric.height: case VitalSignMetric.height:
return null; return null;
case VitalSignMetric.weight: case VitalSignMetric.weight:
return latest.weightKg != null ? 'Normal' : null; // return latest.weightKg != null ? 'Normal' : null;
return VitalSignUiModel.bmiStatus(latest.bodyMassIndex);
case VitalSignMetric.temperature: case VitalSignMetric.temperature:
return null; return null;
case VitalSignMetric.heartRate: case VitalSignMetric.heartRate:

@ -138,11 +138,13 @@ class _VitalSignPageState extends State<VitalSignPage> {
label: LocaleKeys.weight.tr(context: context), label: LocaleKeys.weight.tr(context: context),
value: latestVitalSign?.weightKg?.toString() ?? '--', value: latestVitalSign?.weightKg?.toString() ?? '--',
unit: 'kg', unit: 'kg',
status: (latestVitalSign?.weightKg != null) ? 'Normal' : null, status: (latestVitalSign?.weightKg != null)
? VitalSignUiModel.bmiStatus(latestVitalSign?.bodyMassIndex)
: null,
onTap: () => _openDetails( onTap: () => _openDetails(
VitalSignDetailsArgs( VitalSignDetailsArgs(
metric: VitalSignMetric.weight, metric: VitalSignMetric.weight,
title: LocaleKeys.height.tr(context: context), title: LocaleKeys.weight.tr(context: context),
icon: AppAssets.weightVital, icon: AppAssets.weightVital,
unit: 'kg', unit: 'kg',
), ),

@ -116,6 +116,7 @@ void showCommonBottomSheet(BuildContext context,
Function(String?)? callBackFunc, Function(String?)? callBackFunc,
String? title, String? title,
required double height, required double height,
bool isAutoDismiss = false,
bool isCloseButtonVisible = true, bool isCloseButtonVisible = true,
bool isFullScreen = true, bool isFullScreen = true,
bool isDismissible = true, bool isDismissible = true,
@ -131,6 +132,14 @@ void showCommonBottomSheet(BuildContext context,
isDismissible: isDismissible, isDismissible: isDismissible,
backgroundColor: isSuccessDialog ? AppColors.whiteColor : AppColors.scaffoldBgColor, backgroundColor: isSuccessDialog ? AppColors.whiteColor : AppColors.scaffoldBgColor,
builder: (BuildContext context) { builder: (BuildContext context) {
if (isAutoDismiss) {
Future.delayed(Duration(seconds: 2), () {
Navigator.of(context).pop();
if (callBackFunc != null) {
callBackFunc(null);
}
});
}
return Container( return Container(
height: height, height: height,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.scaffoldBgColor, borderRadius: 24.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.scaffoldBgColor, borderRadius: 24.h),
@ -214,6 +223,7 @@ void showCommonBottomSheetWithoutHeight(
bool isCloseButtonVisible = true, bool isCloseButtonVisible = true,
bool isFullScreen = true, bool isFullScreen = true,
bool isDismissible = true, bool isDismissible = true,
bool isAutoDismiss = false,
Widget? titleWidget, Widget? titleWidget,
bool useSafeArea = false, bool useSafeArea = false,
bool hasBottomPadding = true, bool hasBottomPadding = true,
@ -237,6 +247,14 @@ void showCommonBottomSheetWithoutHeight(
backgroundColor: resolvedBgColor, backgroundColor: resolvedBgColor,
useSafeArea: useSafeArea, useSafeArea: useSafeArea,
builder: (BuildContext context) { builder: (BuildContext context) {
if (isAutoDismiss) {
Future.delayed(Duration(seconds: 2), () {
Navigator.of(context).pop();
if (callBackFunc != null) {
callBackFunc();
}
});
}
return SafeArea( return SafeArea(
top: false, top: false,
left: false, left: false,

Loading…
Cancel
Save