Add target price alerts, historical low indicator, bulk actions, and dashboard summary

Features:
- Target price alerts: Set a specific price target and get notified when reached
- Historical low indicator: Badge showing when current price is at/near all-time low
- Bulk actions: Select multiple products to delete at once
- Dashboard summary: Shows total products, items at lowest price, at target, biggest drops

Backend changes:
- Add target_price column to products table
- Add target_price notification type with Telegram/Discord support
- Include min_price in product queries for historical low detection
- Update scheduler to check target price conditions

Frontend changes:
- Add target price input to ProductDetail notification settings
- Show target price badge on product cards
- Add "Lowest Price" and "Near Low" badges to product cards
- Add bulk selection mode with checkboxes
- Add dashboard summary cards at top of product list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
clucraft 2026-01-21 13:40:39 -05:00
parent 2acc47c21c
commit a85e22d8bc
9 changed files with 454 additions and 5 deletions

View file

@ -129,12 +129,13 @@ router.put('/:id', async (req: AuthRequest, res: Response) => {
return;
}
const { name, refresh_interval, price_drop_threshold, notify_back_in_stock } = req.body;
const { name, refresh_interval, price_drop_threshold, target_price, notify_back_in_stock } = req.body;
const product = await productQueries.update(productId, userId, {
name,
refresh_interval,
price_drop_threshold,
target_price,
notify_back_in_stock,
});