pull/91/head
haroon amjad 5 months ago
parent 2e16622cc3
commit 2160f87c59

@ -729,7 +729,7 @@ var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatb
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -7,7 +7,6 @@ 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/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart'; import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.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: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';
@ -122,7 +121,7 @@ class TrackingScreen extends StatelessWidget {
height: 40.h, height: 40.h,
backgroundColor: AppColors.lightRedButtonColor, backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent, borderColor: Colors.transparent,
text: "Share Your Live Locatin on Whatsapp".needTranslation, text: "Share Your Live Location on Whatsapp".needTranslation,
fontSize: 12.f, fontSize: 12.f,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
@ -231,50 +230,50 @@ class TrackingScreen extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
), ),
TextSpan( TextSpan(
text: "...".needTranslation, text: "...".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.errorColor, color: AppColors.errorColor,
), ),
), ),
]), ]),
); );
case OrderTrackingState.returning: case OrderTrackingState.returning:
return RichText( return RichText(
text: TextSpan(children: <TextSpan>[ text: TextSpan(children: <TextSpan>[
TextSpan( TextSpan(
text: "15:30".needTranslation, text: "15:30".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
), ),
TextSpan( TextSpan(
text: " mins ".needTranslation, text: " mins ".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.errorColor, color: AppColors.errorColor,
), ),
), ),
TextSpan( TextSpan(
text: "to hospital".needTranslation, text: "to hospital".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
), ),
]), ]),
); );
case OrderTrackingState.ended: case OrderTrackingState.ended:
default: default:
return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600); return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600);
} }
} }

