Update Saqel Platform: 2026-09-04 02:04:43
This commit is contained in:
+153
-172
@@ -1,4 +1,7 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'screens/directorate_command_screen.dart';
|
||||
import 'screens/school_principal_screen.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const SaqelAdminApp());
|
||||
@@ -10,11 +13,11 @@ class SaqelAdminApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'صَقِل - الإدارة والمدارس',
|
||||
title: 'صَقِل - الإدارة المركزية والمدارس',
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
scaffoldBackgroundColor: const Color(0xFF0A0E17),
|
||||
scaffoldBackgroundColor: const Color(0xFF070B12),
|
||||
fontFamily: '-apple-system',
|
||||
fontFamilyFallback: const [
|
||||
'SF Pro Display',
|
||||
@@ -27,197 +30,175 @@ class SaqelAdminApp extends StatelessWidget {
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: const Color(0xFF8B5CF6),
|
||||
brightness: Brightness.dark,
|
||||
surface: const Color(0xFF111827),
|
||||
surface: const Color(0xFF0F172A),
|
||||
primary: const Color(0xFF8B5CF6),
|
||||
),
|
||||
),
|
||||
home: const AdminHomeScreen(),
|
||||
builder: (context, child) {
|
||||
return Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: child ?? const SizedBox(),
|
||||
);
|
||||
},
|
||||
home: const UnifiedSupervisorShell(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AdminHomeScreen extends StatelessWidget {
|
||||
const AdminHomeScreen({super.key});
|
||||
/// Unified Shell allowing seamless switching between:
|
||||
/// 1. School Principal / Field Supervisor View (تطبيق مدير المدرسة والمشرف)
|
||||
/// 2. Directorate Commander View (لوحة القائد العام لمديرية الثقافة العسكرية)
|
||||
class UnifiedSupervisorShell extends StatefulWidget {
|
||||
const UnifiedSupervisorShell({super.key});
|
||||
|
||||
@override
|
||||
State<UnifiedSupervisorShell> createState() => _UnifiedSupervisorShellState();
|
||||
}
|
||||
|
||||
class _UnifiedSupervisorShellState extends State<UnifiedSupervisorShell> {
|
||||
int _currentModeIndex = 0; // 0 = School Principal, 1 = Directorate Commander
|
||||
|
||||
final List<Widget> _screens = const [
|
||||
SchoolPrincipalScreen(),
|
||||
DirectorateCommandScreen(),
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
decoration: const BoxDecoration(
|
||||
gradient: RadialGradient(
|
||||
center: Alignment(0.0, -0.6),
|
||||
radius: 1.2,
|
||||
colors: [
|
||||
Color(0xFF25134A),
|
||||
Color(0xFF0A0E17),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: SafeArea(
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 32),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 580),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
width: 80,
|
||||
height: 80,
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF8B5CF6), Color(0xFFA78BFA)],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Color(0x4D8B5CF6),
|
||||
blurRadius: 25,
|
||||
offset: Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'إ',
|
||||
style: TextStyle(
|
||||
fontSize: 42,
|
||||
fontWeight: FontWeight.w900,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
const Text(
|
||||
'إدارة منصة صَقِل وشبكة المدارس',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w800,
|
||||
letterSpacing: -0.5,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Text(
|
||||
'لوحة تحكم B2B: إدارة كشوفات المدارس، تراخيص الثقافة العسكرية، والرقابة المركزية',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Color(0xFF94A3B8),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 36),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xCC161F30),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(
|
||||
color: const Color(0x14FFFFFF),
|
||||
),
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Color(0x66000000),
|
||||
blurRadius: 30,
|
||||
offset: Offset(0, 15),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 10,
|
||||
height: 10,
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFFA78BFA),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
const Expanded(
|
||||
child: Text(
|
||||
'التحكم المركزي والأمان (Enterprise Governance)',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFFA78BFA),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_buildFeatureRow('🏫 كشوفات المدارس (Rosters)', 'الربط التلقائي بالرقم الوطني واستيراد CSV'),
|
||||
_buildFeatureRow('💼 التراخيص وحصص المعلمين', 'متابعة المبيعات، العقود، والأرباح'),
|
||||
_buildFeatureRow('🛡️ الرقابة والامتثال', 'حظر القرصنة، مراقبة استهلاك الخوادم وبوابة نبيه'),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 28),
|
||||
ElevatedButton(
|
||||
onPressed: () {},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF8B5CF6),
|
||||
foregroundColor: Colors.white,
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
elevation: 0,
|
||||
),
|
||||
child: const Text(
|
||||
'دخول لوحة الإدارة المركزية 🏢',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
backgroundColor: const Color(0xFF070B12),
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
// Top Luxury Persona Switcher
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFF0E1626),
|
||||
border: Border(
|
||||
bottom: BorderSide(color: Color(0xFF1E293B)),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFF8B5CF6), Color(0xFF4F46E5)],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'ص',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w900,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'منظومة صَقِل الإشرافية والسيادية',
|
||||
style: TextStyle(
|
||||
fontSize: 13.5,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'التبديل بين الصلاحيات التنفيذية والقيادية',
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: Color(0xFF94A3B8),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Segmented Switcher Pill
|
||||
Container(
|
||||
padding: const EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1E293B),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_buildModeTab(
|
||||
index: 0,
|
||||
title: 'مدير المدرسة / المشرف',
|
||||
icon: CupertinoIcons.building_2_fill,
|
||||
),
|
||||
_buildModeTab(
|
||||
index: 1,
|
||||
title: 'لوحة القائد الأعلى (43 مدرسة)',
|
||||
icon: CupertinoIcons.shield_lefthalf_fill,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Active View
|
||||
Expanded(
|
||||
child: IndexedStack(
|
||||
index: _currentModeIndex,
|
||||
children: _screens,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static Widget _buildFeatureRow(String title, String subtitle) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 13.5,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
Widget _buildModeTab({
|
||||
required int index,
|
||||
required String title,
|
||||
required IconData icon,
|
||||
}) {
|
||||
final isSelected = _currentModeIndex == index;
|
||||
return GestureDetector(
|
||||
onTap: () => setState(() => _currentModeIndex = index),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 7),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? const Color(0xFF8B5CF6) : Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 14,
|
||||
color: isSelected ? Colors.white : const Color(0xFF94A3B8),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
subtitle,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Color(0xFF64748B),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: isSelected ? FontWeight.w700 : FontWeight.w500,
|
||||
color: isSelected ? Colors.white : const Color(0xFF94A3B8),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user