From 4f320966d77b64a127648fe2a6cc5ecab60dc93d Mon Sep 17 00:00:00 2001 From: Madhuravas reddy Date: Fri, 28 Nov 2025 21:41:56 +0530 Subject: [PATCH 1/5] RCF-1283 added config propertys for password validation and document size Signed-off-by: Madhuravas reddy --- .../api_services/AuthenticationApi.java | 10 +++++ .../api_services/DocumentCategoryApi.java | 10 +++++ .../constant/RegistrationConstants.java | 3 +- .../repository/GlobalParamRepository.java | 8 ++++ assets/l10n/app_ar.arb | 3 +- assets/l10n/app_en.arb | 3 +- assets/l10n/app_fr.arb | 3 +- assets/l10n/app_hi.arb | 3 +- assets/l10n/app_kn.arb | 3 +- assets/l10n/app_ta.arb | 3 +- lib/platform_android/auth_service_impl.dart | 13 ++++++ .../document_category_impl.dart | 13 ++++++ lib/platform_spi/auth_service.dart | 2 + .../document_category_service.dart | 2 + lib/provider/auth_provider.dart | 8 ++++ lib/ui/login_page.dart | 5 ++- .../widgets/document_upload_control.dart | 41 +++++++++++++++---- pigeon/auth_response.dart | 2 + pigeon/document_category.dart | 3 ++ 19 files changed, 121 insertions(+), 17 deletions(-) diff --git a/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java b/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java index 6a2768c11..1253c8631 100644 --- a/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java +++ b/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java @@ -265,4 +265,14 @@ public void getRolesByUserId(@NonNull String userId, @NonNull AuthResponsePigeon Log.e(getClass().getSimpleName(), "Getting user role failed!" + Arrays.toString(e.getStackTrace())); } } + + @Override + public void getPasswordLength(@NonNull AuthResponsePigeon.Result result) { + try { + String passwordLength = this.globalParamRepository.getCachedStringPasswordLength(); + result.success(passwordLength); + } catch (Exception e) { + Log.e(getClass().getSimpleName(), "Getting password Length failed!" + Arrays.toString(e.getStackTrace())); + } + } } diff --git a/android/app/src/main/java/io/mosip/registration_client/api_services/DocumentCategoryApi.java b/android/app/src/main/java/io/mosip/registration_client/api_services/DocumentCategoryApi.java index abdc7829a..5e6e2d839 100644 --- a/android/app/src/main/java/io/mosip/registration_client/api_services/DocumentCategoryApi.java +++ b/android/app/src/main/java/io/mosip/registration_client/api_services/DocumentCategoryApi.java @@ -93,6 +93,16 @@ public void getDocumentCategories(@NonNull String categoryCode, @NonNull String result.success(documentCategory); } + @Override + public void getDocumentSize(@NonNull DocumentCategoryPigeon.Result result) { + String documentSize = ""; + try { + documentSize = this.globalParamRepository.getCachedStringDocumentSize(); + } catch (Exception e) { + Log.e(getClass().getSimpleName(), "Fetch document size: " + Arrays.toString(e.getStackTrace())); + } + result.success(documentSize); + } public String evaluateMvelScript(String scriptName, Map dataContext) { try { diff --git a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java index bf441c0e1..7692a2080 100644 --- a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java +++ b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java @@ -117,5 +117,6 @@ public class RegistrationConstants { public static final String JOB_TRIGGER_POINT_USER = "User"; public static final String GPS_DEVICE_ENABLE_FLAG = "mosip.registration.gps_device_enable_flag"; public static final String DIST_FRM_MACHINE_TO_CENTER = "mosip.registration.distance.from.machine.to.center"; - + public static String PWORD_LENGTH = "mosip.registration.username_pwd_length"; + public static String DOC_SIZE = "mosip.registration.document_size"; } diff --git a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java index 12c4d5885..e2e48c9e7 100644 --- a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java +++ b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java @@ -158,6 +158,14 @@ public String getCachedStringMachineToCenterDistance() { return globalParamMap.get(RegistrationConstants.DIST_FRM_MACHINE_TO_CENTER); } + public String getCachedStringPasswordLength() { + return globalParamMap.get(RegistrationConstants.PWORD_LENGTH); + } + + public String getCachedStringDocumentSize() { + return globalParamMap.get(RegistrationConstants.DOC_SIZE); + } + /** * Refresh configuration cache by merging global params with local preferences */ diff --git a/assets/l10n/app_ar.arb b/assets/l10n/app_ar.arb index c2af4d6e1..bafeb8120 100644 --- a/assets/l10n/app_ar.arb +++ b/assets/l10n/app_ar.arb @@ -332,5 +332,6 @@ "enter_additional_info_req_id": "أدخل معرف طلب المعلومات الإضافية", "additional_info_req_id": "معرف طلب المعلومات الإضافية", "no_access_to_this_page": "ليست لديك صلاحية الوصول إلى هذه الصفحة", - "scheduled_job_settings": "إعدادات المهمة المجدولة" + "scheduled_job_settings": "إعدادات المهمة المجدولة", + "doc_size_existed": "حجم الملف يتجاوز الحد {size}" } \ No newline at end of file diff --git a/assets/l10n/app_en.arb b/assets/l10n/app_en.arb index 997e2b7e5..04693aafc 100644 --- a/assets/l10n/app_en.arb +++ b/assets/l10n/app_en.arb @@ -332,5 +332,6 @@ "enter_additional_info_req_id": "Enter Additional Info Request ID", "additional_info_req_id": "Additional Info Request ID", "scheduled_job_settings": "Scheduled Job Settings", - "no_access_to_this_page": "You don't have access to this page" + "no_access_to_this_page": "You don't have access to this page", + "doc_size_existed": "File size exceeds limit {size}" } \ No newline at end of file diff --git a/assets/l10n/app_fr.arb b/assets/l10n/app_fr.arb index d4bc2f01c..276fb4420 100644 --- a/assets/l10n/app_fr.arb +++ b/assets/l10n/app_fr.arb @@ -332,5 +332,6 @@ "enter_additional_info_req_id": "Entrez l'identifiant de la demande d'information supplémentaire", "additional_info_req_id": "Identifiant de la demande d'information supplémentaire", "no_access_to_this_page": "Vous n'avez pas accès à cette page", - "scheduled_job_settings": "Paramètres des tâches planifiées" + "scheduled_job_settings": "Paramètres des tâches planifiées", + "doc_size_existed": "La taille du fichier dépasse la limite de {size}" } \ No newline at end of file diff --git a/assets/l10n/app_hi.arb b/assets/l10n/app_hi.arb index 81f89da74..ce7b54cdc 100644 --- a/assets/l10n/app_hi.arb +++ b/assets/l10n/app_hi.arb @@ -332,5 +332,6 @@ "enter_additional_info_req_id": "अतिरिक्त जानकारी अनुरोध आईडी दर्ज करें", "additional_info_req_id": "अतिरिक्त जानकारी अनुरोध आईडी", "no_access_to_this_page": "आपको इस पृष्ठ तक पहुँच नहीं है", - "scheduled_job_settings": "अनुसूचित कार्य सेटिंग्स" + "scheduled_job_settings": "अनुसूचित कार्य सेटिंग्स", + "doc_size_existed": "फ़ाइल का आकार सीमा {size} से अधिक है" } \ No newline at end of file diff --git a/assets/l10n/app_kn.arb b/assets/l10n/app_kn.arb index 8811d54b1..0bc8a177a 100644 --- a/assets/l10n/app_kn.arb +++ b/assets/l10n/app_kn.arb @@ -332,5 +332,6 @@ "enter_additional_info_req_id": "ಹೆಚ್ಚುವರಿ ಮಾಹಿತಿ ವಿನಂತಿ ಐಡಿ ನಮೂದಿಸಿ", "additional_info_req_id": "ಹೆಚ್ಚುವರಿ ಮಾಹಿತಿ ವಿನಂತಿ ಐಡಿ", "no_access_to_this_page": "ನಿಮಗೆ ಈ ಪುಟಕ್ಕೆ ಪ್ರವೇಶವಿಲ್ಲ", - "scheduled_job_settings": "ನಿಗದಿತ ಉದ್ಯೋಗ ಸೆಟ್ಟಿಂಗ್‌ಗಳು" + "scheduled_job_settings": "ನಿಗದಿತ ಉದ್ಯೋಗ ಸೆಟ್ಟಿಂಗ್‌ಗಳು", + "doc_size_existed": "ಫೈಲ್ ಗಾತ್ರ ಮಿತಿ {size} ಮೀರಿದೆ" } \ No newline at end of file diff --git a/assets/l10n/app_ta.arb b/assets/l10n/app_ta.arb index 50db73239..81125563b 100644 --- a/assets/l10n/app_ta.arb +++ b/assets/l10n/app_ta.arb @@ -341,5 +341,6 @@ "enter_additional_info_req_id": "கூடுதல் தகவல் கோரிக்கை ஐடியை உள்ளிடவும்", "additional_info_req_id": "கூடுதல் தகவல் கோரிக்கை ஐடி", "no_access_to_this_page": "இந்தப் பக்கத்தை அணுக உங்களுக்கு அனுமதி இல்லை", - "scheduled_job_settings": "திட்டமிடப்பட்ட வேலை அமைப்புகள்" + "scheduled_job_settings": "திட்டமிடப்பட்ட வேலை அமைப்புகள்", + "doc_size_existed": "கோப்பின் அளவு {size} வரம்பை மீறுகிறது" } \ No newline at end of file diff --git a/lib/platform_android/auth_service_impl.dart b/lib/platform_android/auth_service_impl.dart index 59c36731b..6bbd074f6 100644 --- a/lib/platform_android/auth_service_impl.dart +++ b/lib/platform_android/auth_service_impl.dart @@ -137,6 +137,19 @@ class AuthServiceImpl implements AuthService { return rolesList; } + @override + Future getPasswordLength() async { + late String passwordLength; + try { + passwordLength = await AuthResponseApi().getPasswordLength(); + } on PlatformException { + debugPrint('getPasswordLength call failed!'); + } catch (e) { + debugPrint(e.toString()); + } + return passwordLength; + } + } AuthService getAuthServiceImpl() => AuthServiceImpl(); diff --git a/lib/platform_android/document_category_impl.dart b/lib/platform_android/document_category_impl.dart index f75866537..511623563 100644 --- a/lib/platform_android/document_category_impl.dart +++ b/lib/platform_android/document_category_impl.dart @@ -19,5 +19,18 @@ class DocumentCategoryImpl implements DocumentCategory { return documentValuesList; } + @override + Future getDocumentSize() async{ + String documentSize = ''; + try { + documentSize = await DocumentCategoryApi().getDocumentSize(); + } on PlatformException { + debugPrint('DynamicServiceResponseApi call failed!'); + } catch (e) { + debugPrint('Document Size not fetched! ${e.toString()}'); + } + return documentSize; + } + } DocumentCategory getDocumentCategoryImpl() => DocumentCategoryImpl(); \ No newline at end of file diff --git a/lib/platform_spi/auth_service.dart b/lib/platform_spi/auth_service.dart index 6b1f8bdb7..4a650fec9 100644 --- a/lib/platform_spi/auth_service.dart +++ b/lib/platform_spi/auth_service.dart @@ -31,5 +31,7 @@ abstract class AuthService { Future> getRolesByUserId(String userId); + Future getPasswordLength(); + factory AuthService() => getAuthServiceImpl(); } diff --git a/lib/platform_spi/document_category_service.dart b/lib/platform_spi/document_category_service.dart index 246fb708e..a64bea85c 100644 --- a/lib/platform_spi/document_category_service.dart +++ b/lib/platform_spi/document_category_service.dart @@ -3,5 +3,7 @@ import 'package:registration_client/platform_android/document_category_impl.dart abstract class DocumentCategory { Future> getDocumentCategories(String categoryCode,String langCode); + Future getDocumentSize(); + factory DocumentCategory() => getDocumentCategoryImpl(); } \ No newline at end of file diff --git a/lib/provider/auth_provider.dart b/lib/provider/auth_provider.dart index c949f7e39..4432d3986 100644 --- a/lib/provider/auth_provider.dart +++ b/lib/provider/auth_provider.dart @@ -34,6 +34,7 @@ class AuthProvider with ChangeNotifier { String _forgotPasswordUrl = ""; String _refreshedLoginTime = ""; String _idleTime = ""; + String _passwordLength = ""; bool get isLoggedIn => _isLoggedIn; bool get isSyncing => _isSyncing; @@ -57,6 +58,7 @@ class AuthProvider with ChangeNotifier { String get forgotPasswordUrl => _forgotPasswordUrl; String get refreshedLoginTime => _refreshedLoginTime; String get idleTime => _idleTime; + String get passwordLength => _passwordLength; setIsLoggedIn(bool value) { _isLoggedIn = value; @@ -242,4 +244,10 @@ class AuthProvider with ChangeNotifier { Future> getUserRole(String userId) async { return await auth.getRolesByUserId(userId); } + + getPasswordLength() async { + String passwordLength = await auth.getPasswordLength(); + _passwordLength = passwordLength; + notifyListeners(); + } } diff --git a/lib/ui/login_page.dart b/lib/ui/login_page.dart index fb9730971..c150cade3 100644 --- a/lib/ui/login_page.dart +++ b/lib/ui/login_page.dart @@ -107,6 +107,7 @@ class _LoginPageState extends State with WidgetsBindingObserver { _initializeAppData() async { await globalProvider.setMachineDetails(); await globalProvider.initializeLanguageDataList(false); + await authProvider.getPasswordLength(); await globalProvider.initializeLocationHierarchyMap(); await globalProvider.setGitHeadAttributes(); await globalProvider.getAudit("REG-LOAD-001", "REG-MOD-101"); @@ -277,7 +278,7 @@ class _LoginPageState extends State with WidgetsBindingObserver { _showInSnackBar(appLocalizations.password_required); return; } - if (password.length > 50) { + if (password.length > (int.tryParse(authProvider.passwordLength) ?? 50)) { _showInSnackBar(appLocalizations.password_exceed); return; } @@ -513,7 +514,7 @@ class _LoginPageState extends State with WidgetsBindingObserver { context.watch().isValidUser && !context.watch().isNetworkPresent ? PasswordComponent( - isDisabled: password.isEmpty || password.length > 50, + isDisabled: password.isEmpty || password.length > (int.tryParse(context.watch().passwordLength) ?? 50), onTapLogin: () async { await _getLoginAction(); await globalProvider.getThresholdValues(); diff --git a/lib/ui/process_ui/widgets/document_upload_control.dart b/lib/ui/process_ui/widgets/document_upload_control.dart index 88295345a..72b56548f 100644 --- a/lib/ui/process_ui/widgets/document_upload_control.dart +++ b/lib/ui/process_ui/widgets/document_upload_control.dart @@ -48,6 +48,29 @@ class _DocumentUploadControlState extends State { return "${(bytes / (1024 * 1024)).toStringAsFixed(2)} MB"; } + int maxFileSize = 2 * 1024 * 1024; // Default 2MB + + _fetchMaxFileSize() async { + try { + String sizeStr = await registrationTaskProvider.documentCategory.getDocumentSize(); + if (sizeStr.isNotEmpty) { + int? size = int.tryParse(sizeStr); + if (size != null && size > 0) { + setState(() { + maxFileSize = size; + }); + } + } + } catch (e) { + debugPrint("Failed to fetch document size limit: $e"); + } + } + + _showError(String message) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text(message), backgroundColor: Colors.red)); + } + FixedExtentScrollController scrollController = FixedExtentScrollController(); @override @@ -62,6 +85,7 @@ class _DocumentUploadControlState extends State { getScannedDocuments(widget.field); myGetDocumentCategoryFuture = _getDocumentType(widget.field.subType!, "eng"); + _fetchMaxFileSize(); } if (context @@ -164,14 +188,15 @@ class _DocumentUploadControlState extends State { } Future addDocument(var item, Field e, String referenceNumber) async { - // final bytes = await getImageBytes(item); - - debugPrint( - "The selected value for dropdown for ${e.id!} is ${documentController.text}"); - // Uint8List myBytes = Uint8List.fromList(bytes); - // context - // .read() - // .addDocument(e.id!, selected!, "reference", myBytes); + if (item == null) return; + if (item is Uint8List) { + if (item.lengthInBytes > maxFileSize) { + final msg = AppLocalizations.of(context)! + .doc_size_existed(getReadableFileSize(item.lengthInBytes)); + _showError(msg); + return; + } + } _getAddDocumentProvider(e, item, referenceNumber); } diff --git a/pigeon/auth_response.dart b/pigeon/auth_response.dart index 1c1587ffa..a9a764bd2 100644 --- a/pigeon/auth_response.dart +++ b/pigeon/auth_response.dart @@ -40,4 +40,6 @@ abstract class AuthResponseApi { String getAutoLogoutPopupTimeout(); @async List getRolesByUserId(String userId); + @async + String getPasswordLength(); } diff --git a/pigeon/document_category.dart b/pigeon/document_category.dart index 71556d2af..0208d0811 100644 --- a/pigeon/document_category.dart +++ b/pigeon/document_category.dart @@ -5,4 +5,7 @@ import 'package:pigeon/pigeon.dart'; abstract class DocumentCategoryApi { @async List getDocumentCategories(String categoryCode,String langCode); + + @async + String getDocumentSize(); } \ No newline at end of file From 0a8174b45ce9c3f5521fc191f9addeeb3dc271dc Mon Sep 17 00:00:00 2001 From: Madhuravas reddy Date: Wed, 3 Dec 2025 12:30:33 +0530 Subject: [PATCH 2/5] Added config property for age limit Signed-off-by: Madhuravas reddy --- .../registration_client/HostApiModule.java | 4 +- .../api_services/DemographicsDetailsApi.java | 18 ++++++- .../constant/RegistrationConstants.java | 5 +- .../repository/GlobalParamRepository.java | 4 ++ assets/l10n/app_ar.arb | 3 +- assets/l10n/app_en.arb | 3 +- assets/l10n/app_fr.arb | 3 +- assets/l10n/app_hi.arb | 3 +- assets/l10n/app_kn.arb | 3 +- assets/l10n/app_ta.arb | 3 +- .../demographic_service_impl.dart | 13 +++++ lib/platform_spi/demographic_service.dart | 2 + .../process_ui/widgets/age_date_control.dart | 48 +++++++++++++++++-- pigeon/demographics_data.dart | 4 ++ 14 files changed, 100 insertions(+), 16 deletions(-) diff --git a/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java b/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java index 588addf52..72713195e 100644 --- a/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java +++ b/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java @@ -166,8 +166,8 @@ PacketAuthenticationApi getPacketAuthenticationApi(SyncRestService syncRestServi @Provides @Singleton - DemographicsDetailsApi getDemographicsDetailsApi(RegistrationService registrationService, AuditManagerService auditManagerService) { - return new DemographicsDetailsApi(registrationService, auditManagerService); + DemographicsDetailsApi getDemographicsDetailsApi(RegistrationService registrationService, AuditManagerService auditManagerService, GlobalParamRepository globalParamRepository) { + return new DemographicsDetailsApi(registrationService, auditManagerService, globalParamRepository); } @Provides diff --git a/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java b/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java index 9302930a8..2043d97e3 100644 --- a/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java +++ b/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java @@ -18,6 +18,7 @@ import javax.inject.Singleton; import io.mosip.registration.clientmanager.dto.registration.RegistrationDto; +import io.mosip.registration.clientmanager.repository.GlobalParamRepository; import io.mosip.registration.clientmanager.spi.AuditManagerService; import io.mosip.registration.clientmanager.spi.RegistrationService; import io.mosip.registration.keymanager.util.CryptoUtil; @@ -30,11 +31,13 @@ public class DemographicsDetailsApi implements DemographicsDataPigeon.Demographi AuditManagerService auditManagerService; private static final String GET_FIELD_FAILED_MESSAGE = "Get field failed!"; + GlobalParamRepository globalParamRepository; + @Inject - public DemographicsDetailsApi(RegistrationService registrationService, AuditManagerService auditManagerService) { + public DemographicsDetailsApi(RegistrationService registrationService, AuditManagerService auditManagerService, GlobalParamRepository globalParamRepository) { this.registrationService = registrationService; this.auditManagerService = auditManagerService; - + this.globalParamRepository = globalParamRepository; } @@ -195,4 +198,15 @@ public void addSelectedCode(@NonNull String fieldId, @NonNull String code, @NonN Log.e(getClass().getSimpleName(), "Add selected data field failed!" + Arrays.toString(e.getStackTrace())); } } + + @Override + public void getDOBMaxAge(@NonNull DemographicsDataPigeon.Result result) { + try { + Log.i(getClass().getSimpleName(), "Get DOB max age"); + String dobMaxAge = this.globalParamRepository.getCachedStringDOBAgeLimit(); + result.success(dobMaxAge); + } catch (Exception e) { + Log.e(getClass().getSimpleName(), "Get DOB max age failed!" + Arrays.toString(e.getStackTrace())); + } + } } diff --git a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java index 7692a2080..47f820751 100644 --- a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java +++ b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/constant/RegistrationConstants.java @@ -117,6 +117,7 @@ public class RegistrationConstants { public static final String JOB_TRIGGER_POINT_USER = "User"; public static final String GPS_DEVICE_ENABLE_FLAG = "mosip.registration.gps_device_enable_flag"; public static final String DIST_FRM_MACHINE_TO_CENTER = "mosip.registration.distance.from.machine.to.center"; - public static String PWORD_LENGTH = "mosip.registration.username_pwd_length"; - public static String DOC_SIZE = "mosip.registration.document_size"; + public static final String PWORD_LENGTH = "mosip.registration.username_pwd_length"; + public static final String DOC_SIZE = "mosip.registration.document_size"; + public static final String MAX_AGE = "mosip.registration.max_age"; } diff --git a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java index e2e48c9e7..5901f1867 100644 --- a/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java +++ b/android/clientmanager/src/main/java/io/mosip/registration/clientmanager/repository/GlobalParamRepository.java @@ -166,6 +166,10 @@ public String getCachedStringDocumentSize() { return globalParamMap.get(RegistrationConstants.DOC_SIZE); } + public String getCachedStringDOBAgeLimit() { + return globalParamMap.get(RegistrationConstants.MAX_AGE); + } + /** * Refresh configuration cache by merging global params with local preferences */ diff --git a/assets/l10n/app_ar.arb b/assets/l10n/app_ar.arb index bafeb8120..61dcaa63a 100644 --- a/assets/l10n/app_ar.arb +++ b/assets/l10n/app_ar.arb @@ -333,5 +333,6 @@ "additional_info_req_id": "معرف طلب المعلومات الإضافية", "no_access_to_this_page": "ليست لديك صلاحية الوصول إلى هذه الصفحة", "scheduled_job_settings": "إعدادات المهمة المجدولة", - "doc_size_existed": "حجم الملف يتجاوز الحد {size}" + "doc_size_existed": "حجم الملف يتجاوز الحد {size}", + "age_should_not_be_greater": "يجب ألا يزيد العمر عن {age} سنة" } \ No newline at end of file diff --git a/assets/l10n/app_en.arb b/assets/l10n/app_en.arb index 04693aafc..b5477bf33 100644 --- a/assets/l10n/app_en.arb +++ b/assets/l10n/app_en.arb @@ -333,5 +333,6 @@ "additional_info_req_id": "Additional Info Request ID", "scheduled_job_settings": "Scheduled Job Settings", "no_access_to_this_page": "You don't have access to this page", - "doc_size_existed": "File size exceeds limit {size}" + "doc_size_existed": "File size exceeds limit {size}", + "age_should_not_be_greater": "Age should not be greater than {age} years" } \ No newline at end of file diff --git a/assets/l10n/app_fr.arb b/assets/l10n/app_fr.arb index 276fb4420..80d4abf88 100644 --- a/assets/l10n/app_fr.arb +++ b/assets/l10n/app_fr.arb @@ -333,5 +333,6 @@ "additional_info_req_id": "Identifiant de la demande d'information supplémentaire", "no_access_to_this_page": "Vous n'avez pas accès à cette page", "scheduled_job_settings": "Paramètres des tâches planifiées", - "doc_size_existed": "La taille du fichier dépasse la limite de {size}" + "doc_size_existed": "La taille du fichier dépasse la limite de {size}", + "age_should_not_be_greater": "L'âge ne doit pas dépasser {age} ans." } \ No newline at end of file diff --git a/assets/l10n/app_hi.arb b/assets/l10n/app_hi.arb index ce7b54cdc..799f62587 100644 --- a/assets/l10n/app_hi.arb +++ b/assets/l10n/app_hi.arb @@ -333,5 +333,6 @@ "additional_info_req_id": "अतिरिक्त जानकारी अनुरोध आईडी", "no_access_to_this_page": "आपको इस पृष्ठ तक पहुँच नहीं है", "scheduled_job_settings": "अनुसूचित कार्य सेटिंग्स", - "doc_size_existed": "फ़ाइल का आकार सीमा {size} से अधिक है" + "doc_size_existed": "फ़ाइल का आकार सीमा {size} से अधिक है", + "age_should_not_be_greater": "उम्र {age} वर्ष से अधिक नहीं होनी चाहिए।" } \ No newline at end of file diff --git a/assets/l10n/app_kn.arb b/assets/l10n/app_kn.arb index 0bc8a177a..f7e523b40 100644 --- a/assets/l10n/app_kn.arb +++ b/assets/l10n/app_kn.arb @@ -333,5 +333,6 @@ "additional_info_req_id": "ಹೆಚ್ಚುವರಿ ಮಾಹಿತಿ ವಿನಂತಿ ಐಡಿ", "no_access_to_this_page": "ನಿಮಗೆ ಈ ಪುಟಕ್ಕೆ ಪ್ರವೇಶವಿಲ್ಲ", "scheduled_job_settings": "ನಿಗದಿತ ಉದ್ಯೋಗ ಸೆಟ್ಟಿಂಗ್‌ಗಳು", - "doc_size_existed": "ಫೈಲ್ ಗಾತ್ರ ಮಿತಿ {size} ಮೀರಿದೆ" + "doc_size_existed": "ಫೈಲ್ ಗಾತ್ರ ಮಿತಿ {size} ಮೀರಿದೆ", + "age_should_not_be_greater": "ವಯಸ್ಸು {age} ವರ್ಷಗಳಿಗಿಂತ ಹೆಚ್ಚಿರಬಾರದು" } \ No newline at end of file diff --git a/assets/l10n/app_ta.arb b/assets/l10n/app_ta.arb index 81125563b..f91ab8736 100644 --- a/assets/l10n/app_ta.arb +++ b/assets/l10n/app_ta.arb @@ -342,5 +342,6 @@ "additional_info_req_id": "கூடுதல் தகவல் கோரிக்கை ஐடி", "no_access_to_this_page": "இந்தப் பக்கத்தை அணுக உங்களுக்கு அனுமதி இல்லை", "scheduled_job_settings": "திட்டமிடப்பட்ட வேலை அமைப்புகள்", - "doc_size_existed": "கோப்பின் அளவு {size} வரம்பை மீறுகிறது" + "doc_size_existed": "கோப்பின் அளவு {size} வரம்பை மீறுகிறது", + "age_should_not_be_greater": "வயது {age} ஆண்டுகளுக்கு அதிகமாக இருக்கக்கூடாது" } \ No newline at end of file diff --git a/lib/platform_android/demographic_service_impl.dart b/lib/platform_android/demographic_service_impl.dart index adc2c3349..3839cbc9e 100644 --- a/lib/platform_android/demographic_service_impl.dart +++ b/lib/platform_android/demographic_service_impl.dart @@ -163,6 +163,19 @@ class DemographicServiceImpl implements DemographicService { debugPrint('Selected Code not added ${e.toString()}'); } } + + @override + Future getDOBMaxAge() async { + String maxAge = ""; + try { + maxAge = await DemographicsApi().getDOBMaxAge(); + } on PlatformException { + debugPrint('DemographicsApi call failed'); + } catch (e) { + debugPrint('Max Age not fetched ${e.toString()}'); + } + return maxAge; + } } DemographicService getDemographicServiceImpl() => DemographicServiceImpl(); diff --git a/lib/platform_spi/demographic_service.dart b/lib/platform_spi/demographic_service.dart index 7ba9a8f60..bcd040b28 100644 --- a/lib/platform_spi/demographic_service.dart +++ b/lib/platform_spi/demographic_service.dart @@ -35,5 +35,7 @@ abstract class DemographicService { Future addSelectedCode(String fieldId,String code); + Future getDOBMaxAge(); + factory DemographicService() => getDemographicServiceImpl(); } diff --git a/lib/ui/process_ui/widgets/age_date_control.dart b/lib/ui/process_ui/widgets/age_date_control.dart index 2e3add134..fae7019e3 100644 --- a/lib/ui/process_ui/widgets/age_date_control.dart +++ b/lib/ui/process_ui/widgets/age_date_control.dart @@ -38,6 +38,7 @@ class _AgeDateControlState extends State { late RegistrationTaskProvider registrationTaskProvider; TextEditingController dateController = TextEditingController(); TextEditingController ageController = TextEditingController(); + int maxAge = 150; @override void initState() { @@ -45,6 +46,7 @@ class _AgeDateControlState extends State { globalProvider = Provider.of(context, listen: false); registrationTaskProvider = Provider.of(context, listen: false); + _getDOBMaxAge(); }); _getSavedDate(); super.initState(); @@ -109,6 +111,16 @@ class _AgeDateControlState extends State { }); } + _getDOBMaxAge() async { + String maxAgeStr = + await registrationTaskProvider.demographics.getDOBMaxAge(); + if (maxAgeStr.isNotEmpty) { + setState(() { + maxAge = int.parse(maxAgeStr); + }); + } + } + void _getSavedDate() { globalProvider = Provider.of(context, listen: false); if (globalProvider.fieldInputValue.containsKey(widget.field.id)) { @@ -145,6 +157,8 @@ class _AgeDateControlState extends State { void showBottomPopup(BuildContext context) { String dateString = dateController.text; + final localMaxAge = maxAge; + showModalBottomSheet( backgroundColor: Colors.white, context: context, @@ -187,7 +201,7 @@ class _AgeDateControlState extends State { ), CustomCupertinoDatePicker( maxDate: DateTime.now(), - minDate: DateTime(DateTime.now().year - 125), + minDate: DateTime(DateTime.now().year - localMaxAge), selectedDate: dateString != "" ? DateFormat(widget.field.format == null || widget.field.format!.toLowerCase() == "none" @@ -261,18 +275,40 @@ class _AgeDateControlState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Flexible( flex: 3, child: TextFormField( + autovalidateMode: AutovalidateMode.onUserInteraction, readOnly: true, controller: dateController, validator: (value) { - if (widget.field.required == true && (value == null || value.isEmpty)) { + if (widget.field.required == true && + (value == null || value.isEmpty)) { return AppLocalizations.of(context)! .select_value_message; } + if (value != null && value.isNotEmpty) { + try { + DateTime date = DateFormat( + widget.field.format == null || + widget.field.format! + .toLowerCase() == + "none" + ? "yyyy/MM/dd" + : widget.field.format) + .parse(value); + int age = calculateYearDifference( + date, DateTime.now()) + .abs(); + if (age > maxAge) { + return AppLocalizations.of(context)!.age_should_not_be_greater(maxAge); + } + } catch (e) { + print(e); + } + } return null; }, onTap: (() { @@ -303,11 +339,15 @@ class _AgeDateControlState extends State { ), ), const SizedBox(width: 12), - const Text("OR"), + Padding( + padding: const EdgeInsets.only(top: 15), + child: const Text("OR"), + ), const SizedBox(width: 12), Flexible( flex: 1, child: TextFormField( + autovalidateMode: AutovalidateMode.onUserInteraction, controller: ageController, keyboardType: TextInputType.number, validator: (value) { diff --git a/pigeon/demographics_data.dart b/pigeon/demographics_data.dart index cb8d0a359..34dd30ba0 100644 --- a/pigeon/demographics_data.dart +++ b/pigeon/demographics_data.dart @@ -45,4 +45,8 @@ abstract class DemographicsApi { @async void addSelectedCode(String fieldId,String code); + + @async + String getDOBMaxAge(); + } From 5afdabb93151da34e21cd621caa0a2669e8a4c43 Mon Sep 17 00:00:00 2001 From: Madhuravas reddy Date: Wed, 3 Dec 2025 17:49:47 +0530 Subject: [PATCH 3/5] resolved code rabbit review comments Signed-off-by: Madhuravas reddy --- .../api_services/DemographicsDetailsApi.java | 6 +++--- assets/l10n/app_ar.arb | 16 +++++++++++++++- assets/l10n/app_en.arb | 16 +++++++++++++++- assets/l10n/app_fr.arb | 16 +++++++++++++++- assets/l10n/app_hi.arb | 16 +++++++++++++++- assets/l10n/app_kn.arb | 16 +++++++++++++++- assets/l10n/app_ta.arb | 16 +++++++++++++++- lib/ui/process_ui/widgets/age_date_control.dart | 5 ++++- 8 files changed, 97 insertions(+), 10 deletions(-) diff --git a/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java b/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java index 2043d97e3..934396d0d 100644 --- a/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java +++ b/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java @@ -201,12 +201,12 @@ public void addSelectedCode(@NonNull String fieldId, @NonNull String code, @NonN @Override public void getDOBMaxAge(@NonNull DemographicsDataPigeon.Result result) { + String dobMaxAge = ""; try { - Log.i(getClass().getSimpleName(), "Get DOB max age"); - String dobMaxAge = this.globalParamRepository.getCachedStringDOBAgeLimit(); - result.success(dobMaxAge); + dobMaxAge = this.globalParamRepository.getCachedStringDOBAgeLimit(); } catch (Exception e) { Log.e(getClass().getSimpleName(), "Get DOB max age failed!" + Arrays.toString(e.getStackTrace())); } + result.success(dobMaxAge); } } diff --git a/assets/l10n/app_ar.arb b/assets/l10n/app_ar.arb index 61dcaa63a..50f66d0ed 100644 --- a/assets/l10n/app_ar.arb +++ b/assets/l10n/app_ar.arb @@ -334,5 +334,19 @@ "no_access_to_this_page": "ليست لديك صلاحية الوصول إلى هذه الصفحة", "scheduled_job_settings": "إعدادات المهمة المجدولة", "doc_size_existed": "حجم الملف يتجاوز الحد {size}", - "age_should_not_be_greater": "يجب ألا يزيد العمر عن {age} سنة" + "@doc_size_existed": { + "placeholders": { + "size": { + "type": "String" + } + } + }, + "age_should_not_be_greater": "يجب ألا يزيد العمر عن {age} سنة", + "@age_should_not_be_greater": { + "placeholders": { + "age": { + "type": "int" + } + } + } } \ No newline at end of file diff --git a/assets/l10n/app_en.arb b/assets/l10n/app_en.arb index b5477bf33..2e3c5bcb9 100644 --- a/assets/l10n/app_en.arb +++ b/assets/l10n/app_en.arb @@ -334,5 +334,19 @@ "scheduled_job_settings": "Scheduled Job Settings", "no_access_to_this_page": "You don't have access to this page", "doc_size_existed": "File size exceeds limit {size}", - "age_should_not_be_greater": "Age should not be greater than {age} years" + "@doc_size_existed": { + "placeholders": { + "size": { + "type": "String" + } + } + }, + "age_should_not_be_greater": "Age should not be greater than {age} years", + "@age_should_not_be_greater": { + "placeholders": { + "age": { + "type": "int" + } + } + } } \ No newline at end of file diff --git a/assets/l10n/app_fr.arb b/assets/l10n/app_fr.arb index 80d4abf88..bb6b9c136 100644 --- a/assets/l10n/app_fr.arb +++ b/assets/l10n/app_fr.arb @@ -334,5 +334,19 @@ "no_access_to_this_page": "Vous n'avez pas accès à cette page", "scheduled_job_settings": "Paramètres des tâches planifiées", "doc_size_existed": "La taille du fichier dépasse la limite de {size}", - "age_should_not_be_greater": "L'âge ne doit pas dépasser {age} ans." + "@doc_size_existed": { + "placeholders": { + "size": { + "type": "String" + } + } + }, + "age_should_not_be_greater": "L'âge ne doit pas dépasser {age} ans.", + "@age_should_not_be_greater": { + "placeholders": { + "age": { + "type": "int" + } + } + } } \ No newline at end of file diff --git a/assets/l10n/app_hi.arb b/assets/l10n/app_hi.arb index 799f62587..9695e34b2 100644 --- a/assets/l10n/app_hi.arb +++ b/assets/l10n/app_hi.arb @@ -334,5 +334,19 @@ "no_access_to_this_page": "आपको इस पृष्ठ तक पहुँच नहीं है", "scheduled_job_settings": "अनुसूचित कार्य सेटिंग्स", "doc_size_existed": "फ़ाइल का आकार सीमा {size} से अधिक है", - "age_should_not_be_greater": "उम्र {age} वर्ष से अधिक नहीं होनी चाहिए।" + "@doc_size_existed": { + "placeholders": { + "size": { + "type": "String" + } + } + }, + "age_should_not_be_greater": "उम्र {age} वर्ष से अधिक नहीं होनी चाहिए।", + "@age_should_not_be_greater": { + "placeholders": { + "age": { + "type": "int" + } + } + } } \ No newline at end of file diff --git a/assets/l10n/app_kn.arb b/assets/l10n/app_kn.arb index f7e523b40..2be3805aa 100644 --- a/assets/l10n/app_kn.arb +++ b/assets/l10n/app_kn.arb @@ -334,5 +334,19 @@ "no_access_to_this_page": "ನಿಮಗೆ ಈ ಪುಟಕ್ಕೆ ಪ್ರವೇಶವಿಲ್ಲ", "scheduled_job_settings": "ನಿಗದಿತ ಉದ್ಯೋಗ ಸೆಟ್ಟಿಂಗ್‌ಗಳು", "doc_size_existed": "ಫೈಲ್ ಗಾತ್ರ ಮಿತಿ {size} ಮೀರಿದೆ", - "age_should_not_be_greater": "ವಯಸ್ಸು {age} ವರ್ಷಗಳಿಗಿಂತ ಹೆಚ್ಚಿರಬಾರದು" + "@doc_size_existed": { + "placeholders": { + "size": { + "type": "String" + } + } + }, + "age_should_not_be_greater": "ವಯಸ್ಸು {age} ವರ್ಷಗಳಿಗಿಂತ ಹೆಚ್ಚಿರಬಾರದು", + "@age_should_not_be_greater": { + "placeholders": { + "age": { + "type": "int" + } + } + } } \ No newline at end of file diff --git a/assets/l10n/app_ta.arb b/assets/l10n/app_ta.arb index f91ab8736..3279c344a 100644 --- a/assets/l10n/app_ta.arb +++ b/assets/l10n/app_ta.arb @@ -343,5 +343,19 @@ "no_access_to_this_page": "இந்தப் பக்கத்தை அணுக உங்களுக்கு அனுமதி இல்லை", "scheduled_job_settings": "திட்டமிடப்பட்ட வேலை அமைப்புகள்", "doc_size_existed": "கோப்பின் அளவு {size} வரம்பை மீறுகிறது", - "age_should_not_be_greater": "வயது {age} ஆண்டுகளுக்கு அதிகமாக இருக்கக்கூடாது" + "@doc_size_existed": { + "placeholders": { + "size": { + "type": "String" + } + } + }, + "age_should_not_be_greater": "வயது {age} ஆண்டுகளுக்கு அதிகமாக இருக்கக்கூடாது", + "@age_should_not_be_greater": { + "placeholders": { + "age": { + "type": "int" + } + } + } } \ No newline at end of file diff --git a/lib/ui/process_ui/widgets/age_date_control.dart b/lib/ui/process_ui/widgets/age_date_control.dart index fae7019e3..f02fada66 100644 --- a/lib/ui/process_ui/widgets/age_date_control.dart +++ b/lib/ui/process_ui/widgets/age_date_control.dart @@ -115,8 +115,11 @@ class _AgeDateControlState extends State { String maxAgeStr = await registrationTaskProvider.demographics.getDOBMaxAge(); if (maxAgeStr.isNotEmpty) { + if (!mounted) return; + final parsedAge = int.tryParse(maxAgeStr); + if (parsedAge == null) return; setState(() { - maxAge = int.parse(maxAgeStr); + maxAge = parsedAge; }); } } From a8437e684c4cd4f9678b996753b9e9529edde6e9 Mon Sep 17 00:00:00 2001 From: Madhuravas reddy Date: Tue, 16 Dec 2025 11:58:21 +0530 Subject: [PATCH 4/5] Resolved code rabbit review comment Signed-off-by: Madhuravas reddy --- .../api_services/DemographicsDetailsApi.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java b/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java index 934396d0d..9939fec9e 100644 --- a/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java +++ b/android/app/src/main/java/io/mosip/registration_client/api_services/DemographicsDetailsApi.java @@ -203,7 +203,10 @@ public void addSelectedCode(@NonNull String fieldId, @NonNull String code, @NonN public void getDOBMaxAge(@NonNull DemographicsDataPigeon.Result result) { String dobMaxAge = ""; try { - dobMaxAge = this.globalParamRepository.getCachedStringDOBAgeLimit(); + String value = this.globalParamRepository.getCachedStringDOBAgeLimit(); + if (value != null) { + dobMaxAge = value; + } } catch (Exception e) { Log.e(getClass().getSimpleName(), "Get DOB max age failed!" + Arrays.toString(e.getStackTrace())); } From 74ffdcc2e9f2875563b8335e108b4093506b309d Mon Sep 17 00:00:00 2001 From: Madhuravas reddy Date: Wed, 17 Dec 2025 19:09:21 +0530 Subject: [PATCH 5/5] Renamed label key Signed-off-by: Madhuravas reddy --- assets/l10n/app_ar.arb | 4 ++-- assets/l10n/app_en.arb | 4 ++-- assets/l10n/app_fr.arb | 4 ++-- assets/l10n/app_hi.arb | 4 ++-- assets/l10n/app_kn.arb | 4 ++-- assets/l10n/app_ta.arb | 4 ++-- lib/ui/process_ui/widgets/document_upload_control.dart | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/assets/l10n/app_ar.arb b/assets/l10n/app_ar.arb index 50f66d0ed..82ff48589 100644 --- a/assets/l10n/app_ar.arb +++ b/assets/l10n/app_ar.arb @@ -333,8 +333,8 @@ "additional_info_req_id": "معرف طلب المعلومات الإضافية", "no_access_to_this_page": "ليست لديك صلاحية الوصول إلى هذه الصفحة", "scheduled_job_settings": "إعدادات المهمة المجدولة", - "doc_size_existed": "حجم الملف يتجاوز الحد {size}", - "@doc_size_existed": { + "doc_size_exceeded": "حجم الملف يتجاوز الحد {size}", + "@doc_size_exceeded": { "placeholders": { "size": { "type": "String" diff --git a/assets/l10n/app_en.arb b/assets/l10n/app_en.arb index 2e3c5bcb9..31fb24a80 100644 --- a/assets/l10n/app_en.arb +++ b/assets/l10n/app_en.arb @@ -333,8 +333,8 @@ "additional_info_req_id": "Additional Info Request ID", "scheduled_job_settings": "Scheduled Job Settings", "no_access_to_this_page": "You don't have access to this page", - "doc_size_existed": "File size exceeds limit {size}", - "@doc_size_existed": { + "doc_size_exceeded": "File size exceeds limit {size}", + "@doc_size_exceeded": { "placeholders": { "size": { "type": "String" diff --git a/assets/l10n/app_fr.arb b/assets/l10n/app_fr.arb index bb6b9c136..99788e0e1 100644 --- a/assets/l10n/app_fr.arb +++ b/assets/l10n/app_fr.arb @@ -333,8 +333,8 @@ "additional_info_req_id": "Identifiant de la demande d'information supplémentaire", "no_access_to_this_page": "Vous n'avez pas accès à cette page", "scheduled_job_settings": "Paramètres des tâches planifiées", - "doc_size_existed": "La taille du fichier dépasse la limite de {size}", - "@doc_size_existed": { + "doc_size_exceeded": "La taille du fichier dépasse la limite de {size}", + "@doc_size_exceeded": { "placeholders": { "size": { "type": "String" diff --git a/assets/l10n/app_hi.arb b/assets/l10n/app_hi.arb index 9695e34b2..2d18c5c11 100644 --- a/assets/l10n/app_hi.arb +++ b/assets/l10n/app_hi.arb @@ -333,8 +333,8 @@ "additional_info_req_id": "अतिरिक्त जानकारी अनुरोध आईडी", "no_access_to_this_page": "आपको इस पृष्ठ तक पहुँच नहीं है", "scheduled_job_settings": "अनुसूचित कार्य सेटिंग्स", - "doc_size_existed": "फ़ाइल का आकार सीमा {size} से अधिक है", - "@doc_size_existed": { + "doc_size_exceeded": "फ़ाइल का आकार सीमा {size} से अधिक है", + "@doc_size_exceeded": { "placeholders": { "size": { "type": "String" diff --git a/assets/l10n/app_kn.arb b/assets/l10n/app_kn.arb index 2be3805aa..2000965f5 100644 --- a/assets/l10n/app_kn.arb +++ b/assets/l10n/app_kn.arb @@ -333,8 +333,8 @@ "additional_info_req_id": "ಹೆಚ್ಚುವರಿ ಮಾಹಿತಿ ವಿನಂತಿ ಐಡಿ", "no_access_to_this_page": "ನಿಮಗೆ ಈ ಪುಟಕ್ಕೆ ಪ್ರವೇಶವಿಲ್ಲ", "scheduled_job_settings": "ನಿಗದಿತ ಉದ್ಯೋಗ ಸೆಟ್ಟಿಂಗ್‌ಗಳು", - "doc_size_existed": "ಫೈಲ್ ಗಾತ್ರ ಮಿತಿ {size} ಮೀರಿದೆ", - "@doc_size_existed": { + "doc_size_exceeded": "ಫೈಲ್ ಗಾತ್ರ ಮಿತಿ {size} ಮೀರಿದೆ", + "@doc_size_exceeded": { "placeholders": { "size": { "type": "String" diff --git a/assets/l10n/app_ta.arb b/assets/l10n/app_ta.arb index 3279c344a..9671e1e63 100644 --- a/assets/l10n/app_ta.arb +++ b/assets/l10n/app_ta.arb @@ -342,8 +342,8 @@ "additional_info_req_id": "கூடுதல் தகவல் கோரிக்கை ஐடி", "no_access_to_this_page": "இந்தப் பக்கத்தை அணுக உங்களுக்கு அனுமதி இல்லை", "scheduled_job_settings": "திட்டமிடப்பட்ட வேலை அமைப்புகள்", - "doc_size_existed": "கோப்பின் அளவு {size} வரம்பை மீறுகிறது", - "@doc_size_existed": { + "doc_size_exceeded": "கோப்பின் அளவு {size} வரம்பை மீறுகிறது", + "@doc_size_exceeded": { "placeholders": { "size": { "type": "String" diff --git a/lib/ui/process_ui/widgets/document_upload_control.dart b/lib/ui/process_ui/widgets/document_upload_control.dart index 72b56548f..57bd4509c 100644 --- a/lib/ui/process_ui/widgets/document_upload_control.dart +++ b/lib/ui/process_ui/widgets/document_upload_control.dart @@ -192,7 +192,7 @@ class _DocumentUploadControlState extends State { if (item is Uint8List) { if (item.lengthInBytes > maxFileSize) { final msg = AppLocalizations.of(context)! - .doc_size_existed(getReadableFileSize(item.lengthInBytes)); + .doc_size_exceeded(getReadableFileSize(item.lengthInBytes)); _showError(msg); return; }