From 7065a4fb2314132e79bf9a1c31f5ac42c53e5134 Mon Sep 17 00:00:00 2001 From: Sultan khan Date: Thu, 15 Oct 2026 14:32:46 +0300 Subject: [PATCH] no message --- lib/ui/login/login_screen.dart | 18 +++++++++++++++++ .../profile/mazaya_access_result_screen.dart | 20 +++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart index ca60b770..6923747b 100644 --- a/lib/ui/login/login_screen.dart +++ b/lib/ui/login/login_screen.dart @@ -591,6 +591,24 @@ class _LoginScreenState extends State { } void _navigateToMazayaAccessRevoked([String? depName]) async { + + await Utils.removeStringFromPrefs("P_DEP_IS_LOGGED_IN"); + await Utils.removeStringFromPrefs("P_DEP_NATIONAL_ID"); + await Utils.removeStringFromPrefs("P_DEP_BIRTH_DATE"); + await Utils.removeStringFromPrefs("P_DEP_TOKEN_ID"); + await Utils.removeStringFromPrefs("P_DEP_LOGIN_TOKEN_ID"); + await Utils.removeStringFromPrefs("P_DEP_AUTHENTICATION_TOKEN_ID"); + await Utils.removeStringFromPrefs("P_DEP_MOBILE_NUMBER"); + await Utils.removeStringFromPrefs("P_DEPENDENT_NAME"); + await Utils.removeStringFromPrefs("P_DEP_LOGIN_TYPE"); + ApiConsts.selectedMemberType = MemberType.employee; + ApiConsts.ISDependetLogin = false; + AppState().setDependentName = null; + AppState().setDependentDob = null; + AppState().setDependentLoginType = null; + AppState().setWalaplusDepInfoModel = null; + AppState().setPostParamsInitConfig(); + String name = depName ?? AppState().dependentName ?? ""; if (name.isEmpty) { name = await Utils.getStringFromPrefs("P_DEPENDENT_NAME"); diff --git a/lib/ui/profile/mazaya_access_result_screen.dart b/lib/ui/profile/mazaya_access_result_screen.dart index f6a2bac2..5029e658 100644 --- a/lib/ui/profile/mazaya_access_result_screen.dart +++ b/lib/ui/profile/mazaya_access_result_screen.dart @@ -135,15 +135,15 @@ class MazayaAccessResultScreen extends StatelessWidget { effectiveNationalId = routeArgs['nationalId'] ?? nationalId; effectiveDateOfBirth = routeArgs['dateOfBirth'] ?? dateOfBirth; } - - if (effectiveName.trim().isEmpty) { - String fallback = AppState().dependentName ?? ""; - if (fallback.isNotEmpty) { - effectiveName = fallback; - } else { - effectiveName = isAr ? "التابع" : "Dependent"; - } - } + effectiveName = isAr ? "التابع" : "Dependent"; + // if (effectiveName.trim().isEmpty) { + // String fallback = AppState().dependentName ?? ""; + // if (fallback.isNotEmpty) { + // effectiveName = fallback; + // } else { + // effectiveName = isAr ? "التابع" : "Dependent"; + // } + // } String linkToShare = effectiveUrl ?? getDownloadLink(); String initials = effectiveInitials ?? _getInitials(effectiveName); @@ -407,7 +407,7 @@ class MazayaAccessResultScreen extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - name.toText14(isBold: true, maxlines: 1, color: const Color(0xFF1E293B)), + // name.toText14(isBold: true, maxlines: 1, color: const Color(0xFF1E293B)), const SizedBox(height: 2), LocaleKeys.dependentAccessBlocked.tr().toText12(isBold: true, color: const Color(0xFFED1C24)), ],