/* ═══════════════════════════════════════════════════════════════ FEEDBACK TYPES Used by the public form (to render the tiles) and the admin triage view (to label them). The ids must match TYPES in server/src/routes/feedback.js, which decides what's storable; keep the two in step. DATA_REQUEST is kept out of the tiles: the Privacy page's form sends it (FeedbackForm's fixedType), with an email required. 'general' isn't offered anywhere; it's the server's fallback for a type it doesn't recognize, so old rows still read sensibly. ═══════════════════════════════════════════════════════════════ */ export const FEEDBACK_TYPES = [ { id: "broken", label: "Something's broken", hint: "A link, image, or button that doesn't work", }, { id: "confusing", label: "Hard to use", hint: "Something you couldn't find or follow", }, { id: "outdated", label: "Wrong or missing info", hint: "Old dates, typos, an event that isn't listed", }, { id: "request", label: "Feature request", hint: "Something you'd like the site to do", }, { id: "praise", label: "Kind words", hint: "Tell us what's working well", }, { id: "other", label: "Something else", hint: "Anything that doesn't fit the boxes above", }, ]; export const DATA_REQUEST = { id: "privacy", label: "Privacy or data request", hint: "A question about your data, or a request to see or delete it", }; const BY_ID = new Map([...FEEDBACK_TYPES, DATA_REQUEST].map((t) => [t.id, t.label])); export function feedbackTypeLabel(id) { return BY_ID.get(id) ?? (id === "general" ? "Unsorted" : id); }