diff --git a/assets/images/svg/symptom_checker_icon.svg b/assets/images/svg/symptom_checker_icon.svg
new file mode 100644
index 0000000..e41c1dd
--- /dev/null
+++ b/assets/images/svg/symptom_checker_icon.svg
@@ -0,0 +1,6 @@
+
diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart
index 6ba2980..2fdc389 100644
--- a/lib/core/app_assets.dart
+++ b/lib/core/app_assets.dart
@@ -246,6 +246,7 @@ class AppAssets {
static const String rotateIcon = '$svgBasePath/rotate_icon.svg';
static const String refreshIcon = '$svgBasePath/refresh.svg';
static const String homeBorderedIcon = '$svgBasePath/home_bordered.svg';
+ static const String symptomCheckerIcon = '$svgBasePath/symptom_checker_icon.svg';
// Water Monitor
static const String waterBottle = '$svgBasePath/water_bottle.svg';
diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart
index 489af59..c6c5554 100644
--- a/lib/core/dependencies.dart
+++ b/lib/core/dependencies.dart
@@ -34,6 +34,8 @@ import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_repo.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart';
import 'package:hmg_patient_app_new/features/payfort/payfort_repo.dart';
import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_repo.dart';
@@ -138,6 +140,7 @@ class AppDependencies {
getIt.registerLazySingleton(() => SymptomsCheckerRepoImp(loggerService: getIt(), apiClient: getIt()));
getIt.registerLazySingleton(() => BloodDonationRepoImp(loggerService: getIt(), apiClient: getIt()));
getIt.registerLazySingleton(() => WaterMonitorRepoImp(loggerService: getIt(), apiClient: getIt()));
+ getIt.registerLazySingleton(() => MyInvoicesRepoImp(loggerService: getIt(), apiClient: getIt()));
// ViewModels
// Global/shared VMs → LazySingleton
@@ -271,5 +274,7 @@ class AppDependencies {
getIt.registerLazySingleton(() => HealthProvider());
getIt.registerLazySingleton(() => WaterMonitorViewModel(waterMonitorRepo: getIt()));
+
+ getIt.registerLazySingleton(() => MyInvoicesViewModel(myInvoicesRepo: getIt(), errorHandlerService: getIt(), navServices: getIt()));
}
}
diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart
index 46649fb..b393772 100644
--- a/lib/features/authentication/authentication_view_model.dart
+++ b/lib/features/authentication/authentication_view_model.dart
@@ -32,6 +32,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_vie
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/authentication/login.dart';
import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart';
+import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
@@ -39,6 +40,7 @@ import 'package:hmg_patient_app_new/services/error_handler_service.dart';
import 'package:hmg_patient_app_new/services/localauth_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:sms_otp_auto_verify/sms_otp_auto_verify.dart';
import 'models/request_models/get_user_mobile_device_data.dart';
@@ -565,7 +567,7 @@ class AuthenticationViewModel extends ChangeNotifier {
if (!_appState.getIsChildLoggedIn) {
await medicalVm.getFamilyFiles(status: 0);
await medicalVm.getAllPendingRecordsByResponseId();
- _navigationService.popUntilNamed(AppRoutes.landingScreen);
+ _navigationService.replaceAllRoutesAndNavigateToLanding();
}
} else {
if (activation.list != null && activation.list!.isNotEmpty) {
@@ -675,7 +677,12 @@ class AuthenticationViewModel extends ChangeNotifier {
}
Future navigateToHomeScreen() async {
- _navigationService.pushAndReplace(AppRoutes.landingScreen);
+ Navigator.pushAndRemoveUntil(
+ _navigationService.navigatorKey.currentContext!,
+ CustomPageRoute(
+ page: LandingNavigation(),
+ ),
+ (r) => false);
}
Future navigateToOTPScreen(
diff --git a/lib/features/my_invoices/models/get_invoice_details_response_model.dart b/lib/features/my_invoices/models/get_invoice_details_response_model.dart
new file mode 100644
index 0000000..ef88623
--- /dev/null
+++ b/lib/features/my_invoices/models/get_invoice_details_response_model.dart
@@ -0,0 +1,489 @@
+class GetInvoiceDetailsResponseModel {
+ int? projectID;
+ int? doctorID;
+ num? grandTotal;
+ num? quantity;
+ num? total;
+ num? discount;
+ num? subTotal;
+ int? invoiceNo;
+ String? createdOn;
+ String? procedureID;
+ String? procedureName;
+ String? procedureNameN;
+ num? procedurePrice;
+ num? patientShare;
+ num? companyShare;
+ num? totalPatientShare;
+ num? totalCompanyShare;
+ num? totalShare;
+ num? discountAmount;
+ num? vATPercentage;
+ num? patientVATAmount;
+ num? companyVATAmount;
+ num? totalVATAmount;
+ num? price;
+ int? patientID;
+ String? patientIdentificationNo;
+ String? patientName;
+ String? patientNameN;
+ String? nationalityID;
+ String? doctorName;
+ String? doctorNameN;
+ int? clinicID;
+ String? clinicDescription;
+ String? clinicDescriptionN;
+ String? appointmentDate;
+ int? appointmentNo;
+ String? insuranceID;
+ int? companyID;
+ String? companyName;
+ String? companyNameN;
+ String? companyAddress;
+ String? companyAddressN;
+ String? companyGroupAddress;
+ String? groupName;
+ String? groupNameN;
+ String? patientAddress;
+ String? vATNo;
+ String? paymentDate;
+ String? projectName;
+ num? totalDiscount;
+ num? totalPatientShareWithQuantity;
+ String? legalName;
+ String? legalNameN;
+ num? advanceAdjustment;
+ String? patientCityName;
+ String? patientCityNameN;
+ String? doctorImageURL;
+ List? listConsultation;
+
+ GetInvoiceDetailsResponseModel(
+ {this.projectID,
+ this.doctorID,
+ this.grandTotal,
+ this.quantity,
+ this.total,
+ this.discount,
+ this.subTotal,
+ this.invoiceNo,
+ this.createdOn,
+ this.procedureID,
+ this.procedureName,
+ this.procedureNameN,
+ this.procedurePrice,
+ this.patientShare,
+ this.companyShare,
+ this.totalPatientShare,
+ this.totalCompanyShare,
+ this.totalShare,
+ this.discountAmount,
+ this.vATPercentage,
+ this.patientVATAmount,
+ this.companyVATAmount,
+ this.totalVATAmount,
+ this.price,
+ this.patientID,
+ this.patientIdentificationNo,
+ this.patientName,
+ this.patientNameN,
+ this.nationalityID,
+ this.doctorName,
+ this.doctorNameN,
+ this.clinicID,
+ this.clinicDescription,
+ this.clinicDescriptionN,
+ this.appointmentDate,
+ this.appointmentNo,
+ this.insuranceID,
+ this.companyID,
+ this.companyName,
+ this.companyNameN,
+ this.companyAddress,
+ this.companyAddressN,
+ this.companyGroupAddress,
+ this.groupName,
+ this.groupNameN,
+ this.patientAddress,
+ this.vATNo,
+ this.paymentDate,
+ this.projectName,
+ this.totalDiscount,
+ this.totalPatientShareWithQuantity,
+ this.legalName,
+ this.legalNameN,
+ this.advanceAdjustment,
+ this.patientCityName,
+ this.patientCityNameN,
+ this.doctorImageURL,
+ this.listConsultation});
+
+ GetInvoiceDetailsResponseModel.fromJson(Map json) {
+ projectID = json['ProjectID'];
+ doctorID = json['DoctorID'];
+ grandTotal = json['GrandTotal'];
+ quantity = json['Quantity'];
+ total = json['Total'];
+ discount = json['Discount'];
+ subTotal = json['SubTotal'];
+ invoiceNo = json['InvoiceNo'];
+ createdOn = json['CreatedOn'];
+ procedureID = json['ProcedureID'];
+ procedureName = json['ProcedureName'];
+ procedureNameN = json['ProcedureNameN'];
+ procedurePrice = json['ProcedurePrice'];
+ patientShare = json['PatientShare'];
+ companyShare = json['CompanyShare'];
+ totalPatientShare = json['TotalPatientShare'];
+ totalCompanyShare = json['TotalCompanyShare'];
+ totalShare = json['TotalShare'];
+ discountAmount = json['DiscountAmount'];
+ vATPercentage = json['VATPercentage'];
+ patientVATAmount = json['PatientVATAmount'];
+ companyVATAmount = json['CompanyVATAmount'];
+ totalVATAmount = json['TotalVATAmount'];
+ price = json['Price'];
+ patientID = json['PatientID'];
+ patientIdentificationNo = json['PatientIdentificationNo'];
+ patientName = json['PatientName'];
+ patientNameN = json['PatientNameN'];
+ nationalityID = json['NationalityID'];
+ doctorName = json['DoctorName'];
+ doctorNameN = json['DoctorNameN'];
+ clinicID = json['ClinicID'];
+ clinicDescription = json['ClinicDescription'];
+ clinicDescriptionN = json['ClinicDescriptionN'];
+ appointmentDate = json['AppointmentDate'];
+ appointmentNo = json['AppointmentNo'];
+ insuranceID = json['InsuranceID'];
+ companyID = json['CompanyID'];
+ companyName = json['CompanyName'];
+ companyNameN = json['CompanyNameN'];
+ companyAddress = json['CompanyAddress'];
+ companyAddressN = json['CompanyAddressN'];
+ companyGroupAddress = json['CompanyGroupAddress'];
+ groupName = json['GroupName'];
+ groupNameN = json['GroupNameN'];
+ patientAddress = json['PatientAddress'];
+ vATNo = json['VATNo'];
+ paymentDate = json['PaymentDate'];
+ projectName = json['ProjectName'];
+ totalDiscount = json['TotalDiscount'];
+ totalPatientShareWithQuantity = json['TotalPatientShareWithQuantity'];
+ legalName = json['LegalName'];
+ legalNameN = json['LegalNameN'];
+ advanceAdjustment = json['AdvanceAdjustment'];
+ patientCityName = json['PatientCityName'];
+ patientCityNameN = json['PatientCityNameN'];
+ doctorImageURL = json['DoctorImageURL'];
+ if (json['listConsultation'] != null) {
+ listConsultation = [];
+ json['listConsultation'].forEach((v) {
+ listConsultation!.add(new ListConsultation.fromJson(v));
+ });
+ }
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ProjectID'] = this.projectID;
+ data['DoctorID'] = this.doctorID;
+ data['GrandTotal'] = this.grandTotal;
+ data['Quantity'] = this.quantity;
+ data['Total'] = this.total;
+ data['Discount'] = this.discount;
+ data['SubTotal'] = this.subTotal;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['CreatedOn'] = this.createdOn;
+ data['ProcedureID'] = this.procedureID;
+ data['ProcedureName'] = this.procedureName;
+ data['ProcedureNameN'] = this.procedureNameN;
+ data['ProcedurePrice'] = this.procedurePrice;
+ data['PatientShare'] = this.patientShare;
+ data['CompanyShare'] = this.companyShare;
+ data['TotalPatientShare'] = this.totalPatientShare;
+ data['TotalCompanyShare'] = this.totalCompanyShare;
+ data['TotalShare'] = this.totalShare;
+ data['DiscountAmount'] = this.discountAmount;
+ data['VATPercentage'] = this.vATPercentage;
+ data['PatientVATAmount'] = this.patientVATAmount;
+ data['CompanyVATAmount'] = this.companyVATAmount;
+ data['TotalVATAmount'] = this.totalVATAmount;
+ data['Price'] = this.price;
+ data['PatientID'] = this.patientID;
+ data['PatientIdentificationNo'] = this.patientIdentificationNo;
+ data['PatientName'] = this.patientName;
+ data['PatientNameN'] = this.patientNameN;
+ data['NationalityID'] = this.nationalityID;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorNameN'] = this.doctorNameN;
+ data['ClinicID'] = this.clinicID;
+ data['ClinicDescription'] = this.clinicDescription;
+ data['ClinicDescriptionN'] = this.clinicDescriptionN;
+ data['AppointmentDate'] = this.appointmentDate;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['InsuranceID'] = this.insuranceID;
+ data['CompanyID'] = this.companyID;
+ data['CompanyName'] = this.companyName;
+ data['CompanyNameN'] = this.companyNameN;
+ data['CompanyAddress'] = this.companyAddress;
+ data['CompanyAddressN'] = this.companyAddressN;
+ data['CompanyGroupAddress'] = this.companyGroupAddress;
+ data['GroupName'] = this.groupName;
+ data['GroupNameN'] = this.groupNameN;
+ data['PatientAddress'] = this.patientAddress;
+ data['VATNo'] = this.vATNo;
+ data['PaymentDate'] = this.paymentDate;
+ data['ProjectName'] = this.projectName;
+ data['TotalDiscount'] = this.totalDiscount;
+ data['TotalPatientShareWithQuantity'] = this.totalPatientShareWithQuantity;
+ data['LegalName'] = this.legalName;
+ data['LegalNameN'] = this.legalNameN;
+ data['AdvanceAdjustment'] = this.advanceAdjustment;
+ data['PatientCityName'] = this.patientCityName;
+ data['PatientCityNameN'] = this.patientCityNameN;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ if (this.listConsultation != null) {
+ data['listConsultation'] =
+ this.listConsultation!.map((v) => v.toJson()).toList();
+ }
+ return data;
+ }
+}
+
+class ListConsultation {
+ int? projectID;
+ int? doctorID;
+ num? grandTotal;
+ int? quantity;
+ num? total;
+ num? discount;
+ num? subTotal;
+ int? invoiceNo;
+ String? createdOn;
+ String? procedureID;
+ String? procedureName;
+ String? procedureNameN;
+ num? procedurePrice;
+ num? patientShare;
+ num? companyShare;
+ num? totalPatientShare;
+ num? totalCompanyShare;
+ num? totalShare;
+ num? discountAmount;
+ num? vATPercentage;
+ num? patientVATAmount;
+ num? companyVATAmount;
+ num? totalVATAmount;
+ num? price;
+ int? patientID;
+ int? patientIdentificationNo;
+ String? patientName;
+ String? patientNameN;
+ String? nationalityID;
+ String? doctorName;
+ String? doctorNameN;
+ int? clinicID;
+ String? clinicDescription;
+ String? clinicDescriptionN;
+ String? appointmentDate;
+ dynamic appointmentNo;
+ dynamic insuranceID;
+ dynamic companyID;
+ String? companyName;
+ String? companyNameN;
+ String? companyAddress;
+ String? companyAddressN;
+ String? companyGroupAddress;
+ String? groupName;
+ String? groupNameN;
+ String? patientAddress;
+ String? vATNo;
+ String? paymentDate;
+ String? projectName;
+ num? totalDiscount;
+ num? totalPatientShareWithQuantity;
+ String? legalName;
+ String? legalNameN;
+ num? advanceAdjustment;
+ String? patientCityName;
+ String? patientCityNameN;
+
+ ListConsultation(
+ {this.projectID,
+ this.doctorID,
+ this.grandTotal,
+ this.quantity,
+ this.total,
+ this.discount,
+ this.subTotal,
+ this.invoiceNo,
+ this.createdOn,
+ this.procedureID,
+ this.procedureName,
+ this.procedureNameN,
+ this.procedurePrice,
+ this.patientShare,
+ this.companyShare,
+ this.totalPatientShare,
+ this.totalCompanyShare,
+ this.totalShare,
+ this.discountAmount,
+ this.vATPercentage,
+ this.patientVATAmount,
+ this.companyVATAmount,
+ this.totalVATAmount,
+ this.price,
+ this.patientID,
+ this.patientIdentificationNo,
+ this.patientName,
+ this.patientNameN,
+ this.nationalityID,
+ this.doctorName,
+ this.doctorNameN,
+ this.clinicID,
+ this.clinicDescription,
+ this.clinicDescriptionN,
+ this.appointmentDate,
+ this.appointmentNo,
+ this.insuranceID,
+ this.companyID,
+ this.companyName,
+ this.companyNameN,
+ this.companyAddress,
+ this.companyAddressN,
+ this.companyGroupAddress,
+ this.groupName,
+ this.groupNameN,
+ this.patientAddress,
+ this.vATNo,
+ this.paymentDate,
+ this.projectName,
+ this.totalDiscount,
+ this.totalPatientShareWithQuantity,
+ this.legalName,
+ this.legalNameN,
+ this.advanceAdjustment,
+ this.patientCityName,
+ this.patientCityNameN});
+
+ ListConsultation.fromJson(Map json) {
+ projectID = json['ProjectID'];
+ doctorID = json['DoctorID'];
+ grandTotal = json['GrandTotal'];
+ quantity = json['Quantity'];
+ total = json['Total'];
+ discount = json['Discount'];
+ subTotal = json['SubTotal'];
+ invoiceNo = json['InvoiceNo'];
+ createdOn = json['CreatedOn'];
+ procedureID = json['ProcedureID'];
+ procedureName = json['ProcedureName'];
+ procedureNameN = json['ProcedureNameN'];
+ procedurePrice = json['ProcedurePrice'];
+ patientShare = json['PatientShare'];
+ companyShare = json['CompanyShare'];
+ totalPatientShare = json['TotalPatientShare'];
+ totalCompanyShare = json['TotalCompanyShare'];
+ totalShare = json['TotalShare'];
+ discountAmount = json['DiscountAmount'];
+ vATPercentage = json['VATPercentage'];
+ patientVATAmount = json['PatientVATAmount'];
+ companyVATAmount = json['CompanyVATAmount'];
+ totalVATAmount = json['TotalVATAmount'];
+ price = json['Price'];
+ patientID = json['PatientID'];
+ patientIdentificationNo = json['PatientIdentificationNo'];
+ patientName = json['PatientName'];
+ patientNameN = json['PatientNameN'];
+ nationalityID = json['NationalityID'];
+ doctorName = json['DoctorName'];
+ doctorNameN = json['DoctorNameN'];
+ clinicID = json['ClinicID'];
+ clinicDescription = json['ClinicDescription'];
+ clinicDescriptionN = json['ClinicDescriptionN'];
+ appointmentDate = json['AppointmentDate'];
+ appointmentNo = json['AppointmentNo'];
+ insuranceID = json['InsuranceID'];
+ companyID = json['CompanyID'];
+ companyName = json['CompanyName'];
+ companyNameN = json['CompanyNameN'];
+ companyAddress = json['CompanyAddress'];
+ companyAddressN = json['CompanyAddressN'];
+ companyGroupAddress = json['CompanyGroupAddress'];
+ groupName = json['GroupName'];
+ groupNameN = json['GroupNameN'];
+ patientAddress = json['PatientAddress'];
+ vATNo = json['VATNo'];
+ paymentDate = json['PaymentDate'];
+ projectName = json['ProjectName'];
+ totalDiscount = json['TotalDiscount'];
+ totalPatientShareWithQuantity = json['TotalPatientShareWithQuantity'];
+ legalName = json['LegalName'];
+ legalNameN = json['LegalNameN'];
+ advanceAdjustment = json['AdvanceAdjustment'];
+ patientCityName = json['PatientCityName'];
+ patientCityNameN = json['PatientCityNameN'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ProjectID'] = this.projectID;
+ data['DoctorID'] = this.doctorID;
+ data['GrandTotal'] = this.grandTotal;
+ data['Quantity'] = this.quantity;
+ data['Total'] = this.total;
+ data['Discount'] = this.discount;
+ data['SubTotal'] = this.subTotal;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['CreatedOn'] = this.createdOn;
+ data['ProcedureID'] = this.procedureID;
+ data['ProcedureName'] = this.procedureName;
+ data['ProcedureNameN'] = this.procedureNameN;
+ data['ProcedurePrice'] = this.procedurePrice;
+ data['PatientShare'] = this.patientShare;
+ data['CompanyShare'] = this.companyShare;
+ data['TotalPatientShare'] = this.totalPatientShare;
+ data['TotalCompanyShare'] = this.totalCompanyShare;
+ data['TotalShare'] = this.totalShare;
+ data['DiscountAmount'] = this.discountAmount;
+ data['VATPercentage'] = this.vATPercentage;
+ data['PatientVATAmount'] = this.patientVATAmount;
+ data['CompanyVATAmount'] = this.companyVATAmount;
+ data['TotalVATAmount'] = this.totalVATAmount;
+ data['Price'] = this.price;
+ data['PatientID'] = this.patientID;
+ data['PatientIdentificationNo'] = this.patientIdentificationNo;
+ data['PatientName'] = this.patientName;
+ data['PatientNameN'] = this.patientNameN;
+ data['NationalityID'] = this.nationalityID;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorNameN'] = this.doctorNameN;
+ data['ClinicID'] = this.clinicID;
+ data['ClinicDescription'] = this.clinicDescription;
+ data['ClinicDescriptionN'] = this.clinicDescriptionN;
+ data['AppointmentDate'] = this.appointmentDate;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['InsuranceID'] = this.insuranceID;
+ data['CompanyID'] = this.companyID;
+ data['CompanyName'] = this.companyName;
+ data['CompanyNameN'] = this.companyNameN;
+ data['CompanyAddress'] = this.companyAddress;
+ data['CompanyAddressN'] = this.companyAddressN;
+ data['CompanyGroupAddress'] = this.companyGroupAddress;
+ data['GroupName'] = this.groupName;
+ data['GroupNameN'] = this.groupNameN;
+ data['PatientAddress'] = this.patientAddress;
+ data['VATNo'] = this.vATNo;
+ data['PaymentDate'] = this.paymentDate;
+ data['ProjectName'] = this.projectName;
+ data['TotalDiscount'] = this.totalDiscount;
+ data['TotalPatientShareWithQuantity'] = this.totalPatientShareWithQuantity;
+ data['LegalName'] = this.legalName;
+ data['LegalNameN'] = this.legalNameN;
+ data['AdvanceAdjustment'] = this.advanceAdjustment;
+ data['PatientCityName'] = this.patientCityName;
+ data['PatientCityNameN'] = this.patientCityNameN;
+ return data;
+ }
+}
diff --git a/lib/features/my_invoices/models/get_invoices_list_response_model.dart b/lib/features/my_invoices/models/get_invoices_list_response_model.dart
new file mode 100644
index 0000000..e8056d9
--- /dev/null
+++ b/lib/features/my_invoices/models/get_invoices_list_response_model.dart
@@ -0,0 +1,88 @@
+class GetInvoicesListResponseModel {
+ String? setupId;
+ int? projectID;
+ int? patientID;
+ int? appointmentNo;
+ String? appointmentDate;
+ String? appointmentDateN;
+ int? clinicID;
+ int? doctorID;
+ int? invoiceNo;
+ int? status;
+ String? arrivedOn;
+ String? doctorName;
+ String? doctorNameN;
+ String? clinicName;
+ double? decimalDoctorRate;
+ String? doctorImageURL;
+ int? doctorRate;
+ int? patientNumber;
+ String? projectName;
+
+ GetInvoicesListResponseModel(
+ {this.setupId,
+ this.projectID,
+ this.patientID,
+ this.appointmentNo,
+ this.appointmentDate,
+ this.appointmentDateN,
+ this.clinicID,
+ this.doctorID,
+ this.invoiceNo,
+ this.status,
+ this.arrivedOn,
+ this.doctorName,
+ this.doctorNameN,
+ this.clinicName,
+ this.decimalDoctorRate,
+ this.doctorImageURL,
+ this.doctorRate,
+ this.patientNumber,
+ this.projectName});
+
+ GetInvoicesListResponseModel.fromJson(Map json) {
+ setupId = json['SetupId'];
+ projectID = json['ProjectID'];
+ patientID = json['PatientID'];
+ appointmentNo = json['AppointmentNo'];
+ appointmentDate = json['AppointmentDate'];
+ appointmentDateN = json['AppointmentDateN'];
+ clinicID = json['ClinicID'];
+ doctorID = json['DoctorID'];
+ invoiceNo = json['InvoiceNo'];
+ status = json['Status'];
+ arrivedOn = json['ArrivedOn'];
+ doctorName = json['DoctorName'];
+ doctorNameN = json['DoctorNameN'];
+ clinicName = json['ClinicName'];
+ decimalDoctorRate = json['DecimalDoctorRate'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorRate = json['DoctorRate'];
+ patientNumber = json['PatientNumber'];
+ projectName = json['ProjectName'];
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data['SetupId'] = this.setupId;
+ data['ProjectID'] = this.projectID;
+ data['PatientID'] = this.patientID;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['AppointmentDate'] = this.appointmentDate;
+ data['AppointmentDateN'] = this.appointmentDateN;
+ data['ClinicID'] = this.clinicID;
+ data['DoctorID'] = this.doctorID;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['Status'] = this.status;
+ data['ArrivedOn'] = this.arrivedOn;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorNameN'] = this.doctorNameN;
+ data['ClinicName'] = this.clinicName;
+ data['DecimalDoctorRate'] = this.decimalDoctorRate;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorRate'] = this.doctorRate;
+ data['PatientNumber'] = this.patientNumber;
+ data['ProjectName'] = this.projectName;
+ return data;
+ }
+}
diff --git a/lib/features/my_invoices/my_invoices_repo.dart b/lib/features/my_invoices/my_invoices_repo.dart
new file mode 100644
index 0000000..68eee6e
--- /dev/null
+++ b/lib/features/my_invoices/my_invoices_repo.dart
@@ -0,0 +1,141 @@
+import 'package:dartz/dartz.dart';
+import 'package:hmg_patient_app_new/core/api/api_client.dart';
+import 'package:hmg_patient_app_new/core/api_consts.dart';
+import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart';
+import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoice_details_response_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoices_list_response_model.dart';
+import 'package:hmg_patient_app_new/services/logger_service.dart';
+
+abstract class MyInvoicesRepo {
+ Future>>> getAllInvoicesList();
+
+ Future>> getInvoiceDetails({required num appointmentNo, required num invoiceNo, required int projectID});
+
+ Future>> sendInvoiceEmail({required num appointmentNo, required int projectID});
+}
+
+class MyInvoicesRepoImp implements MyInvoicesRepo {
+ final ApiClient apiClient;
+ final LoggerService loggerService;
+
+ MyInvoicesRepoImp({required this.loggerService, required this.apiClient});
+
+ @override
+ Future>>> getAllInvoicesList() async {
+ Map mapDevice = {};
+
+ try {
+ GenericApiModel>? apiResponse;
+ Failure? failure;
+ await apiClient.post(
+ GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC,
+ body: mapDevice,
+ onFailure: (error, statusCode, {messageStatus, failureType}) {
+ failure = failureType;
+ },
+ onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
+ try {
+ final list = response['List_DentalAppointments'];
+
+ final invoicesList = list.map((item) => GetInvoicesListResponseModel.fromJson(item as Map)).toList().cast();
+
+ apiResponse = GenericApiModel>(
+ messageStatus: messageStatus,
+ statusCode: statusCode,
+ errorMessage: null,
+ data: invoicesList,
+ );
+ } catch (e) {
+ failure = DataParsingFailure(e.toString());
+ }
+ },
+ );
+ if (failure != null) return Left(failure!);
+ if (apiResponse == null) return Left(ServerFailure("Unknown error"));
+ return Right(apiResponse!);
+ } catch (e) {
+ return Left(UnknownFailure(e.toString()));
+ }
+ }
+
+ @override
+ Future>> getInvoiceDetails({required num appointmentNo, required num invoiceNo, required int projectID}) async {
+ Map mapDevice = {
+ "AppointmentNo": appointmentNo,
+ "InvoiceNo": invoiceNo,
+ "IsRegistered": true,
+ "ProjectID": projectID,
+ };
+
+ try {
+ GenericApiModel? apiResponse;
+ Failure? failure;
+ await apiClient.post(
+ GET_DENTAL_APPOINTMENT_INVOICE,
+ body: mapDevice,
+ onFailure: (error, statusCode, {messageStatus, failureType}) {
+ failure = failureType;
+ },
+ onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
+ try {
+ final list = response['List_eInvoiceForDental'];
+ final invoicesList = GetInvoiceDetailsResponseModel.fromJson(list[0]);
+
+ apiResponse = GenericApiModel(
+ messageStatus: messageStatus,
+ statusCode: statusCode,
+ errorMessage: null,
+ data: invoicesList,
+ );
+ } catch (e) {
+ failure = DataParsingFailure(e.toString());
+ }
+ },
+ );
+ if (failure != null) return Left(failure!);
+ if (apiResponse == null) return Left(ServerFailure("Unknown error"));
+ return Right(apiResponse!);
+ } catch (e) {
+ return Left(UnknownFailure(e.toString()));
+ }
+ }
+
+ @override
+ Future> sendInvoiceEmail({required num appointmentNo, required int projectID}) async {
+ Map mapDevice = {
+ "AppointmentNo": appointmentNo,
+ "IsRegistered": true,
+ "ProjectID": projectID,
+ };
+
+ try {
+ GenericApiModel? apiResponse;
+ Failure? failure;
+ await apiClient.post(
+ SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL,
+ body: mapDevice,
+ onFailure: (error, statusCode, {messageStatus, failureType}) {
+ failure = failureType;
+ },
+ onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
+ try {
+ apiResponse = GenericApiModel(
+ messageStatus: messageStatus,
+ statusCode: statusCode,
+ errorMessage: null,
+ data: response,
+ );
+ } catch (e) {
+ failure = DataParsingFailure(e.toString());
+ }
+ },
+ );
+ if (failure != null) return Left(failure!);
+ if (apiResponse == null) return Left(ServerFailure("Unknown error"));
+ return Right(apiResponse!);
+ } catch (e) {
+ return Left(UnknownFailure(e.toString()));
+ }
+ }
+}
diff --git a/lib/features/my_invoices/my_invoices_view_model.dart b/lib/features/my_invoices/my_invoices_view_model.dart
new file mode 100644
index 0000000..a02d741
--- /dev/null
+++ b/lib/features/my_invoices/my_invoices_view_model.dart
@@ -0,0 +1,99 @@
+import 'package:flutter/material.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoice_details_response_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoices_list_response_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_repo.dart';
+import 'package:hmg_patient_app_new/services/error_handler_service.dart';
+import 'package:hmg_patient_app_new/services/navigation_service.dart';
+
+class MyInvoicesViewModel extends ChangeNotifier {
+ bool isInvoicesListLoading = false;
+ bool isInvoiceDetailsLoading = false;
+
+ MyInvoicesRepo myInvoicesRepo;
+ ErrorHandlerService errorHandlerService;
+ NavigationService navServices;
+
+ List allInvoicesList = [];
+ late GetInvoiceDetailsResponseModel invoiceDetailsResponseModel;
+
+ MyInvoicesViewModel({required this.myInvoicesRepo, required this.errorHandlerService, required this.navServices});
+
+ setInvoicesListLoading() {
+ isInvoicesListLoading = true;
+ allInvoicesList.clear();
+ notifyListeners();
+ }
+
+ setInvoiceDetailLoading() {
+ isInvoiceDetailsLoading = true;
+ notifyListeners();
+ }
+
+ Future getAllInvoicesList({Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ final result = await myInvoicesRepo.getAllInvoicesList();
+
+ result.fold(
+ (failure) async {
+ isInvoicesListLoading = false;
+ notifyListeners();
+ },
+ (apiResponse) {
+ if (apiResponse.messageStatus == 2) {
+ // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
+ } else if (apiResponse.messageStatus == 1) {
+ allInvoicesList = apiResponse.data!;
+ isInvoicesListLoading = false;
+
+ notifyListeners();
+ if (onSuccess != null) {
+ onSuccess(apiResponse);
+ }
+ }
+ },
+ );
+ }
+
+ Future getInvoiceDetails({required num appointmentNo, required num invoiceNo, required int projectID, Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ final result = await myInvoicesRepo.getInvoiceDetails(appointmentNo: appointmentNo, invoiceNo: invoiceNo, projectID: projectID);
+
+ result.fold(
+ (failure) async {
+ isInvoiceDetailsLoading = false;
+ notifyListeners();
+ },
+ (apiResponse) {
+ if (apiResponse.messageStatus == 2) {
+ // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
+ } else if (apiResponse.messageStatus == 1) {
+ invoiceDetailsResponseModel = apiResponse.data!;
+ isInvoiceDetailsLoading = false;
+
+ notifyListeners();
+ if (onSuccess != null) {
+ onSuccess(apiResponse);
+ }
+ }
+ },
+ );
+ }
+
+ Future sendInvoiceEmail({required num appointmentNo, required int projectID, Function(dynamic)? onSuccess, Function(String)? onError}) async {
+ final result = await myInvoicesRepo.sendInvoiceEmail(appointmentNo: appointmentNo, projectID: projectID);
+
+ result.fold(
+ (failure) async {
+ notifyListeners();
+ },
+ (apiResponse) {
+ if (apiResponse.messageStatus == 2) {
+ // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
+ } else if (apiResponse.messageStatus == 1) {
+ notifyListeners();
+ if (onSuccess != null) {
+ onSuccess(apiResponse);
+ }
+ }
+ },
+ );
+ }
+}
diff --git a/lib/main.dart b/lib/main.dart
index 9600d5e..a9d16dc 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -25,6 +25,7 @@ import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_mode
import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart';
import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart';
@@ -169,6 +170,9 @@ void main() async {
),
ChangeNotifierProvider(
create: (_) => getIt.get(),
+ ),
+ ChangeNotifierProvider(
+ create: (_) => getIt.get(),
)
], child: MyApp()),
),
diff --git a/lib/presentation/authentication/saved_login_screen.dart b/lib/presentation/authentication/saved_login_screen.dart
index 93b26c7..f0fd8cb 100644
--- a/lib/presentation/authentication/saved_login_screen.dart
+++ b/lib/presentation/authentication/saved_login_screen.dart
@@ -16,6 +16,7 @@ import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart';
import 'package:hmg_patient_app_new/widgets/bottomsheet/generic_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:provider/provider.dart';
class SavedLogin extends StatefulWidget {
@@ -266,9 +267,15 @@ class _SavedLogin extends State {
child: CustomButton(
text: LocaleKeys.guest.tr(),
onPressed: () {
- Navigator.of(context).pushReplacement(
- MaterialPageRoute(builder: (BuildContext context) => LandingNavigation()),
- );
+ Navigator.pushAndRemoveUntil(
+ context,
+ CustomPageRoute(
+ page: LandingNavigation(),
+ ),
+ (r) => false);
+ // Navigator.of(context).pushAndRemoveUntil(
+ // MaterialPageRoute(builder: (BuildContext context) => LandingNavigation())
+ // );
},
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
diff --git a/lib/presentation/hmg_services/services_page.dart b/lib/presentation/hmg_services/services_page.dart
index 1380ad9..3b31d38 100644
--- a/lib/presentation/hmg_services/services_page.dart
+++ b/lib/presentation/hmg_services/services_page.dart
@@ -10,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/route_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/features/blood_donation/blood_donation_view_model.dart';
+import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/hmg_services_component_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
@@ -17,6 +18,7 @@ import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_mo
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/blood_donation/blood_donation_page.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/contact_us.dart';
+import 'package:hmg_patient_app_new/presentation/emergency_services/emergency_services_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/hmg_services/services_view.dart';
@@ -48,9 +50,21 @@ class ServicesPage extends StatelessWidget {
"".needTranslation,
AppAssets.emergency_services_icon,
bgColor: AppColors.primaryRedColor,
- true,
- route: AppRoutes.eReferralPage,
- ),
+ true, route: null, onTap: () {
+ getIt.get().flushData();
+ getIt.get().getTransportationOrders(
+ showLoader: false,
+ );
+ getIt.get().getRRTOrders(
+ showLoader: false,
+ );
+ Navigator.of(GetIt.instance().navigatorKey.currentContext!).push(
+ CustomPageRoute(
+ page: EmergencyServicesPage(),
+ settings: const RouteSettings(name: '/EmergencyServicesPage'),
+ ),
+ );
+ }),
HmgServicesComponentModel(
11,
"Book\nAppointment".needTranslation,
@@ -58,7 +72,7 @@ class ServicesPage extends StatelessWidget {
AppAssets.appointment_calendar_icon,
bgColor: AppColors.bookAppointment,
true,
- route: AppRoutes.eReferralPage,
+ route: AppRoutes.bookAppointmentPage,
),
HmgServicesComponentModel(
5,
diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart
index 1496ded..95884d4 100644
--- a/lib/presentation/home/landing_page.dart
+++ b/lib/presentation/home/landing_page.dart
@@ -1,4 +1,5 @@
import 'dart:async';
+import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
@@ -13,6 +14,7 @@ import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/int_extensions.dart';
+import 'package:hmg_patient_app_new/extensions/route_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/features/authentication/authentication_view_model.dart';
@@ -25,6 +27,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
+import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/appointment_queue_page.dart';
import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart';
@@ -43,6 +46,9 @@ import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dar
import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart';
import 'package:hmg_patient_app_new/presentation/profile_settings/profile_settings.dart';
import 'package:hmg_patient_app_new/presentation/rate_appointment/rate_appointment_doctor.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedures_details_page.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart';
+import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@@ -67,13 +73,13 @@ class _LandingPageState extends State {
late AppState appState;
late MyAppointmentsViewModel myAppointmentsViewModel;
- late PrescriptionsViewModel prescriptionsViewModel;
final CacheService cacheService = GetIt.instance();
late AppointmentRatingViewModel appointmentRatingViewModel;
late InsuranceViewModel insuranceViewModel;
late ImmediateLiveCareViewModel immediateLiveCareViewModel;
late BookAppointmentsViewModel bookAppointmentsViewModel;
late EmergencyServicesViewModel emergencyServicesViewModel;
+ late TodoSectionViewModel todoSectionViewModel;
final SwiperController _controller = SwiperController();
@@ -82,10 +88,6 @@ class _LandingPageState extends State {
authVM = context.read();
habibWalletVM = context.read();
appointmentRatingViewModel = context.read();
- // myAppointmentsViewModel = context.read();
- // prescriptionsViewModel = context.read();
- // insuranceViewModel = context.read();
- // immediateLiveCareViewModel = context.read();
authVM.savePushTokenToAppState();
if (mounted) {
@@ -97,13 +99,11 @@ class _LandingPageState extends State {
if (appState.isAuthenticated) {
habibWalletVM.initHabibWalletProvider();
habibWalletVM.getPatientBalanceAmount();
+ todoSectionViewModel.initializeTodoSectionViewModel();
immediateLiveCareViewModel.initImmediateLiveCare();
immediateLiveCareViewModel.getPatientLiveCareHistory();
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
- myAppointmentsViewModel.getPatientMyDoctors();
- prescriptionsViewModel.initPrescriptionsViewModel();
- insuranceViewModel.initInsuranceProvider();
emergencyServicesViewModel.checkPatientERAdvanceBalance();
myAppointmentsViewModel.getPatientAppointmentQueueDetails();
if(!appState.isRatedVisible) {
@@ -111,17 +111,16 @@ class _LandingPageState extends State {
if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) {
appointmentRatingViewModel.getAppointmentDetails(appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!, appointmentRatingViewModel.appointmentRatedList.last.projectID!,
onSuccess: ((response) {
-
appointmentRatingViewModel.setClinicOrDoctor(false);
appointmentRatingViewModel.setTitle("Rate Doctor".needTranslation);
appointmentRatingViewModel.setSubTitle("How was your last visit with doctor?".needTranslation);
openLastRating();
appState.setRatedVisible(true);
-
- }));
-
- }
- });
+ }),
+ );
+ }
+ },
+ );
}
}
});
@@ -132,10 +131,10 @@ class _LandingPageState extends State {
Widget build(BuildContext context) {
bookAppointmentsViewModel = Provider.of(context, listen: false);
myAppointmentsViewModel = Provider.of(context, listen: false);
- prescriptionsViewModel = Provider.of(context, listen: false);
insuranceViewModel = Provider.of(context, listen: false);
immediateLiveCareViewModel = Provider.of(context, listen: false);
emergencyServicesViewModel = Provider.of(context, listen: false);
+ todoSectionViewModel = Provider.of(context, listen: false);
appState = getIt.get();
return PopScope(
canPop: false,
@@ -214,6 +213,50 @@ class _LandingPageState extends State {
),
],
).paddingSymmetrical(24.h, 0.h),
+ !appState.isAuthenticated
+ ? Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 24.r,
+ hasShadow: false,
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(16.h),
+ child: Row(
+ children: [
+ Utils.buildSvgWithAssets(
+ width: 50.w,
+ height: 60.h,
+ icon: AppAssets.symptomCheckerIcon,
+ fit: BoxFit.contain,
+ ),
+ SizedBox(width: 12.w),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ "How are you feeling today?".needTranslation.toText14(isBold: true),
+ "Check your symptoms with this scale".needTranslation.toText12(fontWeight: FontWeight.w500),
+ SizedBox(height: 14.h),
+ CustomButton(
+ text: "Check your symptoms".needTranslation,
+ onPressed: () async {
+ context.navigateWithName(AppRoutes.userInfoSelection);
+ },
+ backgroundColor: Color(0xFF2B353E),
+ borderColor: Color(0xFF2B353E),
+ textColor: AppColors.whiteColor,
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ borderRadius: 12,
+ height: 40.h,
+ ),
+ ],
+ )
+ ],
+ ),
+ ),
+ ).paddingSymmetrical(24.w, 0.h)
+ : SizedBox.shrink(),
appState.isAuthenticated
? Column(
children: [
@@ -234,8 +277,8 @@ class _LandingPageState extends State {
Navigator.of(context).push(CustomPageRoute(page: MyAppointmentsPage()));
}),
SizedBox(height: 16.h),
- Consumer2(
- builder: (context, myAppointmentsVM, immediateLiveCareVM, child) {
+ Consumer3(
+ builder: (context, myAppointmentsVM, immediateLiveCareVM, todoSectionVM, child) {
return myAppointmentsVM.isMyAppointmentsLoading
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
@@ -452,20 +495,41 @@ class _LandingPageState extends State {
SizedBox(height: 12.h),
],
)
- : Container(
- decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
- borderRadius: 24.r,
- hasShadow: true,
- ),
- child: AppointmentCard(
- patientAppointmentHistoryResponseModel:
- myAppointmentsVM.patientAppointmentsHistoryList[immediateLiveCareViewModel.patientHasPendingLiveCareRequest ? --index : index],
- myAppointmentsViewModel: myAppointmentsViewModel,
- bookAppointmentsViewModel: bookAppointmentsViewModel,
- isLoading: false,
- isFromHomePage: true,
- ),
+ : (todoSectionVM.patientAncillaryOrdersList.isNotEmpty && index == 1)
+ ? AncillaryOrderCard(
+ order: todoSectionVM.patientAncillaryOrdersList.first,
+ isLoading: false,
+ isOrdersList: false,
+ onCheckIn: () {
+ log("Check-in for order: ${todoSectionVM.patientAncillaryOrdersList.first.orderNo}");
+ },
+ onViewDetails: () {
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: AncillaryOrderDetailsList(
+ appointmentNoVida: todoSectionVM.patientAncillaryOrdersList.first.appointmentNo ?? 0,
+ orderNo: todoSectionVM.patientAncillaryOrdersList.first.orderNo ?? 0,
+ projectID: todoSectionVM.patientAncillaryOrdersList.first.projectID ?? 0,
+ projectName: todoSectionVM.patientAncillaryOrdersList.first.projectName ?? "",
+ ),
+ ),
+ );
+ },
+ )
+ : Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 24.r,
+ hasShadow: true,
+ ),
+ child: AppointmentCard(
+ patientAppointmentHistoryResponseModel:
+ myAppointmentsVM.patientAppointmentsHistoryList[immediateLiveCareViewModel.patientHasPendingLiveCareRequest ? --index : index],
+ myAppointmentsViewModel: myAppointmentsViewModel,
+ bookAppointmentsViewModel: bookAppointmentsViewModel,
+ isLoading: false,
+ isFromHomePage: true,
+ ),
);
},
)
diff --git a/lib/presentation/home/navigation_screen.dart b/lib/presentation/home/navigation_screen.dart
index 6ec8c3a..43cc3b9 100644
--- a/lib/presentation/home/navigation_screen.dart
+++ b/lib/presentation/home/navigation_screen.dart
@@ -1,15 +1,18 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
+import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/route_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart';
import 'package:hmg_patient_app_new/presentation/hmg_services/services_page.dart';
import 'package:hmg_patient_app_new/presentation/home/landing_page.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart';
+import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_selection.dart';
import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/widgets/bottom_navigation/bottom_navigation.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
class LandingNavigation extends StatefulWidget {
const LandingNavigation({super.key});
@@ -33,7 +36,9 @@ class _LandingNavigationState extends State {
const LandingPage(),
appState.isAuthenticated ? MedicalFilePage() : /* need add feedback page */ FeedbackPage(),
SizedBox(),
- const ToDoPage(),
+ // const ToDoPage(),
+ // appState.isAuthenticated ? UserInfoSelectionScreen() : /* need add news page */ SizedBox(),
+ SizedBox(),
ServicesPage(),
],
),
@@ -46,6 +51,20 @@ class _LandingNavigationState extends State {
context.navigateWithName(AppRoutes.bookAppointmentPage);
return;
}
+ if (_currentIndex == 3) {
+ if (appState.isAuthenticated) {
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: UserInfoSelectionScreen(),
+ ),
+ );
+ } else {
+ Utils.openWebView(
+ url: 'https://x.com/HMG',
+ );
+ }
+ return;
+ }
_pageController.animateToPage(index, duration: const Duration(milliseconds: 300), curve: Curves.easeInOut);
},
),
diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart
index 5683c94..f705993 100644
--- a/lib/presentation/medical_file/medical_file_page.dart
+++ b/lib/presentation/medical_file/medical_file_page.dart
@@ -25,6 +25,7 @@ import 'package:hmg_patient_app_new/features/medical_file/models/family_file_res
import 'package:hmg_patient_app_new/features/medical_file/models/patient_sickleave_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/allergies/allergies_list_page.dart';
@@ -49,8 +50,10 @@ import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_fi
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/patient_sick_leave_card.dart';
import 'package:hmg_patient_app_new/presentation/medical_report/medical_reports_page.dart';
import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart';
+import 'package:hmg_patient_app_new/presentation/my_invoices/my_invoices_list.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart';
import 'package:hmg_patient_app_new/presentation/radiology/radiology_orders_page.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
import 'package:hmg_patient_app_new/presentation/vital_sign/vital_sign_page.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
@@ -83,7 +86,9 @@ class _MedicalFilePageState extends State {
late MedicalFileViewModel medicalFileViewModel;
late BookAppointmentsViewModel bookAppointmentsViewModel;
late LabViewModel labViewModel;
+ late MyInvoicesViewModel myInvoicesViewModel;
late HmgServicesViewModel hmgServicesViewModel;
+ late PrescriptionsViewModel prescriptionsViewModel;
int currentIndex = 0;
@@ -96,7 +101,8 @@ class _MedicalFilePageState extends State {
appState = getIt.get();
scheduleMicrotask(() {
if (appState.isAuthenticated) {
- labViewModel.initLabProvider();
+ myAppointmentsViewModel.getPatientMyDoctors();
+ prescriptionsViewModel.initPrescriptionsViewModel();
insuranceViewModel.initInsuranceProvider();
medicalFileViewModel.setIsPatientSickLeaveListLoading(true);
medicalFileViewModel.getPatientSickLeaveList();
@@ -131,10 +137,13 @@ class _MedicalFilePageState extends State {
myAppointmentsViewModel = Provider.of(context, listen: false);
medicalFileViewModel = Provider.of(context, listen: false);
bookAppointmentsViewModel = Provider.of(context, listen: false);
+ myInvoicesViewModel = Provider.of(context, listen: false);
hmgServicesViewModel = Provider.of(context, listen: false);
+ prescriptionsViewModel = Provider.of(context, listen: false);
NavigationService navigationService = getIt.get();
return CollapsingListView(
- title: "Medical File".needTranslation,
+ // title: "Medical File".needTranslation,
+ title: LocaleKeys.medicalFile.tr(context: context),
trailing: Row(
children: [
Wrap(
@@ -1133,7 +1142,13 @@ class _MedicalFilePageState extends State {
svgIcon: AppAssets.invoices_list_icon,
isLargeText: true,
iconSize: 36.w,
- ),
+ ).onPress(() {
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: MyInvoicesList(),
+ ),
+ );
+ }),
MedicalFileCard(
label: "Ancillary Orders List".needTranslation,
textColor: AppColors.blackColor,
@@ -1141,7 +1156,13 @@ class _MedicalFilePageState extends State {
svgIcon: AppAssets.ancillary_orders_list_icon,
isLargeText: true,
iconSize: 36.w,
- ),
+ ).onPress(() {
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: ToDoPage(),
+ ),
+ );
+ }),
],
).paddingSymmetrical(0.w, 0.0),
SizedBox(height: 16.h),
diff --git a/lib/presentation/my_invoices/my_invoices_details_page.dart b/lib/presentation/my_invoices/my_invoices_details_page.dart
new file mode 100644
index 0000000..cccd671
--- /dev/null
+++ b/lib/presentation/my_invoices/my_invoices_details_page.dart
@@ -0,0 +1,272 @@
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:hmg_patient_app_new/core/app_assets.dart';
+import 'package:hmg_patient_app_new/core/app_state.dart';
+import 'package:hmg_patient_app_new/core/dependencies.dart';
+import 'package:hmg_patient_app_new/core/utils/date_util.dart';
+import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
+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/widget_extensions.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoice_details_response_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_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/widgets/appbar/collapsing_list_view.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:provider/provider.dart';
+
+class MyInvoicesDetailsPage extends StatefulWidget {
+ GetInvoiceDetailsResponseModel getInvoiceDetailsResponseModel;
+
+ MyInvoicesDetailsPage({super.key, required this.getInvoiceDetailsResponseModel});
+
+ @override
+ State createState() => _MyInvoicesDetailsPageState();
+}
+
+class _MyInvoicesDetailsPageState extends State {
+ late MyInvoicesViewModel myInvoicesViewModel;
+
+ @override
+ Widget build(BuildContext context) {
+ myInvoicesViewModel = Provider.of(context, listen: false);
+ return Scaffold(
+ backgroundColor: AppColors.bgScaffoldColor,
+ body: Column(
+ children: [
+ Expanded(
+ child: CollapsingListView(
+ title: "Invoice Details".needTranslation,
+ sendEmail: () async {
+ LoaderBottomSheet.showLoader(loadingText: "Sending email, Please wait...".needTranslation);
+ await myInvoicesViewModel.sendInvoiceEmail(
+ appointmentNo: widget.getInvoiceDetailsResponseModel.appointmentNo!,
+ projectID: widget.getInvoiceDetailsResponseModel.projectID!,
+ onSuccess: (val) {
+ LoaderBottomSheet.hideLoader();
+ showCommonBottomSheetWithoutHeight(
+ context,
+ child: Utils.getSuccessWidget(loadingText: "Email sent successfully.".needTranslation),
+ callBackFunc: () {},
+ isFullScreen: false,
+ isCloseButtonVisible: true,
+ );
+ },
+ onError: (err) {
+ LoaderBottomSheet.hideLoader();
+ showCommonBottomSheetWithoutHeight(
+ context,
+ child: Utils.getErrorWidget(loadingText: err),
+ callBackFunc: () {},
+ isFullScreen: false,
+ isCloseButtonVisible: true,
+ );
+ });
+ },
+ child: SingleChildScrollView(
+ child: Padding(
+ padding: EdgeInsets.all(24.h),
+ child: Column(
+ children: [
+ Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 20.h,
+ hasShadow: true,
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(14.h),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Column(
+ children: [
+ Image.network(
+ widget.getInvoiceDetailsResponseModel.doctorImageURL!,
+ width: 63.h,
+ height: 63.h,
+ fit: BoxFit.cover,
+ ).circle(100.r),
+ ],
+ ),
+ SizedBox(width: 16.w),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ (getIt().isArabic() ? widget.getInvoiceDetailsResponseModel.doctorNameN! : widget.getInvoiceDetailsResponseModel.doctorName!).toText16(isBold: true),
+ SizedBox(height: 8.h),
+ Wrap(
+ direction: Axis.horizontal,
+ spacing: 6.w,
+ runSpacing: 6.h,
+ children: [
+ AppCustomChipWidget(
+ labelText: "${LocaleKeys.invoiceNo}: ${widget.getInvoiceDetailsResponseModel.invoiceNo!}",
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ AppCustomChipWidget(
+ labelText: (widget.getInvoiceDetailsResponseModel.clinicDescription!.length > 15
+ ? '${widget.getInvoiceDetailsResponseModel.clinicDescription!.substring(0, 12)}...'
+ : widget.getInvoiceDetailsResponseModel.clinicDescription!),
+ labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
+ ),
+ AppCustomChipWidget(
+ labelText: widget.getInvoiceDetailsResponseModel.projectName!,
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ AppCustomChipWidget(
+ labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
+ icon: AppAssets.doctor_calendar_icon,
+ labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.getInvoiceDetailsResponseModel.appointmentDate), false),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ SizedBox(height: 16.h),
+ Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 20.h,
+ hasShadow: true,
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(14.h),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ widget.getInvoiceDetailsResponseModel.listConsultation!.first.procedureName!.toText16(isBold: true),
+ SizedBox(height: 16.h),
+ Wrap(
+ direction: Axis.horizontal,
+ spacing: 6.w,
+ runSpacing: 6.h,
+ children: [
+ AppCustomChipWidget(
+ labelText: "${LocaleKeys.quantity.tr()}: ${widget.getInvoiceDetailsResponseModel.listConsultation!.first.quantity!}",
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ AppCustomChipWidget(
+ labelText: "${LocaleKeys.price.tr()}: ${widget.getInvoiceDetailsResponseModel.listConsultation!.first.price!} ${LocaleKeys.sar.tr()}",
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ AppCustomChipWidget(
+ labelText: "${LocaleKeys.total.tr()}: ${widget.getInvoiceDetailsResponseModel.listConsultation!.first.total!} ${LocaleKeys.sar.tr()}",
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ SizedBox(height: 16.h),
+ Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 20.h,
+ hasShadow: true,
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(14.h),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ "Insurance Details".toText16(isBold: true),
+ SizedBox(height: 16.h),
+ widget.getInvoiceDetailsResponseModel.groupName!.toText14(isBold: true),
+ Row(
+ children: [
+ Expanded(child: widget.getInvoiceDetailsResponseModel.companyName!.toText14(isBold: true)),
+ ],
+ ),
+ SizedBox(height: 12.h),
+ Row(
+ children: [
+ AppCustomChipWidget(
+ labelText: "Insurance ID: ${widget.getInvoiceDetailsResponseModel.insuranceID ?? "-"}",
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 24.h,
+ hasShadow: false,
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 24.h),
+ "Total Balance".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
+ SizedBox(height: 17.h),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ "Amount before tax".needTranslation.toText14(isBold: true),
+ Utils.getPaymentAmountWithSymbol(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalShare.toString().toText16(isBold: true), AppColors.blackColor, 13,
+ isSaudiCurrency: true),
+ ],
+ ).paddingSymmetrical(24.h, 0.h),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ "VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
+ Utils.getPaymentAmountWithSymbol(
+ widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalVATAmount!.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
+ isSaudiCurrency: true),
+ ],
+ ).paddingSymmetrical(24.h, 0.h),
+ SizedBox(height: 16.h),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ "Discount".needTranslation.toText14(isBold: true),
+ Utils.getPaymentAmountWithSymbol(widget.getInvoiceDetailsResponseModel.listConsultation!.first.discountAmount!.toString().toText14(isBold: true, color: AppColors.primaryRedColor),
+ AppColors.primaryRedColor, 13,
+ isSaudiCurrency: true),
+ ],
+ ).paddingSymmetrical(24.h, 0.h),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ "Paid".needTranslation.toText14(isBold: true),
+ Utils.getPaymentAmountWithSymbol(
+ widget.getInvoiceDetailsResponseModel.listConsultation!.first.grandTotal!.toString().toText14(isBold: true, color: AppColors.textColor), AppColors.textColor, 13,
+ isSaudiCurrency: true),
+ ],
+ ).paddingSymmetrical(24.h, 0.h),
+ SizedBox(height: 24.h),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/presentation/my_invoices/my_invoices_list.dart b/lib/presentation/my_invoices/my_invoices_list.dart
new file mode 100644
index 0000000..ef1a9c2
--- /dev/null
+++ b/lib/presentation/my_invoices/my_invoices_list.dart
@@ -0,0 +1,116 @@
+import 'dart:async';
+
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
+import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
+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/widget_extensions.dart';
+import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart';
+import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
+import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
+import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart';
+import 'package:hmg_patient_app_new/presentation/my_invoices/my_invoices_details_page.dart';
+import 'package:hmg_patient_app_new/presentation/my_invoices/widgets/invoice_list_card.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/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';
+import 'package:provider/provider.dart';
+
+class MyInvoicesList extends StatefulWidget {
+ const MyInvoicesList({super.key});
+
+ @override
+ State createState() => _MyInvoicesListState();
+}
+
+class _MyInvoicesListState extends State {
+ late MyInvoicesViewModel myInvoicesViewModel;
+
+ @override
+ void initState() {
+ scheduleMicrotask(() {
+ myInvoicesViewModel.setInvoicesListLoading();
+ myInvoicesViewModel.getAllInvoicesList();
+ });
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ myInvoicesViewModel = Provider.of(context, listen: false);
+ return CollapsingListView(
+ title: LocaleKeys.invoiceList.tr(context: context),
+ child: SingleChildScrollView(
+ child: Consumer(builder: (context, myInvoicesVM, child) {
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 24.h),
+ ListView.builder(
+ itemCount: myInvoicesVM.isInvoicesListLoading ? 4 : myInvoicesVM.allInvoicesList.length,
+ physics: NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ padding: EdgeInsetsGeometry.zero,
+ itemBuilder: (context, index) {
+ return myInvoicesVM.isInvoicesListLoading
+ ? LabResultItemView(
+ onTap: () {},
+ labOrder: null,
+ index: index,
+ isLoading: true,
+ )
+ : AnimationConfiguration.staggeredList(
+ position: index,
+ duration: const Duration(milliseconds: 500),
+ child: SlideAnimation(
+ verticalOffset: 100.0,
+ child: FadeInAnimation(
+ child: AnimatedContainer(
+ duration: Duration(milliseconds: 300),
+ curve: Curves.easeInOut,
+ child: InvoiceListCard(
+ getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index],
+ onTap: () async {
+ myInvoicesVM.setInvoiceDetailLoading();
+ LoaderBottomSheet.showLoader(loadingText: "Fetching invoice details, Please wait...".needTranslation);
+ await myInvoicesVM.getInvoiceDetails(
+ appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!,
+ invoiceNo: myInvoicesVM.allInvoicesList[index].invoiceNo!,
+ projectID: myInvoicesVM.allInvoicesList[index].projectID!,
+ onSuccess: (val) {
+ LoaderBottomSheet.hideLoader();
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: MyInvoicesDetailsPage(getInvoiceDetailsResponseModel: myInvoicesVM.invoiceDetailsResponseModel),
+ ),
+ );
+ },
+ onError: (err) {
+ LoaderBottomSheet.hideLoader();
+ showCommonBottomSheetWithoutHeight(
+ context,
+ child: Utils.getErrorWidget(loadingText: err),
+ callBackFunc: () {},
+ isFullScreen: false,
+ isCloseButtonVisible: true,
+ );
+ });
+ },
+ ),
+ ),
+ ),
+ ),
+ );
+ }).paddingSymmetrical(24.w, 0.h),
+ ],
+ );
+ }),
+ ),
+ );
+ }
+}
diff --git a/lib/presentation/my_invoices/widgets/invoice_list_card.dart b/lib/presentation/my_invoices/widgets/invoice_list_card.dart
new file mode 100644
index 0000000..27ca79a
--- /dev/null
+++ b/lib/presentation/my_invoices/widgets/invoice_list_card.dart
@@ -0,0 +1,151 @@
+import 'package:flutter/material.dart';
+import 'package:hmg_patient_app_new/core/app_assets.dart';
+import 'package:hmg_patient_app_new/core/app_state.dart';
+import 'package:hmg_patient_app_new/core/dependencies.dart';
+import 'package:hmg_patient_app_new/core/utils/date_util.dart';
+import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
+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/widget_extensions.dart';
+import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoices_list_response_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/widgets/buttons/custom_button.dart';
+import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
+
+class InvoiceListCard extends StatelessWidget {
+ final GetInvoicesListResponseModel getInvoicesListResponseModel;
+ Function? onTap;
+
+ InvoiceListCard({super.key, required this.getInvoicesListResponseModel, required this.onTap});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 20.h,
+ hasShadow: true,
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(14.h),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Wrap(
+ alignment: WrapAlignment.start,
+ direction: Axis.horizontal,
+ spacing: 6.w,
+ runSpacing: 6.h,
+ children: [
+ AppCustomChipWidget(
+ icon: AppAssets.walkin_appointment_icon,
+ iconColor: AppColors.textColor,
+ labelText: 'Walk In'.needTranslation,
+ textColor: AppColors.textColor,
+ ),
+ AppCustomChipWidget(
+ labelText: 'OutPatient'.needTranslation,
+ backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.1),
+ textColor: AppColors.primaryRedColor,
+ ),
+ ],
+ ),
+ SizedBox(height: 16.h),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Column(
+ children: [
+ Image.network(
+ getInvoicesListResponseModel.doctorImageURL!,
+ width: 63.h,
+ height: 63.h,
+ fit: BoxFit.cover,
+ ).circle(100.r),
+ Transform.translate(
+ offset: Offset(0.0, -20.h),
+ child: Container(
+ width: 40.w,
+ height: 40.h,
+ decoration: BoxDecoration(
+ color: AppColors.whiteColor,
+ shape: BoxShape.circle, // Makes the container circular
+ border: Border.all(
+ color: AppColors.scaffoldBgColor, // Color of the border
+ width: 1.5.w, // Width of the border
+ ),
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h),
+ SizedBox(height: 2.h),
+ "${getInvoicesListResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor),
+ ],
+ ),
+ ).circle(100),
+ ),
+ ],
+ ),
+ SizedBox(width: 16.w),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ (getIt().isArabic() ? getInvoicesListResponseModel.doctorNameN! : getInvoicesListResponseModel.doctorName!).toText16(isBold: true),
+ SizedBox(height: 8.h),
+ Wrap(
+ direction: Axis.horizontal,
+ spacing: 6.w,
+ runSpacing: 6.h,
+ children: [
+ AppCustomChipWidget(
+ labelText: "${LocaleKeys.invoiceNo}: ${getInvoicesListResponseModel.invoiceNo!}",
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ AppCustomChipWidget(
+ labelText:
+ (getInvoicesListResponseModel.clinicName!.length > 15 ? '${getInvoicesListResponseModel.clinicName!.substring(0, 12)}...' : getInvoicesListResponseModel.clinicName!),
+ labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
+ ),
+ AppCustomChipWidget(
+ labelText: getInvoicesListResponseModel.projectName!,
+ labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
+ ),
+ AppCustomChipWidget(
+ labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
+ icon: AppAssets.doctor_calendar_icon,
+ labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(getInvoicesListResponseModel.appointmentDate), false),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ SizedBox(height: 16.h),
+ CustomButton(
+ text: "View invoice details".needTranslation,
+ onPressed: () {
+ if (onTap != null) {
+ onTap!();
+ }
+ },
+ backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.1),
+ borderColor: AppColors.primaryRedColor.withValues(alpha: 0.01),
+ textColor: AppColors.primaryRedColor,
+ fontSize: 14.f,
+ fontWeight: FontWeight.w500,
+ borderRadius: 12.r,
+ padding: EdgeInsets.symmetric(horizontal: 10.w),
+ height: 40.h,
+ iconSize: 14.h,
+ ),
+ ],
+ ),
+ ),
+ ).paddingOnly(bottom: 16.h);
+ }
+}
diff --git a/lib/presentation/onboarding/onboarding_screen.dart b/lib/presentation/onboarding/onboarding_screen.dart
index 265559b..a40a27b 100644
--- a/lib/presentation/onboarding/onboarding_screen.dart
+++ b/lib/presentation/onboarding/onboarding_screen.dart
@@ -9,6 +9,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
+import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
import 'package:lottie/lottie.dart';
@@ -30,7 +31,13 @@ class _OnboardingScreenState extends State {
void goToHomePage() {
Utils.saveBoolFromPrefs(CacheConst.firstLaunch, false);
- Navigator.of(context).pushReplacement(FadePage(page: LandingNavigation()));
+ Navigator.pushAndRemoveUntil(
+ context,
+ CustomPageRoute(
+ page: LandingNavigation(),
+ ),
+ (r) => false);
+ // Navigator.of(context).pushReplacement(FadePage(page: LandingNavigation()));
}
@override
diff --git a/lib/presentation/symptoms_checker/user_info_selection.dart b/lib/presentation/symptoms_checker/user_info_selection.dart
index 91f3d36..fd00308 100644
--- a/lib/presentation/symptoms_checker/user_info_selection.dart
+++ b/lib/presentation/symptoms_checker/user_info_selection.dart
@@ -144,7 +144,7 @@ class _UserInfoSelectionScreenState extends State {
Expanded(
child: CollapsingListView(
title: "Symptoms Checker".needTranslation,
- isLeading: true,
+ isLeading: Navigator.canPop(context),
child: SingleChildScrollView(
child: Column(
children: [
@@ -228,46 +228,48 @@ class _UserInfoSelectionScreenState extends State {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
child: SafeArea(
top: false,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- SizedBox(height: 24.h),
- Row(
- children: [
- Expanded(
- child: CustomButton(
- text: "No, Edit all".needTranslation,
- icon: AppAssets.edit_icon,
- iconColor: AppColors.primaryRedColor,
- onPressed: () {
- context.read().setUserInfoPage(0, isSinglePageEdit: false);
- context.navigateWithName(AppRoutes.userInfoFlowManager);
- },
- backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
- borderColor: Colors.transparent,
- textColor: AppColors.primaryRedColor,
- fontSize: 16.f,
+ child: Padding(
+ padding: EdgeInsets.all(8.h),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Row(
+ children: [
+ Expanded(
+ child: CustomButton(
+ text: "No, Edit all".needTranslation,
+ icon: AppAssets.edit_icon,
+ iconColor: AppColors.primaryRedColor,
+ onPressed: () {
+ context.read().setUserInfoPage(0, isSinglePageEdit: false);
+ context.navigateWithName(AppRoutes.userInfoFlowManager);
+ },
+ backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
+ borderColor: Colors.transparent,
+ textColor: AppColors.primaryRedColor,
+ fontSize: 16.f,
+ ),
),
- ),
- SizedBox(width: 12.w),
- Expanded(
- child: CustomButton(
- text: "Yes, It is".needTranslation,
- icon: AppAssets.tickIcon,
- iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
- onPressed: hasEmptyFields
- ? () {} // Empty function for disabled state
- : () => context.navigateWithName(AppRoutes.organSelectorPage),
- backgroundColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
- borderColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
- textColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
- fontSize: 16.f,
+ SizedBox(width: 12.w),
+ Expanded(
+ child: CustomButton(
+ text: "Yes, It is".needTranslation,
+ icon: AppAssets.tickIcon,
+ iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
+ onPressed: hasEmptyFields
+ ? () {} // Empty function for disabled state
+ : () => context.navigateWithName(AppRoutes.organSelectorPage),
+ backgroundColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
+ borderColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor,
+ textColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
+ fontSize: 16.f,
+ ),
),
- ),
- ],
- ),
- ],
- ).paddingSymmetrical(24.w, 0),
+ ],
+ ),
+ ],
+ ).paddingSymmetrical(24.w, 0),
+ ),
),
);
}
diff --git a/lib/presentation/todo_section/todo_page.dart b/lib/presentation/todo_section/todo_page.dart
index 8907fc8..0d2d806 100644
--- a/lib/presentation/todo_section/todo_page.dart
+++ b/lib/presentation/todo_section/todo_page.dart
@@ -47,6 +47,7 @@ class _ToDoPageState extends State {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: 3,
+ padding: EdgeInsetsGeometry.zero,
itemBuilder: (context, index) {
return AncillaryOrderCard(
order: AncillaryOrderItem(),
@@ -60,15 +61,13 @@ class _ToDoPageState extends State {
Widget build(BuildContext context) {
appState = getIt.get();
return CollapsingListView(
- title: "ToDo List".needTranslation,
- isLeading: false,
+ title: "Ancillary Orders".needTranslation,
+ isLeading: true,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
- "Ancillary Orders".needTranslation.toText18(isBold: true),
- SizedBox(height: 24.h),
Consumer(
builder: (BuildContext context, TodoSectionViewModel todoSectionViewModel, Widget? child) {
return todoSectionViewModel.isAncillaryOrdersLoading
diff --git a/lib/presentation/todo_section/widgets/ancillary_orders_list.dart b/lib/presentation/todo_section/widgets/ancillary_orders_list.dart
index 8a3e3fa..910da59 100644
--- a/lib/presentation/todo_section/widgets/ancillary_orders_list.dart
+++ b/lib/presentation/todo_section/widgets/ancillary_orders_list.dart
@@ -7,9 +7,13 @@ 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/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/todo_section/models/resp_models/ancillary_order_list_response_model.dart';
+import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
+import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_page.dart';
+import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart';
import 'package:hmg_patient_app_new/theme/colors.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/routes/custom_page_route.dart';
class AncillaryOrdersList extends StatelessWidget {
final List orders;
@@ -52,6 +56,7 @@ class AncillaryOrdersList extends StatelessWidget {
child: AncillaryOrderCard(
order: order,
isLoading: false,
+ isOrdersList: true,
onCheckIn: onCheckIn != null ? () => onCheckIn!(order) : null,
onViewDetails: onViewDetails != null ? () => onViewDetails!(order) : null,
)),
@@ -90,12 +95,14 @@ class AncillaryOrderCard extends StatelessWidget {
super.key,
required this.order,
this.isLoading = false,
+ this.isOrdersList = false,
this.onCheckIn,
this.onViewDetails,
});
final AncillaryOrderItem order;
final bool isLoading;
+ final bool isOrdersList;
final VoidCallback? onCheckIn;
final VoidCallback? onViewDetails;
@@ -113,30 +120,24 @@ class AncillaryOrderCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- // Header Row with Order Number and Date
- // Row(
- // mainAxisAlignment: MainAxisAlignment.spaceBetween,
- // children: [
- // Row(
- // children: [
- // if (!isLoading)
- // "Order #".needTranslation.toText14(
- // color: AppColors.textColorLight,
- // weight: FontWeight.w500,
- // ),
- // SizedBox(width: 4.w),
- // (isLoading ? "12345" : "${order.orderNo ?? '-'}").toText16(isBold: true).toShimmer2(isShow: isLoading),
- // ],
- // ),
- // if (order.orderDate != null || isLoading)
- // (isLoading ? "Jan 15, 2024" : DateFormat('MMM dd, yyyy').format(order.orderDate!))
- // .toText12(color: AppColors.textColorLight)
- // .toShimmer2(isShow: isLoading),
- // ],
- // ),
-
- SizedBox(height: 12.h),
-
+ isOrdersList
+ ? SizedBox.shrink()
+ : Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ "Ancillary Orders".toText14(isBold: true),
+ Row(
+ children: [
+ LocaleKeys.viewAll.tr(context: context).toText12(color: AppColors.primaryRedColor),
+ SizedBox(width: 2.h),
+ Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h),
+ ],
+ ),
+ ],
+ ).toShimmer2(isShow: isLoading).onPress(() {
+ Navigator.of(context).push(CustomPageRoute(page: ToDoPage()));
+ }),
+ SizedBox(height: 10.h),
// Doctor and Clinic Info
Row(
crossAxisAlignment: CrossAxisAlignment.center,
@@ -144,8 +145,8 @@ class AncillaryOrderCard extends StatelessWidget {
if (!isLoading) ...[
Image.network(
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
- width: 40.w,
- height: 40.h,
+ width: 63.w,
+ height: 63.h,
fit: BoxFit.cover,
).circle(100.r),
SizedBox(width: 12.w),
@@ -155,11 +156,7 @@ class AncillaryOrderCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Doctor Name
- if (order.doctorName != null || isLoading)
- (isLoading ? "Dr. John Smith" : order.doctorName!)
- .toString()
- .toText14(isBold: true, maxlines: 2)
- .toShimmer2(isShow: isLoading),
+ if (order.doctorName != null || isLoading) (isLoading ? "Dr. John Smith" : order.doctorName!).toString().toText16(isBold: true, maxlines: 2).toShimmer2(isShow: isLoading),
SizedBox(height: 4.h),
],
@@ -167,9 +164,7 @@ class AncillaryOrderCard extends StatelessWidget {
),
],
),
-
- SizedBox(height: 12.h),
-
+ SizedBox(height: 8.h),
// Chips for Appointment Info and Status
Wrap(
direction: Axis.horizontal,
@@ -191,9 +186,8 @@ class AncillaryOrderCard extends StatelessWidget {
// Appointment Date
if (order.appointmentDate != null || isLoading)
AppCustomChipWidget(
- icon: AppAssets.calendar,
- labelText:
- isLoading ? "Date: Jan 20, 2024" : "Date: ${DateFormat('MMM dd, yyyy').format(order.appointmentDate!)}".needTranslation,
+ icon: AppAssets.appointment_calendar_icon,
+ labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!).needTranslation,
).toShimmer2(isShow: isLoading),
// Appointment Number
diff --git a/lib/widgets/appbar/collapsing_list_view.dart b/lib/widgets/appbar/collapsing_list_view.dart
index c1ab6d4..aa6cc3e 100644
--- a/lib/widgets/appbar/collapsing_list_view.dart
+++ b/lib/widgets/appbar/collapsing_list_view.dart
@@ -21,6 +21,7 @@ class CollapsingListView extends StatelessWidget {
VoidCallback? history;
VoidCallback? instructions;
VoidCallback? requests;
+ VoidCallback? sendEmail;
Widget? bottomChild;
Widget? trailing;
bool isClose;
@@ -40,6 +41,7 @@ class CollapsingListView extends StatelessWidget {
this.history,
this.instructions,
this.requests,
+ this.sendEmail,
this.isLeading = true,
this.trailing,
this.leadingCallback,
@@ -78,6 +80,7 @@ class CollapsingListView extends StatelessWidget {
history: history,
instructions: instructions,
requests: requests,
+ sendEmail: sendEmail,
bottomChild: bottomChild,
trailing: trailing,
)
@@ -108,6 +111,7 @@ class CollapsingListView extends StatelessWidget {
history: history,
instructions: instructions,
requests: requests,
+ sendEmail: sendEmail,
bottomChild: bottomChild,
trailing: trailing,
),
@@ -181,6 +185,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget
VoidCallback? history;
VoidCallback? instructions;
VoidCallback? requests;
+ VoidCallback? sendEmail;
Widget? bottomChild;
Widget? trailing;
@@ -195,6 +200,7 @@ class ScrollAnimatedTitle extends StatefulWidget implements PreferredSizeWidget
this.history,
this.instructions,
this.requests,
+ this.sendEmail,
this.bottomChild,
this.trailing,
});
@@ -267,6 +273,7 @@ class _ScrollAnimatedTitleState extends State {
if (widget.history != null) actionButton(context, t, title: "History".needTranslation, icon: AppAssets.insurance_history_icon).onPress(widget.history!),
if (widget.instructions != null) actionButton(context, t, title: "Instructions".needTranslation, icon: AppAssets.requests).onPress(widget.instructions!),
if (widget.requests != null) actionButton(context, t, title: "Requests".needTranslation, icon: AppAssets.insurance_history_icon).onPress(widget.requests!),
+ if (widget.sendEmail != null) actionButton(context, t, title: "Send Email".needTranslation, icon: AppAssets.email).onPress(widget.sendEmail!),
if (widget.search != null) Utils.buildSvgWithAssets(icon: AppAssets.search_icon).onPress(widget.search!),
if (widget.trailing != null) widget.trailing!,
]
diff --git a/lib/widgets/bottom_navigation/bottom_navigation.dart b/lib/widgets/bottom_navigation/bottom_navigation.dart
index a3e117f..c820468 100644
--- a/lib/widgets/bottom_navigation/bottom_navigation.dart
+++ b/lib/widgets/bottom_navigation/bottom_navigation.dart
@@ -30,7 +30,8 @@ class BottomNavigation extends StatelessWidget {
isSpecial: true,
),
appState.isAuthenticated
- ? BottomNavItem(icon: AppAssets.toDoBottom, label: LocaleKeys.todoList.tr(context: context))
+ // ? BottomNavItem(icon: AppAssets.toDoBottom, label: LocaleKeys.todoList.tr(context: context))
+ ? BottomNavItem(icon: AppAssets.toDoBottom, label: "Symptoms")
: BottomNavItem(icon: AppAssets.news, label: LocaleKeys.news.tr()),
BottomNavItem(icon: AppAssets.servicesBottom, label: LocaleKeys.services2.tr(context: context)),
];
@@ -39,7 +40,7 @@ class BottomNavigation extends StatelessWidget {
decoration: _containerDecoration,
padding: _containerPadding,
child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: List.generate(
items.length,
(index) => _buildNavItem(items[index], index),