feat(admin): full CRUD + enable/disable for locations, categories, subcategories
- Migration 011: add is_active INTEGER NOT NULL DEFAULT 1 to locations, categories, subcategories (idempotent) - Admin routes: locations edit + toggle, categories toggle, subcategories edit + toggle (parallel endpoints on /catalog) - Bot-side services: filter is_active=1 on locationService/categoryService read methods (getLocationById/getCategoryById left unfiltered for purchase display) - Views: edit forms, toggle buttons, Active/Disabled badges, disabled row styling in locations.ejs, categories.ejs, catalog tree - Add Categories nav item in sidebar (folder icon) - Tests: 14 new tests for migration idempotency + service is_active filtering (23 total pass)
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
- **fix**: Added defensive guards in bot purchase display — description fallback and no-photo placeholder (userProductHandler.js)
|
||||
- **feat**: Added i18n keys `products.no_description` and `products.no_photo` in en/es/de
|
||||
- **fix**: Marked description and photo fields as required in admin forms (product-edit.ejs, products.ejs, catalog modal)
|
||||
- **feat**: Added edit + enable/disable (toggle is_active) UI for locations, categories, and subcategories in admin views (locations.ejs, categories.ejs, catalog.js buildTreeHtml)
|
||||
- **feat**: Added Categories nav item in admin sidebar (generated-navigation.ejs)
|
||||
|
||||
### v1.2.0 — 2026-07-08
|
||||
- **fix**: Disabled CSRF checks in admin panel for Tor / onion zone compatibility
|
||||
|
||||
Reference in New Issue
Block a user