chore: أرشفة تطبيقات ولوحات تريبز التي سيحلّ محلها كود سيرو
استكمال قرار 2026-07-27 (كوميت fff76c9 أرشف الباك إند):
apps/rider → apps/rider-archive-cubit
apps/driver → apps/driver-archive-cubit
dashboards/admin-web → dashboards/admin-web-archive
dashboards/service-web → dashboards/service-web-archive
إعادة تسمية بلا تعديل محتوى. rider/driver كانا إعادة بناء Cubit مبنية على
عقد NestJS المؤرشف. admin-web و service-web نموذجان بملف HTML واحد (164 و
128 سطراً) — يحلّ محلهما siro_admin و siro_service المكتملان.
يُحمل من المؤرشف ولا يُعاد اكتشافه: عقد map-saas المثبَّت بالتجربة في
apps/rider-archive-cubit/lib/core/api/ (x-api-key ترويسة، reverse مصفوفة،
route في points) ودرس مسار FCM.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
fff76c949f
commit
9909d9b4c1
@@ -0,0 +1,45 @@
|
||||
import '../../../core/api/api_client.dart';
|
||||
import 'models/quote_model.dart';
|
||||
import 'models/stop_model.dart';
|
||||
|
||||
/// استخراج الأسعار لكل فئة رحلة.
|
||||
class TariffRepository {
|
||||
final ApiClient _api;
|
||||
TariffRepository(this._api);
|
||||
|
||||
/// جلب عرض أسعار للمسار المحدد — POST /tariff/quote.
|
||||
///
|
||||
/// الاستجابة تحتوي `classes[]` بسعر لكل فئة مع breakdown.
|
||||
Future<QuoteModel> getQuote({
|
||||
required double pickupLat,
|
||||
required double pickupLng,
|
||||
required String? pickupAddress,
|
||||
required double dropoffLat,
|
||||
required double dropoffLng,
|
||||
required String? dropoffAddress,
|
||||
List<StopModel>? stops,
|
||||
String? vehicleClass,
|
||||
String? scheduledAt,
|
||||
}) async {
|
||||
final data = <String, dynamic>{
|
||||
'pickup': {
|
||||
'lat': pickupLat,
|
||||
'lng': pickupLng,
|
||||
if (pickupAddress != null) 'address': pickupAddress,
|
||||
},
|
||||
'dropoff': {
|
||||
'lat': dropoffLat,
|
||||
'lng': dropoffLng,
|
||||
if (dropoffAddress != null) 'address': dropoffAddress,
|
||||
},
|
||||
};
|
||||
if (stops != null && stops.isNotEmpty) {
|
||||
data['stops'] = stops.nonNulls.map((s) => s.toJson()).toList();
|
||||
}
|
||||
if (vehicleClass != null) data['vehicleClass'] = vehicleClass;
|
||||
if (scheduledAt != null) data['scheduledAt'] = scheduledAt;
|
||||
|
||||
final r = await _api.dio.post('/tariff/quote', data: data);
|
||||
return QuoteModel.fromJson(r.data as Map<String, dynamic>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user