no message

dev_sultan
Sultan khan 16 hours ago
parent d9d7a8b7c2
commit d86a9b5ed9

@ -1843,5 +1843,6 @@
"weatherIndicators": "طقس",
"submitRating": "إرسال التقييم",
"maxOneFileAllowed": "يمكن رفع ملف واحد فقط",
"fileSizeExceedsLimit": "يجب ألا يتجاوز حجم الملف 1 ميغابايت"
"fileSizeExceedsLimit": "يجب ألا يتجاوز حجم الملف 1 ميغابايت",
"submitReferral": "تقديم الطلب"
}

@ -1833,7 +1833,8 @@
"weatherIndicators": "Weather",
"submitRating": "Submit",
"maxOneFileAllowed": "Only 1 file can be uploaded",
"fileSizeExceedsLimit": "File size must not exceed 1 MB"
"fileSizeExceedsLimit": "File size must not exceed 1 MB",
"submitReferral": "Submit"
}

@ -185,7 +185,7 @@ class _NewReferralPageState extends State<NewReferralPage> {
color: AppColors.whiteColor,
padding: EdgeInsets.all(ResponsiveExtension(20).h),
child: CustomButton(
text: _currentStep <= 1 ? LocaleKeys.next.tr() : LocaleKeys.submit.tr(),
text: _currentStep <= 1 ? LocaleKeys.next.tr() : LocaleKeys.submitReferral.tr(),
// icon: AppAssets.search_icon,
iconColor: Colors.white,
onPressed: () => {_handleNextStep()},

@ -248,7 +248,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
child: Consumer<HabibWalletViewModel>(
builder: (context, habibWalletVM, child) {
final hospitals = habibWalletVM.advancePaymentHospitals;
if (hospitals == null || hospitals.isEmpty) {
if (hospitals.isEmpty) {
return const Center(
child: Padding(
padding: EdgeInsets.all(16.0),
@ -289,19 +289,15 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
}
void _addMedicalReport(String image, File file, ReferralFormManager formManager) {
// Max 1 file
if (formManager.formData.medicalReportImages.isNotEmpty) {
formManager.setFieldError('medicalReport', LocaleKeys.maxOneFileAllowed.tr(context: context));
return;
}
// Remove max 1 file check
// Max 1 MB
final fileSizeInBytes = file.lengthSync();
if (fileSizeInBytes > 1 * 1024 * 1024) {
formManager.setFieldError('medicalReport', LocaleKeys.fileSizeExceedsLimit.tr(context: context));
formManager.setFieldError('medicalReport', 'File size exceeds 1MB limit.');
return;
}
final newAttachment = EReferralAttachment(
fileName: 'medical_report_${formManager.formData.medicalReportImages.length + 1}.png',
fileName: 'medical_report_formManager.formData.medicalReportImages.length + 1}.png',
base64String: image
);
@ -315,19 +311,15 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
}
void _addInsuranceDocument(String image, File file, ReferralFormManager formManager) {
// Max 1 file
if (formManager.formData.insuredPatientImages.isNotEmpty) {
formManager.setFieldError('insuredDocument', LocaleKeys.maxOneFileAllowed.tr(context: context));
return;
}
// Remove max 1 file check
// Max 1 MB
final fileSizeInBytes = file.lengthSync();
if (fileSizeInBytes > 1 * 1024 * 1024) {
formManager.setFieldError('insuredDocument', LocaleKeys.fileSizeExceedsLimit.tr(context: context));
formManager.setFieldError('insuredDocument', 'File size exceeds 1MB limit.');
return;
}
final newAttachment = EReferralAttachment(
fileName: 'insurance_${formManager.formData.insuredPatientImages.length + 1}.png',
fileName: 'insurance_formManager.formData.insuredPatientImages.length + 1}.png',
base64String: image
);

Loading…
Cancel
Save