From 1b6e172a4a88cf4ecec5106f17b876b24de984f8 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Sun, 28 Jun 2026 23:14:46 +0300 Subject: [PATCH] Update: 2026-06-28 23:14:46 --- .../getDriverDetailsForActivate.php | 2 +- .../lib/controller/functions/launch.dart | 73 ++++++++++++++--- siro_service/lib/controller/local/ar_eg.dart | 81 +++++++++++++++++++ siro_service/lib/controller/local/ar_jo.dart | 81 +++++++++++++++++++ siro_service/lib/controller/local/ar_sy.dart | 81 +++++++++++++++++++ .../controller/local/local_controller.dart | 1 + .../mainController/main_controller.dart | 59 +++++++++++++- .../pages/review_driver_page.dart | 72 +++++++++-------- .../review_driver_controller.dart | 19 ++--- siro_service/pubspec.lock | 38 ++++----- 10 files changed, 428 insertions(+), 79 deletions(-) diff --git a/backend/serviceapp/getDriverDetailsForActivate.php b/backend/serviceapp/getDriverDetailsForActivate.php index c7141994..4e572caf 100644 --- a/backend/serviceapp/getDriverDetailsForActivate.php +++ b/backend/serviceapp/getDriverDetailsForActivate.php @@ -17,7 +17,7 @@ if ($stmt->rowCount() > 0) { // فك التشفير للحقول المطلوبة $fieldsToDecrypt = [ 'phone','email','gender','national_number','first_name','last_name', - 'name_arabic','address','site','vin','car_plate','owner' + 'name_arabic','address','site','vin','car_plate','owner','birthdate' ]; foreach ($fieldsToDecrypt as $field) { if (isset($row[$field]) && $row[$field] !== '') { diff --git a/siro_service/lib/controller/functions/launch.dart b/siro_service/lib/controller/functions/launch.dart index 26a7026d..9a1ebcc0 100644 --- a/siro_service/lib/controller/functions/launch.dart +++ b/siro_service/lib/controller/functions/launch.dart @@ -1,5 +1,49 @@ import 'package:url_launcher/url_launcher.dart'; import 'dart:io'; +import 'package:siro_service/main.dart'; + +String _formatPhoneNumberForCommunication(String rawPhone, String country) { + String digits = rawPhone.replaceAll(RegExp(r'[^0-9]'), ''); + if (digits.startsWith('00')) { + digits = digits.substring(2); + } + if (country == 'Jordan') { + if (digits.startsWith('962') && digits.length >= 12) { + return digits; + } + if (digits.startsWith('0')) { + digits = digits.substring(1); + } + if (!digits.startsWith('962')) { + digits = '962$digits'; + } + } else if (country == 'Egypt') { + if (digits.startsWith('20') && digits.length >= 11) { + return digits; + } + if (digits.startsWith('0')) { + digits = digits.substring(1); + } + if (!digits.startsWith('20')) { + digits = '20$digits'; + } + } else if (country == 'Syria') { + if (digits.startsWith('963') && digits.length >= 11) { + return digits; + } + if (digits.startsWith('0')) { + digits = digits.substring(1); + } + if (!digits.startsWith('963')) { + digits = '963$digits'; + } + } else { + if (digits.startsWith('0') && digits.length > 5) { + digits = digits.substring(1); + } + } + return digits; +} void showInBrowser(String url) async { if (await canLaunchUrl(Uri.parse(url))) { @@ -8,28 +52,39 @@ void showInBrowser(String url) async { } Future makePhoneCall(String phoneNumber) async { + final cleanPhone = phoneNumber.replaceAll(RegExp(r'[^0-9+]'), ''); final Uri launchUri = Uri( scheme: 'tel', - path: phoneNumber, + path: cleanPhone, ); - await launchUrl(launchUri); + if (await canLaunchUrl(launchUri)) { + await launchUrl(launchUri); + } else { + final String telUrl = 'tel:$cleanPhone'; + if (await canLaunchUrl(Uri.parse(telUrl))) { + await launchUrl(Uri.parse(telUrl)); + } + } } void launchCommunication( String method, String contactInfo, String message) async { String url; + final cleanPhone = contactInfo.replaceAll(RegExp(r'[^0-9+]'), ''); + final country = box.read('countryCode')?.toString() ?? 'Jordan'; + final phone = _formatPhoneNumberForCommunication(contactInfo, country); if (Platform.isIOS) { switch (method) { case 'phone': - url = 'tel:$contactInfo'; + url = 'tel:$cleanPhone'; break; case 'sms': - url = 'sms:$contactInfo?body=${Uri.encodeComponent(message)}'; + url = 'sms:$cleanPhone?body=${Uri.encodeComponent(message)}'; break; case 'whatsapp': url = - 'https://api.whatsapp.com/send?phone=$contactInfo&text=${Uri.encodeComponent(message)}'; + 'https://api.whatsapp.com/send?phone=$phone&text=${Uri.encodeComponent(message)}'; break; case 'email': url = @@ -41,10 +96,10 @@ void launchCommunication( } else if (Platform.isAndroid) { switch (method) { case 'phone': - url = 'tel:$contactInfo'; + url = 'tel:$cleanPhone'; break; case 'sms': - url = 'sms:$contactInfo?body=${Uri.encodeComponent(message)}'; + url = 'sms:$cleanPhone?body=${Uri.encodeComponent(message)}'; break; case 'whatsapp': // Check if WhatsApp is installed @@ -52,11 +107,11 @@ void launchCommunication( await canLaunchUrl(Uri.parse('whatsapp://')); if (whatsappInstalled) { url = - 'whatsapp://send?phone=$contactInfo&text=${Uri.encodeComponent(message)}'; + 'whatsapp://send?phone=$phone&text=${Uri.encodeComponent(message)}'; } else { // Provide an alternative action, such as opening the WhatsApp Web API url = - 'https://api.whatsapp.com/send?phone=$contactInfo&text=${Uri.encodeComponent(message)}'; + 'https://api.whatsapp.com/send?phone=$phone&text=${Uri.encodeComponent(message)}'; } break; case 'email': diff --git a/siro_service/lib/controller/local/ar_eg.dart b/siro_service/lib/controller/local/ar_eg.dart index 767a3da3..b58a6e19 100644 --- a/siro_service/lib/controller/local/ar_eg.dart +++ b/siro_service/lib/controller/local/ar_eg.dart @@ -931,4 +931,85 @@ final Map ar_eg = { "🔍 Search & Inquiries": "🔍 Search & Inquiries", "🔒 انتهت الجلسة": "🔒 انتهت الجلسة", "🚗 Vehicle Management": "🚗 Vehicle Management", + "ID Front": "الوجه الأمامي للهوية", + "ID Back": "الوجه الخلفي للهوية", + "Driver License": "رخصة القيادة", + "License Back": "الوجه الخلفي للرخصة", + "Car Reg Front": "رخصة المركبة - الأمام", + "Car Reg Back": "رخصة المركبة - الخلف", + "Criminal Record": "الصحيفة الجنائية", + "Profile Photo": "صورة الشخص", + "Country": "البلد", + "Detecting country...": "جاري تحديد البلد...", + "Verify the profile photo matches the person in the ID and Driver License photos above.": "تحقق من تطابق الصورة الشخصية مع الشخص في صور الهوية ورخصة القيادة أعلاه.", + "Review the \"لا حكم عليه\" document. Verify name matches driver.": "راجع وثيقة \"لا حكم عليه\". تحقق من مطابقة الاسم مع السائق.", + "Review the \"عدم محكومية\" document. Verify name matches driver.": "راجع وثيقة \"عدم محكومية\". تحقق من مطابقة الاسم مع السائق.", + "Review the \"فيش وتشبيه\" document. Verify name matches driver.": "راجع وثيقة \"فيش وتشبيه\". تحقق من مطابقة الاسم مع السائق.", + "Review the criminal record document. Verify name matches driver.": "راجع وثيقة الحالة الجنائية. تحقق من مطابقة الاسم مع السائق.", + "First Name": "الاسم الأول", + "Last Name": "الاسم الأخير", + "National Number": "الرقم الوطني", + "Gender": "الجنس", + "Birthdate": "تاريخ الميلاد", + "Place of Registration": "مكان القيد", + "Address": "العنوان", + "Marital Status": "الحالة الاجتماعية", + "License Type": "فئة الرخصة", + "License Categories": "فئات الرخصة", + "License Issue Date": "تاريخ إصدار الرخصة", + "License Expiry Date": "تاريخ انتهاء الرخصة", + "Owner Name": "اسم المالك", + "Car Plate": "رقم اللوحة", + "Car Color": "لون السيارة", + "Make": "الشركة المصنعة", + "Model": "الموديل", + "Year": "سنة الصنع", + "Fuel Type": "نوع الوقود", + "VIN / Chassis": "رقم الشاصي", + "License Expiry": "تاريخ انتهاء الترخيص", + "Phone Number": "رقم الهاتف", + "Email": "البريد الإلكتروني", + "No image available": "لا توجد صورة متاحة", + "Failed to load image": "فشل تحميل الصورة", + "Reject Driver": "رفض السائق", + "Enter rejection reason...": "أدخل سبب الرفض...", + "Reject": "رفض", + "Activate": "تفعيل", + "Save": "حفظ", + "Cancel": "إلغاء", + "Driver activated successfully!": "تم تفعيل السائق بنجاح!", + "Driver rejected": "تم رفض السائق", + "Failed to reject driver": "فشل رفض السائق", + "Failed to activate driver": "فشل تفعيل السائق", + "Failed to save changes": "فشل حفظ التغييرات", + "Data saved successfully": "تم حفظ البيانات بنجاح", + "Failed to load data": "فشل تحميل البيانات", + "Error": "خطأ", + "Done": "تم", + "Male": "ذكر", + "Female": "أنثى", + "white": "أبيض", + "black": "أسود", + "silver": "فضي", + "gray": "رمادي", + "gunmetal": "فولاذي", + "red": "أحمر", + "blue": "أزرق", + "navy": "كحلي", + "green": "أخضر", + "darkGreen": "أخضر غامق", + "beige": "بيج", + "brown": "بني", + "maroon": "ماروني", + "burgundy": "برغندي", + "yellow": "أصفر", + "orange": "برتقالي", + "gold": "ذهبي", + "bronze": "برونزي", + "champagne": "شامباني", + "purple": "بنفسجي", + "Please enter a rejection reason": "يرجى إدخال سبب الرفض", + "Jordan": "الأردن", + "Egypt": "مصر", + "Syria": "سوريا", }; diff --git a/siro_service/lib/controller/local/ar_jo.dart b/siro_service/lib/controller/local/ar_jo.dart index 4e2e2f81..7bc43cd0 100644 --- a/siro_service/lib/controller/local/ar_jo.dart +++ b/siro_service/lib/controller/local/ar_jo.dart @@ -931,4 +931,85 @@ final Map ar_jo = { "🔍 Search & Inquiries": "🔍 Search & Inquiries", "🔒 انتهت الجلسة": "🔒 انتهت الجلسة", "🚗 Vehicle Management": "🚗 Vehicle Management", + "ID Front": "الوجه الأمامي للهوية", + "ID Back": "الوجه الخلفي للهوية", + "Driver License": "رخصة القيادة", + "License Back": "الوجه الخلفي للرخصة", + "Car Reg Front": "رخصة المركبة - الأمام", + "Car Reg Back": "رخصة المركبة - الخلف", + "Criminal Record": "الصحيفة الجنائية", + "Profile Photo": "صورة الشخص", + "Country": "البلد", + "Detecting country...": "جاري تحديد البلد...", + "Verify the profile photo matches the person in the ID and Driver License photos above.": "تحقق من تطابق الصورة الشخصية مع الشخص في صور الهوية ورخصة القيادة أعلاه.", + "Review the \"لا حكم عليه\" document. Verify name matches driver.": "راجع وثيقة \"لا حكم عليه\". تحقق من مطابقة الاسم مع السائق.", + "Review the \"عدم محكومية\" document. Verify name matches driver.": "راجع وثيقة \"عدم محكومية\". تحقق من مطابقة الاسم مع السائق.", + "Review the \"فيش وتشبيه\" document. Verify name matches driver.": "راجع وثيقة \"فيش وتشبيه\". تحقق من مطابقة الاسم مع السائق.", + "Review the criminal record document. Verify name matches driver.": "راجع وثيقة الحالة الجنائية. تحقق من مطابقة الاسم مع السائق.", + "First Name": "الاسم الأول", + "Last Name": "الاسم الأخير", + "National Number": "الرقم الوطني", + "Gender": "الجنس", + "Birthdate": "تاريخ الميلاد", + "Place of Registration": "مكان القيد", + "Address": "العنوان", + "Marital Status": "الحالة الاجتماعية", + "License Type": "فئة الرخصة", + "License Categories": "فئات الرخصة", + "License Issue Date": "تاريخ إصدار الرخصة", + "License Expiry Date": "تاريخ انتهاء الرخصة", + "Owner Name": "اسم المالك", + "Car Plate": "رقم اللوحة", + "Car Color": "لون السيارة", + "Make": "الشركة المصنعة", + "Model": "الموديل", + "Year": "سنة الصنع", + "Fuel Type": "نوع الوقود", + "VIN / Chassis": "رقم الشاصي", + "License Expiry": "تاريخ انتهاء الترخيص", + "Phone Number": "رقم الهاتف", + "Email": "البريد الإلكتروني", + "No image available": "لا توجد صورة متاحة", + "Failed to load image": "فشل تحميل الصورة", + "Reject Driver": "رفض السائق", + "Enter rejection reason...": "أدخل سبب الرفض...", + "Reject": "رفض", + "Activate": "تفعيل", + "Save": "حفظ", + "Cancel": "إلغاء", + "Driver activated successfully!": "تم تفعيل السائق بنجاح!", + "Driver rejected": "تم رفض السائق", + "Failed to reject driver": "فشل رفض السائق", + "Failed to activate driver": "فشل تفعيل السائق", + "Failed to save changes": "فشل حفظ التغييرات", + "Data saved successfully": "تم حفظ البيانات بنجاح", + "Failed to load data": "فشل تحميل البيانات", + "Error": "خطأ", + "Done": "تم", + "Male": "ذكر", + "Female": "أنثى", + "white": "أبيض", + "black": "أسود", + "silver": "فضي", + "gray": "رمادي", + "gunmetal": "فولاذي", + "red": "أحمر", + "blue": "أزرق", + "navy": "كحلي", + "green": "أخضر", + "darkGreen": "أخضر غامق", + "beige": "بيج", + "brown": "بني", + "maroon": "ماروني", + "burgundy": "برغندي", + "yellow": "أصفر", + "orange": "برتقالي", + "gold": "ذهبي", + "bronze": "برونزي", + "champagne": "شامباني", + "purple": "بنفسجي", + "Please enter a rejection reason": "يرجى إدخال سبب الرفض", + "Jordan": "الأردن", + "Egypt": "مصر", + "Syria": "سوريا", }; diff --git a/siro_service/lib/controller/local/ar_sy.dart b/siro_service/lib/controller/local/ar_sy.dart index be739b78..739775e5 100644 --- a/siro_service/lib/controller/local/ar_sy.dart +++ b/siro_service/lib/controller/local/ar_sy.dart @@ -931,4 +931,85 @@ final Map ar_sy = { "🔍 Search & Inquiries": "🔍 Search & Inquiries", "🔒 انتهت الجلسة": "🔒 انتهت الجلسة", "🚗 Vehicle Management": "🚗 Vehicle Management", + "ID Front": "الوجه الأمامي للهوية", + "ID Back": "الوجه الخلفي للهوية", + "Driver License": "رخصة القيادة", + "License Back": "الوجه الخلفي للرخصة", + "Car Reg Front": "رخصة المركبة - الأمام", + "Car Reg Back": "رخصة المركبة - الخلف", + "Criminal Record": "الصحيفة الجنائية", + "Profile Photo": "صورة الشخص", + "Country": "البلد", + "Detecting country...": "جاري تحديد البلد...", + "Verify the profile photo matches the person in the ID and Driver License photos above.": "تحقق من تطابق الصورة الشخصية مع الشخص في صور الهوية ورخصة القيادة أعلاه.", + "Review the \"لا حكم عليه\" document. Verify name matches driver.": "راجع وثيقة \"لا حكم عليه\". تحقق من مطابقة الاسم مع السائق.", + "Review the \"عدم محكومية\" document. Verify name matches driver.": "راجع وثيقة \"عدم محكومية\". تحقق من مطابقة الاسم مع السائق.", + "Review the \"فيش وتشبيه\" document. Verify name matches driver.": "راجع وثيقة \"فيش وتشبيه\". تحقق من مطابقة الاسم مع السائق.", + "Review the criminal record document. Verify name matches driver.": "راجع وثيقة الحالة الجنائية. تحقق من مطابقة الاسم مع السائق.", + "First Name": "الاسم الأول", + "Last Name": "الاسم الأخير", + "National Number": "الرقم الوطني", + "Gender": "الجنس", + "Birthdate": "تاريخ الميلاد", + "Place of Registration": "مكان القيد", + "Address": "العنوان", + "Marital Status": "الحالة الاجتماعية", + "License Type": "فئة الرخصة", + "License Categories": "فئات الرخصة", + "License Issue Date": "تاريخ إصدار الرخصة", + "License Expiry Date": "تاريخ انتهاء الرخصة", + "Owner Name": "اسم المالك", + "Car Plate": "رقم اللوحة", + "Car Color": "لون السيارة", + "Make": "الشركة المصنعة", + "Model": "الموديل", + "Year": "سنة الصنع", + "Fuel Type": "نوع الوقود", + "VIN / Chassis": "رقم الشاصي", + "License Expiry": "تاريخ انتهاء الترخيص", + "Phone Number": "رقم الهاتف", + "Email": "البريد الإلكتروني", + "No image available": "لا توجد صورة متاحة", + "Failed to load image": "فشل تحميل الصورة", + "Reject Driver": "رفض السائق", + "Enter rejection reason...": "أدخل سبب الرفض...", + "Reject": "رفض", + "Activate": "تفعيل", + "Save": "حفظ", + "Cancel": "إلغاء", + "Driver activated successfully!": "تم تفعيل السائق بنجاح!", + "Driver rejected": "تم رفض السائق", + "Failed to reject driver": "فشل رفض السائق", + "Failed to activate driver": "فشل تفعيل السائق", + "Failed to save changes": "فشل حفظ التغييرات", + "Data saved successfully": "تم حفظ البيانات بنجاح", + "Failed to load data": "فشل تحميل البيانات", + "Error": "خطأ", + "Done": "تم", + "Male": "ذكر", + "Female": "أنثى", + "white": "أبيض", + "black": "أسود", + "silver": "فضي", + "gray": "رمادي", + "gunmetal": "فولاذي", + "red": "أحمر", + "blue": "أزرق", + "navy": "كحلي", + "green": "أخضر", + "darkGreen": "أخضر غامق", + "beige": "بيج", + "brown": "بني", + "maroon": "ماروني", + "burgundy": "برغندي", + "yellow": "أصفر", + "orange": "برتقالي", + "gold": "ذهبي", + "bronze": "برونزي", + "champagne": "شامباني", + "purple": "بنفسجي", + "Please enter a rejection reason": "يرجى إدخال سبب الرفض", + "Jordan": "الأردن", + "Egypt": "مصر", + "Syria": "سوريا", }; diff --git a/siro_service/lib/controller/local/local_controller.dart b/siro_service/lib/controller/local/local_controller.dart index ea0d10c5..362a2f37 100644 --- a/siro_service/lib/controller/local/local_controller.dart +++ b/siro_service/lib/controller/local/local_controller.dart @@ -82,6 +82,7 @@ class LocaleController extends GetxController { } box.write(BoxName.lang, langcode); + language = locale; Get.changeTheme(appTheme); Get.updateLocale(locale); update(); diff --git a/siro_service/lib/controller/mainController/main_controller.dart b/siro_service/lib/controller/mainController/main_controller.dart index f84f2cbb..77b0f2b2 100644 --- a/siro_service/lib/controller/mainController/main_controller.dart +++ b/siro_service/lib/controller/mainController/main_controller.dart @@ -119,18 +119,69 @@ class MainController extends GetxController { // await getDriverData(); } + String _formatPhoneNumberForCommunication(String rawPhone, String country) { + String digits = rawPhone.replaceAll(RegExp(r'[^0-9]'), ''); + if (digits.startsWith('00')) { + digits = digits.substring(2); + } + if (country == 'Jordan') { + if (digits.startsWith('962') && digits.length >= 12) { + return digits; + } + if (digits.startsWith('0')) { + digits = digits.substring(1); + } + if (!digits.startsWith('962')) { + digits = '962$digits'; + } + } else if (country == 'Egypt') { + if (digits.startsWith('20') && digits.length >= 11) { + return digits; + } + if (digits.startsWith('0')) { + digits = digits.substring(1); + } + if (!digits.startsWith('20')) { + digits = '20$digits'; + } + } else if (country == 'Syria') { + if (digits.startsWith('963') && digits.length >= 11) { + return digits; + } + if (digits.startsWith('0')) { + digits = digits.substring(1); + } + if (!digits.startsWith('963')) { + digits = '963$digits'; + } + } else { + if (digits.startsWith('0') && digits.length > 5) { + digits = digits.substring(1); + } + } + return digits; + } + Future makePhoneCall(String phoneNumber) async { + final cleanPhone = phoneNumber.replaceAll(RegExp(r'[^0-9+]'), ''); final Uri launchUri = Uri( scheme: 'tel', - path: phoneNumber, + path: cleanPhone, ); - await launchUrl(launchUri); + if (await canLaunchUrl(launchUri)) { + await launchUrl(launchUri); + } else { + final String telUrl = 'tel:$cleanPhone'; + if (await canLaunchUrl(Uri.parse(telUrl))) { + await launchUrl(Uri.parse(telUrl)); + } + } } Future launchCommunication( String method, String contactInfo, String message) async { - // رقّم فقط (بدون + أو مسافات) - final phone = contactInfo.replaceAll(RegExp(r'[^0-9]'), ''); + final country = box.read('countryCode')?.toString() ?? 'Jordan'; + final phone = _formatPhoneNumberForCommunication(contactInfo, country); final encodedMsg = Uri.encodeComponent(message); Uri? uri; diff --git a/siro_service/lib/controller/mainController/pages/review_driver_page.dart b/siro_service/lib/controller/mainController/pages/review_driver_page.dart index 0a8889c5..f894bd0e 100644 --- a/siro_service/lib/controller/mainController/pages/review_driver_page.dart +++ b/siro_service/lib/controller/mainController/pages/review_driver_page.dart @@ -41,41 +41,43 @@ class ReviewDriverPage extends StatelessWidget { itemCount: keys.length, itemBuilder: (context, index) { final key = keys[index]; - final isSelected = c.currentTabIndex.value == index; - return GestureDetector( - onTap: () => c.currentTabIndex.value = index, - child: Container( - margin: const EdgeInsets.symmetric(horizontal: 3), - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), - decoration: BoxDecoration( - color: isSelected - ? AppColor.primaryColor - : AppColor.primaryLight, - borderRadius: BorderRadius.circular(20), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon( - c.tabIcons[key] ?? Icons.image, - size: 16, - color: isSelected ? Colors.white : AppColor.primaryColor, - ), - const SizedBox(width: 4), - Text( - c.tabLabels[key] ?? key, - style: TextStyle( - fontSize: 11, - fontWeight: - isSelected ? FontWeight.bold : FontWeight.normal, - color: - isSelected ? Colors.white : AppColor.primaryColor, + return Obx(() { + final isSelected = c.currentTabIndex.value == index; + return GestureDetector( + onTap: () => c.currentTabIndex.value = index, + child: Container( + margin: const EdgeInsets.symmetric(horizontal: 3), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), + decoration: BoxDecoration( + color: isSelected + ? AppColor.primaryColor + : AppColor.primaryLight, + borderRadius: BorderRadius.circular(20), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + c.tabIcons[key] ?? Icons.image, + size: 16, + color: isSelected ? Colors.white : AppColor.primaryColor, ), - ), - ], + const SizedBox(width: 4), + Text( + (c.tabLabels[key] ?? key).tr, + style: TextStyle( + fontSize: 11, + fontWeight: + isSelected ? FontWeight.bold : FontWeight.normal, + color: + isSelected ? Colors.white : AppColor.primaryColor, + ), + ), + ], + ), ), - ), - ); + ); + }); }, ), ); @@ -106,8 +108,8 @@ class ReviewDriverPage extends StatelessWidget { const SizedBox(width: 6), Text( c.country.isNotEmpty - ? 'Country: ${c.country}' - : 'Detecting country...', + ? '${'Country'.tr}: ${c.country.tr}' + : 'Detecting country...'.tr, style: TextStyle( fontSize: 13, fontWeight: FontWeight.w600, diff --git a/siro_service/lib/controller/mainController/review_driver_controller.dart b/siro_service/lib/controller/mainController/review_driver_controller.dart index eefbce38..7af6b731 100644 --- a/siro_service/lib/controller/mainController/review_driver_controller.dart +++ b/siro_service/lib/controller/mainController/review_driver_controller.dart @@ -18,7 +18,7 @@ class ReviewDriverController extends GetxController { final Map docUrls = { 'id_front': ''.obs, 'id_back': ''.obs, - 'driver_license': ''.obs, + 'driver_license_front': ''.obs, 'driver_license_back': ''.obs, 'car_license_front': ''.obs, 'car_license_back': ''.obs, @@ -29,7 +29,7 @@ class ReviewDriverController extends GetxController { final Map tabLabels = { 'id_front': 'ID Front', 'id_back': 'ID Back', - 'driver_license': 'Driver License', + 'driver_license_front': 'Driver License', 'driver_license_back': 'License Back', 'car_license_front': 'Car Reg Front', 'car_license_back': 'Car Reg Back', @@ -40,7 +40,7 @@ class ReviewDriverController extends GetxController { final Map tabIcons = { 'id_front': Icons.badge, 'id_back': Icons.badge_outlined, - 'driver_license': Icons.drive_eta, + 'driver_license_front': Icons.drive_eta, 'driver_license_back': Icons.drive_eta_outlined, 'car_license_front': Icons.description, 'car_license_back': Icons.description_outlined, @@ -63,7 +63,7 @@ class ReviewDriverController extends GetxController { ['addressController', 'Address', false, false, false, false], ['maritalStatusController', 'Marital Status', false, false, false, false], ], - 'driver_license': [ + 'driver_license_front': [ ['licenseTypeController', 'License Type', false, false, false, false], ['licenseCategoriesController', 'License Categories', false, false, false, false], ['licenseIssueDateController', 'License Issue Date', true, false, false, false], @@ -71,23 +71,20 @@ class ReviewDriverController extends GetxController { ], 'driver_license_back': [], 'car_license_front': [ + ['makeController', 'Make', false, false, false, false], + ['modelController', 'Model', false, false, false, false], + ['yearController', 'Year', false, false, false, false], ['ownerController', 'Owner Name', false, false, false, false], ['carPlateController', 'Car Plate', false, false, false, false], ['color', 'Car Color', false, false, true, false], ], 'car_license_back': [ - ['makeController', 'Make', false, false, false, false], - ['modelController', 'Model', false, false, false, false], - ['yearController', 'Year', false, false, false, false], ['fuel', 'Fuel Type', false, false, false, true], ['vinController', 'VIN / Chassis', false, false, false, false], ['carLicenseExpiryDateController', 'License Expiry', true, false, false, false], ], 'criminal_record': [], - 'profile_picture': [ - ['phoneController', 'Phone Number', false, false, false, false], - ['emailController', 'Email', false, false, false, false], - ], + 'profile_picture': [], }; List> getFieldsForTab(String tabKey) { diff --git a/siro_service/pubspec.lock b/siro_service/pubspec.lock index 90dc6d3c..b81db1ea 100644 --- a/siro_service/pubspec.lock +++ b/siro_service/pubspec.lock @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" checked_yaml: dependency: transitive description: @@ -764,26 +764,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -804,26 +804,26 @@ packages: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6" url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.18" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.13.0" meta: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -1168,10 +1168,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.9" timezone: dependency: transitive description: @@ -1264,10 +1264,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vibration: dependency: "direct main" description: @@ -1365,5 +1365,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.8.0 <4.0.0" + dart: ">=3.9.0-0 <4.0.0" flutter: ">=3.32.0"