Michael Chus
d7285fc730
fix: prevent PricingHandler panics in offline mode
**Problem:**
Opening /admin/pricing page caused nil pointer panic when offline
because PricingHandler methods accessed nil repositories.
**Solution:**
Added offline checks to all PricingHandler public methods:
1. **GetStats** - returns empty stats with offline flag
2. **ListComponents** - returns empty list with message
3. **GetComponentPricing** - returns 503 with offline error
4. **UpdatePrice** - blocks mutations with offline error
5. **RecalculateAll** - blocks recalculation with offline error
6. **PreviewPrice** - blocks preview with offline error
**Response format:**
```json
{
"offline": true,
"message": "Управление ценами доступно только в онлайн режиме",
"components": [],
"total": 0
}
```
**Impact:**
- ✅ No panics when viewing admin pricing offline
- ✅ Clear offline status indication
- ✅ Graceful degradation for all operations
- ✅ UI can detect offline and show appropriate message
Fixes Phase 2.5 admin panel offline issue.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 07:17:58 +03:00
..
2026-01-23 10:49:56 +03:00
2026-02-02 23:29:04 +03:00
2026-02-03 07:17:58 +03:00
2026-02-03 07:10:53 +03:00
2026-02-02 23:29:04 +03:00
2026-02-01 11:00:32 +03:00
2026-02-01 22:20:23 +03:00
2026-02-03 07:10:53 +03:00