From 850ab3f2520206e81ba41ca48fc38448c68bf0e7 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:13:45 +0700 Subject: [PATCH] Add Explore/Quote dual mode to catalog page - Add CatalogMode type (explore/quote) to useCatalogSearch - Create ExplorePanel component with view toggle (offers/hubs/suppliers) - Create QuoteForm and QuotePanel components for search form - Refactor CatalogPage to fullscreen map with overlay panel - Simplify catalog/index.vue to use new components - Add translations for modes and quote form (ru/en) The catalog now has two modes: - Explore: Browse map with offers/hubs/suppliers toggle - Quote: Search form with product/hub/qty filters to find offers --- app/components/catalog/ExplorePanel.vue | 81 ++++ app/components/catalog/QuoteForm.vue | 129 ++++++ app/components/catalog/QuotePanel.vue | 81 ++++ app/components/page/CatalogPage.vue | 459 ++++++-------------- app/composables/useCatalogSearch.ts | 18 + app/pages/catalog/index.vue | 555 +++++++++--------------- i18n/locales/en/catalog.json | 17 + i18n/locales/en/common.json | 1 + i18n/locales/ru/catalog.json | 17 + i18n/locales/ru/common.json | 1 + 10 files changed, 694 insertions(+), 665 deletions(-) create mode 100644 app/components/catalog/ExplorePanel.vue create mode 100644 app/components/catalog/QuoteForm.vue create mode 100644 app/components/catalog/QuotePanel.vue diff --git a/app/components/catalog/ExplorePanel.vue b/app/components/catalog/ExplorePanel.vue new file mode 100644 index 0000000..058d557 --- /dev/null +++ b/app/components/catalog/ExplorePanel.vue @@ -0,0 +1,81 @@ + + + diff --git a/app/components/catalog/QuoteForm.vue b/app/components/catalog/QuoteForm.vue new file mode 100644 index 0000000..37c4222 --- /dev/null +++ b/app/components/catalog/QuoteForm.vue @@ -0,0 +1,129 @@ + + + diff --git a/app/components/catalog/QuotePanel.vue b/app/components/catalog/QuotePanel.vue new file mode 100644 index 0000000..516dd7c --- /dev/null +++ b/app/components/catalog/QuotePanel.vue @@ -0,0 +1,81 @@ + + + diff --git a/app/components/page/CatalogPage.vue b/app/components/page/CatalogPage.vue index c89975c..4bbf5b5 100644 --- a/app/components/page/CatalogPage.vue +++ b/app/components/page/CatalogPage.vue @@ -1,7 +1,7 @@ diff --git a/i18n/locales/en/catalog.json b/i18n/locales/en/catalog.json index 18eacb8..6d1da01 100644 --- a/i18n/locales/en/catalog.json +++ b/i18n/locales/en/catalog.json @@ -40,6 +40,23 @@ "offers": "Offers", "map": "Map" }, + "modes": { + "explore": "Explore", + "quote": "Get Quote" + }, + "quote": { + "title": "Get Quote", + "selectProduct": "Select product", + "selectHub": "Select hub", + "selectSupplier": "Select supplier", + "enterQty": "Quantity (t)", + "search": "Search", + "clear": "Clear" + }, + "explore": { + "title": "Explore the market", + "subtitle": "Switch between offers, hubs, and suppliers" + }, "offers": "offer | offers" } } diff --git a/i18n/locales/en/common.json b/i18n/locales/en/common.json index b51e7b4..ea0ebf5 100644 --- a/i18n/locales/en/common.json +++ b/i18n/locales/en/common.json @@ -18,6 +18,7 @@ "success": "Success", "retry": "Retry", "back": "Back", + "viewDetails": "View details", "list": "List", "map": "Map", "language": "Language", diff --git a/i18n/locales/ru/catalog.json b/i18n/locales/ru/catalog.json index 5909925..a7b0841 100644 --- a/i18n/locales/ru/catalog.json +++ b/i18n/locales/ru/catalog.json @@ -40,6 +40,23 @@ "offers": "Офферы", "map": "Карта" }, + "modes": { + "explore": "Исследовать", + "quote": "Найти офферы" + }, + "quote": { + "title": "Найти офферы", + "selectProduct": "Выберите товар", + "selectHub": "Выберите хаб", + "selectSupplier": "Выберите поставщика", + "enterQty": "Количество (т)", + "search": "Найти", + "clear": "Очистить" + }, + "explore": { + "title": "Исследуйте рынок", + "subtitle": "Переключайтесь между офферами, хабами и поставщиками" + }, "offers": "предложение | предложения | предложений" } } diff --git a/i18n/locales/ru/common.json b/i18n/locales/ru/common.json index 7fb1d9c..3139a38 100644 --- a/i18n/locales/ru/common.json +++ b/i18n/locales/ru/common.json @@ -18,6 +18,7 @@ "success": "Успех", "retry": "Повторить", "back": "Назад", + "viewDetails": "Подробнее", "list": "Список", "map": "Карта", "language": "Язык",