list orders
This commit is contained in:
@@ -233,7 +233,19 @@ class ApiConstants {
|
||||
/// Returns: { "message": { "file_url": "...", "file_name": "...", ... } }
|
||||
static const String uploadFile = '/upload_file';
|
||||
|
||||
/// Get user's orders
|
||||
/// Get list of orders (requires sid and csrf_token)
|
||||
/// POST /api/method/building_material.building_material.api.sales_order.get_list
|
||||
/// Body: { "limit_start": 0, "limit_page_length": 0 }
|
||||
/// Returns: { "message": [...] }
|
||||
static const String getOrdersList = '/building_material.building_material.api.sales_order.get_list';
|
||||
|
||||
/// Get order details (requires sid and csrf_token)
|
||||
/// POST /api/method/building_material.building_material.api.sales_order.get_detail
|
||||
/// Body: { "name": "SAL-ORD-2025-00058-1" }
|
||||
/// Returns: { "message": {...} }
|
||||
static const String getOrderDetail = '/building_material.building_material.api.sales_order.get_detail';
|
||||
|
||||
/// Get user's orders (legacy endpoint - may be deprecated)
|
||||
/// GET /orders?status={status}&page={page}&limit={limit}
|
||||
static const String getOrders = '/orders';
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@ class HiveBoxNames {
|
||||
static const String cityBox = 'city_box';
|
||||
static const String wardBox = 'ward_box';
|
||||
|
||||
/// Order status list cache
|
||||
static const String orderStatusBox = 'order_status_box';
|
||||
|
||||
/// Get all box names for initialization
|
||||
static List<String> get allBoxes => [
|
||||
userBox,
|
||||
@@ -73,6 +76,7 @@ class HiveBoxNames {
|
||||
rewardsBox,
|
||||
cityBox,
|
||||
wardBox,
|
||||
orderStatusBox,
|
||||
settingsBox,
|
||||
cacheBox,
|
||||
syncStateBox,
|
||||
@@ -134,8 +138,9 @@ class HiveTypeIds {
|
||||
static const int addressModel = 30;
|
||||
static const int cityModel = 31;
|
||||
static const int wardModel = 32;
|
||||
static const int orderStatusModel = 62;
|
||||
|
||||
// Enums (33-62)
|
||||
// Enums (33-61)
|
||||
static const int userRole = 33;
|
||||
static const int userStatus = 34;
|
||||
static const int loyaltyTier = 35;
|
||||
|
||||
Reference in New Issue
Block a user