Merge branch 'master_mohemm_flutter'

# Conflicts:
#	pubspec.yaml
master
haroon amjad 3 hours ago
commit 66f0800cc6

@ -606,7 +606,7 @@
"confirmRevokeMazayaAccess": "هل أنت متأكد أنك تريد إلغاء صلاحية مزايا لـ \"{}\"؟",
"yes": "نعم",
"no": "لا",
"mazayaInviteInstructions": "يرجى تحميل تطبيق مهمم من الرابط أعلاه واستخدام بيانات الاعتماد التالية لتسجيل الدخول",
"mazayaInviteInstructions": "يُرجى تحميل تطبيق مهمم من الرابط أعلاه، واستخدام رقم هويتك الوطنية وتاريخ ميلادك لتسجيل الدخول.",
"cameraPermissionRequiredToScan": "يرجى منح صلاحية الكاميرا لمسح رمز الاستجابة السريعة",
"cameraPermissionPermanentlyDenied": "يرجى تفعيل صلاحية الكاميرا من إعدادات التطبيق > الصلاحيات",
"openSettings": "فتح الإعدادات",

@ -553,7 +553,7 @@
"confirmRevokeMazayaAccess": "Are you sure you want to revoke Mazaya access to \"{}\"?",
"yes": "Yes",
"no": "No",
"mazayaInviteInstructions": "Please download the MoheM app from the above link and use the following credentials to login",
"mazayaInviteInstructions": "Please download the MoheM app from the above link and use your National ID & Date of birth to login.",
"cameraPermissionRequiredToScan": "Please grant camera permission to scan the QR code",
"cameraPermissionPermanentlyDenied": "Please allow camera permission from the app settings > Permissions",
"openSettings": "Open Settings",

@ -622,7 +622,7 @@ class CodegenLoader extends AssetLoader{
"confirmRevokeMazayaAccess": "هل أنت متأكد أنك تريد إلغاء صلاحية مزايا لـ \"{}\"؟",
"yes": "نعم",
"no": "لا",
"mazayaInviteInstructions": "يرجى تحميل تطبيق مهمم من الرابط أعلاه واستخدام بيانات الاعتماد التالية لتسجيل الدخول",
"mazayaInviteInstructions": "يُرجى تحميل تطبيق مهمم من الرابط أعلاه، واستخدام رقم هويتك الوطنية وتاريخ ميلادك لتسجيل الدخول.",
"cameraPermissionRequiredToScan": "يرجى منح صلاحية الكاميرا لمسح رمز الاستجابة السريعة",
"cameraPermissionPermanentlyDenied": "يرجى تفعيل صلاحية الكاميرا من إعدادات التطبيق > الصلاحيات",
"openSettings": "فتح الإعدادات",
@ -1458,7 +1458,7 @@ static const Map<String,dynamic> _en_US = {
"confirmRevokeMazayaAccess": "Are you sure you want to revoke Mazaya access to \"{}\"?",
"yes": "Yes",
"no": "No",
"mazayaInviteInstructions": "Please download the MoheM app from the above link and use the following credentials to login",
"mazayaInviteInstructions": "Please download the MoheM app from the above link and use your National ID & Date of birth to login.",
"cameraPermissionRequiredToScan": "Please grant camera permission to scan the QR code",
"cameraPermissionPermanentlyDenied": "Please allow camera permission from the app settings > Permissions",
"openSettings": "Open Settings",

@ -316,6 +316,7 @@ class _DependentDetailsScreenState extends State<DependentDetailsScreen> {
// Full (unmasked) DOB for the share message - distinct from _formatDob/_formatNationalId
// above, which are for the masked on-screen Key Details display.
String _formatDobForShare() {
return "**/**/****";
DateTime? dob = _parseBirthDate(_contact?.dATEOFBIRTH);
if (dob != null) return DateFormat('dd-MM-yyyy').format(dob);
String raw = _contact?.dATEOFBIRTH?.trim() ?? "";
@ -332,7 +333,8 @@ class _DependentDetailsScreenState extends State<DependentDetailsScreen> {
String nationalIdLine =
(nationalId == null || nationalId.isEmpty)
? LocaleKeys.nationalIdOrIqamaFallback.tr()
: "${LocaleKeys.nationalId.tr()}: ${nationalId.replaceAll('-', '')}";
// : "${LocaleKeys.nationalId.tr()}: ${nationalId.replaceAll('-', '')}";
: "${LocaleKeys.nationalId.tr()}: *****";
return "$linkToShare\n\n${LocaleKeys.mazayaInviteInstructions.tr()}\n\n$nationalIdLine\n${LocaleKeys.dateOfBirth.tr()}: ${_formatDobForShare()}";
}

@ -430,6 +430,7 @@ class MazayaAccessResultScreen extends StatelessWidget {
// The raw value can come in as the API's "/Date(ms+tz)/" wrapper or a plain ISO datetime string
// with a time component - either way we only want the date part.
String _formatDob(String raw) {
return "**/**/****";
String s = raw.trim();
if (s.isEmpty) return "";
@ -463,13 +464,15 @@ class MazayaAccessResultScreen extends StatelessWidget {
// string we couldn't otherwise parse, rather than showing it as-is with the time attached.
if (s.contains('T')) return s.split('T').first.replaceAll('/', '-');
if (s.contains(' ')) return s.split(' ').first.replaceAll('/', '-');
return s.replaceAll('/', '-');
// return s.replaceAll('/', '-');
// return "**/**/****";
}
// Same message built for both "Share Download Link" and "Copy Link" - they must always
// carry identical content, so this is the single source of truth for it.
String _buildMazayaInviteMessage(String linkToShare, String nationalId, String dateOfBirth) {
String nationalIdLine = nationalId.trim().isEmpty ? LocaleKeys.nationalIdOrIqamaFallback.tr() : "${LocaleKeys.nationalId.tr()}: ${nationalId.replaceAll('-', '')}";
// String nationalIdLine = nationalId.trim().isEmpty ? LocaleKeys.nationalIdOrIqamaFallback.tr() : "${LocaleKeys.nationalId.tr()}: ${nationalId.replaceAll('-', '')}";
String nationalIdLine = nationalId.trim().isEmpty ? LocaleKeys.nationalIdOrIqamaFallback.tr() : "${LocaleKeys.nationalId.tr()}: *****";
return "$linkToShare\n\n${LocaleKeys.mazayaInviteInstructions.tr()}\n\n$nationalIdLine\n${LocaleKeys.dateOfBirth.tr()}: ${_formatDob(dateOfBirth)}";
}

Loading…
Cancel
Save