Update: 2026-05-07 23:24:12
This commit is contained in:
@@ -13,7 +13,8 @@ class UsersManagementView extends StatelessWidget {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('إدارة مستخدمي النظام', style: TextStyle(fontFamily: 'El Messiri')),
|
||||
title: const Text('إدارة مستخدمي النظام',
|
||||
style: TextStyle(fontFamily: 'El Messiri')),
|
||||
centerTitle: true,
|
||||
backgroundColor: const Color(0xFF0F4C81),
|
||||
foregroundColor: Colors.white,
|
||||
@@ -37,9 +38,11 @@ class UsersManagementView extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.people_outline, size: 80, color: Colors.grey.shade400),
|
||||
Icon(Icons.people_outline,
|
||||
size: 80, color: Colors.grey.shade400),
|
||||
const SizedBox(height: 16),
|
||||
const Text('لا يوجد موظفين مسجلين', style: TextStyle(fontSize: 18, color: Colors.grey)),
|
||||
const Text('لا يوجد موظفين مسجلين',
|
||||
style: TextStyle(fontSize: 18, color: Colors.grey)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -55,28 +58,53 @@ class UsersManagementView extends StatelessWidget {
|
||||
return Card(
|
||||
elevation: 2,
|
||||
margin: const EdgeInsets.only(bottom: 12),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
child: ListTile(
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: const Color(0xFF0F4C81).withValues(alpha: 0.1),
|
||||
backgroundColor:
|
||||
const Color(0xFF0F4C81).withValues(alpha: 0.1),
|
||||
child: const Icon(Icons.person, color: Color(0xFF0F4C81)),
|
||||
),
|
||||
title: Text(
|
||||
user['name'] ?? 'مستخدم',
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
subtitle: Text(user['email'] ?? ''),
|
||||
trailing: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF10B981).withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Text(
|
||||
user['role'] ?? '',
|
||||
style: const TextStyle(color: Color(0xFF10B981), fontSize: 12),
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF10B981), fontSize: 12),
|
||||
),
|
||||
),
|
||||
isThreeLine: user['tenant_name'] != null,
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(user['email'] ?? ''),
|
||||
if (user['tenant_name'] != null) ...[
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.account_balance,
|
||||
size: 12, color: Colors.grey),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
user['tenant_name'],
|
||||
style: const TextStyle(
|
||||
fontSize: 12, color: Colors.grey),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user