Files
webapp/app/pages/catalog/suppliers/index.vue
Ruslan Bakiev 8d1b7c6dc7
All checks were successful
Build Docker Image / build (push) Successful in 4m31s
Unify CatalogPage: fixed map, hover support, delete ListMapLayout
2026-01-08 11:15:54 +07:00

62 lines
1.2 KiB
Vue

<template>
<CatalogPage
:items="items"
:loading="isLoading"
map-id="suppliers-map"
point-color="#3b82f6"
:selected-id="selectedSupplierId"
v-model:hovered-id="hoveredSupplierId"
@select="onSelectSupplier"
>
<template #card="{ item }">
<SupplierCard :supplier="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('catalogSuppliersSection.empty.no_suppliers') }}</Text>
</template>
</CatalogPage>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'topnav'
})
const { t } = useI18n()
const {
items,
total,
isLoading,
isLoadingMore,
canLoadMore,
loadMore,
init
} = useCatalogSuppliers()
// Selected/hovered supplier for map highlighting
const selectedSupplierId = ref<string>()
const hoveredSupplierId = ref<string>()
const onSelectSupplier = (supplier: any) => {
selectedSupplierId.value = supplier.uuid || supplier.teamUuid
}
await init()
useHead(() => ({
title: t('catalogSuppliersSection.header.title')
}))
</script>