fix: reviews — correct pending/archive logic, rejected_at field, stats, reply email
- Migration 085: add rejected_at to reviews - pending = !isPublic && !reply && !rejectedAt - archived = isPublic || reply || rejectedAt - Stats: avgRating/NPS from all reviews; 'В архиве' = archived count - sendReply: no longer sets isPublic=true on negative reviews - reject: sets rejected_at=NOW() (distinct from pending) - restore: clears rejected_at (now actually works) - Badge 'Отклонён' for rejected reviews, opacity-60 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2
backend/migrations/085_reviews_rejected.sql
Normal file
2
backend/migrations/085_reviews_rejected.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Migration 085 — add rejected_at to reviews for explicit rejected state
|
||||
ALTER TABLE reviews ADD COLUMN IF NOT EXISTS rejected_at TIMESTAMPTZ;
|
||||
Reference in New Issue
Block a user