Image Functionality & Discounts & Offers

pull/319/head
Aamir Muhammad 2 months ago
parent 4fd2312e61
commit c77ee66c3a

@ -274,9 +274,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: LocaleKeys.ageYearsOld.tr( labelText: LocaleKeys.ageYearsOld.tr(namedArgs: {'age': '${appState.getAuthenticatedUser()!.age}', 'yearsOld': LocaleKeys.yearsOld.tr(context: context)}, context: context),
namedArgs: {'age': '${appState.getAuthenticatedUser()!.age}', 'yearsOld': LocaleKeys.yearsOld.tr(context: context)},
context: context),
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w), labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
), ),
AppCustomChipWidget( AppCustomChipWidget(
@ -319,14 +317,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
onChipTap: () { onChipTap: () {
if (!insuranceVM.isInsuranceActive) { if (!insuranceVM.isInsuranceActive) {
insuranceVM.setIsInsuranceUpdateDetailsLoading(true); insuranceVM.setIsInsuranceUpdateDetailsLoading(true);
insuranceVM.getPatientInsuranceDetailsForUpdate(appState.getAuthenticatedUser()!.patientId.toString(), insuranceVM.getPatientInsuranceDetailsForUpdate(
appState.getAuthenticatedUser()!.patientIdentificationNo.toString()); appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
child: PatientInsuranceCardUpdateCard(),
callBackFunc: () {},
title: "",
isCloseButtonVisible: false,
isFullScreen: false);
// showCommonBottomSheetWithoutHeight( // showCommonBottomSheetWithoutHeight(
// title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!), // title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
// navigationService.navigatorKey.currentContext!, // navigationService.navigatorKey.currentContext!,
@ -500,13 +493,10 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
getSelectedTabData(0), getSelectedTabData(0),
], ],
), ),
ExpandableListItem( ExpandableListItem(title: LocaleKeys.medicalReports.tr(context: context).toText18(isBold: true), expandedBackgroundColor: Colors.transparent, children: [
title: LocaleKeys.medicalReports.tr(context: context).toText18(isBold: true), SizedBox(height: 10.h),
expandedBackgroundColor: Colors.transparent, getSelectedTabData(2),
children: [ ]),
SizedBox(height: 10.h),
getSelectedTabData(2),
]),
ExpandableListItem( ExpandableListItem(
title: LocaleKeys.insuranceAndPayments.tr(context: context).toText18(isBold: true), title: LocaleKeys.insuranceAndPayments.tr(context: context).toText18(isBold: true),
expandedBackgroundColor: Colors.transparent, expandedBackgroundColor: Colors.transparent,
@ -610,14 +600,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
text: "${LocaleKeys.updateInsurance.tr(context: context)} ${LocaleKeys.updateInsuranceSubtitle.tr(context: context)}", text: "${LocaleKeys.updateInsurance.tr(context: context)} ${LocaleKeys.updateInsuranceSubtitle.tr(context: context)}",
onPressed: () { onPressed: () {
insuranceViewModel.setIsInsuranceUpdateDetailsLoading(true); insuranceViewModel.setIsInsuranceUpdateDetailsLoading(true);
insuranceViewModel.getPatientInsuranceDetailsForUpdate(appState.getAuthenticatedUser()!.patientId.toString(), insuranceViewModel.getPatientInsuranceDetailsForUpdate(
appState.getAuthenticatedUser()!.patientIdentificationNo.toString()); appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
child: PatientInsuranceCardUpdateCard(),
callBackFunc: () {},
title: "",
isCloseButtonVisible: false,
isFullScreen: false);
}, },
backgroundColor: AppColors.bgGreenColor.withOpacity(0.20), backgroundColor: AppColors.bgGreenColor.withOpacity(0.20),
borderColor: AppColors.bgGreenColor.withOpacity(0.0), borderColor: AppColors.bgGreenColor.withOpacity(0.0),
@ -742,8 +727,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
? Container( ? Container(
padding: EdgeInsets.all(12.w), padding: EdgeInsets.all(12.w),
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
decoration: decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, hasShadow: false),
RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, hasShadow: false),
child: Column( child: Column(
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h), Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h),
@ -902,8 +886,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
? const CommonShimmerWidget().paddingSymmetrical(0.w, 0.h) ? const CommonShimmerWidget().paddingSymmetrical(0.w, 0.h)
: prescriptionVM.patientPrescriptionOrders.isNotEmpty : prescriptionVM.patientPrescriptionOrders.isNotEmpty
? Container( ? Container(
decoration: decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r, hasShadow: false),
RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r, hasShadow: false),
child: Padding( child: Padding(
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
child: Column( child: Column(
@ -940,15 +923,13 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
spacing: 3.w, spacing: 3.w,
runSpacing: 4.w, runSpacing: 4.w,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
Directionality( Directionality(
textDirection: ui.TextDirection.ltr, textDirection: ui.TextDirection.ltr,
child: AppCustomChipWidget( child: AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon, icon: AppAssets.doctor_calendar_icon,
labelText: DateUtil.formatDateToDate( labelText: DateUtil.formatDateToDate(
DateUtil.convertStringToDate( DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate),
prescriptionVM.patientPrescriptionOrders[index].appointmentDate),
false, false,
), ),
isEnglishOnly: true, isEnglishOnly: true,
@ -962,20 +943,14 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
// SizedBox(width: 40.h), // SizedBox(width: 40.h),
Transform.flip( Transform.flip(
flipX: appState.isArabic(), flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child:
icon: AppAssets.forward_arrow_icon_small, Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon_small, width: 15.w, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
width: 15.w,
height: 15.h,
fit: BoxFit.contain,
iconColor: AppColors.textColor)),
], ],
).onPress(() { ).onPress(() {
prescriptionVM.setPrescriptionsDetailsLoading(); prescriptionVM.setPrescriptionsDetailsLoading();
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: PrescriptionDetailPage( page: PrescriptionDetailPage(isFromAppointments: false, prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]),
isFromAppointments: false,
prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]),
), ),
); );
}), }),
@ -1137,10 +1112,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
SizedBox(height: 8.h), SizedBox(height: 8.h),
SizedBox( SizedBox(
width: 80.w, width: 80.w,
child: (myAppointmentsVM.patientMyDoctorsList[index].doctorName) child: (myAppointmentsVM.patientMyDoctorsList[index].doctorName).toString().toText12(isBold: true, isCenter: true, maxLine: 2).toShimmer2(isShow: false),
.toString()
.toText12(isBold: true, isCenter: true, maxLine: 2)
.toShimmer2(isShow: false),
), ),
], ],
), ),
@ -1155,8 +1127,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: DoctorProfilePage( page: DoctorProfilePage(isDoctorAllowedToBook: !(myAppointmentsVM.patientMyDoctorsList[index].isLiveCareClinic ?? false)),
isDoctorAllowedToBook: !(myAppointmentsVM.patientMyDoctorsList[index].isLiveCareClinic ?? false)),
), ),
); );
}, onError: (err) { }, onError: (err) {
@ -1293,13 +1264,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
); );
}), }),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Selector<MedicalFileViewModel, Selector<MedicalFileViewModel, ({bool isLoading, List<PatientMedicalReportResponseModel> listRequest, List<PatientMedicalReportResponseModel> listReady})>(
({bool isLoading, List<PatientMedicalReportResponseModel> listRequest, List<PatientMedicalReportResponseModel> listReady})>( selector: (context, vm) => (isLoading: vm.isPatientMedicalReportsListLoading, listRequest: vm.patientMedicalReportRequestedList, listReady: vm.patientMedicalReportReadyList),
selector: (context, vm) => (
isLoading: vm.isPatientMedicalReportsListLoading,
listRequest: vm.patientMedicalReportRequestedList,
listReady: vm.patientMedicalReportReadyList
),
builder: (context, data, _) { builder: (context, data, _) {
return MedicalReportCard(isLoading: data.isLoading, listRequest: data.listRequest, listReady: data.listReady); return MedicalReportCard(isLoading: data.isLoading, listRequest: data.listRequest, listReady: data.listReady);
}, },
@ -1555,17 +1521,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
child: _buildVitalSignCard( child: _buildVitalSignCard(
icon: AppAssets.bloodPressure, icon: AppAssets.bloodPressure,
label: LocaleKeys.bloodPressure.tr(context: context), label: LocaleKeys.bloodPressure.tr(context: context),
value: (vitalSign.bloodPressureLower != null && value: (vitalSign.bloodPressureLower != null && vitalSign.bloodPressureHigher != null && vitalSign.bloodPressureLower != 0 && vitalSign.bloodPressureHigher != 0)
vitalSign.bloodPressureHigher != null &&
vitalSign.bloodPressureLower != 0 &&
vitalSign.bloodPressureHigher != 0)
? "${vitalSign.bloodPressureHigher}/${vitalSign.bloodPressureLower}" ? "${vitalSign.bloodPressureHigher}/${vitalSign.bloodPressureLower}"
: '--', : '--',
unit: '', unit: '',
status: (vitalSign.bloodPressureLower != null && status: (vitalSign.bloodPressureLower != null && vitalSign.bloodPressureHigher != null && vitalSign.bloodPressureLower != 0 && vitalSign.bloodPressureHigher != 0)
vitalSign.bloodPressureHigher != null &&
vitalSign.bloodPressureLower != 0 &&
vitalSign.bloodPressureHigher != 0)
? _getBloodPressureStatus( ? _getBloodPressureStatus(
systolic: vitalSign.bloodPressureHigher, systolic: vitalSign.bloodPressureHigher,
diastolic: vitalSign.bloodPressureLower, diastolic: vitalSign.bloodPressureLower,
@ -1649,8 +1609,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
weight: FontWeight.w600, weight: FontWeight.w600,
), ),
), ),
Utils.buildSvgWithAssets( Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward, width: 18.w, height: 18.h),
icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward, width: 18.w, height: 18.h),
], ],
), ),
Spacer(), Spacer(),

Loading…
Cancel
Save