fixed strings bugs

faiz_dev
faizatflutter 1 day ago
parent 6bb04401cf
commit 47b733c186

@ -1966,9 +1966,9 @@
"fileSizeTooLarge": "يجب ألا يتجاوز حجم الملف 2 ميغابايت",
"image": "صورة",
"refundCannotBeProcessedPatientAdmitted": "لا يمكن معالجة الاسترداد أثناء إقامة المريض",
"cashRefundLimitExceeded": "يمكنك فقط التقدم بطلب استرداد نقدي إذا كان المبلغ أقل من 5000. لمزيد من المعلومات يرجى زيارتنا.",
"cashRefundInstructions": "بمجرد الموافقة على الطلب، يرجى زيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.",
"cashRefundApprovalInstructions": "بمجرد الموافقة على الطلب،\nيرجى زيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد.\nعند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.",
"cashRefundLimitExceeded": "لا يمكن معالجة المبالغ المستردة التي تزيد عن 5000 ريال سعودي نقداً. يرجى اختيار وجهة استرداد أخرى.",
"cashRefundInstructions": "قم بزيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل بمجرد قيام الصراف بإنشاء معاملة الاسترداد. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.",
"cashRefundApprovalInstructions": "قم بزيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل بمجرد قيام الصراف بإنشاء معاملة الاسترداد. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.",
"packageRefundValidationMessage": "طلب استرداد الباقة الخاص بك يتطلب التحقق بسبب استخدام الباقة والفواتير الفرعية ذات الصلة. سنقوم بمراجعة ومعالجة الطلب ضمن اتفاقية مستوى الخدمة المعتمدة بعد تأكيد الأهلية.",
"parkingQR": "رمز الاستجابة السريعة لوقوف السيارات",
"parkingQRDesc": "امسح رمز الاستجابة السريعة (QR Code) أدناه عند بوابة الخروج من موقف السيارات:"

@ -1956,9 +1956,9 @@
"fileSizeTooLarge": "File size must not exceed 2 MB",
"image": "Image",
"refundCannotBeProcessedPatientAdmitted": "Refund cannot be processed while the patient is admitted",
"cashRefundLimitExceeded": "You can only apply for cash refund if the amount is less than 5000. For more information please visit us.",
"cashRefundInstructions": "Once the request is approved, Please visit HMG Hospital or HMG Primary Care cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.",
"cashRefundApprovalInstructions": "Once the request is approved,\nPlease visit HMG Hospital or HMG Primary Care cashier to receive cash.\nAt the cashier counter, you will receive an OTP on your registered mobile number. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.",
"cashRefundLimitExceeded": "Refunds over 5000 SAR cannot be processed as cash. Please select another refund destination.",
"cashRefundInstructions": "Visit HMG Hospital or HMG Primary Care cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number once the cashier has created the refund transaction. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.",
"cashRefundApprovalInstructions": "Visit HMG Hospital or HMG Primary Care cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number once the cashier has created the refund transaction. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.",
"packageRefundValidationMessage": "Your package refund request required validation because of package use and related child invoices. We will review the process the request within the approved SLA after confirming eligibility.",
"parkingQR": "Parking QR Code",
"parkingQRDesc": "Scan the below QR Code at the exit parking gate:"

