المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
33 lines
1.2 KiB
Dart
Executable File
33 lines
1.2 KiB
Dart
Executable File
import '../../constant/box_name.dart';
|
|
import '../../constant/links.dart';
|
|
import '../../main.dart';
|
|
import 'crud.dart';
|
|
|
|
addError1(String error, String details, String where) async {
|
|
try {
|
|
// Get user information for the error log
|
|
final userId = box.read(BoxName.driverID) ?? box.read(BoxName.passengerID);
|
|
final userType =
|
|
box.read(BoxName.driverID) != null ? 'Driver' : 'passenger';
|
|
final phone = box.read(BoxName.phone) ?? box.read(BoxName.phoneDriver);
|
|
|
|
// Send the error data to the server
|
|
// Note: This is a fire-and-forget call. We don't await it or handle its response
|
|
// to prevent an infinite loop if the addError endpoint itself is failing.
|
|
CRUD().post(
|
|
link: AppLink.addError,
|
|
payload: {
|
|
'error': error.toString(),
|
|
'userId': userId.toString(),
|
|
'userType': userType,
|
|
'phone': phone.toString(),
|
|
'device': where, // The location of the error
|
|
'details': details, // The detailed stack trace or context
|
|
},
|
|
);
|
|
} catch (e) {
|
|
// If logging the error itself fails, print to the console to avoid infinite loops.
|
|
print("Failed to log error to server: $e");
|
|
}
|
|
}
|