Compare commits

...

17 Commits

Author SHA1 Message Date
Ruslan Bakiev
fbcfc6caf8 refactor(hub): use CatalogPage component for split layout
All checks were successful
Build Docker Image / build (push) Successful in 4m19s
2026-01-09 01:33:03 +07:00
Ruslan Bakiev
cd2c8afff1 refactor(hub): replace sections with sources list and map
All checks were successful
Build Docker Image / build (push) Successful in 4m45s
- Remove Offers, Suppliers, Products, NearbyConnections sections
- Add product filter dropdown
- Show sources list with routes from findProductRoutes API
- Display routes on map using RequestRoutesMap component
- Add i18n keys for sources section (en/ru)
2026-01-09 01:08:56 +07:00
Ruslan Bakiev
01e8eb2cfa fix: separate list items from map points in orders page
All checks were successful
Build Docker Image / build (push) Successful in 4m58s
- Add mapItems prop to CatalogPage for separate map data
- List shows one card per order, map shows source+dest points
- Fix hover to match by orderUuid pattern
2026-01-08 14:52:58 +07:00
Ruslan Bakiev
75ef38c8b2 feat: show source and destination points on orders map
All checks were successful
Build Docker Image / build (push) Successful in 5m18s
Use coordinates from stages to display both origin and destination
2026-01-08 14:35:59 +07:00
Ruslan Bakiev
13f60bd022 feat: show transport type on routes + unify map height
All checks were successful
Build Docker Image / build (push) Successful in 4m33s
- Add transportType display (🚂 ЖД / 🚛 Авто) in RouteStagesList
- Pass transportType from CalcResultContent to RouteStagesList
- Unify map height in CatalogPage for orders/addresses pages
2026-01-08 14:22:37 +07:00
Ruslan Bakiev
821dd72809 fix(ui): hide SubNavigation on home page, reorder sections, remove description
All checks were successful
Build Docker Image / build (push) Successful in 4m9s
2026-01-08 14:01:18 +07:00
Ruslan Bakiev
6b2208f0ae Add KYC translations, AI button, improve chat, swap homepage sections
Some checks failed
Build Docker Image / build (push) Has been cancelled
- Add missing kycOverview.list translations (en + ru)
- Add AI assistant button to navigation (left of globe)
- Improve AI chat layout: fixed textarea at bottom, full width
- Swap homepage sections: How it works before Who it's for
2026-01-08 13:58:09 +07:00
Ruslan Bakiev
34c7404a42 Refactor navigation and fix UI issues
All checks were successful
Build Docker Image / build (push) Successful in 4m13s
- Add py-4 to main layout for detail page padding
- Show search widget only on main page (not all catalog pages)
- Add 4 menu items: Search, Catalog, Orders, Seller
- Fix orders page click to navigate to order detail
- Update CatalogPage map positioning for new nav structure
- Add search translation to cabinetNav i18n files
2026-01-08 13:26:23 +07:00
Ruslan Bakiev
f3e0260325 Fix search widget destination field not passing mode=search
All checks were successful
Build Docker Image / build (push) Successful in 4m1s
When clicking destination in GlobalSearchBar, now passes ?mode=search
to /select-location so the selection gets saved to searchStore
2026-01-08 13:18:05 +07:00
Ruslan Bakiev
675ccc2064 Add hasSubNav prop for map positioning (3 vs 2 nav levels)
All checks were successful
Build Docker Image / build (push) Successful in 3m58s
2026-01-08 13:11:13 +07:00
Ruslan Bakiev
53904ead05 Fix: offers map coords, map position, orders filter, select-location layout
All checks were successful
Build Docker Image / build (push) Successful in 3m38s
2026-01-08 13:01:54 +07:00
Ruslan Bakiev
8d1b7c6dc7 Unify CatalogPage: fixed map, hover support, delete ListMapLayout
All checks were successful
Build Docker Image / build (push) Successful in 4m31s
2026-01-08 11:15:54 +07:00
Ruslan Bakiev
4057bce4be Update generated GraphQL types
All checks were successful
Build Docker Image / build (push) Successful in 3m58s
2026-01-08 10:56:35 +07:00
Ruslan Bakiev
d6865d2129 UI improvements: filters, map layout, search bar
Some checks failed
Build Docker Image / build (push) Failing after 1m29s
- Add hubCountries query and country filter for hubs page
- Add getAvailableProducts query for offers (only products with active offers)
- Add sourceLatitude/sourceLongitude to orders GraphQL
- Fix ListMapLayout with position fixed for proper map height
- GlobalSearchBar: make fields wider, remove unit selector
- Remove status/isVerified filters from suppliers/offers (backend handles this)
2026-01-08 10:42:59 +07:00
Ruslan Bakiev
0c88cf383c Refactor catalog filters: remove badges, use select dropdowns
All checks were successful
Build Docker Image / build (push) Successful in 4m21s
- Remove filter from suppliers page (not needed)
- Offers: show all active offers directly, add product type filter as select
- Hubs: change filter from pills to select dropdown
- Create CatalogFilterSelect component for dropdown filters
- Update useCatalogOffers to always filter active, use product filter
2026-01-08 10:08:05 +07:00
Ruslan Bakiev
e629025899 Fix UI issues: 3 columns, SubNav label, back button, sticky map, hover flyTo
All checks were successful
Build Docker Image / build (push) Successful in 4m14s
- Homepage roles section now shows 3 columns on medium screens
- SubNavigation catalog offers label changed to "Предложения"
- Removed back button from catalog/offers page
- ListMapLayout: sticky map with full height
- ListMapLayout: hover on card flies to location on map
2026-01-08 10:00:59 +07:00
Ruslan Bakiev
1a0305011f Migrate orders and addresses to split layout
All checks were successful
Build Docker Image / build (push) Successful in 4m20s
- Use ListMapLayout for two-column list+map view
- Orders: show source locations on map
- Addresses: show address locations on map
- Remove preview map links (map is now inline)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 09:48:23 +07:00
43 changed files with 812 additions and 880 deletions

View File

@@ -221,7 +221,8 @@ const mapRouteStages = (route: RoutePathType): RouteStageItem[] => {
from: stage?.fromName || 'Начало', from: stage?.fromName || 'Начало',
to: stage?.toName || 'Конец', to: stage?.toName || 'Конец',
distanceKm: stage?.distanceKm, distanceKm: stage?.distanceKm,
durationSeconds: stage?.travelTimeSeconds durationSeconds: stage?.travelTimeSeconds,
transportType: stage?.transportType
})) }))
} }

View File

@@ -22,8 +22,13 @@
</div> </div>
</div> </div>
<div v-if="stage.distanceKm" class="text-sm text-base-content/70 shrink-0"> <div class="flex items-center gap-2 shrink-0">
<span>{{ formatDistance(stage.distanceKm) }} км</span> <span v-if="stage.transportType" class="badge badge-sm badge-outline">
{{ stage.transportType === 'rail' ? '🚂 ЖД' : '🚛 Авто' }}
</span>
<span v-if="stage.distanceKm" class="text-sm text-base-content/70">
{{ formatDistance(stage.distanceKm) }} км
</span>
</div> </div>
</div> </div>
</div> </div>
@@ -40,6 +45,7 @@ export type RouteStageItem = {
label?: string | null label?: string | null
distanceKm?: number | null distanceKm?: number | null
durationSeconds?: number | null durationSeconds?: number | null
transportType?: string | null
meta?: string[] meta?: string[]
} }

View File

@@ -0,0 +1,31 @@
<template>
<select
:value="modelValue"
class="select select-bordered select-sm w-full max-w-xs"
@change="$emit('update:modelValue', ($event.target as HTMLSelectElement).value)"
>
<option
v-for="filter in filters"
:key="filter.id"
:value="filter.id"
>
{{ filter.label }}
</option>
</select>
</template>
<script setup lang="ts">
interface Filter {
id: string
label: string
}
defineProps<{
filters: Filter[]
modelValue: string
}>()
defineEmits<{
'update:modelValue': [value: string]
}>()
</script>

View File

@@ -1,141 +0,0 @@
<template>
<div class="flex flex-col flex-1 min-h-0">
<!-- Desktop: side-by-side layout -->
<div class="hidden lg:flex flex-1 gap-4 min-h-0">
<!-- Left side: List (scrollable) -->
<div class="w-2/5 overflow-y-auto pr-2">
<slot name="list" />
</div>
<!-- Right side: Map (sticky) -->
<div class="w-3/5 rounded-lg overflow-hidden">
<ClientOnly>
<CatalogMap
ref="mapRef"
:map-id="mapId"
:items="itemsWithCoords"
:point-color="pointColor"
@select-item="onMapSelectItem"
/>
</ClientOnly>
</div>
</div>
<!-- Mobile: toggle between list and map -->
<div class="lg:hidden flex-1 flex flex-col min-h-0">
<!-- Content area -->
<div class="flex-1 overflow-y-auto" v-show="mobileView === 'list'">
<slot name="list" />
</div>
<div class="flex-1" v-show="mobileView === 'map'">
<ClientOnly>
<CatalogMap
ref="mobileMapRef"
:map-id="`${mapId}-mobile`"
:items="itemsWithCoords"
:point-color="pointColor"
@select-item="onMapSelectItem"
/>
</ClientOnly>
</div>
<!-- Mobile toggle buttons -->
<div class="fixed bottom-4 left-1/2 -translate-x-1/2 z-30">
<div class="btn-group shadow-lg">
<button
class="btn btn-sm"
:class="{ 'btn-active': mobileView === 'list' }"
@click="mobileView = 'list'"
>
{{ $t('common.list') }}
</button>
<button
class="btn btn-sm"
:class="{ 'btn-active': mobileView === 'map' }"
@click="mobileView = 'map'"
>
{{ $t('common.map') }}
</button>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
interface MapItem {
uuid: string
latitude?: number | null
longitude?: number | null
name?: string
country?: string
[key: string]: any
}
const props = withDefaults(defineProps<{
items: MapItem[]
selectedItemId?: string
mapId: string
pointColor?: string
}>(), {
pointColor: '#3b82f6'
})
const emit = defineEmits<{
'select-item': [uuid: string]
'update:selectedItemId': [uuid: string]
}>()
// Filter items with valid coordinates
const itemsWithCoords = computed(() =>
props.items.filter(item =>
item.latitude != null &&
item.longitude != null &&
!isNaN(Number(item.latitude)) &&
!isNaN(Number(item.longitude))
).map(item => ({
uuid: item.uuid,
name: item.name || '',
latitude: Number(item.latitude),
longitude: Number(item.longitude),
country: item.country
}))
)
// Mobile view toggle
const mobileView = ref<'list' | 'map'>('list')
// Map refs
const mapRef = ref<{ flyTo: (lat: number, lng: number, zoom?: number) => void } | null>(null)
const mobileMapRef = ref<{ flyTo: (lat: number, lng: number, zoom?: number) => void } | null>(null)
// Handle map item selection
const onMapSelectItem = (uuid: string) => {
emit('select-item', uuid)
emit('update:selectedItemId', uuid)
}
// Fly to a specific item
const flyTo = (lat: number, lng: number, zoom = 8) => {
mapRef.value?.flyTo(lat, lng, zoom)
mobileMapRef.value?.flyTo(lat, lng, zoom)
}
// Fly to item by uuid
const flyToItem = (uuid: string) => {
const item = itemsWithCoords.value.find(i => i.uuid === uuid)
if (item) {
flyTo(item.latitude, item.longitude, 8)
}
}
// Watch selectedItemId and fly to it
watch(() => props.selectedItemId, (uuid) => {
if (uuid) {
flyToItem(uuid)
}
})
// Expose methods for parent components
defineExpose({ flyTo, flyToItem })
</script>

View File

