feat: structured victories/education with photos, links, and editorial profile layout
- Add VictoryItem type (place, category, competition, location, date, image, link) - Add RichListItem type for education with image/link support - Backward-compatible DB parsing for old string[] formats - Admin forms with structured fields and image upload per item - Victory/education cards with photo overlay and lightbox - Remove max-width constraint from trainer profile for full-width layout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,8 @@ import { useState, useEffect } from "react";
|
||||
import { useRouter, useParams } from "next/navigation";
|
||||
import Image from "next/image";
|
||||
import { Save, Loader2, Check, ArrowLeft, Upload } from "lucide-react";
|
||||
import { InputField, TextareaField, ListField } from "../../_components/FormField";
|
||||
import { InputField, TextareaField, ListField, VictoryListField, VictoryItemListField } from "../../_components/FormField";
|
||||
import type { RichListItem, VictoryItem } from "@/types/content";
|
||||
|
||||
interface MemberForm {
|
||||
name: string;
|
||||
@@ -13,8 +14,8 @@ interface MemberForm {
|
||||
instagram: string;
|
||||
description: string;
|
||||
experience: string[];
|
||||
victories: string[];
|
||||
education: string[];
|
||||
victories: VictoryItem[];
|
||||
education: RichListItem[];
|
||||
}
|
||||
|
||||
export default function TeamMemberEditorPage() {
|
||||
@@ -211,13 +212,12 @@ export default function TeamMemberEditorPage() {
|
||||
onChange={(items) => setData({ ...data, experience: items })}
|
||||
placeholder="Например: 10 лет в танцах"
|
||||
/>
|
||||
<ListField
|
||||
<VictoryItemListField
|
||||
label="Достижения"
|
||||
items={data.victories}
|
||||
onChange={(items) => setData({ ...data, victories: items })}
|
||||
placeholder="Например: 1 место — чемпионат..."
|
||||
/>
|
||||
<ListField
|
||||
<VictoryListField
|
||||
label="Образование"
|
||||
items={data.education}
|
||||
onChange={(items) => setData({ ...data, education: items })}
|
||||
|
||||
Reference in New Issue
Block a user