Fix catalog UI issues
All checks were successful
Build Docker Image / build (push) Successful in 3m31s

1. Fix navbar height - prevent tag wrapping with overflow-hidden
2. Fix translation keys for mode labels and search form labels
3. Fix SelectionPanel - white glass header/search, no top gap
4. Map click fills active selector - emit full properties from map
This commit is contained in:
Ruslan Bakiev
2026-01-24 09:47:41 +07:00
parent 3140226bc3
commit 2a607d0d2d
5 changed files with 68 additions and 29 deletions

View File

@@ -129,7 +129,43 @@ const mapPointColor = computed(() => {
// Handle map item selection
const onMapSelect = (item: any) => {
// Navigate to offer detail page if in quote mode with results
// If in selection mode, use map click to fill the selector
if (selectMode.value && item.uuid) {
const itemName = item.name || item.uuid.slice(0, 8) + '...'
// For hubs selection - click on hub fills hub selector
if (selectMode.value === 'hub' && mapViewMode.value === 'hubs') {
selectItem('hub', item.uuid, itemName)
showQuoteResults.value = false
offers.value = []
return
}
// For supplier selection - click on supplier fills supplier selector
if (selectMode.value === 'supplier' && mapViewMode.value === 'suppliers') {
selectItem('supplier', item.uuid, itemName)
showQuoteResults.value = false
offers.value = []
return
}
// For product selection viewing offers - try to find product in loaded list
if (selectMode.value === 'product' && mapViewMode.value === 'offers') {
// The offer has product info - we'll look it up from the products list if loaded
// or just use the offer's product_uuid if available
const product = products.value.find((p: any) => p.uuid === item.productUuid)
if (product) {
selectItem('product', product.uuid, product.name || itemName)
} else if (item.productUuid) {
selectItem('product', item.productUuid, item.productName || itemName)
}
showQuoteResults.value = false
offers.value = []
return
}
}
// Default behavior for quote mode etc
if (catalogMode.value === 'quote' && item.uuid) {
console.log('Selected from map:', item)
}