@@ -21,8 +21,13 @@
</NuxtLink> </NuxtLink>
</nav> </nav>
<!-- Right: Globe + Team + User --> <!-- Right: AI + Globe + Team + User -->
<div class="flex items-center gap-2 ml-auto"> <div class="flex items-center gap-2 ml-auto">
<!-- AI Assistant button -->
<NuxtLink :to="localePath('/clientarea/ai')" class="btn btn-ghost btn-circle">
<Icon name="lucide:bot" size="20" />
</NuxtLink>
<!-- Globe (language/currency) dropdown --> <!-- Globe (language/currency) dropdown -->
<div class="dropdown dropdown-end"> <div class="dropdown dropdown-end">
<button tabindex="0" class="btn btn-ghost btn-circle"> <button tabindex="0" class="btn btn-ghost btn-circle">
@@ -171,6 +176,7 @@ const route = useRoute()
const { t } = useI18n() const { t } = useI18n()
const tabs = computed(() => [ const tabs = computed(() => [
{ key: 'search', label: t('cabinetNav.search'), path: '/', auth: false },
{ key: 'catalog', label: t('cabinetNav.catalog'), path: '/catalog/offers', auth: false }, { key: 'catalog', label: t('cabinetNav.catalog'), path: '/catalog/offers', auth: false },
{ key: 'orders', label: t('cabinetNav.orders'), path: '/clientarea/orders', auth: true }, { key: 'orders', label: t('cabinetNav.orders'), path: '/clientarea/orders', auth: true },
{ key: 'seller', label: t('cabinetNav.seller'), path: '/clientarea/offers', auth: true, seller: true }, { key: 'seller', label: t('cabinetNav.seller'), path: '/clientarea/offers', auth: true, seller: true },
@@ -186,7 +192,8 @@ const visibleTabs = computed(() => {
const isActiveTab = (key: string) => { const isActiveTab = (key: string) => {
const path = route.path const path = route.path
if (key === 'catalog') return path.startsWith('/catalog') || path === '/' if (key === 'search') return path === '/' || path === '/en' || path === '/ru'
if (key === 'catalog') return path.startsWith('/catalog') || path.includes('/en/catalog') || path.includes('/ru/catalog')
if (key === 'orders') return path.includes('/clientarea/orders') || path.includes('/clientarea/addresses') || path.includes('/clientarea/billing') if (key === 'orders') return path.includes('/clientarea/orders') || path.includes('/clientarea/addresses') || path.includes('/clientarea/billing')
if (key === 'seller') return path.includes('/clientarea/offers') if (key === 'seller') return path.includes('/clientarea/offers')
return false return false

View File

@@ -25,7 +25,7 @@ const { t } = useI18n()
const sectionItems = computed(() => ({ const sectionItems = computed(() => ({
catalog: [ catalog: [
{ label: t('cabinetNav.offers'), path: '/catalog/offers' }, { label: 'Предложения', path: '/catalog/offers' },
{ label: t('cabinetNav.suppliers'), path: '/catalog/suppliers' }, { label: t('cabinetNav.suppliers'), path: '/catalog/suppliers' },
{ label: t('cabinetNav.hubs'), path: '/catalog/hubs' }, { label: t('cabinetNav.hubs'), path: '/catalog/hubs' },
], ],

View File

@@ -19,6 +19,7 @@
<!-- Left: List (scrollable) --> <!-- Left: List (scrollable) -->
<div class="w-2/5 overflow-y-auto pr-2"> <div class="w-2/5 overflow-y-auto pr-2">
<Stack gap="4"> <Stack gap="4">
<slot name="header" />
<slot name="filters" /> <slot name="filters" />
<Stack gap="3"> <Stack gap="3">
@@ -27,6 +28,8 @@
:key="item.uuid" :key="item.uuid"
:class="{ 'ring-2 ring-primary rounded-lg': item.uuid === selectedId }" :class="{ 'ring-2 ring-primary rounded-lg': item.uuid === selectedId }"
@click="onItemClick(item)" @click="onItemClick(item)"
@mouseenter="emit('update:hoveredId', item.uuid)"
@mouseleave="emit('update:hoveredId', undefined)"
> >
<slot name="card" :item="item" /> <slot name="card" :item="item" />
</div> </div>
@@ -42,17 +45,19 @@
</Stack> </Stack>
</div> </div>
<!-- Right: Map --> <!-- Right: Map (fixed position) -->
<div class="w-3/5 rounded-lg overflow-hidden"> <div class="w-3/5 relative">
<ClientOnly> <div class="fixed right-6 w-[calc(60%-3rem)] rounded-lg overflow-hidden" :class="[mapTopClass, mapHeightClass]">
<CatalogMap <ClientOnly>
ref="mapRef" <CatalogMap
:map-id="mapId" ref="mapRef"
:items="itemsWithCoords" :map-id="mapId"
:point-color="pointColor" :items="itemsWithCoords"
@select-item="onMapSelect" :point-color="pointColor"
/> @select-item="onMapSelect"
</ClientOnly> />
</ClientOnly>
</div>
</div> </div>
</div> </div>
@@ -60,6 +65,7 @@
<div class="lg:hidden flex-1 flex flex-col min-h-0"> <div class="lg:hidden flex-1 flex flex-col min-h-0">
<div class="flex-1 overflow-y-auto py-4" v-show="mobileView === 'list'"> <div class="flex-1 overflow-y-auto py-4" v-show="mobileView === 'list'">
<Stack gap="4"> <Stack gap="4">
<slot name="header" />
<slot name="filters" /> <slot name="filters" />
<Stack gap="3"> <Stack gap="3">
@@ -68,6 +74,8 @@
:key="item.uuid" :key="item.uuid"
:class="{ 'ring-2 ring-primary rounded-lg': item.uuid === selectedId }" :class="{ 'ring-2 ring-primary rounded-lg': item.uuid === selectedId }"
@click="onItemClick(item)" @click="onItemClick(item)"
@mouseenter="emit('update:hoveredId', item.uuid)"
@mouseleave="emit('update:hoveredId', undefined)"
> >
<slot name="card" :item="item" /> <slot name="card" :item="item" />
</div> </div>
@@ -120,6 +128,7 @@
<!-- Without Map: Simple List --> <!-- Without Map: Simple List -->
<div v-else class="flex-1 overflow-y-auto py-4"> <div v-else class="flex-1 overflow-y-auto py-4">
<Stack gap="4"> <Stack gap="4">
<slot name="header" />
<slot name="filters" /> <slot name="filters" />
<Stack gap="3"> <Stack gap="3">
@@ -157,26 +166,38 @@ interface MapItem {
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
items: MapItem[] items: MapItem[]
mapItems?: MapItem[] // Optional separate items for map (if different from list items)
loading?: boolean loading?: boolean
withMap?: boolean withMap?: boolean
mapId?: string mapId?: string
pointColor?: string pointColor?: string
selectedId?: string selectedId?: string
hoveredId?: string
hasSubNav?: boolean
}>(), { }>(), {
loading: false, loading: false,
withMap: true, withMap: true,
mapId: 'catalog-map', mapId: 'catalog-map',
pointColor: '#3b82f6' pointColor: '#3b82f6',
hasSubNav: true
}) })
// Map positioning - unified height for all pages with map
const mapTopClass = 'top-32'
const mapHeightClass = 'h-[calc(100vh-9rem)]'
const emit = defineEmits<{ const emit = defineEmits<{
'select': [item: MapItem] 'select': [item: MapItem]
'update:selectedId': [uuid: string] 'update:selectedId': [uuid: string]
'update:hoveredId': [uuid: string | undefined]
}>() }>()
// Use mapItems if provided, otherwise fall back to items
const itemsForMap = computed(() => props.mapItems || props.items)
// Filter items with valid coordinates for map // Filter items with valid coordinates for map
const itemsWithCoords = computed(() => const itemsWithCoords = computed(() =>
props.items.filter(item => itemsForMap.value.filter(item =>
item.latitude != null && item.latitude != null &&
item.longitude != null && item.longitude != null &&
!isNaN(Number(item.latitude)) && !isNaN(Number(item.latitude)) &&
@@ -186,7 +207,8 @@ const itemsWithCoords = computed(() =>
name: item.name || '', name: item.name || '',
latitude: Number(item.latitude), latitude: Number(item.latitude),
longitude: Number(item.longitude), longitude: Number(item.longitude),
country: item.country country: item.country,
orderUuid: item.orderUuid // Preserve orderUuid for hover matching
})) }))
) )
@@ -229,6 +251,22 @@ watch(() => props.selectedId, (uuid) => {
} }
}) })
// Watch hoveredId and fly to it
watch(() => props.hoveredId, (uuid) => {
if (uuid && props.withMap) {
// Try direct match first
let item = itemsWithCoords.value.find(i => i.uuid === uuid)
// If not found, try matching by orderUuid (for mapItems with separate source/dest points)
if (!item) {
item = itemsWithCoords.value.find(i => i.uuid === `${uuid}-source` || (i as any).orderUuid === uuid)
}
if (item) {
mapRef.value?.flyTo(item.latitude, item.longitude, 8)
mobileMapRef.value?.flyTo(item.latitude, item.longitude, 8)
}
}
})
// Expose flyTo for external use // Expose flyTo for external use
const flyTo = (lat: number, lng: number, zoom = 8) => { const flyTo = (lat: number, lng: number, zoom = 8) => {
mapRef.value?.flyTo(lat, lng, zoom) mapRef.value?.flyTo(lat, lng, zoom)

View File

@@ -7,7 +7,7 @@
> >
<!-- Product field (clickable, navigates to /goods) --> <!-- Product field (clickable, navigates to /goods) -->
<div <div
class="flex flex-col px-4 py-2 min-w-32 pl-6 rounded-l-full hover:bg-base-200/50 border-r border-base-300 cursor-pointer" class="flex flex-col px-4 py-2 min-w-48 pl-6 rounded-l-full hover:bg-base-200/50 border-r border-base-300 cursor-pointer"
@click="goToProductSelection" @click="goToProductSelection"
> >
<label class="text-xs font-semibold text-base-content/60 mb-0.5"> <label class="text-xs font-semibold text-base-content/60 mb-0.5">
@@ -19,29 +19,23 @@
</div> </div>
<!-- Quantity field (editable) --> <!-- Quantity field (editable) -->
<div class="flex flex-col px-4 py-2 min-w-32 hover:bg-base-200/50 border-r border-base-300"> <div class="flex flex-col px-4 py-2 min-w-48 hover:bg-base-200/50 border-r border-base-300">
<label class="text-xs font-semibold text-base-content/60 mb-0.5"> <label class="text-xs font-semibold text-base-content/60 mb-0.5">
{{ $t('search.quantity') }} {{ $t('search.quantity') }}
</label> </label>
<div class="flex items-center gap-1"> <input
<input v-model="quantity"
v-model="quantity" type="number"
type="number" min="1"
min="1" :placeholder="$t('search.quantity_placeholder')"
:placeholder="$t('search.quantity_placeholder')" class="w-full bg-transparent outline-none text-sm"
class="w-16 bg-transparent outline-none text-sm" @change="syncQuantityToStore"
@change="syncQuantityToStore" />
/>
<select v-model="unit" class="bg-transparent outline-none text-sm text-base-content/70" @change="syncQuantityToStore">
<option value="t">{{ $t('units.t') }}</option>
<option value="kg">{{ $t('units.kg') }}</option>
</select>
</div>
</div> </div>
<!-- Destination field (clickable, navigates to /select-location) --> <!-- Destination field (clickable, navigates to /select-location) -->
<div <div
class="flex flex-col px-4 py-2 min-w-32 hover:bg-base-200/50 cursor-pointer" class="flex flex-col px-4 py-2 min-w-48 hover:bg-base-200/50 cursor-pointer"
@click="goToLocationSelection" @click="goToLocationSelection"
> >
<label class="text-xs font-semibold text-base-content/60 mb-0.5"> <label class="text-xs font-semibold text-base-content/60 mb-0.5">
@@ -67,7 +61,7 @@
<script setup lang="ts"> <script setup lang="ts">
const emit = defineEmits<{ const emit = defineEmits<{
search: [params: { productUuid?: string; quantity?: number; unit?: string; locationUuid?: string }] search: [params: { productUuid?: string; quantity?: number; locationUuid?: string }]
}>() }>()
const router = useRouter() const router = useRouter()
@@ -84,13 +78,11 @@ const locationUuid = computed(() => searchStore.searchForm.locationUuid || '')
const quantity = ref<number | undefined>( const quantity = ref<number | undefined>(
searchStore.searchForm.quantity ? Number(searchStore.searchForm.quantity) : undefined searchStore.searchForm.quantity ? Number(searchStore.searchForm.quantity) : undefined
) )
const unit = ref(searchStore.searchForm.unit || 't')
const syncQuantityToStore = () => { const syncQuantityToStore = () => {
if (quantity.value) { if (quantity.value) {
searchStore.setQuantity(String(quantity.value)) searchStore.setQuantity(String(quantity.value))
} }
searchStore.setUnit(unit.value)
} }
// Navigation to selection pages // Navigation to selection pages
@@ -99,7 +91,7 @@ const goToProductSelection = () => {
} }
const goToLocationSelection = () => { const goToLocationSelection = () => {
navigateTo(localePath('/select-location')) navigateTo(localePath('/select-location') + '?mode=search')
} }
// Can search - need at least product selected // Can search - need at least product selected
@@ -135,7 +127,6 @@ const handleSearch = () => {
emit('search', { emit('search', {
productUuid: productUuid.value, productUuid: productUuid.value,
quantity: quantity.value, quantity: quantity.value,
unit: unit.value,
locationUuid: locationUuid.value locationUuid: locationUuid.value
}) })
} }
@@ -146,10 +137,4 @@ watch(() => searchStore.searchForm.quantity, (val) => {
quantity.value = Number(val) quantity.value = Number(val)
} }
}, { immediate: true }) }, { immediate: true })
watch(() => searchStore.searchForm.unit, (val) => {
if (val) {
unit.value = val
}
}, { immediate: true })
</script> </script>

View File

