refactor(webapp): Update to use new geo queries - offersByHub, offerToHub
All checks were successful
Build Docker Image / build (push) Successful in 4m23s
All checks were successful
Build Docker Image / build (push) Successful in 4m23s
- Rename GetOffersToHub → GetOffersByHub - Rename GetDeliveryToHub → GetOfferToHub - Delete FindRoutes.graphql, FindProductRoutes.graphql - Update catalog pages and CalcResultContent to use new query names - Regenerate GraphQL types
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GetNodeConnectionsDocument, GetOffersToHubDocument } from '~/composables/graphql/public/geo-generated'
|
||||
import { GetNodeConnectionsDocument, GetOffersByHubDocument } from '~/composables/graphql/public/geo-generated'
|
||||
import { GetAvailableProductsDocument, GetOfferDocument } from '~/composables/graphql/public/exchange-generated'
|
||||
|
||||
definePageMeta({
|
||||
@@ -238,7 +238,7 @@ const loadRoutes = async () => {
|
||||
|
||||
try {
|
||||
const data = await execute(
|
||||
GetOffersToHubDocument,
|
||||
GetOffersByHubDocument,
|
||||
{
|
||||
hubUuid: hubId.value,
|
||||
productUuid: productId.value,
|
||||
@@ -247,7 +247,7 @@ const loadRoutes = async () => {
|
||||
'public',
|
||||
'geo'
|
||||
)
|
||||
rawSources.value = (data?.offersToHub || []).filter(Boolean)
|
||||
rawSources.value = (data?.offersByHub || []).filter(Boolean)
|
||||
await loadOfferDetails()
|
||||
} catch (error) {
|
||||
console.error('Error loading offers:', error)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GetNodeConnectionsDocument, GetOffersToHubDocument } from '~/composables/graphql/public/geo-generated'
|
||||
import { GetNodeConnectionsDocument, GetOffersByHubDocument } from '~/composables/graphql/public/geo-generated'
|
||||
import { GetAvailableProductsDocument, GetOfferDocument } from '~/composables/graphql/public/exchange-generated'
|
||||
|
||||
definePageMeta({
|
||||
@@ -238,7 +238,7 @@ const loadRoutes = async () => {
|
||||
|
||||
try {
|
||||
const data = await execute(
|
||||
GetOffersToHubDocument,
|
||||
GetOffersByHubDocument,
|
||||
{
|
||||
hubUuid: hubId.value,
|
||||
productUuid: productId.value,
|
||||
@@ -247,7 +247,7 @@ const loadRoutes = async () => {
|
||||
'public',
|
||||
'geo'
|
||||
)
|
||||
rawSources.value = (data?.offersToHub || []).filter(Boolean)
|
||||
rawSources.value = (data?.offersByHub || []).filter(Boolean)
|
||||
await loadOfferDetails()
|
||||
} catch (error) {
|
||||
console.error('Error loading offers:', error)
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GetNodeConnectionsDocument, GetOffersBySupplierProductDocument, GetDeliveryToHubDocument } from '~/composables/graphql/public/geo-generated'
|
||||
import { GetNodeConnectionsDocument, GetOffersBySupplierProductDocument, GetOfferToHubDocument } from '~/composables/graphql/public/geo-generated'
|
||||
import {
|
||||
GetSupplierProfileDocument,
|
||||
GetSupplierProfilesDocument,
|
||||
@@ -272,7 +272,7 @@ const loadRoute = async (offerUuid: string) => {
|
||||
isLoadingRoute.value = true
|
||||
try {
|
||||
const data = await execute(
|
||||
GetDeliveryToHubDocument,
|
||||
GetOfferToHubDocument,
|
||||
{
|
||||
offerUuid,
|
||||
hubUuid: hubId.value
|
||||
@@ -280,7 +280,7 @@ const loadRoute = async (offerUuid: string) => {
|
||||
'public',
|
||||
'geo'
|
||||
)
|
||||
routeData.value = data?.deliveryToHub?.routes?.[0] || null
|
||||
routeData.value = data?.offerToHub?.routes?.[0] || null
|
||||
} catch (error) {
|
||||
console.error('Error loading route:', error)
|
||||
routeData.value = null
|
||||
|
||||
Reference in New Issue
Block a user