From 65b07271d9118d7f6e1f9f4e704ec631049975e4 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev Date: Mon, 26 Jan 2026 14:08:21 +0700 Subject: [PATCH] Simplify GEO API - use new list endpoints and routes in nearestOffers - 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 --- app/components/CalcResultContent.vue | 52 ++--- app/components/LocationsContent.vue | 6 +- .../graphql/public/geo-generated.ts | 205 +++++++----------- app/composables/useCatalogHubs.ts | 31 +-- app/composables/useCatalogInfo.ts | 51 +---- app/composables/useCatalogProducts.ts | 10 +- app/composables/useCatalogSuppliers.ts | 43 +--- app/pages/catalog/hubs/[id]/index.vue | 12 +- app/stores/location.ts | 8 +- .../public/geo/GetHubsForProduct.graphql | 11 - .../public/geo/GetHubsNearOffer.graphql | 11 - graphql/operations/public/geo/GetNode.graphql | 11 +- .../public/geo/GetNodeConnections.graphql | 40 ---- .../operations/public/geo/GetNodes.graphql | 13 -- .../public/geo/GetOfferToHub.graphql | 26 --- .../public/geo/GetOffersByHub.graphql | 26 --- .../public/geo/GetOffersByProduct.graphql | 16 -- .../geo/GetOffersBySupplierProduct.graphql | 16 -- .../operations/public/geo/GetProducts.graphql | 7 - .../public/geo/GetProductsBySupplier.graphql | 7 - .../public/geo/GetProductsNearHub.graphql | 7 - .../public/geo/GetSuppliers.graphql | 5 - .../public/geo/GetSuppliersForProduct.graphql | 5 - .../operations/public/geo/HubsList.graphql | 11 + .../public/geo/NearestOffers.graphql | 23 +- .../public/geo/ProductsList.graphql | 7 + .../public/geo/RouteToCoordinate.graphql | 26 --- .../public/geo/SuppliersList.graphql | 8 + 28 files changed, 190 insertions(+), 504 deletions(-) delete mode 100644 graphql/operations/public/geo/GetHubsForProduct.graphql delete mode 100644 graphql/operations/public/geo/GetHubsNearOffer.graphql delete mode 100644 graphql/operations/public/geo/GetNodeConnections.graphql delete mode 100644 graphql/operations/public/geo/GetNodes.graphql delete mode 100644 graphql/operations/public/geo/GetOfferToHub.graphql delete mode 100644 graphql/operations/public/geo/GetOffersByHub.graphql delete mode 100644 graphql/operations/public/geo/GetOffersByProduct.graphql delete mode 100644 graphql/operations/public/geo/GetOffersBySupplierProduct.graphql delete mode 100644 graphql/operations/public/geo/GetProducts.graphql delete mode 100644 graphql/operations/public/geo/GetProductsBySupplier.graphql delete mode 100644 graphql/operations/public/geo/GetProductsNearHub.graphql delete mode 100644 graphql/operations/public/geo/GetSuppliers.graphql delete mode 100644 graphql/operations/public/geo/GetSuppliersForProduct.graphql create mode 100644 graphql/operations/public/geo/HubsList.graphql create mode 100644 graphql/operations/public/geo/ProductsList.graphql delete mode 100644 graphql/operations/public/geo/RouteToCoordinate.graphql create mode 100644 graphql/operations/public/geo/SuppliersList.graphql diff --git a/app/components/CalcResultContent.vue b/app/components/CalcResultContent.vue index 56c0277..8295354 100644 --- a/app/components/CalcResultContent.vue +++ b/app/components/CalcResultContent.vue @@ -64,7 +64,7 @@