Commit Graph

294 Commits

Author SHA1 Message Date
Ruslan Bakiev
2275f956ae Fix: hide mode toggle on home page, store mapViewMode in URL
All checks were successful
Build Docker Image / build (push) Successful in 3m56s
2026-01-26 15:44:44 +07:00
Ruslan Bakiev
6b359b177c Fix: trigger reactivity when setting filter labels
All checks were successful
Build Docker Image / build (push) Successful in 3m44s
2026-01-26 15:35:05 +07:00
Ruslan Bakiev
1c298951b1 Fix: entity type detection in selectProduct, handle offer in add-to-filter
All checks were successful
Build Docker Image / build (push) Successful in 3m47s
2026-01-26 15:29:17 +07:00
Ruslan Bakiev
c76750a738 Fix: InfoPanel not showing - use showPanel prop
All checks were successful
Build Docker Image / build (push) Successful in 3m48s
2026-01-26 15:13:06 +07:00
Ruslan Bakiev
2d83110ef1 Move filterByBounds to map, show only when panel is open
All checks were successful
Build Docker Image / build (push) Successful in 3m46s
2026-01-26 15:00:30 +07:00
Ruslan Bakiev
5ca995ebcc Move filterByBounds checkbox into SelectionPanel
Some checks failed
Build Docker Image / build (push) Has been cancelled
2026-01-26 14:56:40 +07:00
Ruslan Bakiev
3211c5a881 Rename drawer to panel, use selectMode for visibility
All checks were successful
Build Docker Image / build (push) Successful in 3m44s
2026-01-26 14:52:19 +07:00
Ruslan Bakiev
911de423f6 Fix SelectionPanel - click applies immediately, opens Info
Some checks failed
Build Docker Image / build (push) Has been cancelled
2026-01-26 14:49:55 +07:00
Ruslan Bakiev
a48dcf24ee Remove explore mode chips from MainNavigation
All checks were successful
Build Docker Image / build (push) Successful in 3m37s
2026-01-26 14:46:05 +07:00
Ruslan Bakiev
0efc4eddfd Simplify catalog UI - remove chips, add drawer for list
All checks were successful
Build Docker Image / build (push) Successful in 3m59s
- Remove product/hub chips from QuoteForm.vue (duplicate of toggle)
- Add drawer state to useCatalogSearch.ts (isDrawerOpen, selectDrawerItem, applyDrawerFilter)
- Convert SelectionPanel to drawer with header, scrollable content, and footer
- Add "Список" button to CatalogPage.vue to open drawer
- Add "Применить фильтр" button in drawer footer
- Add slide animations for drawer (left on desktop, up on mobile)
- Update translations: catalog.list, catalog.applyFilter
2026-01-26 14:36:42 +07:00
Ruslan Bakiev
65b07271d9 Simplify GEO API - use new list endpoints and routes in nearestOffers
All checks were successful
Build Docker Image / build (push) Successful in 4m11s
- Replace GetNodesDocument with HubsListDocument in useCatalogHubs.ts
- Replace GetSupplierProfilesDocument with SuppliersListDocument in useCatalogSuppliers.ts
- Replace manual grouping with ProductsListDocument in useCatalogProducts.ts
- Update nearestOffers to pass hubUuid for server-side route calculation
- Remove RouteToCoordinate calls - routes now included in nearestOffers response
- Delete 15 obsolete GraphQL files
- Add 3 new list endpoints: HubsList, SuppliersList, ProductsList
- Fix TypeScript errors in CalcResultContent, LocationsContent, hubs page, location store
2026-01-26 14:08:21 +07:00
Ruslan Bakiev
6d916d65a0 Show routes in hub info panel offers
All checks were successful
Build Docker Image / build (push) Successful in 3m47s
Replace OfferCard with OfferResultCard when displaying offers
for a hub after product selection. This shows the route stages
and distance to the hub instead of just offer info.
2026-01-26 08:36:14 +07:00
Ruslan Bakiev
2b6cccdead Fix all TypeScript errors and remove Storybook
All checks were successful
Build Docker Image / build (push) Successful in 5m8s
- Remove all Storybook files and configuration
- Add type declarations for @vueuse/core, @formkit/core, vue3-apexcharts
- Fix TypeScript configuration (typeRoots, include paths)
- Fix Sentry config - move settings to plugin
- Fix nullable prop assignments with ?? operator
- Fix type narrowing issues with explicit type assertions
- Fix Card component linkable computed properties
- Update codegen with operationResultSuffix
- Fix GraphQL operation type definitions
2026-01-26 00:32:36 +07:00
Ruslan Bakiev
b326d8cd76 Fix supplierUuid -> uuid parameter in GetSupplierProfile call
All checks were successful
Build Docker Image / build (push) Successful in 3m32s
2026-01-25 22:38:59 +07:00
Ruslan Bakiev
ed7dec304f Update geo GraphQL types after backend fixes
All checks were successful
Build Docker Image / build (push) Successful in 3m25s
2026-01-25 22:20:47 +07:00
Ruslan Bakiev
cc52aa6179 Fix supplier info and catalog filtering bugs
All checks were successful
Build Docker Image / build (push) Successful in 3m22s
1. Add latitude/longitude to GetSupplierProfile query
   - Without coordinates, supplier merge overwrites geo node data
   - Causes "Supplier has no coordinates" warning and no offers loading
   - Affects: useCatalogInfo.ts loadSupplierInfo() and useCatalogProducts.ts fetchProducts()

