From d03564a2d907681ebaacc71ac59c7156c1acf45f Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Sat, 24 Jan 2026 10:54:09 +0700 Subject: [PATCH] Add filter by map bounds checkbox to SelectionPanel - Remove map search input (was wrong implementation) - Add checkbox "In map area" to filter list by visible map bounds - Filter products/hubs/suppliers when checkbox is enabled - Disable "load more" when filtering by bounds (client-side only) --- app/components/catalog/SelectionPanel.vue | 13 ++++++ app/components/page/CatalogPage.vue | 28 +------------ app/pages/catalog/index.vue | 51 +++++++++++++++++++++-- i18n/locales/en/catalog.json | 2 +- i18n/locales/ru/catalog.json | 2 +- 5 files changed, 63 insertions(+), 33 deletions(-) diff --git a/app/components/catalog/SelectionPanel.vue b/app/components/catalog/SelectionPanel.vue index 85f4639..919c396 100644 --- a/app/components/catalog/SelectionPanel.vue +++ b/app/components/catalog/SelectionPanel.vue @@ -14,6 +14,17 @@ :placeholder="searchPlaceholder" class="input input-sm w-full bg-white/50 border-base-300/50 text-base-content placeholder:text-base-content/50" /> + + @@ -96,12 +107,14 @@ const props = defineProps<{ loading?: boolean loadingMore?: boolean hasMore?: boolean + filterByBounds?: boolean }>() const emit = defineEmits<{ 'select': [type: string, item: Item] 'close': [] 'load-more': [] + 'update:filter-by-bounds': [value: boolean] }>() const { t } = useI18n() diff --git a/app/components/page/CatalogPage.vue b/app/components/page/CatalogPage.vue index 9d314dd..3c05515 100644 --- a/app/components/page/CatalogPage.vue +++ b/app/components/page/CatalogPage.vue @@ -38,29 +38,6 @@ {{ $t('common.loading') }} - - -