All checks were successful
Build Docker Image / build (push) Successful in 5m25s
- Make GlobalSearchBar functional with searchStore integration - Add destination search using hubs/nodes GraphQL query - Navigate to /request page instead of /catalog/offers - Remove hero section from index.vue (search is now in header) - Add padding (px-3 lg:px-6) to topnav layout - Implement split layout for catalog pages (offers, hubs, suppliers) - Left side: filters + scrollable card list (40%) - Right side: map (60%, hidden on mobile)
87 lines
2.1 KiB
Vue
87 lines
2.1 KiB
Vue
<template>
|
|
<div class="flex flex-col h-[calc(100vh-200px)]">
|
|
<!-- Header -->
|
|
<div class="py-4">
|
|
<PageHeader :title="t('catalogSuppliersSection.header.title')" />
|
|
</div>
|
|
|
|
<!-- Loading state -->
|
|
<div v-if="isLoading" class="flex-1 flex items-center justify-center">
|
|
<Card padding="lg">
|
|
<Stack align="center" justify="center" gap="3">
|
|
<Spinner />
|
|
<Text tone="muted">{{ t('catalogLanding.states.loading') }}</Text>
|
|
</Stack>
|
|
</Card>
|
|
</div>
|
|
|
|
<!-- Split Layout -->
|
|
<div v-else class="flex-1 flex gap-4 min-h-0">
|
|
<!-- Left side: Filters + Cards (scrollable) -->
|
|
<div class="w-full lg:w-2/5 overflow-y-auto pr-2">
|
|
<Stack gap="4">
|
|
<CatalogFilters :filters="filters" v-model="selectedFilter" />
|
|
|
|
<Stack gap="3">
|
|
<SupplierCard
|
|
v-for="supplier in items"
|
|
:key="supplier.uuid || supplier.teamUuid"
|
|
:supplier="supplier"
|
|
/>
|
|
</Stack>
|
|
|
|
<PaginationLoadMore
|
|
:shown="items.length"
|
|
:total="total"
|
|
:can-load-more="canLoadMore"
|
|
:loading="isLoadingMore"
|
|
@load-more="loadMore"
|
|
/>
|
|
|
|
<Stack v-if="total === 0" align="center" gap="2">
|
|
<Text tone="muted">{{ t('catalogSuppliersSection.empty.no_suppliers') }}</Text>
|
|
</Stack>
|
|
</Stack>
|
|
</div>
|
|
|
|
<!-- Right side: Map (sticky, hidden on mobile) -->
|
|
<div class="hidden lg:block lg:w-3/5 rounded-lg overflow-hidden">
|
|
<ClientOnly>
|
|
<MapboxGlobe
|
|
map-id="suppliers-map"
|
|
:locations="itemsWithCoords"
|
|
class="h-full w-full"
|
|
/>
|
|
</ClientOnly>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
definePageMeta({
|
|
layout: 'topnav'
|
|
})
|
|
|
|
const { t } = useI18n()
|
|
|
|
const {
|
|
items,
|
|
total,
|
|
selectedFilter,
|
|
filters,
|
|
isLoading,
|
|
isLoadingMore,
|
|
itemsWithCoords,
|
|
canLoadMore,
|
|
loadMore,
|
|
init
|
|
} = useCatalogSuppliers()
|
|
|
|
await init()
|
|
|
|
useHead(() => ({
|
|
title: t('catalogSuppliersSection.header.title')
|
|
}))
|
|
</script>
|