2. Add bounds validation in catalog composables
   - Validate bounds coordinates before passing to GraphQL or using in filters
   - Prevents 400 errors when bounds contain NaN/undefined/Infinity
   - Fixed in: useCatalogHubs.ts and useCatalogSuppliers.ts

Fixes:
- https://optovia.ru/catalog?info=supplier:c7f2e3f1-b16a-423d-a947-359e30858d94
- https://optovia.ru/catalog?select=hub 400 error

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 21:01:23 +07:00
Ruslan Bakiev
50375f2a74 Refactor catalog to use coordinate-based GraphQL endpoints
All checks were successful
Build Docker Image / build (push) Successful in 3m33s
Replace entity-specific queries (GetProductsNearHub, GetOffersByHub, GetHubsForProduct, GetSuppliersForProduct) with unified coordinate-based endpoints (NearestHubs, NearestOffers, NearestSuppliers, RouteToCoordinate). This simplifies backend architecture from 18 to 8 core endpoints while maintaining identical UI/UX behavior.

All composables and pages now use coordinates + client-side grouping instead of specialized backend queries. For global product filtering, uses center point (0,0) with 20000km radius.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 17:39:33 +07:00
Ruslan Bakiev
7403d4f063 Add coordinate-based GraphQL operations for geo API
All checks were successful
Build Docker Image / build (push) Successful in 3m31s
- Add NearestHubs.graphql - find hubs near coordinates
- Add NearestOffers.graphql - find offers near coordinates
- Add NearestSuppliers.graphql - find suppliers near coordinates
- Add RouteToCoordinate.graphql - route from offer to coordinates
- Regenerate geo-generated.ts with new operations

These operations simplify frontend logic by working with coordinates
instead of requiring entity-specific queries.
2026-01-25 17:28:40 +07:00
Ruslan Bakiev
39c3d24b3a Fix Info panel - translations, two-step offers flow, icon, add to filter
All checks were successful
Build Docker Image / build (push) Successful in 3m36s
- Add i18n translations for entities, tabs, and info sections (EN/RU)
- Refactor offers tab to two-step flow (products → offers) for Hub/Supplier
- Replace entity badge with circular icon in header
- Fix "Add to filter" button with name fallback and proper cleanup
- Update selectItem() to clear info param when adding to filter
2026-01-25 16:44:00 +07:00
Ruslan Bakiev
908d63062c Merge branch 'info-panel'
All checks were successful
Build Docker Image / build (push) Successful in 4m22s
2026-01-25 15:38:31 +07:00
Ruslan Bakiev
2ce3bd0bd2 Add Info panel for catalog with tabbed interface
Implemented Info mode для детального просмотра объектов каталога (hub/supplier/offer) с навигацией между связанными объектами.