@ -210,9 +210,11 @@ class ApiClientImp implements ApiClient {
body['TokenID'] = "@dm!n";
}
// body['TokenID'] = "@dm!n";
body['TokenID'] = "@dm!n";
// body['PatientID'] = 6424682;
// body['PatientID'] = 4772785;
// body['PatientID'] = 4776359;
body['PatientID'] = 4776466;
// body['PatientID'] = 4771727;
// body['PatientID'] = 3648831;
// body['PatientID'] = 89754444;
@ -252,7 +254,7 @@ class ApiClientImp implements ApiClient {
if (kDebugMode) {
debugPrint("uri: ${Uri.parse(url.trim())}");
var requestBodyJSON = json.encode(body);
debugPrint("body: $requestBodyJSON", wrapWidth: 2048);
debugPrint("body: $requestBodyJSON", wrapWidth: 1024);
// log("body: $requestBodyJSON");
}
@ -263,7 +265,7 @@ class ApiClientImp implements ApiClient {
body: requestBody,
headers: headers,
);
// log("response: ${response.body.toString()}");
log("response: ${response.body.toString()}");
} on SocketException catch (e) {
final message = e.message.contains('Connection reset by peer') ? LocaleKeys.networkConnectionReset.tr() : LocaleKeys.networkErrorMessage.tr();
onFailure(message, -1, failureType: ConnectivityFailure(message));
@ -382,7 +384,7 @@ class ApiClientImp implements ApiClient {
onSuccess(parsed, statusCode,
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} else {
if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null && parsed['ErrorMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
onFailure(
LocaleKeys.networkServerErrorNoMessage.tr(),

@ -303,7 +303,7 @@ class ApiConsts {
static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations";
// ************ static values for Api ****************
static final double appVersionID = 21.3;
static final double appVersionID = 21.5;
static final int appChannelId = 3;
static final String appIpAddress = "10.20.10.20";

@ -112,18 +112,18 @@ class SubmitRefundRequestModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> json = {
"ProjectID": projectId,
"Refund_RefundType": refundType,
"Refund_Project": refundProject,
"Refund_RefundType": refundType ?? '',
"Refund_Project": refundProject ?? '',
"Refund_ProjectId": refundProjectId,
"Refund_PatientId": refundPatientId,
"PatientMobileNumber": patientMobileNumber,
"Refund_PatientName": refundPatientName,
"Refund_NationalId": refundNationalId,
"Refund_PatientId": refundPatientId ?? '',
"PatientMobileNumber": patientMobileNumber ?? '',
"Refund_PatientName": refundPatientName ?? '',
"Refund_NationalId": refundNationalId ?? '',
"Refund_DoctorId": refundDoctorId,
"Refund_DoctorName": refundDoctorName,
"Refund_RefundDestination": refundDestination,
"Refund_IBAN": refundIban,
"Refund_Remarks": refundRemarks,
"Refund_DoctorName": refundDoctorName ?? '',
"Refund_RefundDestination": refundDestination ?? '',
"Refund_IBAN": refundIban ?? '',
"Refund_Remarks": refundRemarks ?? '',
"Refund_TotalRefundAmount": refundTotalAmount,
"Refund_IsFastTrack": isRefundFastTrack,
"Refund_AttachmentsBase64List": refundAttachmentsBase64List,
@ -134,10 +134,10 @@ class SubmitRefundRequestModel {
json["Refund_AdvancesList"] = refundAdvancesList.map((a) => a.toJson()).toList();
} else {
// Invoice refund include invoice-specific fields and procedures list
json["Refund_InvoiceNo"] = refundInvoiceNo;
json["Refund_AppointmentNo"] = refundAppointmentNo;
json["Refund_InvoiceNo"] = refundInvoiceNo ?? '';
json["Refund_AppointmentNo"] = refundAppointmentNo ?? '';
json["Refund_ClinicId"] = refundClinicId;
json["Refund_ClinicName"] = refundClinicName;
json["Refund_ClinicName"] = refundClinicName ?? '';
json["Refund_ProceduresList"] = refundProceduresList.map((p) => p.toJson()).toList();
}

@ -1,3 +1,5 @@
import 'dart:developer';
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';
@ -290,15 +292,30 @@ class RefundRequestRepoImp implements RefundRequestRepo {
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
// Check if MessageStatus indicates success (handle null messageStatus)
if (messageStatus == null || messageStatus != 1) {
// Extract error message from response - ensure we handle nulls properly
final String errorMsg = (response['Message']?.toString() ??
response['message']?.toString() ??
response['ErrorEndUserMessage']?.toString() ??
response['ErrorMessage']?.toString() ??
errorMessage ??
'Unknown error');
loggerService.logError("submitRefund error - messageStatus: $messageStatus, error: $errorMsg");
failure = ServerFailure(errorMsg);
return;
}
final model = SubmitRefundResponseModel.fromJson(response as Map<String, dynamic>);
apiResponse = GenericApiModel<SubmitRefundResponseModel>(
messageStatus: 1,
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: errorMessage,
data: model,
);
} catch (e) {
loggerService.logError("submitRefund parsing error: $e");
} catch (e, stackTrace) {
loggerService.logError("submitRefund parsing error: $e\nStack trace: $stackTrace");
failure = DataParsingFailure(e.toString());
}
},
@ -308,7 +325,7 @@ class RefundRequestRepoImp implements RefundRequestRepo {
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
loggerService.logError("submitRefund exception: $e");
log("submitRefund exception: $e");
return Left(UnknownFailure(e.toString()));
}
}

@ -65,7 +65,7 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
_ibanController.addListener(() => _refundRequestViewModel.triggerRebuild());
_descriptionController.addListener(() => _refundRequestViewModel.triggerRebuild());
_loadInvoiceDetails();
_loadThresholdAmount();
// _loadThresholdAmount();
});
}

@ -1,3 +1,4 @@
import 'dart:developer';
import 'dart:io';
import 'package:hmg_patient_app_new/core/exceptions/api_exception.dart';

@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';

Loading…
Cancel
Save