This commit is contained in:
@@ -12,8 +12,10 @@ type GeoNode = {
|
||||
transport_types?: string[]
|
||||
product_uuid?: string
|
||||
product_name?: string
|
||||
product_image_url?: string
|
||||
supplier_uuid?: string
|
||||
supplier_name?: string
|
||||
supplier_logo_url?: string
|
||||
price_per_unit?: string
|
||||
currency?: string
|
||||
quantity?: string
|
||||
@@ -31,6 +33,7 @@ type DemoProduct = {
|
||||
uuid: string
|
||||
name: string
|
||||
unit: string
|
||||
imageUrl: string
|
||||
}
|
||||
|
||||
type DemoSupplier = {
|
||||
@@ -40,6 +43,7 @@ type DemoSupplier = {
|
||||
longitude: number
|
||||
country: string
|
||||
country_code: string
|
||||
logoUrl: string
|
||||
hubKey: string
|
||||
}
|
||||
|
||||
@@ -73,16 +77,19 @@ const products: DemoProduct[] = [
|
||||
uuid: '55555555-1111-4111-8111-111111111111',
|
||||
name: 'Solar panels',
|
||||
unit: 'pallet',
|
||||
imageUrl: 'https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=900&q=80',
|
||||
},
|
||||
{
|
||||
uuid: '55555555-1111-4111-8111-222222222222',
|
||||
name: 'Industrial pumps',
|
||||
unit: 'unit',
|
||||
imageUrl: 'https://images.unsplash.com/photo-1581092160607-ee22621dd758?auto=format&fit=crop&w=900&q=80',
|
||||
},
|
||||
{
|
||||
uuid: '55555555-1111-4111-8111-333333333333',
|
||||
name: 'Soybean meal',
|
||||
unit: 'ton',
|
||||
imageUrl: 'https://images.unsplash.com/photo-1625246333195-78d9c38ad449?auto=format&fit=crop&w=900&q=80',
|
||||
},
|
||||
]
|
||||
|
||||
@@ -152,6 +159,7 @@ const suppliers: DemoSupplier[] = [
|
||||
longitude: 113.3831,
|
||||
country: 'China',
|
||||
country_code: 'CN',
|
||||
logoUrl: 'https://ui-avatars.com/api/?name=Guangzhou+Solar+Factory&background=0B6BFF&color=fff&bold=true',
|
||||
hubKey: 'logistics-demo-hub-1',
|
||||
},
|
||||
{
|
||||
@@ -161,6 +169,7 @@ const suppliers: DemoSupplier[] = [
|
||||
longitude: 114.0579,
|
||||
country: 'China',
|
||||
country_code: 'CN',
|
||||
logoUrl: 'https://ui-avatars.com/api/?name=Shenzhen+Pump+Works&background=9F1239&color=fff&bold=true',
|
||||
hubKey: 'logistics-demo-hub-2',
|
||||
},
|
||||
{
|
||||
@@ -170,6 +179,7 @@ const suppliers: DemoSupplier[] = [
|
||||
longitude: 126.6617,
|
||||
country: 'China',
|
||||
country_code: 'CN',
|
||||
logoUrl: 'https://ui-avatars.com/api/?name=Harbin+Agro+Export&background=0F8A6A&color=fff&bold=true',
|
||||
hubKey: 'logistics-demo-hub-3',
|
||||
},
|
||||
{
|
||||
@@ -179,6 +189,7 @@ const suppliers: DemoSupplier[] = [
|
||||
longitude: 131.8735,
|
||||
country: 'Russia',
|
||||
country_code: 'RU',
|
||||
logoUrl: 'https://ui-avatars.com/api/?name=Vladivostok+Timber+Terminal&background=C45125&color=fff&bold=true',
|
||||
hubKey: 'logistics-demo-hub-4',
|
||||
},
|
||||
]
|
||||
@@ -201,6 +212,7 @@ const supplierNodes: GeoNode[] = suppliers.map(supplier => ({
|
||||
longitude: supplier.longitude,
|
||||
country: supplier.country,
|
||||
country_code: supplier.country_code,
|
||||
supplier_logo_url: supplier.logoUrl,
|
||||
synced_at: now,
|
||||
}))
|
||||
|
||||
@@ -221,8 +233,10 @@ const offers: GeoNode[] = Array.from({ length: 24 }, (_, index) => {
|
||||
country_code: supplier.country_code,
|
||||
product_uuid: product.uuid,
|
||||
product_name: product.name,
|
||||
product_image_url: product.imageUrl,
|
||||
supplier_uuid: supplier.uuid,
|
||||
supplier_name: supplier.name,
|
||||
supplier_logo_url: supplier.logoUrl,
|
||||
price_per_unit: String(900 + (index % 8) * 55),
|
||||
currency: 'USD',
|
||||
quantity: String(500 + index * 25),
|
||||
|
||||
Reference in New Issue
Block a user