feat(admin): implement review and moderation center

New Reviews & Moderation feature (frontend only): moderation dashboard (real pending/approved/rejected/reported/spam counts, average rating, recent activity, moderation-health%, computed from the full review queue); reviews list with table/cards, density, saved column visibility, search/status/rating filters, bulk approve/reject/spam/hide/export; review detail shows customer/product/rating/text/photos/timeline/moderator-notes with a real moderation workflow (approve/reject/spam/hide/restore/pin/feature, feature disabled with an explanation unless the review is approved); reusable ReviewHealthWidget (rating/text/media/moderated/report-status/visible + completion%); reports queue lists reports against products/reviews/customers/categories with resolve/dismiss, and honestly renders 'Not available yet' rather than fabricating a value wherever a target can't be resolved (e.g. photos, customer-target reports). Backed by a new in-memory AdminModerationLocalGateway seeded from real product data - the same mock-gateway pattern already used by every other admin feature in this app (orders/products/categories), since no review/report backend exists to reuse. Replaced the 'Reviews' comingSoon nav placeholder with a working link; added full adminModeration i18n coverage.
This commit is contained in:
sdarbinyan
2026-07-18 22:01:16 +04:00
parent 097927f124
commit 3c9b425203
26 changed files with 1369 additions and 1 deletions

View File

@@ -1135,6 +1135,77 @@ export const hy: Translations = {
optionalDataMissingDescription: 'Optional config արժեքը բացակայում է։',
optionalDataMissingResolution: 'Ավելացրեք արժեքը, եթե UX-ը կախված է դրանից։',
},
adminModeration: {
search: 'Փնտրել ըստ հաճախորդի, ապրանքի կամ կարծիքի տեքստի…',
allStatuses: 'Բոլոր կարգավիճակները',
allRatings: 'Բոլոր գնահատականները',
rating: 'Գնահատական',
customer: 'Հաճախորդ',
product: 'Ապրանք',
reviewText: 'Կարծիք',
photos: 'Լուսանկարներ',
workflow: 'Գործողություններ',
approve: 'Հաստատել',
reject: 'Մերժել',
markSpam: 'Նշել որպես սպամ',
hide: 'Թաքցնել',
restore: 'Վերականգնել',
pin: 'Ամրացնել',
unpin: 'Հանել ամրացումը',
feature: 'Առանձնացնել',
unfeature: 'Հանել առանձնացումը',
featureDisabledHint: 'Առանձնացնել կարելի է միայն հաստատված կարծիքները։',
moderatorNotes: 'Մոդերատորի նշումներ',
notAvailable: 'Դեռ հասանելի չէ',
changeStatus: 'Փոխել կարգավիճակը',
hideSelected: 'Թաքցնել',
archiveSelected: 'Արխիվացնել',
reportsQueue: 'Բողոքների հերթ',
reportsColumn: 'Բողոքներ',
reportTarget: 'Բողոքարկված օբյեկտ',
reportType: 'Տեսակ',
reportReason: 'Պատճառ',
resolve: 'Լուծված',
dismiss: 'Մերժել',
reportsEmptyTitle: 'Բողոքներ չկան',
reportsEmptyDescription: 'Հաճախորդների բողոքները ապրանքների, կարծիքների կամ հաշիվների վերաբերյալ կհայտնվեն այստեղ։',
reportedCount: 'Բողոքարկված',
averageRating: 'Միջին գնահատական',
moderationHealth: 'Մոդերացիայի վիճակ',
emptyTitle: 'Կարծիքներ դեռ չկան',
emptyDescription: 'Կարծիքները կհայտնվեն այստեղ հաճախորդների առաջին գնահատականներից հետո։',
emptyGuide: 'Հաճախորդները թողնում են աստղանիշ գնահատական և տեքստ գնումից հետո։ Նոր կարծիքները ստանում են «Սպասման մեջ» կարգավիճակ, մինչև մոդերատորը հաստատի, մերժի կամ նշի որպես սպամ․ հաստատված կարծիքները դառնում են տեսանելի խանութում։ Փորձեք պարբերաբար մշակել սպասման հերթը։',
healthRating: 'Գնահատական',
healthText: 'Տեքստ',
healthMedia: 'Մեդիա',
healthModeration: 'Մոդերացված',
healthReportStatus: 'Բաց բողոքներ չկան',
healthVisibility: 'Տեսանելի է',
health: 'Վիճակ',
column_product: 'Ապրանք',
column_rating: 'Գնահատական',
column_status: 'Կարգավիճակ',
column_reports: 'Բողոքներ',
column_created: 'Ուղարկված է',
status: {
pending: 'Սպասման մեջ',
approved: 'Հաստատված',
rejected: 'Մերժված',
spam: 'Սպամ',
},
targetType: {
product: 'Ապրանք',
review: 'Կարծիք',
customer: 'Հաճախորդ',
category: 'Կատեգորիա',
unknown: 'Անհայտ',
},
reportStatus: {
open: 'Բաց',
resolved: 'Լուծված',
dismissed: 'Մերժված',
},
},
adminOrders: {
back: 'Վերադառնալ պատվերներին',
search: 'Փնտրել ըստ պատվերի համարի, անվան, էլ. փոստի կամ հեռախոսի…',
@@ -1536,6 +1607,7 @@ export const hy: Translations = {
categories: 'Կատեգորիաներ',
orders: 'Պատվերներ',
customers: 'Հաճախորդներ',
moderation: 'Կարծիքներ և մոդերացիա',
transactions: 'Գործարքներ',
reviews: 'Կարծիքներ',
reports: 'Հաշվետվություններ',
@@ -1576,6 +1648,9 @@ export const hy: Translations = {
orderDetail: { title: 'Պատվեր', description: 'Պատվերի մանրամասներն ու կարգավիճակը' },
customers: { title: 'Հաճախորդներ', description: 'Բոլորը, ովքեր պատվեր են կատարել' },
customerDetail: { title: 'Հաճախորդ', description: 'Հաճախորդի պրոֆիլ, պատվերներ և ակտիվություն' },
moderation: { title: 'Կարծիքներ և մոդերացիա', description: 'Դիտեք և մոդերացրեք հաճախորդների կարծիքները' },
reviewDetail: { title: 'Կարծիք', description: 'Կարծիքի մանրամասներ և մոդերացիայի գործողություններ' },
reportsQueue: { title: 'Բողոքների հերթ', description: 'Հաճախորդների կողմից բողոքարկված բովանդակություն' },
transactions: { title: 'Գործարքներ', description: 'Վճարումներ, վերադարձներ և կեղծիքի ստուգում' },
media: { title: 'Մեդիադարան', description: 'Ապրանքների և էջերի պատկերներ ու ֆայլեր' },
users: { title: 'Օգտատերեր', description: 'Ադմինիստրատորների թիմը և իրավունքները' },