feat: rebuild Catalog with collapsible tree + product table + photo upload

- Left panel: collapsible tree (Country → City → District → Category → Subcategory)
  - Quick-add buttons: + City, + District, + Category, + Subcategory
  - Delete buttons with confirmation on all nodes
  - Product count badges on each node
  - Click node to filter right panel
- Right panel: Product table with Photo, Name, Category, Subcategory, Price, Stock
  - Edit (✎) and Delete (✕) buttons per row
  - Add Product modal with all fields
- Product edit form: name, price, stock, description, category, subcategory (JS filtered),
  photo_url/hidden_photo_url (URL or file upload), hidden_coordinates, hidden_description, private_data
- Multer file upload for photos stored in /uploads/
- Routes: add-city, add-district, product CRUD with photo upload
- Product JSON API for modal editing
- Responsive grid: tree (320px) + table (1fr)
This commit is contained in:
NW
2026-06-22 21:42:56 +01:00
parent c7bf3f132c
commit 935c6df1dc
9 changed files with 374 additions and 316 deletions

View File

@@ -14,6 +14,7 @@ services:
- .env
volumes:
- ./db:/app/db/ # Синхронизация базы данных (persistence)
- ./uploads:/app/uploads/ # Uploaded product photos
- ./wg/start.sh:/app/start.sh # Монтируем start.sh (генерирует wg0.conf из env)
cap_add: # Минимальные привилегии, необходимые только для WireGuard
- NET_ADMIN