@ -136,7 +136,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
).withHorizontalPadding(24.w).onPress(() { ).withHorizontalPadding(24.w).onPress(() {
DialogService dialogService = getIt.get<DialogService>(); DialogService dialogService = getIt.get<DialogService>();
dialogService.showFamilyBottomSheetWithoutH( dialogService.showFamilyBottomSheetWithoutH(
label: "Who do you want to book for?".needTranslation, label: "Family Files".needTranslation,
message: "This clinic or doctor is only available for the below eligible profiles.".needTranslation, message: "This clinic or doctor is only available for the below eligible profiles.".needTranslation,
onSwitchPress: (FamilyFileResponseModelLists profile) { onSwitchPress: (FamilyFileResponseModelLists profile) {
medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber); medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber);
@ -144,133 +144,130 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
profiles: medicalFileViewModel.patientFamilyFiles); profiles: medicalFileViewModel.patientFamilyFiles);
}), }),
isLeading: false, isLeading: false,
child: SingleChildScrollView( child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ SizedBox(height: 16.h),
SizedBox(height: 16.h), TextInputWidget(
TextInputWidget( labelText: LocaleKeys.search.tr(context: context),
labelText: LocaleKeys.search.tr(context: context), hintText: "Type any record".needTranslation,
hintText: "Type any record".needTranslation, controller: TextEditingController(),
controller: TextEditingController(), keyboardType: TextInputType.number,
keyboardType: TextInputType.number, isEnable: true,
isEnable: true, prefix: null,
prefix: null, autoFocus: false,
autoFocus: false, isBorderAllowed: false,
isBorderAllowed: false, isAllowLeadingIcon: true,
isAllowLeadingIcon: true, padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h), leadingIcon: AppAssets.student_card,
leadingIcon: AppAssets.student_card, ).paddingSymmetrical(24.w, 0.0),
).paddingSymmetrical(24.w, 0.0), SizedBox(height: 16.h),
SizedBox(height: 16.h), Container(
Container( width: double.infinity,
width: double.infinity, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r), child: Padding(
child: Padding( padding: EdgeInsets.all(16.w),
padding: EdgeInsets.all(16.w), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Row(
Row( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, width: 56.w, height: 56.h),
Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, width: 56.w, height: 56.h), SizedBox(width: 8.w),
SizedBox(width: 8.w), Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" .toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1),
.toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1), SizedBox(height: 4.h),
SizedBox(height: 4.h), Wrap(
Wrap( direction: Axis.horizontal,
direction: Axis.horizontal, spacing: 4.w,
spacing: 4.w, runSpacing: 6.w,
runSpacing: 6.w, children: [
children: [ AppCustomChipWidget(
AppCustomChipWidget( icon: AppAssets.file_icon,
icon: AppAssets.file_icon, labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}",
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}", labelPadding: EdgeInsetsDirectional.only(end: 6.w),
labelPadding: EdgeInsetsDirectional.only(end: 6.w), onChipTap: () {
onChipTap: () { navigationService.pushPage(
navigationService.pushPage( page: FamilyMedicalScreen(
page: FamilyMedicalScreen( profiles: medicalFileViewModel.patientFamilyFiles,
profiles: medicalFileViewModel.patientFamilyFiles, onSelect: (FamilyFileResponseModelLists p1) {},
onSelect: (FamilyFileResponseModelLists p1) {}, ));
)); },
}, ),
), AppCustomChipWidget(
AppCustomChipWidget( icon: AppAssets.checkmark_icon,
icon: AppAssets.checkmark_icon, labelText: LocaleKeys.verified.tr(context: context),
labelText: LocaleKeys.verified.tr(context: context), iconColor: AppColors.successColor,
iconColor: AppColors.successColor, labelPadding: EdgeInsetsDirectional.only(end: 6.w),
labelPadding: EdgeInsetsDirectional.only(end: 6.w), ),
), ],
], ),
), ],
], )
) ],
], ),
), SizedBox(height: 16.h),
SizedBox(height: 16.h), Divider(color: AppColors.dividerColor, height: 1.h),
Divider(color: AppColors.dividerColor, height: 1.h), SizedBox(height: 16.h),
SizedBox(height: 16.h), Wrap(
Wrap( direction: Axis.horizontal,
direction: Axis.horizontal, spacing: 4.h,
spacing: 4.h, runSpacing: 4.h,
runSpacing: 4.h, children: [
children: [ AppCustomChipWidget(
AppCustomChipWidget( labelText: "${appState.getAuthenticatedUser()!.age} Years Old",
labelText: "${appState.getAuthenticatedUser()!.age} Years Old",
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w), labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
), ),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.blood_icon, icon: AppAssets.blood_icon,
labelText: "Blood: ${appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup.isEmpty}", labelText: "Blood: ${appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup.isEmpty}",
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
labelPadding: EdgeInsetsDirectional.only(end: 8.w), labelPadding: EdgeInsetsDirectional.only(end: 8.w),
), ),
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) { Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
return AppCustomChipWidget( return AppCustomChipWidget(
icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon, icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon,
labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation, labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation,
iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
iconSize: 12.w, iconSize: 12.w,
backgroundColor: backgroundColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1),
insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1), labelPadding: EdgeInsetsDirectional.only(end: 8.w),
labelPadding: EdgeInsetsDirectional.only(end: 8.w), );
); }),
}),
],
),
],
),
),
).paddingSymmetrical(24.w, 0.0),
SizedBox(height: 16.h),
Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
return Column(
children: [
CustomTabBar(
activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.more, "More".needTranslation),
], ],
onTabChange: (index) { ),
medicalFileVM.onTabChanged(index);
},
).paddingSymmetrical(24.w, 0.0),
SizedBox(height: 24.h),
getSelectedTabData(medicalFileVM.selectedTabIndex),
], ],
); ),
}), ),
], ).paddingSymmetrical(24.w, 0.0),
), SizedBox(height: 16.h),
Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
return Column(
children: [
CustomTabBar(
activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.more, "More".needTranslation),
],
onTabChange: (index) {
medicalFileVM.onTabChanged(index);
},
).paddingSymmetrical(24.w, 0.0),
SizedBox(height: 24.h),
getSelectedTabData(medicalFileVM.selectedTabIndex),
],
);
}),
],
), ),
); );
} }
@ -344,6 +341,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
SizedBox(height: 16.h), SizedBox(height: 16.h),
Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) { Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
return SizedBox( return SizedBox(
height: 185.h,
child: myAppointmentsVM.isMyAppointmentsLoading child: myAppointmentsVM.isMyAppointmentsLoading
? MedicalFileAppointmentCard( ? MedicalFileAppointmentCard(
patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(), patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(),

@ -168,7 +168,7 @@ class _FamilyCardsState extends State<FamilyCards> {
? ((profile.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.male_img) ? ((profile.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.male_img)
: (profile.age! < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg), : (profile.age! < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg),
width: 80.h, width: 80.h,
height: 78.h), height: 72.h),
SizedBox(height: 8.h), SizedBox(height: 8.h),
(profile.patientName ?? "Unknown").toText14(isBold: false, isCenter: true, maxlines: 1, weight: FontWeight.w600), (profile.patientName ?? "Unknown").toText14(isBold: false, isCenter: true, maxlines: 1, weight: FontWeight.w600),
SizedBox(height: 8.h), SizedBox(height: 8.h),

Loading…
Cancel
Save