Merge pull request 'haroon_dev' (#231) from haroon_dev into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/231
pull/233/head
Haroon6138 2 days ago
commit 730a4f0040

@ -559,6 +559,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID, clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
doctorID: widget.patientAppointmentHistoryResponseModel.doctorID, doctorID: widget.patientAppointmentHistoryResponseModel.doctorID,
setupID: widget.patientAppointmentHistoryResponseModel.setupID, setupID: widget.patientAppointmentHistoryResponseModel.setupID,
isInOutPatient: widget.patientAppointmentHistoryResponseModel.isInOutPatient,
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo,
episodeID: widget.patientAppointmentHistoryResponseModel.episodeID,
dischargeNo: 0,
); );
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(

@ -703,7 +703,7 @@ class _LandingPageState extends State<LandingPage> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return AnimationConfiguration.staggeredList( return AnimationConfiguration.staggeredList(
position: index, position: index,
duration: const Duration(milliseconds: 500), duration: const Duration(milliseconds: 200),
child: SlideAnimation( child: SlideAnimation(
horizontalOffset: 100.0, horizontalOffset: 100.0,
child: FadeInAnimation( child: FadeInAnimation(

@ -229,7 +229,7 @@ class FadedLargeServiceCard extends StatelessWidget {
Row( Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
isPNG ? Image.asset(serviceCardData.icon, width: 35.h, height: 35.h) : Container( isPNG ? Image.asset(serviceCardData.icon, width: 32.h, height: 32.h).circle(100.h) : Container(
height: 32.h, height: 32.h,
width: 32.h, width: 32.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(

@ -169,8 +169,8 @@ class _PatientSickleavesListPageState extends State<PatientSickleavesListPage> {
richText: Row( richText: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
"${model.patientSickLeaveList[index].sickLeaveDays} ".toText10(isEnglishOnly: true), "${model.patientSickLeaveList[index].sickLeaveDays} ".toText10(isBold: true),
LocaleKeys.days.tr(context: context).toText10() LocaleKeys.days.tr(context: context).toText10(isBold: true)
], ],
), ),
// labelText: "${model.patientSickLeaveList[index].sickLeaveDays} ${LocaleKeys.days.tr(context: context)}", // labelText: "${model.patientSickLeaveList[index].sickLeaveDays} ${LocaleKeys.days.tr(context: context)}",

@ -108,7 +108,7 @@ class MedicalFileAppointmentCard extends StatelessWidget {
borderColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01), borderColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01),
textColor: AppointmentType.getNextActionTextColor(patientAppointmentHistoryResponseModel.nextAction), textColor: AppointmentType.getNextActionTextColor(patientAppointmentHistoryResponseModel.nextAction),
fontSize: 14.f, fontSize: 14.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
borderRadius: 12.r, borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w), padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h, height: 40.h,
@ -118,8 +118,13 @@ class MedicalFileAppointmentCard extends StatelessWidget {
).toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading), ).toShimmer2(isShow: myAppointmentsViewModel.isMyAppointmentsLoading),
), ),
SizedBox(width: 8.w), SizedBox(width: 8.w),
Expanded( ((((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
flex: 2, (patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
AppointmentType.isArrived(patientAppointmentHistoryResponseModel))
? SizedBox.shrink()
: Expanded(
flex: 2,
child: Container( child: Container(
height: 40.h, height: 40.h,
width: 40.w, width: 40.w,
@ -163,42 +168,75 @@ class MedicalFileAppointmentCard extends StatelessWidget {
} }
Widget getArrivedAppointmentButton(BuildContext context) { Widget getArrivedAppointmentButton(BuildContext context) {
return if ((((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
// DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15 (patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
// ? CustomButton( !Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
// text: LocaleKeys.askDoctor.tr(context: context), AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) {
// onPressed: () { return CustomButton(
// onAskDoctorTap(); text: LocaleKeys.viewDetails.tr(context: context),
// }, onPressed: () {
// backgroundColor: AppColors.secondaryLightRedColor, Navigator.of(context)
// borderColor: AppColors.secondaryLightRedColor, .push(
// textColor: AppColors.primaryRedColor, CustomPageRoute(
// fontSize: 14.f, page: AppointmentDetailsPage(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel),
// fontWeight: FontWeight.w600, ),
// borderRadius: 12.r, )
// padding: EdgeInsets.symmetric(horizontal: 10.w), .then((_) {
// height: 40.h, myAppointmentsViewModel.initAppointmentsViewModel();
// icon: AppAssets.ask_doctor_icon, myAppointmentsViewModel.getPatientAppointments(true, false);
// iconColor: AppColors.primaryRedColor, });
// iconSize: 16.h, },
// ) backgroundColor: AppColors.secondaryLightRedColor,
// : borderColor: AppColors.secondaryLightRedColor,
CustomButton( textColor: AppColors.primaryRedColor,
text: LocaleKeys.rebook.tr(context: context), fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
onPressed: () { fontWeight: FontWeight.w600,
onRescheduleTap(); borderRadius: 12.r,
}, padding: EdgeInsets.symmetric(horizontal: 10.w),
backgroundColor: AppColors.greyColor, // height: isTablet || isFoldable ? 46.h : 40.h,
borderColor: AppColors.greyColor, height: 40.h,
textColor: AppColors.blackColor, icon: null,
fontSize: 14.f, iconColor: AppColors.primaryRedColor,
fontWeight: FontWeight.w600, iconSize: 16.h,
borderRadius: 12.r, );
padding: EdgeInsets.symmetric(horizontal: 10.w), } else {
height: 40.h, return
icon: AppAssets.rebook_appointment_icon, // DateTime.now().difference(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate)).inDays <= 15
iconColor: AppColors.blackColor, // ? CustomButton(
iconSize: 16.h, // text: LocaleKeys.askDoctor.tr(context: context),
); // onPressed: () {
// onAskDoctorTap();
// },
// backgroundColor: AppColors.secondaryLightRedColor,
// borderColor: AppColors.secondaryLightRedColor,
// textColor: AppColors.primaryRedColor,
// fontSize: 14.f,
// fontWeight: FontWeight.w600,
// borderRadius: 12.r,
// padding: EdgeInsets.symmetric(horizontal: 10.w),
// height: 40.h,
// icon: AppAssets.ask_doctor_icon,
// iconColor: AppColors.primaryRedColor,
// iconSize: 16.h,
// )
// :
CustomButton(
text: LocaleKeys.rebook.tr(context: context),
onPressed: () {
onRescheduleTap();
},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
textColor: AppColors.blackColor,
fontSize: 14.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
icon: AppAssets.rebook_appointment_icon,
iconColor: AppColors.blackColor,
iconSize: 16.h,
);
}
} }
} }

@ -251,6 +251,9 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
await prescriptionsViewModel.getPrescriptionDetails(widget.prescriptionsResponseModel, onSuccess: (val) { await prescriptionsViewModel.getPrescriptionDetails(widget.prescriptionsResponseModel, onSuccess: (val) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
prescriptionsViewModel.initiatePrescriptionDelivery(); prescriptionsViewModel.initiatePrescriptionDelivery();
}, onError: (err) {
LoaderBottomSheet.hideLoader();
print(err);
}); });
} }
}, },

@ -84,7 +84,22 @@ class CustomButton extends StatelessWidget {
padding: text.isNotEmpty ? EdgeInsets.only(right: 4.w, left: 4.w) : EdgeInsets.zero, padding: text.isNotEmpty ? EdgeInsets.only(right: 4.w, left: 4.w) : EdgeInsets.zero,
child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isButtonDisabled, width: iconS, height: iconS, applyThemeColor: applyThemeColor), child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isButtonDisabled, width: iconS, height: iconS, applyThemeColor: applyThemeColor),
), ),
if (text.isNotEmpty) if (text.isNotEmpty && icon != null)
Flexible(
child: Text(
text,
overflow: textOverflow ?? TextOverflow.ellipsis,
maxLines: 1,
textAlign: TextAlign.center,
style: context.dynamicTextStyle(
fontSize: fontS,
color: isButtonDisabled ? AppColors.greyTextColor : textColor,
letterSpacing: 0,
fontWeight: isBold ? FontWeight.w700 : fontWeight,
),
),
),
if (text.isNotEmpty && icon == null)
Text( Text(
text, text,
overflow: textOverflow ?? TextOverflow.ellipsis, overflow: textOverflow ?? TextOverflow.ellipsis,

Loading…
Cancel
Save