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

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/139
pull/147/head
Haroon6138 2 weeks ago
commit 1dce2a5c3a

@ -210,7 +210,7 @@ class ApiClientImp implements ApiClient {
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
log("uri: ${Uri.parse(url.trim())}"); log("uri: ${Uri.parse(url.trim())}");
log("body: ${json.encode(body)}"); log("body: ${json.encode(body)}");
log("response.body: ${response.body}"); // log("response.body: ${response.body}");
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
onFailure('Error While Fetching data', statusCode, failureType: StatusCodeFailure("Error While Fetching data")); onFailure('Error While Fetching data', statusCode, failureType: StatusCodeFailure("Error While Fetching data"));
logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);

@ -182,6 +182,7 @@ class PrescriptionsRepoImp implements PrescriptionsRepo {
"To": Utils.appState.getAuthenticatedUser()!.emailAddress, "To": Utils.appState.getAuthenticatedUser()!.emailAddress,
"SetupID": prescriptionsResponseModel.setupID, "SetupID": prescriptionsResponseModel.setupID,
"IsDownload": true, "IsDownload": true,
"isDentalAllowedBackend": false,
}; };
try { try {

@ -246,7 +246,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
], ],
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Wrap( bookAppointmentsViewModel.appointmentNearestGateResponseModel != null ? Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 8.w, spacing: 8.w,
runSpacing: 8.h, runSpacing: 8.h,
@ -261,7 +261,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
"Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}") "Nearest Gate: ${getIt.get<AppState>().isArabic() ? bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumberN : bookAppointmentsVM.appointmentNearestGateResponseModel!.nearestGateNumber}")
.toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading), .toShimmer2(isShow: bookAppointmentsVM.isAppointmentNearestGateLoading),
], ],
), ) : SizedBox.shrink(),
], ],
), ),
), ),

@ -179,7 +179,13 @@ class AppointmentCard extends StatelessWidget {
? '${patientAppointmentHistoryResponseModel.clinicName!.substring(0, 12)}...' ? '${patientAppointmentHistoryResponseModel.clinicName!.substring(0, 12)}...'
: patientAppointmentHistoryResponseModel.clinicName!), : patientAppointmentHistoryResponseModel.clinicName!),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
AppCustomChipWidget(labelText: isLoading ? 'Olaya' : patientAppointmentHistoryResponseModel.projectName!).toShimmer2(isShow: isLoading), AppCustomChipWidget(
labelText: isLoading
? 'Olaya'
: patientAppointmentHistoryResponseModel.projectName!.length > 15
? '${patientAppointmentHistoryResponseModel.projectName!.substring(0, 12)}...'
: patientAppointmentHistoryResponseModel.projectName!)
.toShimmer2(isShow: isLoading),
AppCustomChipWidget( AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w), labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
icon: AppAssets.appointment_calendar_icon, icon: AppAssets.appointment_calendar_icon,

@ -146,7 +146,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"${LocaleKeys.usageStatus.tr(context: context)}: ".toText14(isBold: true), "${LocaleKeys.usageStatus.tr(context: context)}: ".toText14(isBold: true),
insuranceApprovalResponseModel.apporvalDetails!.isInvoicedDesc!.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor), (insuranceApprovalResponseModel.apporvalDetails!.isInvoicedDesc ?? "").toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
], ],
), ),
], ],

@ -48,8 +48,9 @@ class PatientInsuranceCard extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true), SizedBox(
"Policy: ${insuranceCardDetailsModel.insurancePolicyNo}".toText12(isBold: true, color: AppColors.lightGrayColor), width: MediaQuery.of(context).size.width * 0.45, child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true)),
"Policy: ${insuranceCardDetailsModel.insurancePolicyNo}".needTranslation.toText12(isBold: true, color: AppColors.lightGrayColor),
], ],
), ),
AppCustomChipWidget( AppCustomChipWidget(

@ -180,8 +180,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" SizedBox(
.toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1), width: MediaQuery.of(context).size.width * 0.6,
child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"
.toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 2),
),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,

@ -84,7 +84,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
// ), // ),
// ], // ],
// ).paddingSymmetrical(24.h, 0.h), // ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 20.h), SizedBox(height: 8.h),
Row( Row(
children: [ children: [
CustomButton( CustomButton(
@ -162,7 +162,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
patientMedicalReportResponseModel: PatientMedicalReportResponseModel(), patientMedicalReportResponseModel: PatientMedicalReportResponseModel(),
medicalFileViewModel: medicalFileVM, medicalFileViewModel: medicalFileVM,
isLoading: true, isLoading: true,
).paddingSymmetrical(24.h, 8.h) ).paddingSymmetrical(0.h, 8.h)
: medicalFileViewModel.patientMedicalReportList.isNotEmpty : medicalFileViewModel.patientMedicalReportList.isNotEmpty
? AnimationConfiguration.staggeredList( ? AnimationConfiguration.staggeredList(
position: index, position: index,

@ -219,7 +219,15 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! text: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported!
? LocaleKeys.resendOrder.tr(context: context) ? LocaleKeys.resendOrder.tr(context: context)
: LocaleKeys.prescriptionDeliveryError.tr(context: context), : LocaleKeys.prescriptionDeliveryError.tr(context: context),
onPressed: () {}, onPressed: () async {
if (widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported!) {
LoaderBottomSheet.showLoader(loadingText: "Fetching prescription details...".needTranslation);
await prescriptionsViewModel.getPrescriptionDetails(widget.prescriptionsResponseModel, onSuccess: (val) {
LoaderBottomSheet.hideLoader();
prescriptionsViewModel.initiatePrescriptionDelivery();
});
}
},
backgroundColor: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.greyF7Color, backgroundColor: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.greyF7Color,
borderColor: AppColors.successColor.withOpacity(0.01), borderColor: AppColors.successColor.withOpacity(0.01),
textColor: textColor:

Loading…
Cancel
Save