feat(catalog): filter map clusters by chips
All checks were successful
Build Docker Image / build (push) Successful in 5m1s

This commit is contained in:
Ruslan Bakiev
2026-02-07 08:35:22 +07:00
parent aa7790f45e
commit 755a92d194
7 changed files with 89 additions and 103 deletions

View File

@@ -116,13 +116,6 @@
:key="product.uuid ?? index"
class="relative group"
>
<button
v-if="product.uuid"
class="absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 hover:bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center"
@click.stop="emit('pin', 'product', product)"
>
<Icon name="lucide:pin" size="12" />
</button>
<ProductCard
:product="product"
compact
@@ -191,13 +184,6 @@
:key="supplier.uuid ?? index"
class="relative group"
>
<button
v-if="supplier.uuid"
class="absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 hover:bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center"
@click.stop="emit('pin', 'supplier', supplier)"
>
<Icon name="lucide:pin" size="12" />
</button>
<SupplierCard
:supplier="supplier"
selectable
@@ -235,13 +221,6 @@
:key="hub.uuid ?? index"
class="relative group"
>
<button
v-if="hub.uuid"
class="absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 hover:bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center"
@click.stop="emit('pin', 'hub', hub)"
>
<Icon name="lucide:pin" size="12" />
</button>
<HubCard
:hub="hub"
:origin="originCoords"
@@ -267,13 +246,6 @@
:key="hub.uuid ?? index"
class="relative group"
>
<button
v-if="hub.uuid"
class="absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 hover:bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center"
@click.stop="emit('pin', 'hub', hub)"
>
<Icon name="lucide:pin" size="12" />
</button>
<HubCard
:hub="hub"
:origin="originCoords"
@@ -286,11 +258,6 @@
</div>
</section>
<!-- Add to filter button -->
<button class="btn btn-primary btn-sm mt-2" @click="emit('add-to-filter')">
<Icon name="lucide:filter-plus" size="16" />
{{ $t('catalog.info.addToFilter') }}
</button>
</div>
</div>
</div>
@@ -326,8 +293,6 @@ const props = defineProps<{
const emit = defineEmits<{
'close': []
'add-to-filter': []
'pin': [type: 'product' | 'supplier' | 'hub', item: { uuid?: string | null; name?: string | null }]
'open-info': [type: InfoEntityType, uuid: string]
'select-product': [uuid: string | null]
'select-offer': [offer: { uuid: string; productUuid?: string | null }]

View File

@@ -31,13 +31,6 @@
@mouseenter="emit('hover', item.uuid ?? null)"
@mouseleave="emit('hover', null)"
>
<button
v-if="item.uuid"
class="absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 hover:bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center"
@click.stop="onPin(item)"
>
<Icon name="lucide:pin" size="12" />
</button>
<ProductCard
:product="item"
selectable
@@ -56,13 +49,6 @@
@mouseenter="emit('hover', item.uuid ?? null)"
@mouseleave="emit('hover', null)"
>
<button
v-if="item.uuid"
class="absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 hover:bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center"
@click.stop="onPin(item)"
>
<Icon name="lucide:pin" size="12" />
</button>
<HubCard
:hub="item"
selectable
@@ -80,13 +66,6 @@
@mouseenter="emit('hover', item.uuid ?? null)"
@mouseleave="emit('hover', null)"
>
<button
v-if="item.uuid"
class="absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 hover:bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center"
@click.stop="onPin(item)"
>
<Icon name="lucide:pin" size="12" />
</button>
<SupplierCard
:supplier="item"
selectable
@@ -129,7 +108,6 @@ const props = defineProps<{
const emit = defineEmits<{
'select': [type: string, item: Item]
'pin': [type: string, item: Item]
'close': []
'load-more': []
'hover': [uuid: string | null]
@@ -191,10 +169,4 @@ const onSelect = (item: Item) => {
emit('select', props.selectMode, item)
}
}
const onPin = (item: Item) => {
if (props.selectMode && item.uuid) {
emit('pin', props.selectMode, item)
}
}
</script>