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:
2026-08-22 05:40:35 +05:30
parent c8350563d9
commit d7348e253f
387 changed files with 80693 additions and 12272 deletions

View File

@@ -0,0 +1,205 @@
class ProductDetails {
int? code;
List<Product>? products;
String? message;
Pricedetails? pricedetails;
bool? status;
ProductDetails({
this.code,
this.products,
this.message,
this.pricedetails,
this.status,
});
factory ProductDetails.fromJson(Map<String, dynamic> json) {
return ProductDetails(
code: json['code'] as int?,
products: json['details'] != null
? (json['details'] as List<dynamic>)
.map((v) => Product.fromJson(v as Map<String, dynamic>))
.toList()
: null,
message: json['message'] as String?,
pricedetails: json['pricedetails'] != null
? Pricedetails.fromJson(json['pricedetails'] as Map<String, dynamic>)
: null,
status: json['status'] as bool?,
);
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['code'] = code;
if (products != null) {
data['details'] = products!.map((v) => v.toJson()).toList();
}
data['message'] = message;
if (pricedetails != null) {
data['pricedetails'] = pricedetails!.toJson();
}
data['status'] = status;
return data;
}
}
class Product {
int? orderDetailId;
int? orderHeaderId;
int? tenantId;
int? locationId;
int? productId;
String? productName;
String? productDescription;
int? supplyQty;
int? balanceQty;
int? orderQty;
int? price;
int? unitId;
String? unitName;
int? productAddonId;
int? addonTypeId;
int? productMapId;
int? productVariantId;
String? productAddonDescription;
int? discountId;
String? discountName;
String? discountCode;
String? discountTerms;
int? discountPercentage;
int? discountAmount;
int? landingAmount;
int? taxPercentage;
int? taxAmount;
int? productSumPrice;
String? itemStatus;
String? delivered;
int? orderAmount;
String? productImage;
Product({
this.orderDetailId,
this.orderHeaderId,
this.tenantId,
this.locationId,
this.productId,
this.productName,
this.productDescription,
this.supplyQty,
this.balanceQty,
this.orderQty,
this.price,
this.unitId,
this.unitName,
this.productAddonId,
this.addonTypeId,
this.productMapId,
this.productVariantId,
this.productAddonDescription,
this.discountId,
this.discountName,
this.discountCode,
this.discountTerms,
this.discountPercentage,
this.discountAmount,
this.landingAmount,
this.taxPercentage,
this.taxAmount,
this.productSumPrice,
this.itemStatus,
this.delivered,
this.orderAmount,
this.productImage,
});
factory Product.fromJson(Map<String, dynamic> json) {
return Product(
orderDetailId: json['orderdetailid'] as int?,
orderHeaderId: json['orderheaderid'] as int?,
tenantId: json['tenantid'] as int?,
locationId: json['locationid'] as int?,
productId: json['productid'] as int?,
productName: json['productname'] as String?,
productDescription: json['productdescription'] as String?,
supplyQty: json['supplyqty'] as int?,
balanceQty: json['balanceqty'] as int?,
orderQty: json['orderqty'] as int?,
price: json['price'] as int?,
unitId: json['unitid'] as int?,
unitName: json['unitname'] as String?,
productAddonId: json['productaddonid'] as int?,
addonTypeId: json['addontypeid'] as int?,
productMapId: json['productmapid'] as int?,
productVariantId: json['productvariantid'] as int?,
productAddonDescription: json['productaddondescription'] as String?,
discountId: json['discountid'] as int?,
discountName: json['discountname'] as String?,
discountCode: json['discountcode'] as String?,
discountTerms: json['discountterms'] as String?,
discountPercentage: json['discountpercentage'] as int?,
discountAmount: json['discountamount'] as int?,
landingAmount: json['landingamount'] as int?,
taxPercentage: json['taxpercentage'] as int?,
taxAmount: json['taxamount'] as int?,
productSumPrice: json['productsumprice'] as int?,
itemStatus: json['itemstatus'] as String?,
delivered: json['delivered'] as String?,
orderAmount: json['orderamount'] as int?,
productImage: json['productimage'] as String?,
);
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['orderdetailid'] = orderDetailId;
data['orderheaderid'] = orderHeaderId;
data['tenantid'] = tenantId;
data['locationid'] = locationId;
data['productid'] = productId;
data['productname'] = productName;
data['productdescription'] = productDescription;
data['supplyqty'] = supplyQty;
data['balanceqty'] = balanceQty;
data['orderqty'] = orderQty;
data['price'] = price;
data['unitid'] = unitId;
data['unitname'] = unitName;
data['productaddonid'] = productAddonId;
data['addontypeid'] = addonTypeId;
data['productmapid'] = productMapId;
data['productvariantid'] = productVariantId;
data['productaddondescription'] = productAddonDescription;
data['discountid'] = discountId;
data['discountname'] = discountName;
data['discountcode'] = discountCode;
data['discountterms'] = discountTerms;
data['discountpercentage'] = discountPercentage;
data['discountamount'] = discountAmount;
data['landingamount'] = landingAmount;
data['taxpercentage'] = taxPercentage;
data['taxamount'] = taxAmount;
data['productsumprice'] = productSumPrice;
data['itemstatus'] = itemStatus;
data['delivered'] = delivered;
data['orderamount'] = orderAmount;
data['productimage'] = productImage;
return data;
}
}
class Pricedetails {
int? orderAmount;
Pricedetails({this.orderAmount});
factory Pricedetails.fromJson(Map<String, dynamic> json) {
return Pricedetails(orderAmount: json['orderamount'] as int?);
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['orderamount'] = orderAmount;
return data;
}
}