feat: add vendor notifications and analytics pages (Phase 3)

New pages:
- Notifications center: view, mark read, delete, settings modal
- Analytics: period selector, stats overview, feature-gated advanced metrics

Changes:
- Add routes for /vendor/{code}/notifications and /analytics
- Create notifications.js and analytics.js with full functionality
- Create notifications.html and analytics.html templates
- Update sidebar with Analytics link and Notifications in Customers section
- Update vendor-frontend-parity-plan.md to mark Phase 3 complete

Vendor frontend now at ~95% parity with admin.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-01 16:35:52 +01:00
parent 463e1b67d5
commit 646d789af7
7 changed files with 1009 additions and 10 deletions

View File

@@ -5,7 +5,7 @@
## Executive Summary
The vendor frontend is now approximately 90% complete compared to admin. Phase 1 (Sidebar Refactor) and Phase 2 (Core JS Files) are complete. Only Phase 3 (New Features like notifications and analytics) remains.
The vendor frontend is now approximately 95% complete compared to admin. Phase 1 (Sidebar Refactor), Phase 2 (Core JS Files), and Phase 3 (Notifications + Analytics) are complete. Only bulk operations remain as optional enhancements.
---
@@ -21,6 +21,7 @@ The vendor frontend is now approximately 90% complete compared to admin. Phase 1
### New Sidebar Structure
```
Dashboard
Analytics
├── Products & Inventory (collapsible)
│ ├── All Products
│ ├── Inventory
@@ -31,7 +32,8 @@ Dashboard
│ └── Invoices
├── Customers & Communication (collapsible)
│ ├── Customers
── Messages
── Messages
│ └── Notifications
├── Shop & Content (collapsible)
│ └── Content Pages
└── Account & Settings (collapsible)
@@ -97,8 +99,8 @@ Dashboard
| Profile | - | ✅ | Complete |
| Settings | ✅ | ✅ | Complete |
| Content Pages | ✅ | ✅ | Complete |
| Notifications | ✅ | | Missing page + JS |
| Analytics | ✅ | | Missing page |
| Notifications | ✅ | | Complete |
| Analytics | ✅ | | Complete |
---
@@ -106,8 +108,8 @@ Dashboard
| Type | Admin | Vendor | Target |
|------|-------|--------|--------|
| Total JS Files | 52 | 18 | 20+ |
| Page Coverage | ~90% | ~90% | 90%+ |
| Total JS Files | 52 | 20 | 20+ |
| Page Coverage | ~90% | ~95% | 90%+ |
---
@@ -142,7 +144,7 @@ Dashboard
- [x] settings.js
- [x] content-pages.js (already exists)
### Phase 3: New Features
- [ ] Notifications center
- [ ] Analytics page
- [ ] Bulk operations
### Phase 3: New Features
- [x] Notifications center
- [x] Analytics page
- [ ] Bulk operations (optional enhancement)