Miler rider app: surface system, visible design language, backend lifecycle
Design system - MilerSurface ladder (canvas → working → raised → floating) with MilerPanel as layer 1; canvas moved to #DEE3EA so white separates at 1.290:1. - Visible vocabulary applied across Home, Deliveries, Activity, Account and the sheets: hero heads (tabular numeral + small caption, clamped at 1.3x), canvas wells for anything that opens, small filled tags for shelf labels, demoted placeholders. Recorded in DESIGN_SYSTEM.md §6. - One icon family: 222 Material glyphs migrated to Lucide; none left outside lib/xpress. - Colour semantics corrected: amber only for what is genuinely owed, brand red reserved for the live stop, disabled primaries go neutral rather than pale. Data and lifecycle - lib/data/lifecycle.dart reads mutations for what they prove; route_order.dart makes admin sequence the single ordering authority; service_day.dart, and stop_area.dart rewritten against live Coimbatore addresses (digit-token stripping, city stoplist, street suffixes, stammer collapse). - countLabel states the load once, in bags. Testing - 1440 tests passing; golden shot harnesses for Home, Deliveries, Activity, sheets and verify, with test/failures/ now gitignored (diff debris). - New pins: home_gutter_test, stop_area_test, plus updated structural bounds. Note: this commit also carries pre-existing working-tree deletions that were present before this work (API_SPEC.md, README.md, demo test fixtures). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -169,7 +169,6 @@ class RiderLogController extends GetxController
|
||||
required String latitude,
|
||||
required String longitude,
|
||||
}) async {
|
||||
|
||||
final payload = {
|
||||
"breakid": breakid,
|
||||
"logid": logid,
|
||||
@@ -471,7 +470,6 @@ class RiderLogController extends GetxController
|
||||
payload.remove('lastname');
|
||||
}
|
||||
|
||||
|
||||
await _saveToOfflineQueue('/miler/logs', payload);
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -488,15 +486,6 @@ class RiderLogController extends GetxController
|
||||
final int? userid = prefs.getInt('userId') ?? prefs.getInt('userid');
|
||||
if ((userid ?? 0) == 0) return false;
|
||||
|
||||
// Demo mode: the mocked login flow in auth.dart stores a fake rider id
|
||||
// (9999) that the live backend rejects, so the real updateriderlog call
|
||||
// always fails. Toggle duty locally and report success so the demo
|
||||
// "Slide to Start Duty" works without a real account or server call.
|
||||
if (userid == 9999) {
|
||||
await prefs.setInt('onduty', on ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
final loc = await _ensureLatLng('0', '0');
|
||||
final payload = RiderUpdate(
|
||||
userid: userid,
|
||||
@@ -898,7 +887,6 @@ class RiderLogController extends GetxController
|
||||
final breakdate = _formatDateTimeFull(now); // e.g. 2025-10-16 16:36:16
|
||||
final breakstart = _formatTime(now); // e.g. 16:36:16
|
||||
|
||||
|
||||
// Build payload with all required fields in the exact format the API expects
|
||||
final payload = <String, dynamic>{
|
||||
"breakid": localBreakId,
|
||||
@@ -1074,7 +1062,6 @@ class RiderLogController extends GetxController
|
||||
final iso = _formatDateTimeFull(now);
|
||||
final loginTime = _formatTime(now);
|
||||
|
||||
|
||||
// ✅ Check if there are active pickup to set status
|
||||
final bool hasActivePickups = prefs.getBool('has_live_pickup') ?? false;
|
||||
final String riderStatus = hasActivePickups ? 'active' : 'idle';
|
||||
|
||||
Reference in New Issue
Block a user