From b4f063aaac96adcad1cd1b19954ef1fb5437259a Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 26 Jun 2026 20:52:18 +0300 Subject: [PATCH] Update: 2026-06-26 20:52:17 --- backend/ride/kazan/add.php | 89 +++++++++---- backend/ride/kazan/update.php | 11 +- siro_admin/ios/Flutter/AppFrameworkInfo.plist | 2 - siro_admin/ios/Runner/AppDelegate.swift | 7 +- siro_admin/ios/Runner/Info.plist | 124 ++++++++++-------- .../controller/admin/kazan_controller.dart | 8 +- .../admin/pricing/kazan_editor_page.dart | 2 +- 7 files changed, 152 insertions(+), 91 deletions(-) diff --git a/backend/ride/kazan/add.php b/backend/ride/kazan/add.php index da205b5d..4fc486f6 100644 --- a/backend/ride/kazan/add.php +++ b/backend/ride/kazan/add.php @@ -1,45 +1,82 @@ prepare($sql); -// Bind the parameters to the SQL query -$stmt->bindParam(':kazan', $kazan); -$stmt->bindParam(':comfortPrice', $comfortPrice); -$stmt->bindParam(':speedPrice', $speedPrice); -$stmt->bindParam(':deliveryPrice', $deliveryPrice); -$stmt->bindParam(':freePrice', $freePrice); -$stmt->bindParam(':latePrice', $latePrice); -$stmt->bindParam(':heavyPrice', $heavyPrice); +$stmt->bindParam(':kazanPercent', $kazanPercent); $stmt->bindParam(':adminId', $adminId); -$stmt->bindParam(':naturePrice', $naturePrice); -$stmt->bindParam(':country', $country); $stmt->bindParam(':fuelPrice', $fuelPrice); +$stmt->bindParam(':currency', $currency); +$stmt->bindParam(':speedPrice', $speedPrice); +$stmt->bindParam(':comfortPrice', $comfortPrice); +$stmt->bindParam(':ladyPrice', $ladyPrice); +$stmt->bindParam(':electricPrice', $electricPrice); +$stmt->bindParam(':vanPrice', $vanPrice); +$stmt->bindParam(':deliveryPrice', $deliveryPrice); +$stmt->bindParam(':mishwarVipPrice', $mishwarVipPrice); +$stmt->bindParam(':fixedPrice', $fixedPrice); +$stmt->bindParam(':awfarPrice', $awfarPrice); +$stmt->bindParam(':normalMinPrice', $normalMinPrice); +$stmt->bindParam(':peakMinPrice', $peakMinPrice); +$stmt->bindParam(':lateMinPrice', $lateMinPrice); +$stmt->bindParam(':country', $country); -// Execute the statement if ($stmt->execute()) { - // Print a success message jsonSuccess(null, "Kazan saved successfully"); } else { - // Print a failure message jsonError("Failed to save Kazan"); } -// Close the statement $stmt->close(); ?> diff --git a/backend/ride/kazan/update.php b/backend/ride/kazan/update.php index 3659fbe4..4cf3aee3 100644 --- a/backend/ride/kazan/update.php +++ b/backend/ride/kazan/update.php @@ -4,8 +4,12 @@ require_once __DIR__ . '/../../connect.php'; $id = filterRequest("id"); $allowedFields = [ - "kazan", "comfortPrice", "speedPrice", "deliveryPrice", - "freePrice", "latePrice", "heavyPrice", "adminId", "naturePrice", "fuelPrice", "familyPrice" + "kazanPercent", "fuelPrice", "currency", + "speedPrice", "comfortPrice", "ladyPrice", + "electricPrice", "vanPrice", "deliveryPrice", + "mishwarVipPrice", "fixedPrice", "awfarPrice", + "normalMinPrice", "peakMinPrice", "lateMinPrice", + "adminId" ]; $setParts = []; @@ -32,7 +36,6 @@ $stmt->execute($params); $userIdToLog = $user_id ?? 'unknown_admin'; -// تسجيل العملية في السجل دائماً $auditResult = logAudit($con, $userIdToLog, "تحديث عمولة/أسعار النظام (Kazan)", "kazan", $id, $params); $debugLog = "[" . date('Y-m-d H:i:s') . "] Kazan Update Triggered. User: $userIdToLog. Audit Result: " . ($auditResult === true ? 'SUCCESS' : $auditResult) . "\n"; @@ -43,4 +46,4 @@ if ($stmt->rowCount() > 0) { } else { jsonSuccess(null, "Kazan data remains unchanged or updated. Audit: " . ($auditResult === true ? 'OK' : $auditResult)); } -?> \ No newline at end of file +?> diff --git a/siro_admin/ios/Flutter/AppFrameworkInfo.plist b/siro_admin/ios/Flutter/AppFrameworkInfo.plist index 1dc6cf76..391a902b 100644 --- a/siro_admin/ios/Flutter/AppFrameworkInfo.plist +++ b/siro_admin/ios/Flutter/AppFrameworkInfo.plist @@ -20,7 +20,5 @@ ???? CFBundleVersion 1.0 - MinimumOSVersion - 13.0 diff --git a/siro_admin/ios/Runner/AppDelegate.swift b/siro_admin/ios/Runner/AppDelegate.swift index 62666446..c30b367e 100644 --- a/siro_admin/ios/Runner/AppDelegate.swift +++ b/siro_admin/ios/Runner/AppDelegate.swift @@ -2,12 +2,15 @@ import Flutter import UIKit @main -@objc class AppDelegate: FlutterAppDelegate { +@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } + + func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { + GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) + } } diff --git a/siro_admin/ios/Runner/Info.plist b/siro_admin/ios/Runner/Info.plist index 263f6c7a..5c566d5f 100644 --- a/siro_admin/ios/Runner/Info.plist +++ b/siro_admin/ios/Runner/Info.plist @@ -1,57 +1,77 @@ + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Siro Admin + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + siro_admin + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + NSBonjourServices + + _http._tcp + _https._tcp + + NSLocalNetworkUsageDescription + نحتاج إلى الوصول إلى الشبكة المحلية لاكتشاف الأجهزة القريبة. + UIApplicationSceneManifest - NSLocalNetworkUsageDescription - نحتاج إلى الوصول إلى الشبكة المحلية لاكتشاف الأجهزة القريبة. - - NSBonjourServices - - _http._tcp - _https._tcp - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Siro Admin - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - siro_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 - + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneClassName + UIWindowScene + UISceneConfigurationName + flutter + UISceneDelegateClassName + FlutterSceneDelegate + UISceneStoryboardFile + Main + + + - \ No newline at end of file + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/siro_admin/lib/controller/admin/kazan_controller.dart b/siro_admin/lib/controller/admin/kazan_controller.dart index 5a72c076..07aa9e43 100644 --- a/siro_admin/lib/controller/admin/kazan_controller.dart +++ b/siro_admin/lib/controller/admin/kazan_controller.dart @@ -11,9 +11,9 @@ class KazanController extends GetxController { final CRUD _crud = CRUD(); final List> countries = [ - {'code': 'syria', 'name': 'سوريا', 'flag': '🇸🇾'}, - {'code': 'jordan', 'name': 'الأردن', 'flag': '🇯🇴'}, - {'code': 'egypt', 'name': 'مصر', 'flag': '🇪🇬'}, + {'code': 'Syria', 'name': 'سوريا', 'flag': '🇸🇾'}, + {'code': 'Jordan', 'name': 'الأردن', 'flag': '🇯🇴'}, + {'code': 'Egypt', 'name': 'مصر', 'flag': '🇪🇬'}, ]; String get selectedCountryCode => @@ -60,7 +60,7 @@ class KazanController extends GetxController { Future updateKazan(Map data) async { isLoading.value = true; try { - data['country'] = selectedCountry.value; + data['country'] = selectedCountryCode; final String link = data.containsKey('id') ? AppLink.updateKazanPercent : AppLink.addKazanPercent; Map payload = {}; diff --git a/siro_admin/lib/views/admin/pricing/kazan_editor_page.dart b/siro_admin/lib/views/admin/pricing/kazan_editor_page.dart index 94b50ceb..c5796dad 100644 --- a/siro_admin/lib/views/admin/pricing/kazan_editor_page.dart +++ b/siro_admin/lib/views/admin/pricing/kazan_editor_page.dart @@ -416,7 +416,7 @@ class KazanEditorPage extends StatelessWidget { if (!data.containsKey('country') || data['country'] == null || data['country'].toString().isEmpty) { - data['country'] = controller.selectedCountry.value; + data['country'] = controller.selectedCountryCode; } bool success = await controller.updateKazan(data);