Fixes & Updates - 2026-06-01: Integrate Back-End v3 updates, fix call/connection issues across apps
This commit is contained in:
@@ -18,19 +18,59 @@ class ComplaintListPage extends StatelessWidget {
|
||||
title: 'إدارة الشكاوى'.tr,
|
||||
isleading: true,
|
||||
body: [
|
||||
Obx(() => controller.isLoading.value && controller.complaintList.isEmpty
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: RefreshIndicator(
|
||||
onRefresh: () => controller.getComplaints(),
|
||||
child: ListView.builder(
|
||||
padding: const EdgeInsets.fromLTRB(16, 16, 16, 80),
|
||||
itemCount: controller.complaintList.length,
|
||||
itemBuilder: (context, index) {
|
||||
final complaint = controller.complaintList[index];
|
||||
return _buildComplaintCard(context, complaint);
|
||||
},
|
||||
),
|
||||
)),
|
||||
Obx(() {
|
||||
if (controller.delayedComplaints.isNotEmpty) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.danger.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: AppColor.danger.withOpacity(0.3)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.warning_amber_rounded, color: AppColor.danger),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'هناك ${controller.delayedComplaints.length} شكاوى لم يتم حلها منذ أكثر من أسبوع!',
|
||||
style: AppStyle.body.copyWith(color: AppColor.danger, fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Obx(() => MyElevatedButton(
|
||||
title: controller.showOnlyDelayed.value ? 'عرض جميع الشكاوى' : 'عرض الشكاوى المتأخرة فقط',
|
||||
onPressed: () => controller.showOnlyDelayed.toggle(),
|
||||
kolor: AppColor.danger,
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
}),
|
||||
Obx(() {
|
||||
final list = controller.showOnlyDelayed.value ? controller.delayedComplaints : controller.complaintList;
|
||||
if (controller.isLoading.value && list.isEmpty) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
return RefreshIndicator(
|
||||
onRefresh: () => controller.getComplaints(),
|
||||
child: ListView.builder(
|
||||
padding: const EdgeInsets.fromLTRB(16, 16, 16, 80),
|
||||
itemCount: list.length,
|
||||
itemBuilder: (context, index) {
|
||||
final complaint = list[index];
|
||||
return _buildComplaintCard(context, complaint);
|
||||
},
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -45,7 +85,9 @@ class ComplaintListPage extends StatelessWidget {
|
||||
tilePadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
leading: _buildStatusIndicator(c['statusComplaint'], statusColor),
|
||||
title: Text(
|
||||
c['complaint_type']?.toString() ?? 'شكوى عامة',
|
||||
c['description']?.toString() ?? 'بدون وصف',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
subtitle: Column(
|
||||
@@ -53,7 +95,7 @@ class ComplaintListPage extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'الرحلة: ${c['ride_id']}',
|
||||
'النوع: ${c['complaint_type'] ?? 'عام'} | الرحلة: ${c['ride_id']}',
|
||||
style: AppStyle.caption,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
|
||||
@@ -79,7 +79,7 @@ class PromoManagementPage extends StatelessWidget {
|
||||
children: [
|
||||
Icon(Icons.money_rounded, size: 14, color: AppColor.success),
|
||||
const SizedBox(width: 4),
|
||||
Text('${promo['amount']} ${'دينار'.tr}', style: AppStyle.number.copyWith(color: AppColor.success)),
|
||||
Text('% ${promo['amount']}', style: AppStyle.number.copyWith(color: AppColor.success)),
|
||||
const SizedBox(width: 12),
|
||||
Icon(Icons.person_rounded, size: 14, color: AppColor.info),
|
||||
const SizedBox(width: 4),
|
||||
@@ -166,10 +166,10 @@ class PromoManagementPage extends StatelessWidget {
|
||||
),
|
||||
MyTextForm(
|
||||
controller: amountController,
|
||||
label: 'المبلغ',
|
||||
hint: 'أدخل قيمة الخصم',
|
||||
label: 'نسبة الخصم',
|
||||
hint: 'أدخل نسبة الخصم (مثال: 25)',
|
||||
type: TextInputType.number,
|
||||
prefixIcon: Icons.attach_money_rounded,
|
||||
prefixIcon: Icons.percent_rounded,
|
||||
),
|
||||
MyTextForm(
|
||||
controller: descController,
|
||||
|
||||
@@ -307,7 +307,7 @@ class AdvancedAnalyticsPage extends StatelessWidget {
|
||||
Text('${d['completed_rides']} رحلة',
|
||||
style: const TextStyle(
|
||||
color: AppColor.info, fontWeight: FontWeight.bold)),
|
||||
Text('${d['total_revenue']} ج.م',
|
||||
Text('${d['total_revenue']} ل.س',
|
||||
style: const TextStyle(
|
||||
color: AppColor.success,
|
||||
fontSize: 12,
|
||||
|
||||
Reference in New Issue
Block a user