Files
sorsfonalak/services/frontend/src/components/AdminNav.tsx
T
fecoandClaude Opus 5.5 62ae4a438e Feedback in the system: ratings, messages, the recommendation question
- Under the summary, the detailed analyses, the forecast and tarot: "How
  tailored to you did it feel?" (1–5 stars); thumbs under answers. Only
  the owner rates, once (changeable); tags, a comment, and a permission
  to read the text; model and prompt version are kept with it
- /visszajelzes: bug, idea, question, other (the page and the browser go
  with it, 10 a day); the state and the operator's reply show there, a
  dot in the account menu marks a new reply. No e-mail, no Telegram
- One NPS question (0–10) in a bar under the header, after two finished
  contents; closing it counts
- Admin → Visszajelzések: numbers by kind, week, tags, model and prompt,
  buyers and others, NPS; ratings with filters, the text only if allowed;
  messages with state, internal note and reply; a count in the admin menu
- Nothing is public. Deleting an account keeps the stars without a name
  or comment; messages go. Privacy policy (hu, en) updated
- The admin menu no longer shows a vertical scrollbar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-24 07:01:40 +00:00

38 lines
1.4 KiB
TypeScript

import Link from "next/link";
import type { Role } from "@/lib/types";
import { FeedbackCount } from "./FeedbackCount";
const PAGES = [
{ href: "/admin", label: "Felhasználók" },
{ href: "/admin/meghivok", label: "Meghívók" },
{ href: "/admin/promokodok", label: "Promókódok" },
{ href: "/admin/ajandekok", label: "Ajándékok" },
{ href: "/admin/visszajelzesek", label: "Visszajelzések", count: true },
{ href: "/admin/hires-emberek", label: "Híres emberek", creator: true },
{ href: "/admin/promptok", label: "Promptok" },
{ href: "/admin/modellek", label: "Modellek" },
{ href: "/admin/hibak", label: "Hibanapló" },
];
/** May manage the famous people (an admin or a creator). */
export function canEditCelebrities(roles: Role[]): boolean {
return roles.includes("admin") || roles.includes("creator");
}
/** Switches between the admin pages (a creator who is no admin: only theirs). */
export function AdminNav({ current, roles }: { current: string; roles?: Role[] }) {
const admin = !roles || roles.includes("admin");
return (
<nav className="admin-nav" aria-label="Admin oldalak">
{PAGES.filter((p) => admin || ("creator" in p && p.creator)).map((p) => (
<Link key={p.href} href={p.href} aria-current={p.href === current ? "page" : undefined}>
{p.label}
{"count" in p && p.count && <FeedbackCount />}
</Link>
))}
</nav>
);
}