Simplify GEO API - use new list endpoints and routes in nearestOffers
All checks were successful
Build Docker Image / build (push) Successful in 4m11s
All checks were successful
Build Docker Image / build (push) Successful in 4m11s
- Replace GetNodesDocument with HubsListDocument in useCatalogHubs.ts - Replace GetSupplierProfilesDocument with SuppliersListDocument in useCatalogSuppliers.ts - Replace manual grouping with ProductsListDocument in useCatalogProducts.ts - Update nearestOffers to pass hubUuid for server-side route calculation - Remove RouteToCoordinate calls - routes now included in nearestOffers response - Delete 15 obsolete GraphQL files - Add 3 new list endpoints: HubsList, SuppliersList, ProductsList - Fix TypeScript errors in CalcResultContent, LocationsContent, hubs page, location store
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GetNodeConnectionsDocument, NearestOffersDocument } from '~/composables/graphql/public/geo-generated'
|
||||
import { GetNodeDocument, NearestOffersDocument } from '~/composables/graphql/public/geo-generated'
|
||||
|
||||
definePageMeta({
|
||||
layout: 'topnav'
|
||||
@@ -122,16 +122,16 @@ const getMockPriceHistory = (uuid: string): number[] => {
|
||||
|
||||
// Initial load
|
||||
try {
|
||||
// First load hub connections to get coordinates
|
||||
const { data: connectionsData } = await useServerQuery(
|
||||
'hub-connections',
|
||||
GetNodeConnectionsDocument,
|
||||
// First load hub node to get coordinates
|
||||
const { data: hubData } = await useServerQuery(
|
||||
'hub-node',
|
||||
GetNodeDocument,
|
||||
{ uuid: hubId.value },
|
||||
'public',
|
||||
'geo'
|
||||
)
|
||||
|
||||
hub.value = connectionsData.value?.nodeConnections?.hub || null
|
||||
hub.value = hubData.value?.node || null
|
||||
|
||||
// Load offers near hub and group by product
|
||||
if (hub.value?.latitude && hub.value?.longitude) {
|
||||
|
||||
Reference in New Issue
Block a user