Update Saqel Platform: 2026-09-04 03:20:29
This commit is contained in:
+209
-19
@@ -637,6 +637,81 @@ class _TeacherMonetizationViewState extends State<TeacherMonetizationView> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// Dual Pricing Audience Breakdown Card
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF0F172A),
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
border: Border.all(color: const Color(0xFF1E293B)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'تصنيف قاعدة الطلبة (المؤسسي مقابل الخارجي) 👥',
|
||||
style: TextStyle(fontSize: 13.5, fontWeight: FontWeight.w800, color: Colors.white),
|
||||
),
|
||||
Text(
|
||||
'تحديث الكشوفات: اليوم',
|
||||
style: TextStyle(fontSize: 11, color: Color(0xFF64748B)),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF064E3B).withOpacity(0.3),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: const Color(0xFF10B981).withOpacity(0.3)),
|
||||
),
|
||||
child: const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('طلبة الثقافة العسكرية والمدارس الشريكة', style: TextStyle(fontSize: 12.5, fontWeight: FontWeight.w700, color: Colors.white)),
|
||||
SizedBox(height: 2),
|
||||
Text('مشمولون برسم (0.00 د.أ) ضمن العقد المؤسسي', style: TextStyle(fontSize: 11, color: Color(0xFF34D399))),
|
||||
],
|
||||
),
|
||||
Text('1,420 طالباً 🎖️', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w900, color: Color(0xFF34D399))),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF0369A1).withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: const Color(0xFF0284C7).withOpacity(0.3)),
|
||||
),
|
||||
child: const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('الطلبة المستقلون (سوق صَقِل المفتوح)', style: TextStyle(fontSize: 12.5, fontWeight: FontWeight.w700, color: Colors.white)),
|
||||
SizedBox(height: 2),
|
||||
Text('مشتركون عبر نظام الدفع الفوري كليك (CliQ)', style: TextStyle(fontSize: 11, color: Color(0xFF38BDF8))),
|
||||
],
|
||||
),
|
||||
Text('380 طالباً 💳', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w900, color: Color(0xFF38BDF8))),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Wallet Card
|
||||
Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
@@ -678,7 +753,7 @@ class _TeacherMonetizationViewState extends State<TeacherMonetizationView> {
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: const Text(
|
||||
'IBAN معتمد',
|
||||
'CliQ & IBAN',
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: Color(0xFF34D399),
|
||||
@@ -697,25 +772,43 @@ class _TeacherMonetizationViewState extends State<TeacherMonetizationView> {
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(
|
||||
'تم تقديم طلب التحويل لحسابك البنكي المعتمد بنجاح.'),
|
||||
backgroundColor: Color(0xFF10B981),
|
||||
const SizedBox(height: 14),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
_showCliqPayoutDialog(context, teacherShare);
|
||||
},
|
||||
icon: const Icon(CupertinoIcons.bolt_fill, size: 16),
|
||||
label: const Text('سحب فوري عبر كليك (CliQ)', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w800)),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF10B981),
|
||||
foregroundColor: Colors.black,
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
icon: const Icon(CupertinoIcons.money_dollar, size: 18),
|
||||
label: const Text('طلب تحويل الرصيد للحساب البنكي'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF10B981),
|
||||
foregroundColor: Colors.black,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
OutlinedButton.icon(
|
||||
onPressed: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('تم تقديم طلب التحويل لحسابك البنكي IBAN بنجاح.'),
|
||||
backgroundColor: Color(0xFF10B981),
|
||||
),
|
||||
);
|
||||
},
|
||||
icon: const Icon(CupertinoIcons.building_2_fill, size: 16, color: Colors.white),
|
||||
label: const Text('تحويل بنكي', style: TextStyle(fontSize: 12, color: Colors.white)),
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: BorderSide(color: Colors.white.withOpacity(0.3)),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -861,6 +954,103 @@ class _TeacherMonetizationViewState extends State<TeacherMonetizationView> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _showCliqPayoutDialog(BuildContext ctx, double availableBalance) {
|
||||
final TextEditingController cliqController = TextEditingController(text: 'AHMAD@CLIQ');
|
||||
final TextEditingController amountController = TextEditingController(text: availableBalance.toInt().toString());
|
||||
|
||||
showModalBottomSheet(
|
||||
context: ctx,
|
||||
backgroundColor: const Color(0xFF0F172A),
|
||||
isScrollControlled: true,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(24))),
|
||||
builder: (bCtx) => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(bCtx).viewInsets.bottom + 20,
|
||||
left: 20,
|
||||
right: 20,
|
||||
top: 24,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Row(
|
||||
children: [
|
||||
Icon(CupertinoIcons.bolt_fill, color: Color(0xFF10B981), size: 22),
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
'طلب سحب فوري عبر كليك (CliQ)',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w800, color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () => Navigator.pop(bCtx),
|
||||
icon: const Icon(CupertinoIcons.xmark_circle_fill, color: Color(0xFF64748B)),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
const Text(
|
||||
'تتم معالجة الحوالة فورياً وإدراجها في طابور السحب الآلي لحسابك البنكي.',
|
||||
style: TextStyle(fontSize: 12, color: Color(0xFF94A3B8)),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
TextField(
|
||||
controller: cliqController,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 13),
|
||||
decoration: InputDecoration(
|
||||
labelText: 'معرّف كليك (CliQ Alias) أو رقم الهاتف',
|
||||
labelStyle: const TextStyle(color: Color(0xFF94A3B8), fontSize: 12),
|
||||
filled: true,
|
||||
fillColor: const Color(0xFF1E293B),
|
||||
prefixIcon: const Icon(CupertinoIcons.person_crop_circle, color: Color(0xFF10B981), size: 20),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: BorderSide.none),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
TextField(
|
||||
controller: amountController,
|
||||
keyboardType: TextInputType.number,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 13),
|
||||
decoration: InputDecoration(
|
||||
labelText: 'المبلغ المطلوب سحبه (دينار أردني)',
|
||||
labelStyle: const TextStyle(color: Color(0xFF94A3B8), fontSize: 12),
|
||||
filled: true,
|
||||
fillColor: const Color(0xFF1E293B),
|
||||
prefixIcon: const Icon(CupertinoIcons.money_dollar, color: Color(0xFF10B981), size: 20),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: BorderSide.none),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
Navigator.pop(bCtx);
|
||||
ScaffoldMessenger.of(ctx).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('تم إدراج طلب السحب بمبلغ ${amountController.text} د.أ في طابور كليك بنجاح ⚡'),
|
||||
backgroundColor: const Color(0xFF10B981),
|
||||
),
|
||||
);
|
||||
},
|
||||
icon: const Icon(CupertinoIcons.paperplane_fill, size: 16),
|
||||
label: const Text('تأكيد وإرسال لطابور السحب الفوري (CliQ Queue)'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF10B981),
|
||||
foregroundColor: Colors.black,
|
||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// ==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user