Новые компоненты:
- InfoPanel.vue - панель с детальной информацией и табами для связанных объектов
- useCatalogInfo.ts - composable для управления Info state и загрузки данных

Изменения:
- useCatalogSearch.ts - добавлен infoId state и функции openInfo/closeInfo
- catalog/index.vue - интеграция InfoPanel, обработчики событий, relatedPoints для карты
- CatalogPage.vue - проброс relatedPoints в CatalogMap
- CatalogMap.vue - related points layer (cyan circles) для отображения связанных объектов

Флоу:
1. Клик на чип → Selection → Выбор → Info открывается
2. Клик на карту → Info открывается напрямую
3. В Info показываются табы со связанными объектами (top-12)
4. Клик на связанный объект → навигация к его Info
5. Кнопка "Добавить в фильтр" - добавляет объект в chips

URL sharing: ?info=type:uuid для шаринга ссылок

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 14:17:47 +07:00
Ruslan Bakiev
9b99d8981c Optimize catalog loading: backend bounds filtering + early returns
All checks were successful
Build Docker Image / build (push) Successful in 4m12s
- Add bounds (west/south/east/north) parameters to GetNodes query
- Add setBoundsFilter to useCatalogHubs, useCatalogSuppliers, useCatalogProducts
- Replace client-side bounds filtering with backend query
- Add early return to setProductFilter to avoid redundant fetches
- Watch filterByBounds to trigger backend refetch when checkbox changes
2026-01-24 12:19:00 +07:00
Ruslan Bakiev
8c753edb28 Add cascading filters for Explore mode
All checks were successful
Build Docker Image / build (push) Successful in 3m34s
When a product is selected, hubs and suppliers are filtered
to show only those that are relevant to that product.
2026-01-24 11:58:56 +07:00
Ruslan Bakiev
726c63efb7 Add GraphQL documents for cascading filters 2026-01-24 11:54:37 +07:00
Ruslan Bakiev
4d018323e7 Fix catalog issues: quantity input, checkbox position, glass header
All checks were successful
Build Docker Image / build (push) Successful in 3m21s
1. Quantity input in Quote mode: replaced button with inline number input
2. Checkbox position: moved to left side (next to panel) instead of right
3. MapPanel glass header: fixed sticky positioning by moving negative margins to children
2026-01-24 11:40:33 +07:00
Ruslan Bakiev
690c76ac79 Fix product selection from map offer click
All checks were successful
Build Docker Image / build (push) Successful in 3m22s
- Use GetOffer to fetch productUuid (not in cluster data)
- Handle both uuid and id properties from clusters
- Skip cluster items (id starts with 'cluster-')
2026-01-24 11:31:05 +07:00
Ruslan Bakiev
467f099130 Add unified MapPanel component for left map panels
All checks were successful
Build Docker Image / build (push) Successful in 3m25s
- Create MapPanel with white glass header, dark content
- Refactor SelectionPanel to use MapPanel
- Refactor QuotePanel to use MapPanel
- Single source of truth for panel styling
2026-01-24 11:20:32 +07:00
Ruslan Bakiev
7c566aeafc Fix SelectionPanel styling + add product filtering by supplier/hub
All checks were successful
Build Docker Image / build (push) Successful in 4m3s
- SelectionPanel header: dark glass style instead of white
- useCatalogProducts: filter by supplierId or hubId using dedicated queries
- catalog/index: connect filters from query params to composable
2026-01-24 11:13:22 +07:00
Ruslan Bakiev
2fc4dfb834 Add Airbnb-style "search as I move" checkbox + hover highlight
All checks were successful
Build Docker Image / build (push) Successful in 3m33s
- Move filter checkbox to right side, same line as view toggle
- Add hover events on selection cards to highlight map points
- Update translations: "Искать при перемещении" / "Search as I move the map"
2026-01-24 11:07:31 +07:00
Ruslan Bakiev
d03564a2d9 Add filter by map bounds checkbox to SelectionPanel
All checks were successful
Build Docker Image / build (push) Successful in 3m36s
- 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)
2026-01-24 10:54:09 +07:00
Ruslan Bakiev
74324ff337 Fix: align right navbar icons to top like logo
All checks were successful
Build Docker Image / build (push) Successful in 3m44s
2026-01-24 10:23:31 +07:00
Ruslan Bakiev
404375248b Fix catalog UI: navbar alignment, selection panel, map search, infinite scroll
All checks were successful
Build Docker Image / build (push) Successful in 3m37s
- Fix team selector alignment in navbar (use items-center, fixed height)
- Fix SelectionPanel header padding to account for parent p-4
- Add map search input (white glass, positioned next to panel)
- Add infinite scroll to SelectionPanel with IntersectionObserver
- Products load all at once (no server-side pagination yet)
- Hubs and Suppliers support pagination with loadMore
2026-01-24 10:09:55 +07:00
Ruslan Bakiev
2a607d0d2d 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
2026-01-24 09:47:41 +07:00
Ruslan Bakiev
3140226bc3 Navbar glass style only on catalog/map pages
All checks were successful
Build Docker Image / build (push) Successful in 3m46s
- Add glassStyle prop to MainNavigation component
- When glassStyle=true: dark transparent bg with white text
- When glassStyle=false: solid bg-base-100 with normal text
- Pass isCatalogSection from layout to toggle glass effect
2026-01-24 09:22:25 +07:00
Ruslan Bakiev
5e55443975 Fix map points: icons, color updates, loading state
All checks were successful
Build Docker Image / build (push) Successful in 3m41s
- Add entityType prop to CatalogMap for icon selection
- Change circle layers to symbol layers with entity-specific icons
- Icons: shopping bag (offers), warehouse (hubs), factory (suppliers)
- Add watcher to update colors when pointColor/entityType changes
- Clear old points and show loading indicator when switching view modes
- Add clearNodes function to useClusteredNodes composable
2026-01-24 09:18:27 +07:00
Ruslan Bakiev
63d81ab42f Search forms: white glass style (bg-white/80) for contrast
All checks were successful
Build Docker Image / build (push) Successful in 4m26s
2026-01-24 09:11:00 +07:00
Ruslan Bakiev
593aa0df12 Make map fullscreen behind transparent navbar
All checks were successful
Build Docker Image / build (push) Successful in 3m14s
2026-01-23 12:48:25 +07:00
Ruslan Bakiev
aa5a0a66fa Apply dark glass style (bg-black/30) to navbar, left panel, mobile panel
All checks were successful
Build Docker Image / build (push) Successful in 3m13s
2026-01-23 12:30:28 +07:00
Ruslan Bakiev
9d46bab93f Fix nav height, view toggle transparency, dynamic map colors by view mode
All checks were successful
Build Docker Image / build (push) Successful in 3m24s
2026-01-23 12:17:40 +07:00
Ruslan Bakiev
655c02d6fc Replace mode toggle with TradeScanner/Search nav links in header
All checks were successful
Build Docker Image / build (push) Successful in 3m14s
2026-01-23 12:11:48 +07:00
Ruslan Bakiev
999658aee1 UI: Glass effect everywhere, fix nav height, simplify quote form
All checks were successful
Build Docker Image / build (push) Successful in 3m9s
- Fixed nav height (h-20), logo and user menu aligned to top
- Quote form: removed colored circles, simple labels, search button inside pill
- Panels closer to nav (top-4 instead of top-20)
- Glass effect on all overlays (bg-base-100/70 backdrop-blur-md)
- Selection panel sticky headers with glass effect
2026-01-23 11:36:20 +07:00
Ruslan Bakiev
f31ceacdee Add catalog.json to i18n config (was missing)
All checks were successful
Build Docker Image / build (push) Successful in 3m14s
2026-01-23 11:02:23 +07:00
Ruslan Bakiev
5258347ccb UI fixes: header height, map color, panel scroll
All checks were successful
Build Docker Image / build (push) Successful in 3m10s
- MainNavigation: fixed min-height to prevent jumping on mode switch
- CatalogMap: default pointColor changed from green to orange (#f97316)
- CatalogPage: panel scroll on entire container, not inner
- SelectionPanel: sticky header and search, removed inner scroll
2026-01-23 10:53:21 +07:00
Ruslan Bakiev
fc6ce31659 Add unified icon system to navigation
All checks were successful
Build Docker Image / build (push) Successful in 3m14s
- Chips: colored circle with entity icon (product/hub/supplier)
- Active tokens: outline style with icon in circle
- Quote segments: labeled with colored circle icons
2026-01-23 10:35:59 +07:00
Ruslan Bakiev
4c6f5abd78 UI fixes: identical headers, panel styling, view toggle icons, sync map view
All checks were successful
Build Docker Image / build (push) Successful in 3m20s
- Show mode toggle on all pages (not just catalog)
- Panel background base-300, top-20 spacing from navbar
- View toggle with colored icons in circles
- Sync mapViewMode when selecting (supplier chip -> suppliers view)
2026-01-23 10:25:33 +07:00
Ruslan Bakiev
c7054579f1 Fix catalog: selection panels instead of modals, remove duplicate QuoteForm
All checks were successful
Build Docker Image / build (push) Successful in 3m55s
- Add SelectionPanel.vue for product/hub/supplier selection lists
- Remove QuoteForm from QuotePanel (header already has controls)
- Show SelectionPanel when selectMode is active
- Connect search button in header to page via shared state
2026-01-23 09:56:17 +07:00
Ruslan Bakiev
ae9985023c Add mode toggle [Explore|Quote] left of search form in header
All checks were successful
Build Docker Image / build (push) Successful in 3m43s
2026-01-22 20:57:37 +07:00
Ruslan Bakiev
c0f38a25cd Transform search bar in Quote mode to Airbnb-style segmented input
All checks were successful
Build Docker Image / build (push) Successful in 3m21s
- Remove mode toggle [Explore/Quote] tabs from header
- In Quote mode: show segmented input (Product | Hub | Quantity) + Search button
- In Explore mode: keep regular pill input with chips
- Add productLabel, hubLabel, supplierLabel computed values to useCatalogSearch
- Pass Quote mode props to MainNavigation
2026-01-22 20:52:06 +07:00
Ruslan Bakiev
7465b1d6a2 Move mode toggle to TopNav, view toggle to map right
All checks were successful
Build Docker Image / build (push) Successful in 3m32s
- Add [Explore/Quote] mode toggle to MainNavigation.vue (TopNav)
- Remove mode toggle from CatalogPage.vue (now in header)
- Move [Offers/Hubs/Suppliers] view toggle from top-left to top-right on map
- View toggle now visible in both modes (Explore and Quote)
- Simplify mobile layout to show only view toggle
2026-01-22 19:32:39 +07:00
Ruslan Bakiev
ddf691c83b Refactor catalog layout: mode toggle to top right, view toggle to top left
All checks were successful
Build Docker Image / build (push) Successful in 3m35s
- Move Explore/Quote mode toggle to top right corner
- Add view toggle (Offers/Hubs/Suppliers) to top left in Explore mode
- Panel shows only in Quote mode when showPanel prop is true
- Simplified panel slot structure
2026-01-22 19:20:11 +07:00