fix(catalog): add badge when selecting from list + fix checkbox position
All checks were successful
Build Docker Image / build (push) Successful in 3m51s
All checks were successful
Build Docker Image / build (push) Successful in 3m51s
- onSelectItem now calls selectItem to add filter badge - Checkbox repositioned to left-[420px] to not hide behind panel - Hide List button when panel is open
This commit is contained in:
@@ -39,8 +39,9 @@
|
|||||||
<span class="text-white text-sm">{{ $t('common.loading') }}</span>
|
<span class="text-white text-sm">{{ $t('common.loading') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- List button (LEFT, opens panel) -->
|
<!-- List button (LEFT, opens panel) - hide when panel is open -->
|
||||||
<button
|
<button
|
||||||
|
v-if="!isPanelOpen"
|
||||||
class="absolute top-[116px] left-4 z-20 hidden lg:flex items-center gap-2 bg-black/30 backdrop-blur-md rounded-lg px-3 py-1.5 border border-white/10 text-white text-sm hover:bg-black/40 transition-colors"
|
class="absolute top-[116px] left-4 z-20 hidden lg:flex items-center gap-2 bg-black/30 backdrop-blur-md rounded-lg px-3 py-1.5 border border-white/10 text-white text-sm hover:bg-black/40 transition-colors"
|
||||||
@click="openPanel"
|
@click="openPanel"
|
||||||
>
|
>
|
||||||
@@ -48,10 +49,10 @@
|
|||||||
<span>{{ $t('catalog.list') }}</span>
|
<span>{{ $t('catalog.list') }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Filter by bounds checkbox (LEFT, next to list button, only when panel is open) -->
|
<!-- Filter by bounds checkbox (LEFT, next to panel when open) -->
|
||||||
<label
|
<label
|
||||||
v-if="isPanelOpen"
|
v-if="isPanelOpen"
|
||||||
class="absolute top-[116px] left-32 z-20 hidden lg:flex items-center gap-2 bg-black/30 backdrop-blur-md rounded-lg px-3 py-1.5 border border-white/10 cursor-pointer text-white text-sm hover:bg-black/40 transition-colors"
|
class="absolute top-[116px] left-[420px] z-20 hidden lg:flex items-center gap-2 bg-black/30 backdrop-blur-md rounded-lg px-3 py-1.5 border border-white/10 cursor-pointer text-white text-sm hover:bg-black/40 transition-colors"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@@ -415,11 +415,10 @@ const onMapSelect = async (item: any) => {
|
|||||||
setLabel(infoType, itemId, itemName)
|
setLabel(infoType, itemId, itemName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle selection from SelectionPanel - open Info and close panel
|
// Handle selection from SelectionPanel - add to filter (show badge in search)
|
||||||
const onSelectItem = (type: string, item: any) => {
|
const onSelectItem = (type: string, item: any) => {
|
||||||
if (item.uuid && item.name) {
|
if (item.uuid && item.name) {
|
||||||
openInfo(type as 'hub' | 'supplier' | 'offer', item.uuid)
|
selectItem(type, item.uuid, item.name)
|
||||||
setLabel(type, item.uuid, item.name)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user