Commit Graph

10 Commits

Author SHA1 Message Date
Ruslan Bakiev
19aca61845 fix(catalog): prevent unnecessary list reloads on map movement
All checks were successful
Build Docker Image / build (push) Successful in 4m14s
- Remove currentMapBounds from watch - it changes on every map move
- Watch only filterByBounds and urlBounds (URL-based state)
- Add early return in setBoundsFilter if bounds haven't changed

This fixes the issue where the list was reloading on every map movement
even when the 'filter by bounds' checkbox was OFF.
2026-01-26 22:24:47 +07:00
Ruslan Bakiev
b02e3882cc feat(catalog): add bounds filtering to list queries
Some checks failed
Build Docker Image / build (push) Has been cancelled
- Add west/south/east/north params to HubsList, SuppliersList, ProductsList GraphQL
- Update useCatalogHubs to pass bounds to query
- Update useCatalogSuppliers to pass bounds to query
- Update useCatalogProducts to pass bounds to query
2026-01-26 21:37:23 +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
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
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
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
d6865d2129 UI improvements: filters, map layout, search bar
Some checks failed
Build Docker Image / build (push) Failing after 1m29s
- Add hubCountries query and country filter for hubs page
- Add getAvailableProducts query for offers (only products with active offers)
- Add sourceLatitude/sourceLongitude to orders GraphQL
- Fix ListMapLayout with position fixed for proper map height
- GlobalSearchBar: make fields wider, remove unit selector
- Remove status/isVerified filters from suppliers/offers (backend handles this)
2026-01-08 10:42:59 +07:00
Ruslan Bakiev
3db50d9637 Initial commit from monorepo 2026-01-07 09:10:35 +07:00