From 79b23584db6cb5585c942986e789d82328ee8253 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 26 Feb 2026 14:04:39 +0300 Subject: [PATCH] updates --- lib/core/api/api_client.dart | 4 ++-- lib/core/api_consts.dart | 14 ++++++-------- lib/core/utils/utils.dart | 2 +- .../ask_doctor/ask_doctor_view_model.dart | 2 +- .../my_appointments_view_model.dart | 6 +++++- .../waiting_appointment_payment_page.dart | 1 + .../widget/e_referral_other_details.dart | 18 +++++++++++++----- .../widget/e_referral_patient_info.dart | 12 +++++++++--- .../widget/e_referral_requester_form.dart | 5 ++++- 9 files changed, 42 insertions(+), 22 deletions(-) diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index e706a9d..f9c44e7 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -194,8 +194,8 @@ class ApiClientImp implements ApiClient { body['TokenID'] = "@dm!n"; } - body['TokenID'] = "@dm!n"; - body['PatientID'] = 4773781; + // body['TokenID'] = "@dm!n"; + // body['PatientID'] = 4773922; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; // body['SessionID'] = "45786230487560q"; diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 708324e..3913200 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -57,7 +57,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.uat: baseUrl = "https://uat.hmgwebservices.com/"; @@ -69,7 +69,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.preProd: baseUrl = "https://webservices.hmg.com/"; @@ -81,7 +81,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.qa: baseUrl = "https://uat.hmgwebservices.com/"; @@ -93,7 +93,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.staging: baseUrl = "https://uat.hmgwebservices.com/"; @@ -105,7 +105,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/uat/'; QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId"; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; } } @@ -229,7 +229,7 @@ class ApiConsts { static String getAiOverViewLabOrder = "Services/Patients.svc/REST/HMGAI_Lab_Analyzer_API"; // ************ static values for Api **************** - static final double appVersionID = 19.8; + static final double appVersionID = 20.1; // static final double appVersionID = 50.7; static final int appChannelId = 3; static final String appIpAddress = "10.20.10.20"; @@ -517,8 +517,6 @@ var IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointment var GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; var ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; -var SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; - var GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; var GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index 671312d..8b5b284 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -860,7 +860,7 @@ class Utils { static String getAppointmentTransID(int projectID, int clinicID, int appoNo, {bool isAddMilliseconds = true}) { String currentMillis = DateTime.now().millisecondsSinceEpoch.toString(); - return '$projectID-$clinicID-$appoNo${isAddMilliseconds ? '-${currentMillis.substring(currentMillis.length - 5, currentMillis.length)}' : ""}'; + return '$projectID-$clinicID-$appoNo${isAddMilliseconds ? '-${currentMillis.substring(currentMillis.length - 5, currentMillis.length)}${currentMillis.substring(currentMillis.length - 5, currentMillis.length)}' : ""}'; } static String getAdvancePaymentTransID(int projectID, int fileNumber) { diff --git a/lib/features/ask_doctor/ask_doctor_view_model.dart b/lib/features/ask_doctor/ask_doctor_view_model.dart index 2b9600e..b28ead1 100644 --- a/lib/features/ask_doctor/ask_doctor_view_model.dart +++ b/lib/features/ask_doctor/ask_doctor_view_model.dart @@ -67,7 +67,7 @@ class AskDoctorViewModel extends ChangeNotifier { (failure) async { isDoctorResponsesLoading = false; notifyListeners(); - await errorHandlerService.handleError(failure: failure); + // await errorHandlerService.handleError(failure: failure); if (onError != null) { onError(failure.toString()); } diff --git a/lib/features/my_appointments/my_appointments_view_model.dart b/lib/features/my_appointments/my_appointments_view_model.dart index f887680..d2296a6 100644 --- a/lib/features/my_appointments/my_appointments_view_model.dart +++ b/lib/features/my_appointments/my_appointments_view_model.dart @@ -791,7 +791,11 @@ class MyAppointmentsViewModel extends ChangeNotifier { final result = await myAppointmentsRepo.getTamaraInstallmentsDetails(); result.fold( - (failure) async => await errorHandlerService.handleError(failure: failure), + // (failure) async => await errorHandlerService.handleError(failure: failure), + (failure) async { + isTamaraDetailsLoading = false; + notifyListeners(); + }, (apiResponse) { getTamaraInstallmentsDetailsResponseModel = apiResponse.data!; isTamaraDetailsLoading = false; diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart index bb347e5..abd8d10 100644 --- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart +++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart @@ -484,6 +484,7 @@ class _WaitingAppointmentPaymentPageState extends State { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: ListView( + padding: EdgeInsets.zero, physics: const BouncingScrollPhysics(), children: [ const SizedBox(height: 12), @@ -97,7 +98,10 @@ class _OtherDetailsStepState extends State { InkWell( child: TextInputWidget( controller: _medicalReportController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.medicalReport.tr(context: context), labelText: LocaleKeys.selectAttachment.tr(context: context), suffix: const Icon(Icons.attachment), @@ -169,6 +173,7 @@ class _OtherDetailsStepState extends State { if (!value) { _updateInsuranceText(); } + setState(() {}); }, ), Padding( @@ -194,7 +199,10 @@ class _OtherDetailsStepState extends State { InkWell( child: TextInputWidget( controller: _insuranceController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.insuranceDocument.tr(context: context), labelText: LocaleKeys.selectAttachment.tr(context: context), suffix: const Icon(Icons.attachment), @@ -234,7 +242,6 @@ class _OtherDetailsStepState extends State { } void _showBranchBottomSheet(BuildContext context, ReferralFormManager formManager) { - showCommonBottomSheetWithoutHeight( context, title: LocaleKeys.selectBranch.tr(context: context), @@ -266,8 +273,9 @@ class _OtherDetailsStepState extends State { onTap: () { formManager.updateBranch(branch); Navigator.pop(context); - }, - ); + setState(() {}); + }, + ); }, // separatorBuilder: (context, index) => const Divider(), itemCount: hospitals.length, diff --git a/lib/presentation/e_referral/widget/e_referral_patient_info.dart b/lib/presentation/e_referral/widget/e_referral_patient_info.dart index 61b92c7..cbce691 100644 --- a/lib/presentation/e_referral/widget/e_referral_patient_info.dart +++ b/lib/presentation/e_referral/widget/e_referral_patient_info.dart @@ -64,6 +64,7 @@ class PatientInformationStepState extends State { return Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: ListView( + padding: EdgeInsets.zero, physics: const BouncingScrollPhysics(), children: [ const SizedBox(height: 12), @@ -71,7 +72,6 @@ class PatientInformationStepState extends State { const SizedBox(height: 12), _buildIdentificationField(formManager), _buildPatientNameField(formManager), - // _buildPatientCountryField(context, formManager), _buildPatientPhoneField(formManager), const SizedBox(height: 20), _buildSectionTitle(LocaleKeys.patientLocation.tr(context: context)), @@ -95,7 +95,10 @@ class PatientInformationStepState extends State { focusNode: _identificationFocusNode, child: TextInputWidget( controller: _identificationController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.enterIdentificationNumber.tr(context: context), labelText: LocaleKeys.identificationNumber.tr(context: context), errorMessage: formManager.errors.patientIdentification, @@ -115,7 +118,10 @@ class PatientInformationStepState extends State { focusNode: _nameFocusNode, child: TextInputWidget( controller: _nameController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), hintText: LocaleKeys.patientName.tr(context: context), labelText: LocaleKeys.name.tr(context: context), keyboardType: TextInputType.text, diff --git a/lib/presentation/e_referral/widget/e_referral_requester_form.dart b/lib/presentation/e_referral/widget/e_referral_requester_form.dart index d2b75cc..b49846f 100644 --- a/lib/presentation/e_referral/widget/e_referral_requester_form.dart +++ b/lib/presentation/e_referral/widget/e_referral_requester_form.dart @@ -94,7 +94,6 @@ class RequesterFormStepState extends State { focusNode: _nameFocusNode, child: TextInputWidget( controller: _nameController, - padding: const EdgeInsets.symmetric(horizontal: 16.0), hintText: LocaleKeys.enterReferralRequesterName.tr(context: context), labelText: LocaleKeys.requesterName.tr(context: context), keyboardType: TextInputType.text, @@ -102,6 +101,10 @@ class RequesterFormStepState extends State { isAllowLeadingIcon: true, leadingIcon: AppAssets.user_circle, hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.requesterName), + padding: EdgeInsets.symmetric( + vertical: ResponsiveExtension(12).h, + horizontal: ResponsiveExtension(16).h, + ), onChange: (value) { formManager.updateRequesterName(value ?? ''); },