Update admin login success to dynamically set countryCode for non-super-admins
This commit is contained in:
@@ -163,6 +163,10 @@ class OtpHelper extends GetxController {
|
||||
String role = data['role'].toString().trim();
|
||||
await box.write('admin_role', role);
|
||||
Log.print('Admin role saved: $role');
|
||||
|
||||
if (role != 'super_admin' && data['country'] != null) {
|
||||
await box.write(BoxName.countryCode, data['country']);
|
||||
}
|
||||
}
|
||||
if (data['phone'] != null) {
|
||||
await box.write(BoxName.adminPhone, data['phone']);
|
||||
|
||||
Reference in New Issue
Block a user