feat(admin): archive tabs for business inquiries and reviews
Inquiries: completed and rejected inquiries move to an "Archiv" tab; resetting the status brings them back. Reviews: new "Ablehnen" action (Review.rejectedAt) instead of only deleting; the archive shows decided reviews in two columns, accepted and rejected, and either decision can be reversed. Pending counters in the sidebar and dashboard exclude rejected reviews, and the product page tells the author their review was not published instead of "still being checked". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
866d3726d1
commit
f1c0da4673
16 files changed
+460
-114
No files matched your search
@@ -0,0 +1,5 @@
|
||||
-- Abgelehnte Bewertungen werden nicht mehr geloescht, sondern markiert und
|
||||
-- im Archiv unter "Abgelehnt" gefuehrt. null = nicht abgelehnt.
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "reviews" ADD COLUMN "rejectedAt" TIMESTAMP(3);
|
||||
@@ -326,6 +326,10 @@ model Review {
|
||||
/// Nur freigeschaltete Bewertungen werden auf der Produktseite angezeigt —
|
||||
/// einfache Missbrauchskontrolle durch den Admin vor Veroeffentlichung.
|
||||
isApproved Boolean @default(false)
|
||||
/// Vom Admin abgelehnt: bleibt im Archiv nachvollziehbar statt geloescht zu
|
||||
/// werden. Offen ist eine Bewertung, solange weder isApproved noch
|
||||
/// rejectedAt gesetzt ist (siehe lib/review-status.ts).
|
||||
rejectedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
|
||||
Reference in new issue
Block a user