@@ -81,6 +81,8 @@ export type Product = {
/** Public schema - no authentication required */ /** Public schema - no authentication required */
export type PublicQuery = { export type PublicQuery = {
__typename?: 'PublicQuery'; __typename?: 'PublicQuery';
/** Get products that have active offers */
getAvailableProducts?: Maybe<Array<Maybe<Product>>>;
getOffer?: Maybe<OfferType>; getOffer?: Maybe<OfferType>;
getOffers?: Maybe<Array<Maybe<OfferType>>>; getOffers?: Maybe<Array<Maybe<OfferType>>>;
getOffersCount?: Maybe<Scalars['Int']['output']>; getOffersCount?: Maybe<Scalars['Int']['output']>;
@@ -160,6 +162,11 @@ export type SupplierProfileType = {
uuid: Scalars['String']['output']; uuid: Scalars['String']['output'];
}; };
export type GetAvailableProductsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetAvailableProductsQuery = { __typename?: 'PublicQuery', getAvailableProducts?: Array<{ __typename?: 'Product', uuid?: string | null, name?: string | null, categoryId?: number | null, categoryName?: string | null, terminusSchemaId?: string | null } | null> | null };
export type GetLocationOffersQueryVariables = Exact<{ export type GetLocationOffersQueryVariables = Exact<{
locationUuid: Scalars['String']['input']; locationUuid: Scalars['String']['input'];
}>; }>;
@@ -175,7 +182,6 @@ export type GetOfferQueryVariables = Exact<{
export type GetOfferQuery = { __typename?: 'PublicQuery', getOffer?: { __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null }; export type GetOfferQuery = { __typename?: 'PublicQuery', getOffer?: { __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null };
export type GetOffersQueryVariables = Exact<{ export type GetOffersQueryVariables = Exact<{
status?: InputMaybe<Scalars['String']['input']>;
productUuid?: InputMaybe<Scalars['String']['input']>; productUuid?: InputMaybe<Scalars['String']['input']>;
locationUuid?: InputMaybe<Scalars['String']['input']>; locationUuid?: InputMaybe<Scalars['String']['input']>;
categoryName?: InputMaybe<Scalars['String']['input']>; categoryName?: InputMaybe<Scalars['String']['input']>;
@@ -185,7 +191,7 @@ export type GetOffersQueryVariables = Exact<{
}>; }>;
export type GetOffersQuery = { __typename?: 'PublicQuery', getOffersCount?: number | null, getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, status: OffersOfferStatusChoices, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null> | null }; export type GetOffersQuery = { __typename?: 'PublicQuery', getOffersCount?: number | null, getOffers?: Array<{ __typename?: 'OfferType', uuid: string, teamUuid: string, locationUuid: string, locationName: string, locationCountry: string, locationCountryCode: string, locationLatitude?: number | null, locationLongitude?: number | null, productUuid: string, productName: string, categoryName: string, quantity: any, unit: string, pricePerUnit?: any | null, currency: string, description: string, validUntil?: any | null, createdAt: string, updatedAt: string } | null> | null };
export type GetProductQueryVariables = Exact<{ export type GetProductQueryVariables = Exact<{
uuid: Scalars['String']['input']; uuid: Scalars['String']['input'];
@@ -222,21 +228,21 @@ export type GetSupplierProfileQuery = { __typename?: 'PublicQuery', getSupplierP
export type GetSupplierProfilesQueryVariables = Exact<{ export type GetSupplierProfilesQueryVariables = Exact<{
country?: InputMaybe<Scalars['String']['input']>; country?: InputMaybe<Scalars['String']['input']>;
isVerified?: InputMaybe<Scalars['Boolean']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>; limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
}>; }>;
export type GetSupplierProfilesQuery = { __typename?: 'PublicQuery', getSupplierProfilesCount?: number | null, getSupplierProfiles?: Array<{ __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, name: string, description: string, country: string, countryCode?: string | null, logoUrl: string, isVerified: boolean, isActive: boolean, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null> | null }; export type GetSupplierProfilesQuery = { __typename?: 'PublicQuery', getSupplierProfilesCount?: number | null, getSupplierProfiles?: Array<{ __typename?: 'SupplierProfileType', uuid: string, teamUuid: string, name: string, description: string, country: string, countryCode?: string | null, logoUrl: string, offersCount?: number | null, latitude?: number | null, longitude?: number | null } | null> | null };
export const GetAvailableProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAvailableProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getAvailableProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"categoryId"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"terminusSchemaId"}}]}}]}}]} as unknown as DocumentNode<GetAvailableProductsQuery, GetAvailableProductsQueryVariables>;
export const GetLocationOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLocationOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetLocationOffersQuery, GetLocationOffersQueryVariables>; export const GetLocationOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLocationOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetLocationOffersQuery, GetLocationOffersQueryVariables>;
export const GetOfferDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOffer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetOfferQuery, GetOfferQueryVariables>; export const GetOfferDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOffer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetOfferQuery, GetOfferQueryVariables>;
export const GetOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"status"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"categoryName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"getOffersCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"Variable","name":{"kind":"Name","value":"status"}}},{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"categoryName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}}]}]}}]} as unknown as DocumentNode<GetOffersQuery, GetOffersQueryVariables>; export const GetOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"categoryName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"getOffersCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"locationUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"locationUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"categoryName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"categoryName"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}}]}]}}]} as unknown as DocumentNode<GetOffersQuery, GetOffersQueryVariables>;
export const GetProductDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"categoryId"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"terminusSchemaId"}}]}}]}}]} as unknown as DocumentNode<GetProductQuery, GetProductQueryVariables>; export const GetProductDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"categoryId"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"terminusSchemaId"}}]}}]}}]} as unknown as DocumentNode<GetProductQuery, GetProductQueryVariables>;
export const GetProductOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProductOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetProductOffersQuery, GetProductOffersQueryVariables>; export const GetProductOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProductOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetProductOffersQuery, GetProductOffersQueryVariables>;
export const GetProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"categoryId"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"terminusSchemaId"}}]}}]}}]} as unknown as DocumentNode<GetProductsQuery, GetProductsQueryVariables>; export const GetProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getProducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"categoryId"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"terminusSchemaId"}}]}}]}}]} as unknown as DocumentNode<GetProductsQuery, GetProductsQueryVariables>;
export const GetSupplierOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetSupplierOffersQuery, GetSupplierOffersQueryVariables>; export const GetSupplierOffersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierOffers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOffers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"status"},"value":{"kind":"StringValue","value":"ACTIVE","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"locationUuid"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountry"}},{"kind":"Field","name":{"kind":"Name","value":"locationCountryCode"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"productUuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"categoryName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"pricePerUnit"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"validUntil"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetSupplierOffersQuery, GetSupplierOffersQueryVariables>;
export const GetSupplierProfileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierProfile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfile"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isVerified"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"offersCount"}}]}}]}}]} as unknown as DocumentNode<GetSupplierProfileQuery, GetSupplierProfileQueryVariables>; export const GetSupplierProfileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierProfile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfile"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isVerified"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"offersCount"}}]}}]}}]} as unknown as DocumentNode<GetSupplierProfileQuery, GetSupplierProfileQueryVariables>;
export const GetSupplierProfilesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierProfiles"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isVerified"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfiles"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"isVerified"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isVerified"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isVerified"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"offersCount"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}}]}},{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfilesCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"isVerified"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isVerified"}}}]}]}}]} as unknown as DocumentNode<GetSupplierProfilesQuery, GetSupplierProfilesQueryVariables>; export const GetSupplierProfilesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSupplierProfiles"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfiles"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"teamUuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"logoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"offersCount"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}}]}},{"kind":"Field","name":{"kind":"Name","value":"getSupplierProfilesCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}}]}]}}]} as unknown as DocumentNode<GetSupplierProfilesQuery, GetSupplierProfilesQueryVariables>;

View File

@@ -71,13 +71,17 @@ export type Query = {
findProductRoutes?: Maybe<Array<Maybe<ProductRouteOptionType>>>; findProductRoutes?: Maybe<Array<Maybe<ProductRouteOptionType>>>;
/** Find K shortest routes through graph between two nodes */ /** Find K shortest routes through graph between two nodes */
findRoutes?: Maybe<Array<Maybe<RoutePathType>>>; findRoutes?: Maybe<Array<Maybe<RoutePathType>>>;
/** List of countries that have logistics hubs */
hubCountries?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
/** Find nearest logistics nodes to given coordinates */
nearestNodes?: Maybe<Array<Maybe<NodeType>>>;
/** Get node by UUID with all edges to neighbors */ /** Get node by UUID with all edges to neighbors */
node?: Maybe<NodeType>; node?: Maybe<NodeType>;
/** Get auto + rail edges for a node (rail uses nearest rail node) */ /** Get auto + rail edges for a node (rail uses nearest rail node) */
nodeConnections?: Maybe<NodeConnectionsType>; nodeConnections?: Maybe<NodeConnectionsType>;
/** Get all nodes (without edges for performance) */ /** Get all nodes (without edges for performance) */
nodes?: Maybe<Array<Maybe<NodeType>>>; nodes?: Maybe<Array<Maybe<NodeType>>>;
/** Get total count of nodes (with optional transport filter) */ /** Get total count of nodes (with optional transport/country filter) */
nodesCount?: Maybe<Scalars['Int']['output']>; nodesCount?: Maybe<Scalars['Int']['output']>;
/** Get rail route between two points via OpenRailRouting */ /** Get rail route between two points via OpenRailRouting */
railRoute?: Maybe<RouteType>; railRoute?: Maybe<RouteType>;
@@ -110,6 +114,14 @@ export type QueryFindRoutesArgs = {
}; };
/** Root query. */
export type QueryNearestNodesArgs = {
lat: Scalars['Float']['input'];
limit?: InputMaybe<Scalars['Int']['input']>;
lon: Scalars['Float']['input'];
};
/** Root query. */ /** Root query. */
export type QueryNodeArgs = { export type QueryNodeArgs = {
uuid: Scalars['String']['input']; uuid: Scalars['String']['input'];
@@ -126,14 +138,17 @@ export type QueryNodeConnectionsArgs = {
/** Root query. */ /** Root query. */
export type QueryNodesArgs = { export type QueryNodesArgs = {
country?: InputMaybe<Scalars['String']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>; limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
search?: InputMaybe<Scalars['String']['input']>;
transportType?: InputMaybe<Scalars['String']['input']>; transportType?: InputMaybe<Scalars['String']['input']>;
}; };
/** Root query. */ /** Root query. */
export type QueryNodesCountArgs = { export type QueryNodesCountArgs = {
country?: InputMaybe<Scalars['String']['input']>;
transportType?: InputMaybe<Scalars['String']['input']>; transportType?: InputMaybe<Scalars['String']['input']>;
}; };
@@ -178,6 +193,16 @@ export type RouteType = {
geometry?: Maybe<Scalars['JSONString']['output']>; geometry?: Maybe<Scalars['JSONString']['output']>;
}; };
export type FindProductRoutesQueryVariables = Exact<{
productUuid: Scalars['String']['input'];
toUuid: Scalars['String']['input'];
limitSources?: InputMaybe<Scalars['Int']['input']>;
limitRoutes?: InputMaybe<Scalars['Int']['input']>;
}>;
export type FindProductRoutesQuery = { __typename?: 'Query', findProductRoutes?: Array<{ __typename?: 'ProductRouteOptionType', sourceUuid?: string | null, sourceName?: string | null, sourceLat?: number | null, sourceLon?: number | null, distanceKm?: number | null, routes?: Array<{ __typename?: 'RoutePathType', totalDistanceKm?: number | null, totalTimeSeconds?: number | null, stages?: Array<{ __typename?: 'RouteStageType', fromUuid?: string | null, fromName?: string | null, fromLat?: number | null, fromLon?: number | null, toUuid?: string | null, toName?: string | null, toLat?: number | null, toLon?: number | null, distanceKm?: number | null, travelTimeSeconds?: number | null, transportType?: string | null } | null> | null } | null> | null } | null> | null };
export type FindRoutesQueryVariables = Exact<{ export type FindRoutesQueryVariables = Exact<{
fromUuid: Scalars['String']['input']; fromUuid: Scalars['String']['input'];
toUuid: Scalars['String']['input']; toUuid: Scalars['String']['input'];
@@ -197,6 +222,11 @@ export type GetAutoRouteQueryVariables = Exact<{
export type GetAutoRouteQuery = { __typename?: 'Query', autoRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: any | null } | null }; export type GetAutoRouteQuery = { __typename?: 'Query', autoRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: any | null } | null };
export type GetHubCountriesQueryVariables = Exact<{ [key: string]: never; }>;
export type GetHubCountriesQuery = { __typename?: 'Query', hubCountries?: Array<string | null> | null };
export type GetNodeQueryVariables = Exact<{ export type GetNodeQueryVariables = Exact<{
uuid: Scalars['String']['input']; uuid: Scalars['String']['input'];
}>; }>;
@@ -217,6 +247,7 @@ export type GetNodesQueryVariables = Exact<{
limit?: InputMaybe<Scalars['Int']['input']>; limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>; offset?: InputMaybe<Scalars['Int']['input']>;
transportType?: InputMaybe<Scalars['String']['input']>; transportType?: InputMaybe<Scalars['String']['input']>;
country?: InputMaybe<Scalars['String']['input']>;
}>; }>;
@@ -233,9 +264,11 @@ export type GetRailRouteQueryVariables = Exact<{
export type GetRailRouteQuery = { __typename?: 'Query', railRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: any | null } | null }; export type GetRailRouteQuery = { __typename?: 'Query', railRoute?: { __typename?: 'RouteType', distanceKm?: number | null, geometry?: any | null } | null };
export const FindProductRoutesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindProductRoutes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitSources"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitRoutes"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findProductRoutes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"productUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"toUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitSources"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitSources"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitRoutes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitRoutes"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sourceUuid"}},{"kind":"Field","name":{"kind":"Name","value":"sourceName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLat"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLon"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"routes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalDistanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"totalTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fromUuid"}},{"kind":"Field","name":{"kind":"Name","value":"fromName"}},{"kind":"Field","name":{"kind":"Name","value":"fromLat"}},{"kind":"Field","name":{"kind":"Name","value":"fromLon"}},{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLat"}},{"kind":"Field","name":{"kind":"Name","value":"toLon"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]}}]} as unknown as DocumentNode<FindProductRoutesQuery, FindProductRoutesQueryVariables>;
export const FindRoutesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindRoutes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findRoutes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"toUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalDistanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"totalTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fromUuid"}},{"kind":"Field","name":{"kind":"Name","value":"fromName"}},{"kind":"Field","name":{"kind":"Name","value":"fromLat"}},{"kind":"Field","name":{"kind":"Name","value":"fromLon"}},{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLat"}},{"kind":"Field","name":{"kind":"Name","value":"toLon"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<FindRoutesQuery, FindRoutesQueryVariables>; export const FindRoutesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindRoutes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findRoutes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"toUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toUuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalDistanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"totalTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fromUuid"}},{"kind":"Field","name":{"kind":"Name","value":"fromName"}},{"kind":"Field","name":{"kind":"Name","value":"fromLat"}},{"kind":"Field","name":{"kind":"Name","value":"fromLon"}},{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLat"}},{"kind":"Field","name":{"kind":"Name","value":"toLon"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<FindRoutesQuery, FindRoutesQueryVariables>;
export const GetAutoRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAutoRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetAutoRouteQuery, GetAutoRouteQueryVariables>; export const GetAutoRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAutoRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetAutoRouteQuery, GetAutoRouteQueryVariables>;
export const GetHubCountriesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetHubCountries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hubCountries"}}]}}]} as unknown as DocumentNode<GetHubCountriesQuery, GetHubCountriesQueryVariables>;
export const GetNodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<GetNodeQuery, GetNodeQueryVariables>; export const GetNodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<GetNodeQuery, GetNodeQueryVariables>;
export const GetNodeConnectionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNodeConnections"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitAuto"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitRail"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodeConnections"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitAuto"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitAuto"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitRail"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitRail"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hub"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"railNode"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"autoEdges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"railEdges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<GetNodeConnectionsQuery, GetNodeConnectionsQueryVariables>; export const GetNodeConnectionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNodeConnections"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitAuto"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limitRail"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodeConnections"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"uuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"uuid"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitAuto"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitAuto"}}},{"kind":"Argument","name":{"kind":"Name","value":"limitRail"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limitRail"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hub"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"railNode"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"autoEdges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"railEdges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"toUuid"}},{"kind":"Field","name":{"kind":"Name","value":"toName"}},{"kind":"Field","name":{"kind":"Name","value":"toLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"toLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"travelTimeSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}}]}}]}}]}}]} as unknown as DocumentNode<GetNodeConnectionsQuery, GetNodeConnectionsQueryVariables>;
export const GetNodesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNodes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}},{"kind":"Field","name":{"kind":"Name","value":"transportTypes"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nodesCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}}]}]}}]} as unknown as DocumentNode<GetNodesQuery, GetNodesQueryVariables>; export const GetNodesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNodes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"nodes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}},{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"latitude"}},{"kind":"Field","name":{"kind":"Name","value":"longitude"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"syncedAt"}},{"kind":"Field","name":{"kind":"Name","value":"transportTypes"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nodesCount"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"transportType"},"value":{"kind":"Variable","name":{"kind":"Name","value":"transportType"}}},{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}}]}]}}]} as unknown as DocumentNode<GetNodesQuery, GetNodesQueryVariables>;
export const GetRailRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRailRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"railRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetRailRouteQuery, GetRailRouteQueryVariables>; export const GetRailRouteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRailRoute"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"railRoute"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"fromLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromLon"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLat"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLat"}}},{"kind":"Argument","name":{"kind":"Name","value":"toLon"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toLon"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"distanceKm"}},{"kind":"Field","name":{"kind":"Name","value":"geometry"}}]}}]}}]} as unknown as DocumentNode<GetRailRouteQuery, GetRailRouteQueryVariables>;

View File

@@ -47,8 +47,10 @@ export type OrderType = {
name?: Maybe<Scalars['String']['output']>; name?: Maybe<Scalars['String']['output']>;
notes?: Maybe<Scalars['String']['output']>; notes?: Maybe<Scalars['String']['output']>;
orderLines?: Maybe<Array<Maybe<OrderLineType>>>; orderLines?: Maybe<Array<Maybe<OrderLineType>>>;
sourceLatitude?: Maybe<Scalars['Float']['output']>;
sourceLocationName?: Maybe<Scalars['String']['output']>; sourceLocationName?: Maybe<Scalars['String']['output']>;
sourceLocationUuid?: Maybe<Scalars['String']['output']>; sourceLocationUuid?: Maybe<Scalars['String']['output']>;
sourceLongitude?: Maybe<Scalars['Float']['output']>;
stages?: Maybe<Array<Maybe<StageType>>>; stages?: Maybe<Array<Maybe<StageType>>>;
status?: Maybe<Scalars['String']['output']>; status?: Maybe<Scalars['String']['output']>;
teamUuid?: Maybe<Scalars['String']['output']>; teamUuid?: Maybe<Scalars['String']['output']>;
@@ -117,8 +119,8 @@ export type GetOrderQuery = { __typename?: 'TeamQuery', getOrder?: { __typename?
export type GetTeamOrdersQueryVariables = Exact<{ [key: string]: never; }>; export type GetTeamOrdersQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTeamOrdersQuery = { __typename?: 'TeamQuery', getTeamOrders?: Array<{ __typename?: 'OrderType', uuid?: string | null, name?: string | null, status?: string | null, totalAmount?: number | null, currency?: string | null, sourceLocationName?: string | null, destinationLocationName?: string | null, createdAt?: string | null, orderLines?: Array<{ __typename?: 'OrderLineType', uuid?: string | null, productName?: string | null, quantity?: number | null, unit?: string | null } | null> | null, stages?: Array<{ __typename?: 'StageType', uuid?: string | null, name?: string | null, stageType?: string | null, transportType?: string | null, sourceLatitude?: number | null, sourceLongitude?: number | null, destinationLatitude?: number | null, destinationLongitude?: number | null, sourceLocationName?: string | null, destinationLocationName?: string | null, trips?: Array<{ __typename?: 'TripType', uuid?: string | null, name?: string | null, plannedLoadingDate?: string | null, actualLoadingDate?: string | null, plannedUnloadingDate?: string | null, actualUnloadingDate?: string | null, realLoadingDate?: string | null } | null> | null } | null> | null } | null> | null }; export type GetTeamOrdersQuery = { __typename?: 'TeamQuery', getTeamOrders?: Array<{ __typename?: 'OrderType', uuid?: string | null, name?: string | null, status?: string | null, totalAmount?: number | null, currency?: string | null, sourceLocationName?: string | null, sourceLatitude?: number | null, sourceLongitude?: number | null, destinationLocationName?: string | null, createdAt?: string | null, orderLines?: Array<{ __typename?: 'OrderLineType', uuid?: string | null, productName?: string | null, quantity?: number | null, unit?: string | null } | null> | null, stages?: Array<{ __typename?: 'StageType', uuid?: string | null, name?: string | null, stageType?: string | null, transportType?: string | null, sourceLatitude?: number | null, sourceLongitude?: number | null, destinationLatitude?: number | null, destinationLongitude?: number | null, sourceLocationName?: string | null, destinationLocationName?: string | null, trips?: Array<{ __typename?: 'TripType', uuid?: string | null, name?: string | null, plannedLoadingDate?: string | null, actualLoadingDate?: string | null, plannedUnloadingDate?: string | null, actualUnloadingDate?: string | null, realLoadingDate?: string | null } | null> | null } | null> | null } | null> | null };
export const GetOrderDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOrder"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOrder"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"orderUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderUuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"totalAmount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"notes"}},{"kind":"Field","name":{"kind":"Name","value":"orderLines"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"subtotal"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"stageType"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"selectedCompany"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"taxId"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"active"}}]}},{"kind":"Field","name":{"kind":"Name","value":"trips"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"plannedLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"realLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedWeight"}},{"kind":"Field","name":{"kind":"Name","value":"weightAtLoading"}},{"kind":"Field","name":{"kind":"Name","value":"weightAtUnloading"}},{"kind":"Field","name":{"kind":"Name","value":"company"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"taxId"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"active"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetOrderQuery, GetOrderQueryVariables>; export const GetOrderDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOrder"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderUuid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getOrder"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"orderUuid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderUuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"totalAmount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"notes"}},{"kind":"Field","name":{"kind":"Name","value":"orderLines"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}},{"kind":"Field","name":{"kind":"Name","value":"subtotal"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"stageType"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationName"}},{"kind":"Field","name":{"kind":"Name","value":"locationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"locationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"selectedCompany"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"taxId"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"active"}}]}},{"kind":"Field","name":{"kind":"Name","value":"trips"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"plannedLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"realLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedWeight"}},{"kind":"Field","name":{"kind":"Name","value":"weightAtLoading"}},{"kind":"Field","name":{"kind":"Name","value":"weightAtUnloading"}},{"kind":"Field","name":{"kind":"Name","value":"company"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"taxId"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"countryCode"}},{"kind":"Field","name":{"kind":"Name","value":"active"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetOrderQuery, GetOrderQueryVariables>;
export const GetTeamOrdersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamOrders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getTeamOrders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"totalAmount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"orderLines"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"stageType"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"trips"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"plannedLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"realLoadingDate"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetTeamOrdersQuery, GetTeamOrdersQueryVariables>; export const GetTeamOrdersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamOrders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getTeamOrders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"totalAmount"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"orderLines"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"productName"}},{"kind":"Field","name":{"kind":"Name","value":"quantity"}},{"kind":"Field","name":{"kind":"Name","value":"unit"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"stageType"}},{"kind":"Field","name":{"kind":"Name","value":"transportType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLatitude"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLongitude"}},{"kind":"Field","name":{"kind":"Name","value":"sourceLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationLocationName"}},{"kind":"Field","name":{"kind":"Name","value":"trips"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"plannedLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualLoadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"plannedUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"actualUnloadingDate"}},{"kind":"Field","name":{"kind":"Name","value":"realLoadingDate"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetTeamOrdersQuery, GetTeamOrdersQueryVariables>;

View File

@@ -1,4 +1,4 @@
import { GetNodesDocument } from '~/composables/graphql/public/geo-generated' import { GetNodesDocument, GetHubCountriesDocument } from '~/composables/graphql/public/geo-generated'
const PAGE_SIZE = 24 const PAGE_SIZE = 24
@@ -6,6 +6,8 @@ const PAGE_SIZE = 24
const items = ref<any[]>([]) const items = ref<any[]>([])
const total = ref(0) const total = ref(0)
const selectedFilter = ref('all') const selectedFilter = ref('all')
const selectedCountry = ref('all')
const countries = ref<string[]>([])
const isLoading = ref(false) const isLoading = ref(false)
const isLoadingMore = ref(false) const isLoadingMore = ref(false)
const isInitialized = ref(false) const isInitialized = ref(false)
@@ -22,6 +24,11 @@ export function useCatalogHubs() {
{ id: 'air', label: t('catalogHubsSection.filters.air') } { id: 'air', label: t('catalogHubsSection.filters.air') }
]) ])
const countryFilters = computed(() => [
{ id: 'all', label: t('catalogHubsSection.filters.all_countries') },
...countries.value.map(c => ({ id: c, label: c }))
])
const itemsWithCoords = computed(() => const itemsWithCoords = computed(() =>
items.value.filter(h => h.latitude && h.longitude) items.value.filter(h => h.latitude && h.longitude)
) )
@@ -44,9 +51,10 @@ export function useCatalogHubs() {
if (replace) isLoading.value = true if (replace) isLoading.value = true
try { try {
const transportType = selectedFilter.value === 'all' ? null : selectedFilter.value const transportType = selectedFilter.value === 'all' ? null : selectedFilter.value
const country = selectedCountry.value === 'all' ? null : selectedCountry.value
const data = await execute( const data = await execute(
GetNodesDocument, GetNodesDocument,
{ limit: PAGE_SIZE, offset, transportType }, { limit: PAGE_SIZE, offset, transportType, country },
'public', 'public',
'geo' 'geo'
) )
@@ -59,6 +67,15 @@ export function useCatalogHubs() {
} }
} }
const loadCountries = async () => {
try {
const data = await execute(GetHubCountriesDocument, {}, 'public', 'geo')
countries.value = data?.hubCountries || []
} catch (e) {
console.error('Failed to load hub countries', e)
}
}
const loadMore = async () => { const loadMore = async () => {
if (isLoadingMore.value) return if (isLoadingMore.value) return
isLoadingMore.value = true isLoadingMore.value = true
@@ -70,7 +87,7 @@ export function useCatalogHubs() {
} }
// При смене фильтра - перезагрузка // При смене фильтра - перезагрузка
watch(selectedFilter, () => { watch([selectedFilter, selectedCountry], () => {
if (isInitialized.value) { if (isInitialized.value) {
fetchPage(0, true) fetchPage(0, true)
} }
@@ -79,7 +96,10 @@ export function useCatalogHubs() {
// Initialize data if not already loaded // Initialize data if not already loaded
const init = async () => { const init = async () => {
if (!isInitialized.value && items.value.length === 0) { if (!isInitialized.value && items.value.length === 0) {
await fetchPage(0, true) await Promise.all([
fetchPage(0, true),
loadCountries()
])
} }
} }
@@ -87,7 +107,9 @@ export function useCatalogHubs() {
items, items,
total, total,
selectedFilter, selectedFilter,
selectedCountry,
filters, filters,
countryFilters,
isLoading, isLoading,
isLoadingMore, isLoadingMore,
itemsWithCoords, itemsWithCoords,

View File

@@ -5,21 +5,14 @@ const PAGE_SIZE = 24
// Shared state across list and map views // Shared state across list and map views
const items = ref<any[]>([]) const items = ref<any[]>([])
const total = ref(0) const total = ref(0)
const selectedFilter = ref('all') const selectedProductUuid = ref<string | null>(null)
const productUuid = ref<string | null>(null)
const isLoading = ref(false) const isLoading = ref(false)
const isLoadingMore = ref(false) const isLoadingMore = ref(false)
const isInitialized = ref(false) const isInitialized = ref(false)
export function useCatalogOffers() { export function useCatalogOffers() {
const { t } = useI18n()
const { execute } = useGraphQL() const { execute } = useGraphQL()
const filters = computed(() => [
{ id: 'all', label: t('catalogOffersSection.filters.all') },
{ id: 'active', label: t('catalogOffersSection.filters.active') }
])
const itemsWithCoords = computed(() => const itemsWithCoords = computed(() =>
items.value items.value
.filter(offer => offer.locationLatitude && offer.locationLongitude) .filter(offer => offer.locationLatitude && offer.locationLongitude)
@@ -37,14 +30,12 @@ export function useCatalogOffers() {
const fetchPage = async (offset: number, replace = false) => { const fetchPage = async (offset: number, replace = false) => {
if (replace) isLoading.value = true if (replace) isLoading.value = true
try { try {
const status = selectedFilter.value === 'active' ? 'active' : null
const data = await execute( const data = await execute(
GetOffersDocument, GetOffersDocument,
{ {
limit: PAGE_SIZE, limit: PAGE_SIZE,
offset, offset,
status, productUuid: selectedProductUuid.value
productUuid: productUuid.value
}, },
'public', 'public',
'exchange' 'exchange'
@@ -59,10 +50,11 @@ export function useCatalogOffers() {
} }
const setProductUuid = (uuid: string | null) => { const setProductUuid = (uuid: string | null) => {
if (productUuid.value !== uuid) { if (selectedProductUuid.value !== uuid) {
productUuid.value = uuid selectedProductUuid.value = uuid
isInitialized.value = false if (isInitialized.value) {
items.value = [] fetchPage(0, true)
}
} }
} }
@@ -76,13 +68,6 @@ export function useCatalogOffers() {
} }
} }
// При смене фильтра - перезагрузка
watch(selectedFilter, () => {
if (isInitialized.value) {
fetchPage(0, true)
}
})
// Initialize data if not already loaded // Initialize data if not already loaded
const init = async () => { const init = async () => {
if (!isInitialized.value && items.value.length === 0) { if (!isInitialized.value && items.value.length === 0) {
@@ -93,9 +78,7 @@ export function useCatalogOffers() {
return { return {
items, items,
total, total,
selectedFilter, selectedProductUuid,
productUuid,
filters,
isLoading, isLoading,
isLoadingMore, isLoadingMore,
itemsWithCoords, itemsWithCoords,

View File

@@ -1,4 +1,4 @@
import { GetProductsDocument } from '~/composables/graphql/public/exchange-generated' import { GetAvailableProductsDocument } from '~/composables/graphql/public/exchange-generated'
// Shared state // Shared state
const items = ref<any[]>([]) const items = ref<any[]>([])
@@ -13,12 +13,12 @@ export function useCatalogProducts() {
isLoading.value = true isLoading.value = true
try { try {
const data = await execute( const data = await execute(
GetProductsDocument, GetAvailableProductsDocument,
{}, {},
'public', 'public',
'exchange' 'exchange'
) )
items.value = data?.getProducts || [] items.value = data?.getAvailableProducts || []
isInitialized.value = true isInitialized.value = true
} finally { } finally {
isLoading.value = false isLoading.value = false

View File

@@ -5,20 +5,13 @@ const PAGE_SIZE = 24
// Shared state across list and map views // Shared state across list and map views
const items = ref<any[]>([]) const items = ref<any[]>([])
const total = ref(0) const total = ref(0)
const selectedFilter = ref('all')
const isLoading = ref(false) const isLoading = ref(false)
const isLoadingMore = ref(false) const isLoadingMore = ref(false)
const isInitialized = ref(false) const isInitialized = ref(false)
export function useCatalogSuppliers() { export function useCatalogSuppliers() {
const { t } = useI18n()
const { execute } = useGraphQL() const { execute } = useGraphQL()
const filters = computed(() => [
{ id: 'all', label: t('catalogSuppliersSection.filters.all') },
{ id: 'verified', label: t('catalogSuppliersSection.filters.verified') }
])
const itemsWithCoords = computed(() => const itemsWithCoords = computed(() =>
items.value.filter(s => s.latitude && s.longitude) items.value.filter(s => s.latitude && s.longitude)
) )
@@ -28,10 +21,9 @@ export function useCatalogSuppliers() {
const fetchPage = async (offset: number, replace = false) => { const fetchPage = async (offset: number, replace = false) => {
if (replace) isLoading.value = true if (replace) isLoading.value = true
try { try {
const isVerified = selectedFilter.value === 'verified' ? true : null
const data = await execute( const data = await execute(
GetSupplierProfilesDocument, GetSupplierProfilesDocument,
{ limit: PAGE_SIZE, offset, isVerified }, { limit: PAGE_SIZE, offset },
'public', 'public',
'exchange' 'exchange'
) )
@@ -54,13 +46,6 @@ export function useCatalogSuppliers() {
} }
} }
// При смене фильтра - перезагрузка
watch(selectedFilter, () => {
if (isInitialized.value) {
fetchPage(0, true)
}
})
// Initialize data if not already loaded // Initialize data if not already loaded
const init = async () => { const init = async () => {
if (!isInitialized.value && items.value.length === 0) { if (!isInitialized.value && items.value.length === 0) {
@@ -71,8 +56,6 @@ export function useCatalogSuppliers() {
return { return {
items, items,
total, total,
selectedFilter,
filters,
isLoading, isLoading,
isLoadingMore, isLoadingMore,
itemsWithCoords, itemsWithCoords,

View File

@@ -7,11 +7,11 @@ export function useTeamOrders() {
const { execute } = useGraphQL() const { execute } = useGraphQL()
const filters = computed(() => [ const filters = computed(() => [
{ key: 'all', label: t('ordersList.filters.all') }, { id: 'all', label: t('ordersList.filters.all') },
{ key: 'pending', label: t('ordersList.filters.pending') }, { id: 'pending', label: t('ordersList.filters.pending') },
{ key: 'processing', label: t('ordersList.filters.processing') }, { id: 'processing', label: t('ordersList.filters.processing') },
{ key: 'in_transit', label: t('ordersList.filters.in_transit') }, { id: 'in_transit', label: t('ordersList.filters.in_transit') },
{ key: 'delivered', label: t('ordersList.filters.delivered') } { id: 'delivered', label: t('ordersList.filters.delivered') }
]) ])
const selectedFilter = ref('all') const selectedFilter = ref('all')

View File

@@ -19,11 +19,11 @@
<!-- Global Search Bar --> <!-- Global Search Bar -->
<GlobalSearchBar v-if="showSearch" class="border-b border-base-300" /> <GlobalSearchBar v-if="showSearch" class="border-b border-base-300" />
<!-- Sub Navigation (section-specific tabs) --> <!-- Sub Navigation (section-specific tabs) - hidden on home page -->
<SubNavigation :section="currentSection" /> <SubNavigation v-if="!isHomePage" :section="currentSection" />
<!-- Page content --> <!-- Page content -->
<main class="flex-1 flex flex-col min-h-0 px-3 lg:px-6"> <main class="flex-1 flex flex-col min-h-0 px-3 lg:px-6 py-4">
<slot /> <slot />
</main> </main>
</div> </div>
@@ -80,11 +80,14 @@ const currentSection = computed(() => {
return 'catalog' return 'catalog'
}) })
// Show search bar on catalog pages // Home page detection
const showSearch = computed(() => { const isHomePage = computed(() => {
return currentSection.value === 'catalog' return route.path === '/' || route.path === '/en' || route.path === '/ru'
}) })
// Show search bar only on main page
const showSearch = computed(() => isHomePage.value)
// Avatar generation // Avatar generation
const generateUserAvatar = async (seed: string) => { const generateUserAvatar = async (seed: string) => {
if (!seed) return if (!seed) return

View File

@@ -25,269 +25,178 @@
</Section> </Section>
<template v-else> <template v-else>
<!-- Map Hero --> <CatalogPage
<MapHero :items="sources"
:title="hub.name" :loading="isLoadingRoutes"
:location="mapLocation" :with-map="true"
:badges="hubBadges" map-id="hub-sources-map"
/> point-color="#10b981"
v-model:selected-id="selectedSourceUuid"
>
<template #header>
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div>
<Heading :level="1">{{ hub.name }}</Heading>
<Text tone="muted" size="sm">
{{ hub.country }}
<span v-if="hub.latitude && hub.longitude" class="ml-2">
{{ hub.latitude.toFixed(2) }}°, {{ hub.longitude.toFixed(2) }}°
</span>
</Text>
</div>
</div>
</template>
<!-- Offers Section --> <template #filters>
<Section v-if="offers.length > 0" variant="plain" paddingY="md"> <select
<Stack gap="4"> v-model="selectedProductUuid"
<Heading :level="2">{{ t('catalogHub.sections.offers.title') }}</Heading> class="select select-bordered w-full"
<Grid :cols="1" :md="2" :lg="3" :gap="4"> >
<OfferCard <option value="">{{ t('catalogHub.sources.selectProduct') }}</option>
v-for="offer in offers" <option v-for="product in products" :key="product.uuid" :value="product.uuid">
:key="offer.uuid" {{ product.name }}
:offer="offer" </option>
/> </select>
</Grid> </template>
</Stack>
</Section>
<!-- Empty offers state --> <template #card="{ item }">
<Section v-else variant="plain" paddingY="md"> <Card padding="sm" interactive>
<Card padding="lg"> <div class="flex items-center justify-between">
<Stack align="center" gap="4"> <div>
<IconCircle tone="primary"> <Text weight="semibold">{{ item.name }}</Text>
<Icon name="lucide:package-x" size="24" /> <Text tone="muted" size="sm">{{ selectedProductName }}</Text>
</IconCircle> </div>
<Heading :level="3">{{ t('catalogHub.empty.offers.title') }}</Heading> <div class="text-right">
<Text tone="muted" align="center"> <Text weight="semibold" class="text-primary">
{{ t('catalogHub.empty.offers.subtitle') }} {{ formatDistance(item.distanceKm) }} км
</Text>
<Text tone="muted" size="sm">
{{ formatDuration(item.durationSeconds) }}
</Text>
</div>
</div>
</Card>
</template>
<template #empty>
<Stack align="center" gap="2">
<Icon name="lucide:package-x" size="32" class="text-base-content/40" />
<Text tone="muted">
{{ selectedProductUuid ? t('catalogHub.sources.empty') : t('catalogHub.sources.selectProduct') }}
</Text> </Text>
</Stack> </Stack>
</Card> </template>
</Section> </CatalogPage>
<!-- Suppliers Section -->
<Section v-if="uniqueSuppliers.length > 0" variant="plain" paddingY="md">
<Stack gap="4">
<Heading :level="2">{{ t('catalogHub.sections.suppliers.title') }}</Heading>
<Grid :cols="1" :md="2" :lg="3" :gap="4">
<SupplierCard
v-for="supplier in uniqueSuppliers"
:key="supplier.teamUuid"
:supplier="supplier"
/>
</Grid>
</Stack>
</Section>
<!-- Products Section -->
<Section v-if="uniqueProducts.length > 0" variant="plain" paddingY="md">
<Stack gap="4">
<Heading :level="2">{{ t('catalogHub.sections.products.title') }}</Heading>
<Stack direction="row" gap="2" wrap>
<NuxtLink
v-for="product in uniqueProducts"
:key="product.uuid"
:to="localePath(`/catalog/products/${product.uuid}`)"
>
<Pill variant="primary" class="hover:bg-primary hover:text-white transition-colors cursor-pointer">
{{ product.name }}
</Pill>
</NuxtLink>
</Stack>
</Stack>
</Section>
<!-- Nearby Connections -->
<NearbyConnectionsSection
:auto-edges="autoEdges"
:rail-edges="railEdges"
:hub="currentHubForMap"
:rail-hub="railHubForMap"
:auto-route-geometries="autoRouteGeometries"
:rail-route-geometries="railRouteGeometries"
/>
</template> </template>
</Stack> </Stack>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { GetLocationOffersDocument, GetSupplierProfilesDocument } from '~/composables/graphql/public/exchange-generated' import { GetNodeConnectionsDocument, FindProductRoutesDocument } from '~/composables/graphql/public/geo-generated'
import { GetNodeConnectionsDocument, GetAutoRouteDocument, GetRailRouteDocument } from '~/composables/graphql/public/geo-generated' import { GetAvailableProductsDocument } from '~/composables/graphql/public/exchange-generated'
import type { EdgeType } from '~/composables/graphql/public/geo-generated'
definePageMeta({ definePageMeta({
layout: 'topnav' layout: 'topnav'
}) })
interface RouteGeometry {
toUuid: string
coordinates: [number, number][]
}
const route = useRoute() const route = useRoute()
const localePath = useLocalePath() const localePath = useLocalePath()
const { t } = useI18n() const { t } = useI18n()
const { execute } = useGraphQL()
const isLoading = ref(true) const isLoading = ref(true)
const isLoadingRoutes = ref(false)
const hub = ref<any>(null) const hub = ref<any>(null)
const railHub = ref<any>(null) const products = ref<Array<{ uuid: string; name: string }>>([])
const offers = ref<any[]>([]) const selectedProductUuid = ref('')
const allSuppliers = ref<any[]>([]) const selectedSourceUuid = ref('')
const autoEdges = ref<EdgeType[]>([]) const rawSources = ref<any[]>([])
const railEdges = ref<EdgeType[]>([])
const autoRouteGeometries = ref<RouteGeometry[]>([])
const railRouteGeometries = ref<RouteGeometry[]>([])
const hubId = computed(() => route.params.id as string) const hubId = computed(() => route.params.id as string)
// Map location // Selected product name
const mapLocation = computed(() => ({ const selectedProductName = computed(() => {
uuid: hub.value?.uuid, const product = products.value.find(p => p.uuid === selectedProductUuid.value)
name: hub.value?.name, return product?.name || ''
latitude: hub.value?.latitude,
longitude: hub.value?.longitude,
country: hub.value?.country,
countryCode: hub.value?.countryCode
}))
// Badges for MapHero
const hubBadges = computed(() => {
const badges: Array<{ icon?: string; text: string }> = []
if (hub.value?.country) {
badges.push({ icon: 'lucide:globe', text: hub.value.country })
}
if (offers.value.length > 0) {
badges.push({ icon: 'lucide:package', text: t('catalogHub.badges.offers', { count: offers.value.length }) })
}
if (hub.value?.latitude && hub.value?.longitude) {
badges.push({ icon: 'lucide:map-pin', text: `${hub.value.latitude.toFixed(2)}°, ${hub.value.longitude.toFixed(2)}°` })
}
return badges
}) })
// Unique suppliers // Transform sources for CatalogPage (needs uuid, latitude, longitude, name)
const uniqueSuppliers = computed(() => { const sources = computed(() => {
const suppliers = new Map<string, { teamUuid: string; name: string; offersCount: number }>() return rawSources.value.map(source => ({
offers.value.forEach(offer => { uuid: source.sourceUuid || '',
if (offer.teamUuid) { name: source.sourceName || '',
const existing = suppliers.get(offer.teamUuid) latitude: source.sourceLat,
const supplierInfo = allSuppliers.value.find(s => s.teamUuid === offer.teamUuid) longitude: source.sourceLon,
if (existing) { distanceKm: source.distanceKm,
existing.offersCount++ durationSeconds: source.routes?.[0]?.totalTimeSeconds
} else { }))
suppliers.set(offer.teamUuid, {
teamUuid: offer.teamUuid,
name: supplierInfo?.name || t('catalogHub.labels.default_supplier'),
offersCount: 1
})
}
}
})
return Array.from(suppliers.values())
}) })
// Unique products // Load routes when product changes
const uniqueProducts = computed(() => { const loadRoutes = async () => {
const products = new Map<string, { uuid: string; name: string }>() if (!selectedProductUuid.value || !hubId.value) {
offers.value.forEach(offer => { rawSources.value = []
offer.lines?.forEach((line: any) => { return
if (line?.productUuid && line?.productName) { }
products.set(line.productUuid, { uuid: line.productUuid, name: line.productName })
}
})
})
return Array.from(products.values())
})
// Current hub for NearbyConnectionsSection isLoadingRoutes.value = true
const currentHubForMap = computed(() => ({ selectedSourceUuid.value = ''
uuid: hub.value?.uuid || '',
name: hub.value?.name || '',
latitude: hub.value?.latitude || 0,
longitude: hub.value?.longitude || 0
}))
const railHubForMap = computed(() => ({ try {
uuid: railHub.value?.uuid || hub.value?.uuid || '', const data = await execute(
name: railHub.value?.name || hub.value?.name || '', FindProductRoutesDocument,
latitude: railHub.value?.latitude || hub.value?.latitude || 0, {
longitude: railHub.value?.longitude || hub.value?.longitude || 0 productUuid: selectedProductUuid.value,
})) toUuid: hubId.value,
limitSources: 12,
// Load route geometries for edges limitRoutes: 1
const loadRouteGeometries = async ( },
edges: EdgeType[], 'public',
hubLat: number, 'geo'
hubLon: number, )
transportType: 'auto' | 'rail' rawSources.value = (data?.findProductRoutes || []).filter(Boolean)
): Promise<RouteGeometry[]> => { } catch (error) {
const RouteDocument = transportType === 'auto' ? GetAutoRouteDocument : GetRailRouteDocument console.error('Error loading routes:', error)
const routeField = transportType === 'auto' ? 'autoRoute' : 'railRoute' rawSources.value = []
} finally {
const filteredEdges = edges isLoadingRoutes.value = false
.filter(e => e?.transportType === transportType && e?.toLatitude && e?.toLongitude) }
.sort((a, b) => (a.distanceKm || 0) - (b.distanceKm || 0))
.slice(0, 12)
const routePromises = filteredEdges.map(async (edge) => {
try {
const { data: routeDataResponse } = await useServerQuery(
`hub-route-${transportType}-${edge.toUuid}`,
RouteDocument,
{
fromLat: hubLat,
fromLon: hubLon,
toLat: edge.toLatitude!,
toLon: edge.toLongitude!
},
'public',
'geo'
)
const routeData = routeDataResponse.value?.[routeField]
if (routeData?.geometry) {
const geometryArray = typeof routeData.geometry === 'string'
? JSON.parse(routeData.geometry)
: routeData.geometry
if (Array.isArray(geometryArray) && geometryArray.length > 0) {
return {
toUuid: edge.toUuid!,
coordinates: geometryArray as [number, number][]
}
}
}
} catch (error) {
console.error(`Failed to load ${transportType} route to ${edge.toName}:`, error)
}
return null
})
const results = await Promise.all(routePromises)
return results.filter(Boolean) as RouteGeometry[]
} }
watch(selectedProductUuid, loadRoutes)
// Formatting helpers
const formatDistance = (km: number | null | undefined) => {
if (!km) return '0'
return Math.round(km).toLocaleString()
}
const formatDuration = (seconds: number | null | undefined) => {
if (!seconds) return '-'
const hours = Math.floor(seconds / 3600)
const minutes = Math.floor((seconds % 3600) / 60)
if (hours > 24) {
const days = Math.floor(hours / 24)
const remainingHours = hours % 24
return `${days}д ${remainingHours}ч`
}
if (hours > 0) {
return `${hours}ч ${minutes}м`
}
return `${minutes}м`
}
// Initial load
try { try {
const [{ data: connectionsData }, { data: offersData }, { data: suppliersData }] = await Promise.all([ const [{ data: connectionsData }, { data: productsData }] = await Promise.all([
useServerQuery('hub-connections', GetNodeConnectionsDocument, { uuid: hubId.value }, 'public', 'geo'), useServerQuery('hub-connections', GetNodeConnectionsDocument, { uuid: hubId.value }, 'public', 'geo'),
useServerQuery('hub-offers', GetLocationOffersDocument, { locationUuid: hubId.value }, 'public', 'exchange'), useServerQuery('available-products', GetAvailableProductsDocument, {}, 'public', 'exchange')
useServerQuery('hub-suppliers', GetSupplierProfilesDocument, {}, 'public', 'exchange')
]) ])
const connectionsResult = connectionsData.value hub.value = connectionsData.value?.nodeConnections?.hub || null
hub.value = connectionsResult?.nodeConnections?.hub || null products.value = (productsData.value?.getAvailableProducts || [])
railHub.value = connectionsResult?.nodeConnections?.railNode || null .filter((p): p is { uuid: string; name: string } => p !== null && !!p.uuid && !!p.name)
offers.value = offersData.value?.getOffers || [] .map(p => ({ uuid: p.uuid!, name: p.name! }))
allSuppliers.value = suppliersData.value?.getSupplierProfiles || []
autoEdges.value = (connectionsResult?.nodeConnections?.autoEdges || []).filter((e): e is EdgeType => e !== null)
railEdges.value = (connectionsResult?.nodeConnections?.railEdges || []).filter((e): e is EdgeType => e !== null)
if (hub.value?.latitude && hub.value?.longitude) {
const railOrigin = railHub.value || hub.value
const [autoGeometries, railGeometries] = await Promise.all([
loadRouteGeometries(autoEdges.value, hub.value.latitude, hub.value.longitude, 'auto'),
loadRouteGeometries(railEdges.value, railOrigin.latitude, railOrigin.longitude, 'rail')
])
autoRouteGeometries.value = autoGeometries
railRouteGeometries.value = railGeometries
}
} catch (error) { } catch (error) {
console.error('Error loading hub:', error) console.error('Error loading hub:', error)
} finally { } finally {
@@ -305,8 +214,8 @@ useHead(() => ({
content: t('catalogHub.meta.description', { content: t('catalogHub.meta.description', {
name: hub.value?.name || '', name: hub.value?.name || '',
country: hub.value?.country || '', country: hub.value?.country || '',
offers: offers.value.length, offers: sources.value.length,
suppliers: uniqueSuppliers.value.length suppliers: 0
}) })
} }
] ]

View File

@@ -5,10 +5,14 @@
map-id="hubs-map" map-id="hubs-map"
point-color="#10b981" point-color="#10b981"
:selected-id="selectedHubId" :selected-id="selectedHubId"
v-model:hovered-id="hoveredHubId"
@select="onSelectHub" @select="onSelectHub"
> >
<template #filters> <template #filters>
<CatalogFilters :filters="filters" v-model="selectedFilter" /> <div class="flex gap-2">
<CatalogFilterSelect :filters="filters" v-model="selectedFilter" />
<CatalogFilterSelect :filters="countryFilters" v-model="selectedCountry" />
</div>
</template> </template>
<template #card="{ item }"> <template #card="{ item }">
@@ -45,7 +49,9 @@ const {
items, items,
total, total,
selectedFilter, selectedFilter,
selectedCountry,
filters, filters,
countryFilters,
isLoading, isLoading,
isLoadingMore, isLoadingMore,
itemsByCountry, itemsByCountry,
@@ -54,8 +60,9 @@ const {
init init
} = useCatalogHubs() } = useCatalogHubs()
// Selected hub for map highlighting // Selected/hovered hub for map highlighting
const selectedHubId = ref<string>() const selectedHubId = ref<string>()
const hoveredHubId = ref<string>()
const onSelectHub = (hub: any) => { const onSelectHub = (hub: any) => {
selectedHubId.value = hub.uuid selectedHubId.value = hub.uuid

View File

@@ -1,81 +1,40 @@
<template> <template>
<div class="flex flex-col flex-1 min-h-0"> <CatalogPage
<!-- Loading state --> :items="itemsForMap"
<div v-if="isLoading || productsLoading" class="flex-1 flex items-center justify-center"> :loading="isLoading || productsLoading"
<Card padding="lg"> map-id="offers-map"
<Stack align="center" justify="center" gap="3"> point-color="#f59e0b"
<Spinner /> :selected-id="selectedOfferId"
<Text tone="muted">{{ t('catalogLanding.states.loading') }}</Text> v-model:hovered-id="hoveredOfferId"
</Stack> @select="onSelectOffer"
</Card> >
</div> <template #filters>
<CatalogFilterSelect
<!-- Products catalog (when no product selected) --> v-if="productFilters.length > 1"
<div v-else-if="!selectedProductUuid" class="flex-1 overflow-y-auto py-4"> :filters="productFilters"
<Stack gap="4"> :model-value="selectedProductUuid || 'all'"
<Grid :cols="1" :md="2" :lg="3" :gap="4"> @update:model-value="onProductFilterChange"
<Card />
v-for="product in products"
:key="product.uuid"
padding="sm"
interactive
@click="selectProduct(product)"
>
<Stack gap="2">
<Text size="base" weight="semibold">{{ product.name }}</Text>
<Text tone="muted">{{ product.categoryName || t('catalogProduct.labels.category_unknown') }}</Text>
</Stack>
</Card>
</Grid>
<Stack v-if="products.length === 0" align="center" gap="2">
<Text tone="muted">{{ t('catalogOffersSection.empty.no_products') }}</Text>
</Stack>
</Stack>
</div>
<!-- Offers for selected product -->
<template v-else>
<!-- Back button -->
<div class="py-2 px-4 lg:px-0">
<NuxtLink :to="localePath('/catalog/offers')" class="btn btn-ghost btn-sm gap-2">
<Icon name="lucide:arrow-left" size="16" />
{{ t('common.back') }}
</NuxtLink>
</div>
<CatalogPage
:items="items"
:loading="isLoading"
map-id="offers-map"
point-color="#f59e0b"
:selected-id="selectedOfferId"
@select="onSelectOffer"
>
<template #filters>
<CatalogFilters :filters="filters" v-model="selectedFilter" />
</template>
<template #card="{ item }">
<OfferCard :offer="item" />
</template>
<template #pagination>
<PaginationLoadMore
:shown="items.length"
:total="total"
:can-load-more="canLoadMore"
:loading="isLoadingMore"
@load-more="loadMore"
/>
</template>
<template #empty>
<Text tone="muted">{{ t('catalogOffersSection.empty.no_offers') }}</Text>
</template>
</CatalogPage>
</template> </template>
</div>
<template #card="{ item }">
<OfferCard :offer="item" />
</template>
<template #pagination>
<PaginationLoadMore
:shown="items.length"
:total="total"
:can-load-more="canLoadMore"
:loading="isLoadingMore"
@load-more="loadMore"
/>
</template>
<template #empty>
<Text tone="muted">{{ t('catalogOffersSection.empty.no_offers') }}</Text>
</template>
</CatalogPage>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -84,11 +43,8 @@ definePageMeta({
}) })
const { t } = useI18n() const { t } = useI18n()
const localePath = useLocalePath()
const route = useRoute()
const router = useRouter()
// Products catalog // Products for filter
const { const {
items: products, items: products,
isLoading: productsLoading, isLoading: productsLoading,
@@ -99,8 +55,7 @@ const {
const { const {
items, items,
total, total,
selectedFilter, selectedProductUuid,
filters,
isLoading, isLoading,
isLoadingMore, isLoadingMore,
canLoadMore, canLoadMore,
@@ -109,48 +64,40 @@ const {
setProductUuid setProductUuid
} = useCatalogOffers() } = useCatalogOffers()
// Get product from query // Map items with correct coordinate field names
const selectedProductUuid = computed(() => route.query.product as string | undefined) const itemsForMap = computed(() => items.value.map(offer => ({
...offer,
latitude: offer.locationLatitude,
longitude: offer.locationLongitude
})))
// Selected product info // Product filter options
const selectedProduct = computed(() => { const productFilters = computed(() => {
if (!selectedProductUuid.value) return null const all = [{ id: 'all', label: t('catalogOffersSection.filters.all_products') }]
return products.value.find(p => p.uuid === selectedProductUuid.value) const productOptions = products.value.map(p => ({
id: p.uuid,
label: p.name
}))
return [...all, ...productOptions]
}) })
const pageTitle = computed(() => { // Handle product filter change
if (selectedProduct.value) { const onProductFilterChange = (value: string) => {
return `${t('catalogOffersSection.header.title')}: ${selectedProduct.value.name}` setProductUuid(value === 'all' ? null : value)
}
return t('catalogOffersSection.header.select_product')
})
const selectProduct = (product: any) => {
router.push({
path: route.path,
query: { product: product.uuid }
})
} }
// Selected offer for map highlighting // Selected/hovered offer for map highlighting
const selectedOfferId = ref<string>() const selectedOfferId = ref<string>()
const hoveredOfferId = ref<string>()
const onSelectOffer = (offer: any) => { const onSelectOffer = (offer: any) => {
selectedOfferId.value = offer.uuid selectedOfferId.value = offer.uuid
} }
// Initialize // Initialize
await initProducts() await Promise.all([initProducts(), initOffers()])
// Watch for product changes
watch(selectedProductUuid, async (uuid) => {
setProductUuid(uuid || null)
if (uuid) {
await initOffers()
}
}, { immediate: true })
useHead(() => ({ useHead(() => ({
title: pageTitle.value title: t('catalogOffersSection.header.title')
})) }))
</script> </script>

View File

@@ -5,12 +5,9 @@
map-id="suppliers-map" map-id="suppliers-map"
point-color="#3b82f6" point-color="#3b82f6"
:selected-id="selectedSupplierId" :selected-id="selectedSupplierId"
v-model:hovered-id="hoveredSupplierId"
@select="onSelectSupplier" @select="onSelectSupplier"
> >
<template #filters>
<CatalogFilters :filters="filters" v-model="selectedFilter" />
</template>
<template #card="{ item }"> <template #card="{ item }">
<SupplierCard :supplier="item" /> <SupplierCard :supplier="item" />
</template> </template>
@@ -41,8 +38,6 @@ const { t } = useI18n()
const { const {
items, items,
total, total,
selectedFilter,
filters,
isLoading, isLoading,
isLoadingMore, isLoadingMore,
canLoadMore, canLoadMore,
@@ -50,8 +45,9 @@ const {
init init
} = useCatalogSuppliers() } = useCatalogSuppliers()
// Selected supplier for map highlighting // Selected/hovered supplier for map highlighting
const selectedSupplierId = ref<string>() const selectedSupplierId = ref<string>()
const hoveredSupplierId = ref<string>()
const onSelectSupplier = (supplier: any) => { const onSelectSupplier = (supplier: any) => {
selectedSupplierId.value = supplier.uuid || supplier.teamUuid selectedSupplierId.value = supplier.uuid || supplier.teamUuid

View File

@@ -1,41 +1,42 @@
<template> <template>
<Section variant="plain" paddingY="md"> <CatalogPage
<Stack gap="6"> :items="itemsForMap"
<Card v-if="isLoading" padding="lg"> :loading="isLoading"
<Stack align="center" gap="3"> map-id="addresses-map"
<Spinner /> point-color="#10b981"
<Text tone="muted">{{ t('profileAddresses.states.loading') }}</Text> :selected-id="selectedAddressId"
</Stack> v-model:hovered-id="hoveredAddressId"
</Card> :has-sub-nav="false"
@select="onSelectAddress"
>
<template #header>
<NuxtLink :to="localePath('/clientarea/addresses/new')">
<Button variant="outline" class="w-full">
<Icon name="lucide:plus" size="16" class="mr-2" />
{{ t('profileAddresses.actions.add') }}
</Button>
</NuxtLink>
</template>
<template v-else-if="items.length"> <template #card="{ item }">
<NuxtLink :to="localePath('/clientarea/addresses/map')" class="block h-48 rounded-lg overflow-hidden cursor-pointer"> <NuxtLink
<ClientOnly> :to="localePath(`/clientarea/addresses/${item.uuid}`)"
<MapboxGlobe class="block"
map-id="addresses-map" >
:locations="itemsWithCoords" <Card padding="sm" interactive>
:height="192" <div class="flex flex-col gap-1">
/> <Text size="base" weight="semibold" class="truncate">{{ item.name }}</Text>
</ClientOnly> <Text tone="muted" size="sm" class="line-clamp-2">{{ item.address }}</Text>
</NuxtLink> <div class="flex items-center mt-1">
<span class="text-lg">{{ isoToEmoji(item.countryCode) }}</span>
<Grid :cols="1" :md="2" :gap="4"> </div>
<NuxtLink v-for="addr in items" :key="addr.uuid" :to="localePath(`/clientarea/addresses/${addr.uuid}`)" class="block"> </div>
<Card padding="small" interactive> </Card>
<div class="flex flex-col gap-1"> </NuxtLink>
<Text size="base" weight="semibold" class="truncate">{{ addr.name }}</Text> </template>
<Text tone="muted" size="sm" class="line-clamp-2">{{ addr.address }}</Text>
<div class="flex items-center mt-1">
<span class="text-lg">{{ isoToEmoji(addr.countryCode) }}</span>
</div>
</div>
</Card>
</NuxtLink>
</Grid>
</template>
<template #empty>
<EmptyState <EmptyState
v-else
icon="📍" icon="📍"
:title="t('profileAddresses.empty.title')" :title="t('profileAddresses.empty.title')"
:description="t('profileAddresses.empty.description')" :description="t('profileAddresses.empty.description')"
@@ -43,8 +44,8 @@
:action-to="localePath('/clientarea/addresses/new')" :action-to="localePath('/clientarea/addresses/new')"
action-icon="lucide:plus" action-icon="lucide:plus"
/> />
</Stack> </template>
</Section> </CatalogPage>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -59,10 +60,29 @@ const localePath = useLocalePath()
const { const {
items, items,
isLoading, isLoading,
itemsWithCoords,
isoToEmoji, isoToEmoji,
init init
} = useTeamAddresses() } = useTeamAddresses()
const selectedAddressId = ref<string>()
const hoveredAddressId = ref<string>()
// Map items for CatalogPage
const itemsForMap = computed(() => {
return items.value.map(addr => ({
uuid: addr.uuid,
name: addr.name,
address: addr.address,
latitude: addr.latitude,
longitude: addr.longitude,
countryCode: addr.countryCode,
country: addr.countryCode
}))
})
const onSelectAddress = (item: any) => {
selectedAddressId.value = item.uuid
}
await init() await init()
</script> </script>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="flex flex-col h-[calc(100vh-4rem)]"> <div class="flex flex-col h-[calc(100vh-8rem)]">
<!-- Chat messages area --> <!-- Chat messages area -->
<div ref="chatContainer" class="flex-1 overflow-y-auto p-4 space-y-3"> <div ref="chatContainer" class="flex-1 overflow-y-auto p-4 pb-24 space-y-3">
<div <div
v-for="(message, idx) in chat" v-for="(message, idx) in chat"
:key="idx" :key="idx"
@@ -9,7 +9,7 @@
:class="message.role === 'user' ? 'justify-end' : 'justify-start'" :class="message.role === 'user' ? 'justify-end' : 'justify-start'"
> >
<div <div
class="max-w-[80%] lg:max-w-[60%] rounded-2xl px-4 py-3 shadow-sm" class="max-w-[80%] lg:max-w-[70%] rounded-2xl px-4 py-3 shadow-sm"
:class="message.role === 'user' ? 'bg-primary text-primary-content' : 'bg-base-100 text-base-content'" :class="message.role === 'user' ? 'bg-primary text-primary-content' : 'bg-base-100 text-base-content'"
> >
<Text weight="semibold" class="mb-1"> <Text weight="semibold" class="mb-1">
@@ -25,9 +25,9 @@
</div> </div>
</div> </div>
<!-- Input area pinned to bottom --> <!-- Input area fixed to bottom -->
<div class="border-t border-base-300 bg-base-100 p-4"> <div class="fixed bottom-0 left-0 right-0 border-t border-base-300 bg-base-100 p-4 z-30">
<form class="flex items-end gap-3 max-w-4xl mx-auto" @submit.prevent="handleSend"> <form class="flex items-end gap-3 px-4 lg:px-6" @submit.prevent="handleSend">
<div class="flex-1"> <div class="flex-1">
<Textarea <Textarea
v-model="input" v-model="input"

View File

@@ -1,88 +1,76 @@
<template> <template>
<Section variant="plain" paddingY="md"> <CatalogPage
<Stack gap="6"> :items="listItems"
<Alert v-if="hasError" variant="error"> :map-items="mapPoints"
<Stack gap="2"> :loading="isLoading"
<Heading :level="4" weight="semibold">{{ $t('common.error') }}</Heading> map-id="orders-map"
<Text tone="muted">{{ error }}</Text> point-color="#6366f1"
<Button @click="load">{{ t('ordersList.errors.retry') }}</Button> :selected-id="selectedOrderId"
</Stack> v-model:hovered-id="hoveredOrderId"
</Alert> :has-sub-nav="false"
@select="onSelectOrder"
>
<template #filters>
<CatalogFilterSelect :filters="filters" v-model="selectedFilter" />
</template>
<Stack v-else-if="isLoading" align="center" justify="center" gap="3"> <template #card="{ item }">
<Spinner /> <Card padding="lg" class="cursor-pointer">
<Text tone="muted">{{ t('ordersList.states.loading') }}</Text> <Stack gap="4">
</Stack> <Stack direction="row" justify="between" align="center">
<Stack gap="1">
<template v-else> <Text size="sm" tone="muted">{{ t('ordersList.card.order_label') }}</Text>
<template v-if="items.length"> <Heading :level="3">#{{ item.name }}</Heading>
<NuxtLink :to="localePath('/clientarea/orders/map')" class="block h-48 rounded-lg overflow-hidden cursor-pointer"> </Stack>
<ClientOnly> <div class="badge badge-outline">
<OrdersRoutesPreview :routes="routesForMap" :height="192" /> {{ getOrderStartDate(item) }} {{ getOrderEndDate(item) }}
</ClientOnly> </div>
</NuxtLink>
<CatalogFilters :filters="filters" v-model="selectedFilter" />
<Stack gap="4">
<Card v-for="order in filteredItems" :key="order.uuid" padding="lg" class="cursor-pointer" @click="openOrder(order)">
<Stack gap="4">
<Stack direction="row" justify="between" align="center">
<Stack gap="1">
<Text size="sm" tone="muted">{{ t('ordersList.card.order_label') }}</Text>
<Heading :level="3">#{{ order.name }}</Heading>
</Stack>
<div class="badge badge-outline">
{{ getOrderStartDate(order) }} {{ getOrderEndDate(order) }}
</div>
</Stack>
<div class="divider my-0"></div>
<Grid :cols="1" :md="3" :gap="3">
<Stack gap="1">
<Text size="sm" tone="muted">{{ t('ordersList.card.route') }}</Text>
<Text weight="semibold">{{ order.sourceLocationName }} {{ order.destinationLocationName }}</Text>
</Stack>
<Stack gap="1">
<Text size="sm" tone="muted">{{ t('ordersList.card.product') }}</Text>
<Text>
{{ order.orderLines?.[0]?.productName || t('ordersList.card.product_loading') }}
<template v-if="order.orderLines?.length > 1">
<span class="badge badge-ghost ml-2">+{{ order.orderLines.length - 1 }}</span>
</template>
</Text>
<Text tone="muted" size="sm">
{{ order.orderLines?.[0]?.quantity || 0 }} {{ order.orderLines?.[0]?.unit || t('ordersList.card.unit_tons') }}
</Text>
</Stack>
<Stack gap="1">
<Text size="sm" tone="muted">{{ t('ordersList.card.status') }}</Text>
<Badge :variant="getStatusVariant(order.status)">
{{ getStatusText(order.status) }}
</Badge>
<Text tone="muted" size="sm">{{ t('ordersList.card.stages_completed', { done: getCompletedStages(order), total: order.stages?.length || 0 }) }}</Text>
</Stack>
</Grid>
</Stack>
</Card>
</Stack> </Stack>
</template>
<EmptyState <div class="divider my-0"></div>
v-else
icon="📦" <Grid :cols="1" :md="3" :gap="3">
:title="$t('orders.no_orders')" <Stack gap="1">
:description="$t('orders.no_orders_desc')" <Text size="sm" tone="muted">{{ t('ordersList.card.route') }}</Text>
:action-label="$t('orders.create_new')" <Text weight="semibold">{{ item.sourceLocationName }} {{ item.destinationLocationName }}</Text>
:action-to="localePath('/clientarea')" </Stack>
action-icon="lucide:plus"
/> <Stack gap="1">
</template> <Text size="sm" tone="muted">{{ t('ordersList.card.product') }}</Text>
</Stack> <Text>
</Section> {{ item.orderLines?.[0]?.productName || t('ordersList.card.product_loading') }}
<template v-if="item.orderLines?.length > 1">
<span class="badge badge-ghost ml-2">+{{ item.orderLines.length - 1 }}</span>
</template>
</Text>
<Text tone="muted" size="sm">
{{ item.orderLines?.[0]?.quantity || 0 }} {{ item.orderLines?.[0]?.unit || t('ordersList.card.unit_tons') }}
</Text>
</Stack>
<Stack gap="1">
<Text size="sm" tone="muted">{{ t('ordersList.card.status') }}</Text>
<Badge :variant="getStatusVariant(item.status)">
{{ getStatusText(item.status) }}
</Badge>
<Text tone="muted" size="sm">{{ t('ordersList.card.stages_completed', { done: getCompletedStages(item), total: item.stages?.length || 0 }) }}</Text>
</Stack>
</Grid>
</Stack>
</Card>
</template>
<template #empty>
<EmptyState
icon="📦"
:title="$t('orders.no_orders')"
:description="$t('orders.no_orders_desc')"
:action-label="$t('orders.create_new')"
:action-to="localePath('/clientarea')"
action-icon="lucide:plus"
/>
</template>
</CatalogPage>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -95,31 +83,67 @@ const localePath = useLocalePath()
const { t } = useI18n() const { t } = useI18n()
const { const {
items,
filteredItems, filteredItems,
isLoading, isLoading,
filters, filters,
selectedFilter, selectedFilter,
routesForMap,
load,
init, init,
getStatusVariant, getStatusVariant,
getStatusText getStatusText
} = useTeamOrders() } = useTeamOrders()
const hasError = ref(false) const selectedOrderId = ref<string>()
const error = ref('') const hoveredOrderId = ref<string>()
try { // List items - one per order (for card rendering)
await init() const listItems = computed(() => {
} catch (err: any) { return filteredItems.value.map(order => ({
hasError.value = true ...order,
error.value = err.message || t('ordersDetail.errors.load_failed') uuid: order.uuid,
name: order.name || `#${order.uuid.slice(0, 8)}`,
latitude: order.sourceLatitude,
longitude: order.sourceLongitude,
country: order.sourceLocationName
}))
})
// Map points - two per order (source + destination)
const mapPoints = computed(() => {
const result: any[] = []
filteredItems.value.forEach(order => {
// Source point
if (order.sourceLatitude && order.sourceLongitude) {
result.push({
uuid: `${order.uuid}-source`,
name: `📦 ${order.sourceLocationName}`,
latitude: order.sourceLatitude,
longitude: order.sourceLongitude,
country: order.sourceLocationName,
orderUuid: order.uuid
})
}
// Destination point - get from last stage
const lastStage = order.stages?.[order.stages.length - 1]
if (lastStage?.destinationLatitude && lastStage?.destinationLongitude) {
result.push({
uuid: `${order.uuid}-dest`,
name: `🏁 ${order.destinationLocationName}`,
latitude: lastStage.destinationLatitude,
longitude: lastStage.destinationLongitude,
country: order.destinationLocationName,
orderUuid: order.uuid
})
}
})
return result
})
const onSelectOrder = (item: any) => {
selectedOrderId.value = item.uuid
navigateTo(localePath(`/clientarea/orders/${item.uuid}`))
} }
const openOrder = (order: any) => { await init()
navigateTo(localePath(`/clientarea/orders/${order.uuid}`))
}
const getOrderStartDate = (order: any) => { const getOrderStartDate = (order: any) => {
if (!order.createdAt) return t('ordersDetail.labels.dates_undefined') if (!order.createdAt) return t('ordersDetail.labels.dates_undefined')

View File

@@ -1,11 +1,41 @@
<template> <template>
<Stack gap="12"> <Stack gap="12">
<!-- How it works -->
<Section variant="plain">
<Stack gap="6" align="center">
<Heading :level="2">{{ $t('howto.title') }}</Heading>
<Grid :cols="1" :md="3" :gap="6">
<Card padding="lg">
<Stack gap="3" align="center">
<IconCircle tone="primary">🔍</IconCircle>
<Heading :level="3" weight="semibold">{{ $t('howto.step1.title') }}</Heading>
<Text tone="muted" align="center">{{ $t('howto.step1.description') }}</Text>
</Stack>
</Card>
<Card padding="lg">
<Stack gap="3" align="center">
<IconCircle tone="primary">🤝</IconCircle>
<Heading :level="3" weight="semibold">{{ $t('howto.step2.title') }}</Heading>
<Text tone="muted" align="center">{{ $t('howto.step2.description') }}</Text>
</Stack>
</Card>
<Card padding="lg">
<Stack gap="3" align="center">
<IconCircle tone="primary"></IconCircle>
<Heading :level="3" weight="semibold">{{ $t('howto.step3.title') }}</Heading>
<Text tone="muted" align="center">{{ $t('howto.step3.description') }}</Text>
</Stack>
</Card>
</Grid>
</Stack>
</Section>
<!-- Who it's for -->
<Section variant="plain"> <Section variant="plain">
<Stack gap="8" align="center"> <Stack gap="8" align="center">
<Heading :level="2">{{ $t('roles.title') }}</Heading> <Heading :level="2">{{ $t('roles.title') }}</Heading>
<Text align="center" tone="muted">{{ $t('about.description') }}</Text>
<Grid :cols="1" :lg="3" :gap="6"> <Grid :cols="1" :md="3" :gap="6">
<Card padding="lg"> <Card padding="lg">
<Stack gap="4" align="center"> <Stack gap="4" align="center">
<IconCircle tone="primary">🏭</IconCircle> <IconCircle tone="primary">🏭</IconCircle>
@@ -53,35 +83,6 @@
</Grid> </Grid>
</Stack> </Stack>
</Section> </Section>
<Section variant="plain">
<Stack gap="6" align="center">
<Heading :level="2">{{ $t('howto.title') }}</Heading>
<Grid :cols="1" :md="3" :gap="6">
<Card padding="lg">
<Stack gap="3" align="center">
<IconCircle tone="primary">🔍</IconCircle>
<Heading :level="3" weight="semibold">{{ $t('howto.step1.title') }}</Heading>
<Text tone="muted" align="center">{{ $t('howto.step1.description') }}</Text>
</Stack>
</Card>
<Card padding="lg">
<Stack gap="3" align="center">
<IconCircle tone="primary">🤝</IconCircle>
<Heading :level="3" weight="semibold">{{ $t('howto.step2.title') }}</Heading>
<Text tone="muted" align="center">{{ $t('howto.step2.description') }}</Text>
</Stack>
</Card>
<Card padding="lg">
<Stack gap="3" align="center">
<IconCircle tone="primary"></IconCircle>
<Heading :level="3" weight="semibold">{{ $t('howto.step3.title') }}</Heading>
<Text tone="muted" align="center">{{ $t('howto.step3.description') }}</Text>
</Stack>
</Card>
</Grid>
</Stack>
</Section>
</Stack> </Stack>
</template> </template>

View File

@@ -1,86 +1,79 @@
<template> <template>
<div class="container mx-auto px-4 py-8"> <CatalogPage
<PageHeader :title="t('common.selectLocation')"> :items="itemsWithCoords"
<template #actions> :loading="isLoading"
<button class="btn btn-ghost" @click="router.back()"> map-id="select-location-map"
<Icon name="lucide:x" size="20" /> point-color="#10b981"
</button> :selected-id="selectedHubId"
</template> v-model:hovered-id="hoveredHubId"
</PageHeader> :has-sub-nav="false"
@select="selectHub"
<Stack gap="8" class="mt-6"> >
<!-- My addresses --> <template #header>
<Stack v-if="isAuthenticated && teamAddresses?.length" gap="4">
<Heading :level="3">{{ t('profileAddresses.header.title') }}</Heading>
<Grid :cols="1" :md="2" :gap="4">
<Card
v-for="addr in teamAddresses"
:key="addr.uuid"
padding="small"
interactive
:class="{ 'ring-2 ring-primary': isSelected('address', addr.uuid) }"
@click="selectAddress(addr)"
>
<Stack gap="2">
<Stack direction="row" align="center" gap="2">
<Icon name="lucide:map-pin" size="18" class="text-primary" />
<Text size="base" weight="semibold">{{ addr.name }}</Text>
<Pill v-if="addr.isDefault" variant="outline" size="sm">Default</Pill>
</Stack>
<Text tone="muted" size="sm">{{ addr.address }}</Text>
</Stack>
</Card>
</Grid>
</Stack>
<!-- Hubs -->
<Stack gap="4"> <Stack gap="4">
<Heading :level="3">{{ t('catalogMap.hubsTab') }}</Heading> <!-- Back button -->
<div class="flex justify-between items-center">
<NuxtLink :to="localePath('/select-location/map')" class="block h-48 rounded-lg overflow-hidden cursor-pointer"> <Heading :level="2">{{ t('common.selectLocation') }}</Heading>
<ClientOnly> <button class="btn btn-ghost btn-sm" @click="router.back()">
<MapboxGlobe <Icon name="lucide:x" size="20" />
map-id="select-location-map" </button>
:locations="itemsWithCoords"
:height="192"
/>
</ClientOnly>
</NuxtLink>
<CatalogFilters :filters="filters" v-model="selectedFilter" />
<div v-if="isLoading" class="flex items-center justify-center p-8">
<span class="loading loading-spinner loading-lg" />
</div> </div>
<EmptyState <!-- My addresses section -->
v-else-if="!items?.length" <Stack v-if="isAuthenticated && teamAddresses?.length" gap="3">
:title="t('catalogMap.noHubs')" <Text weight="semibold">{{ t('profileAddresses.header.title') }}</Text>
/> <Stack gap="2">
<Card
v-for="addr in teamAddresses"
:key="addr.uuid"
padding="sm"
interactive
:class="{ 'ring-2 ring-primary': isSelected('address', addr.uuid) }"
@click="selectAddress(addr)"
>
<Stack gap="1">
<Stack direction="row" align="center" gap="2">
<Icon name="lucide:map-pin" size="16" class="text-primary" />
<Text size="sm" weight="semibold">{{ addr.name }}</Text>
<Pill v-if="addr.isDefault" variant="outline" size="sm">Default</Pill>
</Stack>
<Text tone="muted" size="xs">{{ addr.address }}</Text>
</Stack>
</Card>
</Stack>
</Stack>
<template v-else> <!-- Hubs section header -->
<Grid :cols="1" :md="2" :gap="4"> <Text weight="semibold">{{ t('catalogMap.hubsTab') }}</Text>
<HubCard
v-for="hub in items"
:key="hub.uuid"
:hub="hub"
selectable
:is-selected="isSelected('hub', hub.uuid)"
@select="selectHub(hub)"
/>
</Grid>
<PaginationLoadMore
:shown="items.length"
:total="total"
:can-load-more="canLoadMore"
:loading="isLoadingMore"
@load-more="loadMore"
/>
</template>
</Stack> </Stack>
</Stack> </template>
</div>
<template #filters>
<CatalogFilterSelect :filters="filters" v-model="selectedFilter" />
</template>
<template #card="{ item }">
<HubCard
:hub="item"
selectable
:is-selected="isSelected('hub', item.uuid)"
/>
</template>
<template #pagination>
<PaginationLoadMore
:shown="items.length"
:total="total"
:can-load-more="canLoadMore"
:loading="isLoadingMore"
@load-more="loadMore"
/>
</template>
<template #empty>
<EmptyState :title="t('catalogMap.noHubs')" />
</template>
</CatalogPage>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -113,6 +106,10 @@ const {
init init
} = useCatalogHubs() } = useCatalogHubs()
// Selected/hovered hub for map
const selectedHubId = ref<string>()
const hoveredHubId = ref<string>()
await init() await init()
// Load team addresses // Load team addresses
@@ -151,7 +148,7 @@ const goToRequestIfReady = () => {
} }
const selectHub = async (hub: any) => { const selectHub = async (hub: any) => {
console.log('[selectHub] called', { hub, isSearchMode: isSearchMode.value }) selectedHubId.value = hub.uuid
if (isSearchMode.value) { if (isSearchMode.value) {
searchStore.setLocation(hub.name) searchStore.setLocation(hub.name)
@@ -162,13 +159,9 @@ const selectHub = async (hub: any) => {
} }
try { try {
console.log('[selectHub] calling locationStore.select')
const success = await locationStore.select('hub', hub.uuid, hub.name, hub.latitude, hub.longitude) const success = await locationStore.select('hub', hub.uuid, hub.name, hub.latitude, hub.longitude)
console.log('[selectHub] result:', success)
if (success) { if (success) {
router.back() router.back()
} else {
console.error('[selectHub] Selection failed - success=false')
} }
} catch (e) { } catch (e) {
console.error('[selectHub] Error:', e) console.error('[selectHub] Error:', e)
@@ -176,8 +169,6 @@ const selectHub = async (hub: any) => {
} }
const selectAddress = async (addr: any) => { const selectAddress = async (addr: any) => {
console.log('[selectAddress] called', { addr, isSearchMode: isSearchMode.value })
if (isSearchMode.value) { if (isSearchMode.value) {
searchStore.setLocation(addr.address || addr.name) searchStore.setLocation(addr.address || addr.name)
searchStore.setLocationUuid(addr.uuid) searchStore.setLocationUuid(addr.uuid)
@@ -187,13 +178,9 @@ const selectAddress = async (addr: any) => {
} }
try { try {
console.log('[selectAddress] calling locationStore.select')
const success = await locationStore.select('address', addr.uuid, addr.name, addr.latitude, addr.longitude) const success = await locationStore.select('address', addr.uuid, addr.name, addr.latitude, addr.longitude)
console.log('[selectAddress] result:', success)
if (success) { if (success) {
router.back() router.back()
} else {
console.error('[selectAddress] Selection failed - success=false')
} }
} catch (e) { } catch (e) {
console.error('[selectAddress] Error:', e) console.error('[selectAddress] Error:', e)

View File

@@ -0,0 +1,9 @@
query GetAvailableProducts {
getAvailableProducts {
uuid
name
categoryId
categoryName
terminusSchemaId
}
}

View File

@@ -1,8 +1,7 @@
query GetOffers($status: String, $productUuid: String, $locationUuid: String, $categoryName: String, $teamUuid: String, $limit: Int, $offset: Int) { query GetOffers($productUuid: String, $locationUuid: String, $categoryName: String, $teamUuid: String, $limit: Int, $offset: Int) {
getOffers(status: $status, productUuid: $productUuid, locationUuid: $locationUuid, categoryName: $categoryName, teamUuid: $teamUuid, limit: $limit, offset: $offset) { getOffers(productUuid: $productUuid, locationUuid: $locationUuid, categoryName: $categoryName, teamUuid: $teamUuid, limit: $limit, offset: $offset) {
uuid uuid
teamUuid teamUuid
status
# Location # Location
locationUuid locationUuid
locationName locationName
@@ -25,5 +24,5 @@ query GetOffers($status: String, $productUuid: String, $locationUuid: String, $c
createdAt createdAt
updatedAt updatedAt
} }
getOffersCount(status: $status, productUuid: $productUuid, locationUuid: $locationUuid, categoryName: $categoryName, teamUuid: $teamUuid) getOffersCount(productUuid: $productUuid, locationUuid: $locationUuid, categoryName: $categoryName, teamUuid: $teamUuid)
} }

View File

@@ -1,5 +1,5 @@
query GetSupplierProfiles($country: String, $isVerified: Boolean, $limit: Int, $offset: Int) { query GetSupplierProfiles($country: String, $limit: Int, $offset: Int) {
getSupplierProfiles(country: $country, isVerified: $isVerified, limit: $limit, offset: $offset) { getSupplierProfiles(country: $country, limit: $limit, offset: $offset) {
uuid uuid
teamUuid teamUuid
name name
@@ -7,11 +7,9 @@ query GetSupplierProfiles($country: String, $isVerified: Boolean, $limit: Int, $
country country
countryCode countryCode
logoUrl logoUrl
isVerified
isActive
offersCount offersCount
latitude latitude
longitude longitude
} }
getSupplierProfilesCount(country: $country, isVerified: $isVerified) getSupplierProfilesCount(country: $country)
} }

View File

@@ -0,0 +1,31 @@
query FindProductRoutes($productUuid: String!, $toUuid: String!, $limitSources: Int, $limitRoutes: Int) {
findProductRoutes(
productUuid: $productUuid
toUuid: $toUuid
limitSources: $limitSources
limitRoutes: $limitRoutes
) {
sourceUuid
sourceName
sourceLat
sourceLon
distanceKm
routes {
totalDistanceKm
totalTimeSeconds
stages {
fromUuid
fromName
fromLat
fromLon
toUuid
toName
toLat
toLon
distanceKm
travelTimeSeconds
transportType
}
}
}
}

View File

@@ -0,0 +1,3 @@
query GetHubCountries {
hubCountries
}

View File

@@ -1,5 +1,5 @@
query GetNodes($limit: Int, $offset: Int, $transportType: String) { query GetNodes($limit: Int, $offset: Int, $transportType: String, $country: String) {
nodes(limit: $limit, offset: $offset, transportType: $transportType) { nodes(limit: $limit, offset: $offset, transportType: $transportType, country: $country) {
uuid uuid
name name
latitude latitude
@@ -9,5 +9,5 @@ query GetNodes($limit: Int, $offset: Int, $transportType: String) {
syncedAt syncedAt
transportTypes transportTypes
} }
nodesCount(transportType: $transportType) nodesCount(transportType: $transportType, country: $country)
} }

View File

@@ -6,6 +6,8 @@ query GetTeamOrders {
totalAmount totalAmount
currency currency
sourceLocationName sourceLocationName
sourceLatitude
sourceLongitude
destinationLocationName destinationLocationName
createdAt createdAt
orderLines { orderLines {

View File

@@ -1,5 +1,6 @@
{ {
"cabinetNav": { "cabinetNav": {
"search": "Search",
"catalog": "Catalog", "catalog": "Catalog",
"orders": "My orders", "orders": "My orders",
"addresses": "My addresses", "addresses": "My addresses",

View File

@@ -42,6 +42,12 @@
"byRoad": "By Road", "byRoad": "By Road",
"byRail": "By Rail", "byRail": "By Rail",
"empty": "No connections available" "empty": "No connections available"
},
"sources": {
"title": "Available sources",
"selectProduct": "Select a product",
"empty": "No sources for this product",
"loading": "Loading routes..."
} }
} }
} }

View File

@@ -11,6 +11,7 @@
}, },
"filters": { "filters": {
"all": "All", "all": "All",
"all_countries": "All countries",
"auto": "Auto", "auto": "Auto",
"rail": "Rail", "rail": "Rail",
"sea": "Sea", "sea": "Sea",

View File

@@ -9,7 +9,8 @@
}, },
"filters": { "filters": {
"all": "All", "all": "All",
"active": "Active" "active": "Active",
"all_products": "All products"
}, },
"empty": { "empty": {
"no_offers": "No active offers", "no_offers": "No active offers",

View File

@@ -3,6 +3,17 @@
"header": { "header": {
"title": "KYC verification" "title": "KYC verification"
}, },
"list": {
"title": "My applications",
"unnamed": "Unnamed company",
"submitted": "Submitted",
"inn": "INN",
"status": {
"approved": "Approved",
"rejected": "Rejected",
"pending": "Pending"
}
},
"errors": { "errors": {
"title": "Error", "title": "Error",
"retry": "Retry", "retry": "Retry",

View File

@@ -1,5 +1,6 @@
{ {
"cabinetNav": { "cabinetNav": {
"search": "Поиск",
"catalog": "Каталог", "catalog": "Каталог",
"orders": "Мои заказы", "orders": "Мои заказы",
"addresses": "Мои адреса", "addresses": "Мои адреса",

View File

@@ -42,6 +42,12 @@
"byRoad": "По автодороге", "byRoad": "По автодороге",
"byRail": "По железной дороге", "byRail": "По железной дороге",
"empty": "Нет доступных маршрутов" "empty": "Нет доступных маршрутов"
},
"sources": {
"title": "Откуда можно привезти",
"selectProduct": "Выберите товар",
"empty": "Нет источников для этого товара",
"loading": "Загрузка маршрутов..."
} }
} }
} }

View File

@@ -11,6 +11,7 @@
}, },
"filters": { "filters": {
"all": "Все", "all": "Все",
"all_countries": "Все страны",
"auto": "Авто", "auto": "Авто",
"rail": "Ж/д", "rail": "Ж/д",
"sea": "Море", "sea": "Море",

View File

@@ -9,7 +9,8 @@
}, },
"filters": { "filters": {
"all": "Все", "all": "Все",
"active": "Активные" "active": "Активные",
"all_products": "Все товары"
}, },
"empty": { "empty": {
"no_offers": "Нет активных предложений", "no_offers": "Нет активных предложений",

View File

@@ -3,6 +3,17 @@
"header": { "header": {
"title": "Верификация KYC" "title": "Верификация KYC"
}, },
"list": {
"title": "Мои заявки",
"unnamed": "Без названия",
"submitted": "Подано",
"inn": "ИНН",
"status": {
"approved": "Одобрено",
"rejected": "Отклонено",
"pending": "На рассмотрении"
}
},
"errors": { "errors": {
"title": "Ошибка", "title": "Ошибка",
"retry": "Повторить", "retry": "Повторить",