diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index b17db62..00362bd 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -195,7 +195,7 @@ class ApiClientImp implements ApiClient { } // body['TokenID'] = "@dm!n"; - // body['PatientID'] = 4773715; + // body['PatientID'] = 4774018; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; // body['SessionID'] = "45786230487560q"; diff --git a/lib/features/emergency_services/emergency_services_repo.dart b/lib/features/emergency_services/emergency_services_repo.dart index c63f0ee..f8eb896 100644 --- a/lib/features/emergency_services/emergency_services_repo.dart +++ b/lib/features/emergency_services/emergency_services_repo.dart @@ -183,7 +183,7 @@ class EmergencyServicesRepoImp implements EmergencyServicesRepo { @override Future>>> getProjectList() async { - Map request = {}; + Map request = {'IsOnlineCheckIn': false, 'IsAdvancePayment': false, 'IsForER': true}; try { GenericApiModel>? apiResponse; diff --git a/lib/features/medical_file/medical_file_view_model.dart b/lib/features/medical_file/medical_file_view_model.dart index 9e50075..b93bb62 100644 --- a/lib/features/medical_file/medical_file_view_model.dart +++ b/lib/features/medical_file/medical_file_view_model.dart @@ -41,7 +41,7 @@ class MedicalFileViewModel extends ChangeNotifier { List patientSickLeavesViewList = []; bool isSickLeavesSortByClinic = true; - bool isSickLeavesDataNeedsReloading = true; + // bool isSickLeavesDataNeedsReloading = true; List patientAllergiesList = []; @@ -164,7 +164,7 @@ class MedicalFileViewModel extends ChangeNotifier { } setIsPatientSickLeaveListLoading(bool val) { - if (val && isSickLeavesDataNeedsReloading) { + // if (val && isSickLeavesDataNeedsReloading) { patientSickLeaveList.clear(); patientSickLeavesByClinic.clear(); patientSickLeavesByHospital.clear(); @@ -172,7 +172,7 @@ class MedicalFileViewModel extends ChangeNotifier { patientSickLeavePDFBase64 = ""; isSickLeavesSortByClinic = true; isPatientSickLeaveListLoading = val; - } + // } notifyListeners(); } @@ -268,11 +268,13 @@ class MedicalFileViewModel extends ChangeNotifier { } Future getPatientSickLeaveList({Function(dynamic)? onSuccess, Function(String)? onError}) async { - if (!isSickLeavesDataNeedsReloading) { - return; - } + // if (!isSickLeavesDataNeedsReloading) { + // return; + // } patientSickLeaveList.clear(); + notifyListeners(); + final result = await medicalFileRepo.getPatientSickLeavesList(); result.fold( @@ -314,7 +316,7 @@ class MedicalFileViewModel extends ChangeNotifier { } } patientSickLeavesViewList = patientSickLeavesByClinic; - isSickLeavesDataNeedsReloading = false; + // isSickLeavesDataNeedsReloading = false; notifyListeners(); if (onSuccess != null) { @@ -353,6 +355,11 @@ class MedicalFileViewModel extends ChangeNotifier { Future getPatientMedicalReportList({Function(dynamic)? onSuccess, Function(String)? onError}) async { patientMedicalReportList.clear(); + patientMedicalReportRequestedList.clear(); + patientMedicalReportReadyList.clear(); + patientMedicalReportCancelledList.clear(); + notifyListeners(); + final result = await medicalFileRepo.getPatientMedicalReportsList(); result.fold( diff --git a/lib/presentation/medical_report/medical_reports_page.dart b/lib/presentation/medical_report/medical_reports_page.dart index 87420fd..02a9bde 100644 --- a/lib/presentation/medical_report/medical_reports_page.dart +++ b/lib/presentation/medical_report/medical_reports_page.dart @@ -17,6 +17,7 @@ import 'package:hmg_patient_app_new/presentation/medical_report/widgets/patient_ 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/buttons/custom_button.dart'; +import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; @@ -251,46 +252,21 @@ class _MedicalReportsPageState extends State { ], ), SizedBox(height: 8.h), - Row( + Wrap( + alignment: WrapAlignment.start, + direction: Axis.horizontal, + spacing: 6.h, + runSpacing: 6.h, children: [ - CustomButton( - text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(report.appointmentDate), false), - onPressed: () {}, - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, - fontSize: 10, - fontWeight: FontWeight.w500, - borderRadius: 8, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 24.h, + AppCustomChipWidget( + labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(report.appointmentDate), false), ), - SizedBox(width: 8.h), - CustomButton( - text: medicalFileVM.isMedicalReportsSortByClinic ? report.projectName! : report.clinicDescription!, - onPressed: () {}, - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, - fontSize: 10, - fontWeight: FontWeight.w500, - borderRadius: 8, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 24.h, - ), - SizedBox(width: 8.h), - CustomButton( - text: report.statusDesc!, - onPressed: () {}, - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, - fontSize: 10, - fontWeight: FontWeight.w500, - borderRadius: 8, - padding: EdgeInsets.fromLTRB(10, 0, 10, 0), - height: 24.h, + AppCustomChipWidget( + labelText: medicalFileVM.isMedicalReportsSortByClinic ? report.projectName! : report.clinicDescription!, ), + report.statusDesc != null ? AppCustomChipWidget( + labelText: report.statusDesc ?? "test", + ) : SizedBox.shrink(), ], ), SizedBox(height: 8.h),