This commit is contained in:
+107
-62
@@ -71,17 +71,17 @@ const now = new Date().toISOString()
|
|||||||
const products: DemoProduct[] = [
|
const products: DemoProduct[] = [
|
||||||
{
|
{
|
||||||
uuid: '55555555-1111-4111-8111-111111111111',
|
uuid: '55555555-1111-4111-8111-111111111111',
|
||||||
name: 'Copper cathode',
|
name: 'Solar panels',
|
||||||
unit: 'ton',
|
unit: 'pallet',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: '55555555-1111-4111-8111-222222222222',
|
uuid: '55555555-1111-4111-8111-222222222222',
|
||||||
name: 'Aluminum ingot',
|
name: 'Industrial pumps',
|
||||||
unit: 'ton',
|
unit: 'unit',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: '55555555-1111-4111-8111-333333333333',
|
uuid: '55555555-1111-4111-8111-333333333333',
|
||||||
name: 'Wheat',
|
name: 'Soybean meal',
|
||||||
unit: 'ton',
|
unit: 'ton',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -90,34 +90,56 @@ const hubs: DemoHub[] = [
|
|||||||
{
|
{
|
||||||
_key: 'logistics-demo-hub-1',
|
_key: 'logistics-demo-hub-1',
|
||||||
node_type: 'logistics',
|
node_type: 'logistics',
|
||||||
name: 'Demo Almaty Hub',
|
name: 'Guangzhou Rail Terminal',
|
||||||
latitude: 43.238949,
|
latitude: 23.1291,
|
||||||
longitude: 76.889709,
|
longitude: 113.2644,
|
||||||
country: 'Kazakhstan',
|
country: 'China',
|
||||||
country_code: 'KZ',
|
country_code: 'CN',
|
||||||
transport_types: ['AUTO', 'RAIL'],
|
transport_types: ['auto', 'rail'],
|
||||||
synced_at: now,
|
synced_at: now,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
_key: 'logistics-demo-hub-2',
|
_key: 'logistics-demo-hub-2',
|
||||||
node_type: 'logistics',
|
node_type: 'logistics',
|
||||||
name: 'Demo Moscow Hub',
|
name: 'Shenzhen Yantian Port',
|
||||||
latitude: 55.755826,
|
latitude: 22.5942,
|
||||||
longitude: 37.6173,
|
longitude: 114.2743,
|
||||||
country: 'Russia',
|
country: 'China',
|
||||||
country_code: 'RU',
|
country_code: 'CN',
|
||||||
transport_types: ['AUTO', 'RAIL'],
|
transport_types: ['auto', 'sea'],
|
||||||
synced_at: now,
|
synced_at: now,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
_key: 'logistics-demo-hub-3',
|
_key: 'logistics-demo-hub-3',
|
||||||
node_type: 'logistics',
|
node_type: 'logistics',
|
||||||
name: 'Demo Urumqi Hub',
|
name: 'Harbin Rail Hub',
|
||||||
latitude: 43.825592,
|
latitude: 45.8038,
|
||||||
longitude: 87.616848,
|
longitude: 126.5349,
|
||||||
country: 'China',
|
country: 'China',
|
||||||
country_code: 'CN',
|
country_code: 'CN',
|
||||||
transport_types: ['AUTO', 'RAIL'],
|
transport_types: ['auto', 'rail'],
|
||||||
|
synced_at: now,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_key: 'logistics-demo-hub-4',
|
||||||
|
node_type: 'logistics',
|
||||||
|
name: 'Vladivostok Commercial Port',
|
||||||
|
latitude: 43.1155,
|
||||||
|
longitude: 131.8855,
|
||||||
|
country: 'Russia',
|
||||||
|
country_code: 'RU',
|
||||||
|
transport_types: ['sea', 'rail'],
|
||||||
|
synced_at: now,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_key: 'logistics-demo-hub-5',
|
||||||
|
node_type: 'logistics',
|
||||||
|
name: 'Moscow Rail Hub',
|
||||||
|
latitude: 55.7558,
|
||||||
|
longitude: 37.6173,
|
||||||
|
country: 'Russia',
|
||||||
|
country_code: 'RU',
|
||||||
|
transport_types: ['auto', 'rail'],
|
||||||
synced_at: now,
|
synced_at: now,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -125,30 +147,39 @@ const hubs: DemoHub[] = [
|
|||||||
const suppliers: DemoSupplier[] = [
|
const suppliers: DemoSupplier[] = [
|
||||||
{
|
{
|
||||||
uuid: '66666666-2222-4111-8111-111111111111',
|
uuid: '66666666-2222-4111-8111-111111111111',
|
||||||
name: 'Demo Supplier Almaty',
|
name: 'Guangzhou Solar Factory',
|
||||||
latitude: 43.25667,
|
latitude: 23.0462,
|
||||||
longitude: 76.92861,
|
longitude: 113.3831,
|
||||||
country: 'Kazakhstan',
|
country: 'China',
|
||||||
country_code: 'KZ',
|
country_code: 'CN',
|
||||||
hubKey: 'logistics-demo-hub-1',
|
hubKey: 'logistics-demo-hub-1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: '66666666-2222-4111-8111-222222222222',
|
uuid: '66666666-2222-4111-8111-222222222222',
|
||||||
name: 'Demo Supplier Urumqi',
|
name: 'Shenzhen Pump Works',
|
||||||
latitude: 43.825592,
|
latitude: 22.5431,
|
||||||
longitude: 87.616848,
|
longitude: 114.0579,
|
||||||
|
country: 'China',
|
||||||
|
country_code: 'CN',
|
||||||
|
hubKey: 'logistics-demo-hub-2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
uuid: '66666666-2222-4111-8111-333333333333',
|
||||||
|
name: 'Harbin Agro Export',
|
||||||
|
latitude: 45.7424,
|
||||||
|
longitude: 126.6617,
|
||||||
country: 'China',
|
country: 'China',
|
||||||
country_code: 'CN',
|
country_code: 'CN',
|
||||||
hubKey: 'logistics-demo-hub-3',
|
hubKey: 'logistics-demo-hub-3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: '66666666-2222-4111-8111-333333333333',
|
uuid: '66666666-2222-4111-8111-444444444444',
|
||||||
name: 'Demo Supplier Moscow',
|
name: 'Vladivostok Timber Terminal',
|
||||||
latitude: 55.755826,
|
latitude: 43.1056,
|
||||||
longitude: 37.6173,
|
longitude: 131.8735,
|
||||||
country: 'Russia',
|
country: 'Russia',
|
||||||
country_code: 'RU',
|
country_code: 'RU',
|
||||||
hubKey: 'logistics-demo-hub-2',
|
hubKey: 'logistics-demo-hub-4',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -205,46 +236,60 @@ for (const node of [...hubs, ...offers, ...supplierNodes]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hubLinks = [
|
const hubLinks = [
|
||||||
{
|
|
||||||
from: 'logistics-demo-hub-1',
|
|
||||||
to: 'logistics-demo-hub-2',
|
|
||||||
distanceKm: 3950,
|
|
||||||
travelTimeSeconds: 864000,
|
|
||||||
transportType: 'rail',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
from: 'logistics-demo-hub-2',
|
|
||||||
to: 'logistics-demo-hub-1',
|
|
||||||
distanceKm: 3950,
|
|
||||||
travelTimeSeconds: 864000,
|
|
||||||
transportType: 'rail',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
from: 'logistics-demo-hub-1',
|
from: 'logistics-demo-hub-1',
|
||||||
to: 'logistics-demo-hub-3',
|
to: 'logistics-demo-hub-3',
|
||||||
distanceKm: 1050,
|
distanceKm: 3280,
|
||||||
travelTimeSeconds: 172800,
|
travelTimeSeconds: 691200,
|
||||||
transportType: 'auto',
|
transportType: 'rail',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
from: 'logistics-demo-hub-3',
|
from: 'logistics-demo-hub-3',
|
||||||
to: 'logistics-demo-hub-1',
|
to: 'logistics-demo-hub-1',
|
||||||
distanceKm: 1050,
|
distanceKm: 3280,
|
||||||
travelTimeSeconds: 172800,
|
travelTimeSeconds: 691200,
|
||||||
transportType: 'auto',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
from: 'logistics-demo-hub-3',
|
|
||||||
to: 'logistics-demo-hub-2',
|
|
||||||
distanceKm: 4650,
|
|
||||||
travelTimeSeconds: 950400,
|
|
||||||
transportType: 'rail',
|
transportType: 'rail',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
from: 'logistics-demo-hub-2',
|
from: 'logistics-demo-hub-2',
|
||||||
|
to: 'logistics-demo-hub-4',
|
||||||
|
distanceKm: 2850,
|
||||||
|
travelTimeSeconds: 432000,
|
||||||
|
transportType: 'sea',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: 'logistics-demo-hub-4',
|
||||||
|
to: 'logistics-demo-hub-2',
|
||||||
|
distanceKm: 2850,
|
||||||
|
travelTimeSeconds: 432000,
|
||||||
|
transportType: 'sea',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: 'logistics-demo-hub-3',
|
||||||
|
to: 'logistics-demo-hub-4',
|
||||||
|
distanceKm: 650,
|
||||||
|
travelTimeSeconds: 129600,
|
||||||
|
transportType: 'rail',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: 'logistics-demo-hub-4',
|
||||||
to: 'logistics-demo-hub-3',
|
to: 'logistics-demo-hub-3',
|
||||||
distanceKm: 4650,
|
distanceKm: 650,
|
||||||
travelTimeSeconds: 950400,
|
travelTimeSeconds: 129600,
|
||||||
|
transportType: 'rail',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: 'logistics-demo-hub-4',
|
||||||
|
to: 'logistics-demo-hub-5',
|
||||||
|
distanceKm: 9250,
|
||||||
|
travelTimeSeconds: 1036800,
|
||||||
|
transportType: 'rail',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: 'logistics-demo-hub-5',
|
||||||
|
to: 'logistics-demo-hub-4',
|
||||||
|
distanceKm: 9250,
|
||||||
|
travelTimeSeconds: 1036800,
|
||||||
transportType: 'rail',
|
transportType: 'rail',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user