diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 7c56964..1dc6cf7 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 12.0
+ 13.0
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 8fa203e..7930ad4 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -163,10 +163,10 @@ PODS:
- PromisesObjC (2.4.0)
- PromisesSwift (2.4.0):
- PromisesObjC (= 2.4.0)
- - SDWebImage (5.21.1):
- - SDWebImage/Core (= 5.21.1)
- - SDWebImage/Core (5.21.1)
- - SDWebImageWebPCoder (0.14.6):
+ - SDWebImage (5.21.6):
+ - SDWebImage/Core (= 5.21.6)
+ - SDWebImage/Core (5.21.6)
+ - SDWebImageWebPCoder (0.15.0):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.17)
- sqflite_darwin (0.0.4):
@@ -289,8 +289,8 @@ SPEC CHECKSUMS:
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
- SDWebImage: f29024626962457f3470184232766516dee8dfea
- SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380
+ SDWebImage: 1bb6a1b84b6fe87b972a102bdc77dd589df33477
+ SDWebImageWebPCoder: 0e06e365080397465cc73a7a9b472d8a3bd0f377
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 0046868..4dd1401 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -497,7 +497,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -628,7 +628,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -679,7 +679,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 7c48750..fba2a60 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -1,49 +1,57 @@
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleDisplayName
- Intaleq Admin
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- intaleq_admin
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- $(FLUTTER_BUILD_NAME)
- CFBundleSignature
- ????
- CFBundleVersion
- $(FLUTTER_BUILD_NUMBER)
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- CADisableMinimumFrameDurationOnPhone
-
- UIApplicationSupportsIndirectInputEvents
-
-
-
+
+ NSLocalNetworkUsageDescription
+ نحتاج إلى الوصول إلى الشبكة المحلية لاكتشاف الأجهزة القريبة.
+
+ NSBonjourServices
+
+ _http._tcp
+ _https._tcp
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Intaleq Admin
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ intaleq_admin
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
\ No newline at end of file
diff --git a/lib/constant/links.dart b/lib/constant/links.dart
index 3b0fd9d..28e5799 100644
--- a/lib/constant/links.dart
+++ b/lib/constant/links.dart
@@ -11,14 +11,27 @@ class AppLink {
// static final String endPoint = box.read(BoxName.serverChosen);
// static final String server = Env.seferCairoServer;
- static final String server = 'https://api.intaleq.xyz/intaleq';
+ static final String server = 'https://api.intaleq.xyz/intaleq_v1';
static String loginJwtDriver =
"https://api.intaleq.xyz/intaleq/loginAdmin.php";
+//=============================
+//=============================
+ static final getAllFingerprints =
+ '$server/migration/get_all_fingerprints.php';
+ static final updateFingerprintAdmin =
+ '$server/migration/update_fingerprint_admin.php';
+ static final getAllDriverFingerprints =
+ '$server/migration/get_all_driver_fingerprints.php';
+ static final updateDriverFingerprintAdmin =
+ '$server/migration/update_driver_fingerprint_admin.php';
+//=============================
+//=============================
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
static String llama = 'https://api.llama-api.com/chat/completions';
static String gemini =
'https://generativelanguage.googleapis.com/v1beta3/models/text-bison-001:generateText';
+ static String serverMonitor = "https://tripz-egypt.com/server/monitor.php";
static String test = "$server/test.php";
static String loginWalletAdmin = "$seferPaymentServer/loginWalletAdmin.php";
diff --git a/lib/controller/admin/captain_admin_controller.dart b/lib/controller/admin/captain_admin_controller.dart
index 6532813..a256772 100644
--- a/lib/controller/admin/captain_admin_controller.dart
+++ b/lib/controller/admin/captain_admin_controller.dart
@@ -53,7 +53,7 @@ class CaptainAdminController extends GetxController {
update();
var res = await CRUD().post(
link: AppLink.find_driver_by_phone,
- payload: {'phone': phone},
+ payload: {'phone': "963$phone"},
);
var d = (res);
if (d != 'failure') {
diff --git a/lib/controller/admin/dashboard_controller.dart b/lib/controller/admin/dashboard_controller.dart
index d599582..d41d13f 100644
--- a/lib/controller/admin/dashboard_controller.dart
+++ b/lib/controller/admin/dashboard_controller.dart
@@ -54,14 +54,14 @@ class DashboardController extends GetxController {
}
// 🔹 Check SMS credit
- var res2 = await CRUD().kazumiSMS(
- link: 'https://sms.kazumi.me/api/sms/check-credit',
- payload: {"username": "Sefer", "password": AK.smsPasswordEgypt},
- );
+ // var res2 = await CRUD().kazumiSMS(
+ // link: 'https://sms.kazumi.me/api/sms/check-credit',
+ // payload: {"username": "Sefer", "password": AK.smsPasswordEgypt},
+ // );
- creditSMS = res2['credit'];
- print('📱 SMS Credit Response: ${jsonEncode(res2)}');
- print('💰 creditSMS: $creditSMS');
+ // creditSMS = res2['credit'];
+ // print('📱 SMS Credit Response: ${jsonEncode(res2)}');
+ // print('💰 creditSMS: $creditSMS');
isLoading = false;
update();
diff --git a/lib/controller/admin/static_controller.dart b/lib/controller/admin/static_controller.dart
index 36210cb..05db94a 100644
--- a/lib/controller/admin/static_controller.dart
+++ b/lib/controller/admin/static_controller.dart
@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:fl_chart/fl_chart.dart';
+import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
@@ -7,8 +8,72 @@ import '../../constant/links.dart';
import '../../print.dart';
import '../functions/crud.dart';
+// ══════════════════════════════════════════════════════════════
+// MODEL: Represents one employee's full data for a period
+// ══════════════════════════════════════════════════════════════
+class EmployeeChartData {
+ final String name;
+ final Color color;
+ final List notesSpots;
+ final List callsSpots;
+
+ const EmployeeChartData({
+ required this.name,
+ required this.color,
+ required this.notesSpots,
+ required this.callsSpots,
+ });
+
+ int get totalNotes => notesSpots.fold(0, (sum, s) => sum + s.y.toInt());
+ int get totalCalls => callsSpots.fold(0, (sum, s) => sum + s.y.toInt());
+
+ EmployeeChartData copyWith({
+ List? notesSpots,
+ List? callsSpots,
+ }) {
+ return EmployeeChartData(
+ name: name,
+ color: color,
+ notesSpots: notesSpots ?? this.notesSpots,
+ callsSpots: callsSpots ?? this.callsSpots,
+ );
+ }
+}
+
+// ══════════════════════════════════════════════════════════════
+// MODEL: Employment activation stats per employee
+// ══════════════════════════════════════════════════════════════
+class EmploymentStat {
+ final String name;
+ final int count;
+ final Color color;
+
+ const EmploymentStat({
+ required this.name,
+ required this.count,
+ required this.color,
+ });
+}
+
+// ══════════════════════════════════════════════════════════════
+// CONTROLLER
+// ══════════════════════════════════════════════════════════════
class StaticController extends GetxController {
- // --- Date & State Management ---
+ // ─── Color Palette for Dynamic Employees ───────────────────
+ static const List _employeeColors = [
+ Color(0xFF00D4AA), // teal
+ Color(0xFF82AAFF), // blue
+ Color(0xFFFFCB6B), // amber
+ Color(0xFFC792EA), // purple
+ Color(0xFFFF5370), // red
+ Color(0xFFC3E88D), // green
+ Color(0xFFF07178), // coral
+ Color(0xFF89DDFF), // cyan
+ ];
+
+ Color _colorForIndex(int i) => _employeeColors[i % _employeeColors.length];
+
+ // ─── Date & State ───────────────────────────────────────────
DateTime? startDate = DateTime(DateTime.now().year, DateTime.now().month, 1);
DateTime? endDate =
DateTime(DateTime.now().year, DateTime.now().month + 1, 0);
@@ -19,56 +84,53 @@ class StaticController extends GetxController {
bool isComparing = false;
bool isLoading = false;
- // --- Daily Notes State ---
+ // ─── Daily Notes State ─────────────────────────────────────
bool isLoadingNotes = false;
List dailyNotesList = [];
- // --- Chart Data (Current Range) ---
+ // ─── Main Chart Data ───────────────────────────────────────
List chartDataPassengers = [];
List chartDataDrivers = [];
List chartDataRides = [];
List chartDataDriversMatchingNotes = [];
- // Employee Data (Notes/General Stats)
- List chartDataEmployeerama1 = [];
- List chartDataEmployeeshahd = [];
- List chartDataEmployeeRama2 = [];
- List chartDataEmployeeSefer4 = [];
-
- // Employee Data (Calls/Activations Stats)
- List chartDataCallsrama1 = [];
- List chartDataCallsShahd = [];
- List chartDataCallsRama2 = [];
- List chartDataCallsSefer4 = [];
-
- // --- Chart Data (Comparison Range) ---
List chartDataPassengersCompare = [];
List chartDataDriversCompare = [];
List chartDataRidesCompare = [];
List chartDataDriversMatchingNotesCompare = [];
- // Employee Comparison (Notes)
- List chartDataEmployeerama1Compare = [];
- List chartDataEmployeeshahdCompare = [];
- List chartDataEmployeeRama2Compare = [];
- List chartDataEmployeeSefer4Compare = [];
+ // ─── 🔥 DYNAMIC Employee Data ─────────────────────────────
+ // Key = employee name (from server), Value = their chart data
+ Map employeeData = {};
+ Map employeeDataCompare = {};
- // Employee Comparison (Calls/Activations)
- List chartDataCallsrama1Compare = [];
- List chartDataCallsShahdCompare = [];
- List chartDataCallsRama2Compare = [];
- List chartDataCallsSefer4Compare = [];
+ // Set of all known employee names (union of current + compare)
+ Set get allEmployeeNames => {
+ ...employeeData.keys,
+ ...employeeDataCompare.keys,
+ };
- // --- Totals ---
+ // ─── Employment Stats ──────────────────────────────────────
+ List employmentStatsList = [];
+
+ // ─── Totals ────────────────────────────────────────────────
String totalMonthlyPassengers = '0';
String totalMonthlyRides = '0';
String totalMonthlyDrivers = '0';
- // --- Raw Lists ---
+ // ─── Raw Lists ─────────────────────────────────────────────
List staticList = [];
- // --- Employment Type Stats List (Simple Count) ---
- List