fix: On-hold and trash color conflict, add dashboard tweaks plan

## 1. Fix On-hold/Trash Color Conflict 

**Issue:** Both statuses used same gray color (#6b7280)

**Solution:**
- On-hold: `#64748b` (Slate 500 - lighter)
- Trash: `#475569` (Slate 600 - darker)

**Result:** Distinct visual identity for each status

---

## 2. Dashboard Tweaks Plan 📋

Created `DASHBOARD_TWEAKS_TODO.md` with:

**Pending Tasks:**
1. **No Data State for Charts**
   - Revenue chart (Dashboard → Revenue)
   - Orders chart (Dashboard → Orders)
   - Coupons chart (Dashboard → Coupons)
   - Show friendly message like Overview does

2. **VIP Customer Settings**
   - New page: `/settings/customers`
   - Configure VIP qualification criteria:
     - Minimum total spent
     - Minimum order count
     - Timeframe (all-time, 30/90/365 days)
     - Require both or either
     - Exclude refunded orders
   - VIP detection logic documented

---

## Notification Settings Structure 

**Recommendation:** Separate subpages (not tabs)

**Structure:**
```
/settings/notifications (overview)
├── /settings/notifications/events (What to notify)
├── /settings/notifications/channels (How to notify)
└── /settings/notifications/templates (Email/channel templates)
```

**Reasoning:**
- Cleaner navigation
- Better performance (load only needed)
- Easier maintenance
- Scalability
- Mobile-friendly

---

## Summary

 Color conflict fixed
📋 Dashboard tweaks documented
 Notification structure decided (subpages)

**Next Steps:**
1. Implement no-data states
2. Build VIP settings page
3. Implement notification system
This commit is contained in:
dwindown
2025-11-11 00:23:35 +07:00
parent dd2ff2074f
commit 0aafb65ec0
3 changed files with 176 additions and 15 deletions

View File

@@ -371,13 +371,14 @@ class AnalyticsController {
// Format status distribution and calculate conversion rate
$formatted_status = [];
$status_colors = [
'wc-completed' => '#10b981',
'wc-processing' => '#3b82f6',
'wc-pending' => '#f59e0b',
'wc-on-hold' => '#6b7280',
'wc-cancelled' => '#ef4444',
'wc-refunded' => '#8b5cf6',
'wc-failed' => '#dc2626',
'wc-completed' => '#10b981', // Green
'wc-processing' => '#3b82f6', // Blue
'wc-pending' => '#f59e0b', // Orange/Amber
'wc-on-hold' => '#64748b', // Slate
'wc-cancelled' => '#ef4444', // Red
'wc-refunded' => '#8b5cf6', // Purple
'wc-failed' => '#dc2626', // Dark Red
'wc-trash' => '#475569', // Dark Slate
];
$total_all_orders = 0;
@@ -996,17 +997,18 @@ class AnalyticsController {
// Add color and percentage to status data - SORT BY IMPORTANCE
$status_colors = [
'completed' => '#10b981',
'processing' => '#3b82f6',
'pending' => '#f59e0b',
'cancelled' => '#ef4444',
'refunded' => '#8b5cf6',
'failed' => '#dc2626',
'on-hold' => '#6b7280',
'completed' => '#10b981', // Green
'processing' => '#3b82f6', // Blue
'pending' => '#f59e0b', // Orange/Amber
'cancelled' => '#ef4444', // Red
'refunded' => '#8b5cf6', // Purple
'failed' => '#dc2626', // Dark Red
'on-hold' => '#64748b', // Slate (changed from gray)
'trash' => '#475569', // Dark Slate (distinct from on-hold)
];
// Define sort order (most important first)
$status_order = ['completed', 'processing', 'pending', 'on-hold', 'cancelled', 'refunded', 'failed'];
$status_order = ['completed', 'processing', 'pending', 'on-hold', 'cancelled', 'refunded', 'failed', 'trash'];
foreach ($formatted_status as &$status) {
$status['color'] = $status_colors[$status['status']] ?? '#6b7280';